/* Zanzibar Pocket - warstwa wizualna.
   Kolory zdjęte z grafik: turkus laguny, granat, hibiskus, piasek.
   Font Caveat (SIL Open Font License) osadzony lokalnie - nic nie leci do sieci. */

@font-face {
  font-family: 'Caveat'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(img/caveat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Caveat'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(img/caveat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ocean: #0f6b7d;
  --ocean2: #17919f;
  --aqua: #5ccbd6;
  --navy: #123a4a;
  --coral: #e8543f;
  --sand: #f7e6c9;
  --leaf: #2f8f4e;
  --bg: #eef6f8;
  --card: #ffffff;
  --tint: #e4f4f6;
  --ink: #123a4a;
  --ink-soft: #5c7a83;
  --line: #dbeaee;
  --shadow: 0 2px 6px rgba(18,58,74,.05), 0 12px 26px rgba(18,58,74,.07);
  --r: 20px;
  --r-sm: 14px;
  --tabh: 66px;
}
[data-theme="dark"] {
  --ocean: #4ec3d4; --ocean2: #6fd6e2; --aqua: #8fe3ec; --navy: #d8eef2;
  --coral: #ff7a5c; --sand: #3a3121; --leaf: #57c885;
  --bg: #0b171b; --card: #14252b; --tint: #16323a;
  --ink: #e8f4f6; --ink-soft: #93b0b8; --line: #21383f;
  --shadow: 0 2px 6px rgba(0,0,0,.28), 0 12px 26px rgba(0,0,0,.34);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ocean: #4ec3d4; --ocean2: #6fd6e2; --aqua: #8fe3ec; --navy: #d8eef2;
    --coral: #ff7a5c; --sand: #3a3121; --leaf: #57c885;
    --bg: #0b171b; --card: #14252b; --tint: #16323a;
    --ink: #e8f4f6; --ink-soft: #93b0b8; --line: #21383f;
    --shadow: 0 2px 6px rgba(0,0,0,.28), 0 12px 26px rgba(0,0,0,.34);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--tabh) + env(safe-area-inset-bottom));
  overscroll-behavior-y: none;
}
h1, h2, h3 { line-height: 1.25; margin: 0; }
button { font: inherit; color: inherit; }
a { color: var(--ocean); }
.script { font-family: 'Caveat', 'Segoe Script', cursive; font-weight: 600; }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 30;
  padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top));
  display: flex; align-items: center; gap: 11px;
  background: linear-gradient(120deg, #0a4f5e 0%, #0f6b7d 45%, #17919f 100%);
  color: #fff; box-shadow: 0 4px 18px rgba(10,60,72,.28);
}
header .logo { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 1px 3px rgba(0,0,0,.25)); }
header .ttl { flex: 1; min-width: 0; }
header h1 { font-size: 18px; font-weight: 800; letter-spacing: .2px; }
header h1 span { color: var(--aqua); }
header .sub { font-size: 11.5px; opacity: .9; margin-top: 1px; }
header button {
  background: rgba(255,255,255,.18); border: 0; color: #fff;
  width: 38px; height: 38px; border-radius: 12px; font-size: 17px; cursor: pointer; flex: none;
}
header button:active { background: rgba(255,255,255,.32); }

/* ---------- layout ---------- */
main { padding: 14px 14px 26px; max-width: 720px; margin: 0 auto; }
section[hidden] { display: none !important; }
.card {
  background: var(--card); border-radius: var(--r);
  padding: 16px; margin-bottom: 13px; box-shadow: var(--shadow);
}
.card h2 {
  font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 12px;
  display: flex; align-items: center; gap: 9px;
}
.card h2 img { width: 30px; height: 30px; flex: none; }
.muted { color: var(--ink-soft); font-size: 13.5px; }
.hint {
  font-size: 13px; color: var(--ink-soft); background: var(--tint);
  border-radius: 12px; padding: 10px 12px; margin-top: 11px;
}
.hint b { color: var(--ink); }
.warn { background: rgba(232,84,63,.1); color: #a03a25; }
[data-theme="dark"] .warn { color: #ffb49e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .warn { color: #ffb49e; } }

/* ---------- hero ---------- */
.hero {
  position: relative; height: 152px; border-radius: 22px; overflow: hidden;
  margin-bottom: 14px; display: flex; align-items: flex-end; padding: 15px 17px;
  color: #fff; box-shadow: var(--shadow); isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: var(--img); background-size: cover; background-position: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  /* pionowy cień pod tekst + poziomy od lewej, bo zdjęcia bywają jasne w tym rogu */
  background:
    linear-gradient(180deg, rgba(6,45,56,0) 30%, rgba(6,45,56,.8) 100%),
    linear-gradient(90deg, rgba(6,45,56,.55) 0%, rgba(6,45,56,.1) 55%, rgba(6,45,56,0) 100%);
}
.hero h2 { font-size: 25px; font-weight: 800; text-shadow: 0 2px 12px rgba(0,20,26,.5); }
.hero .script { font-size: 20px; margin-top: 1px; text-shadow: 0 2px 10px rgba(0,20,26,.55); }

/* ---------- tabs ---------- */
nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 20px rgba(18,58,74,.07);
}
nav.tabs button {
  border: 0; background: none; padding: 7px 2px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; color: var(--ink-soft); height: var(--tabh); justify-content: center;
}
nav.tabs button img { width: 30px; height: 30px; filter: grayscale(.35) opacity(.8); transition: .2s; }
nav.tabs button.on { color: var(--ocean); font-weight: 700; }
nav.tabs button.on img { filter: none; transform: translateY(-2px) scale(1.12); }

/* ---------- przypływy ---------- */
.tide-now { text-align: center; padding: 20px 16px 18px; }
.tide-state { font-size: 14.5px; color: var(--ink-soft); }
.tide-big { font-size: 46px; font-weight: 800; letter-spacing: -1.5px; margin: 2px 0 4px; color: var(--ocean); }
.tide-big small { font-size: 16px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.gauge { height: 14px; border-radius: 99px; background: var(--tint); overflow: hidden; margin: 14px 0 6px; }
.gauge > div { height: 100%; background: linear-gradient(90deg, var(--aqua), var(--ocean2)); border-radius: 99px; transition: width .5s; }
.gauge-lbl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-soft); }
.nextev { display: flex; gap: 10px; margin-top: 15px; }
.nextev div { flex: 1; background: var(--tint); border-radius: 16px; padding: 11px 8px; text-align: center; }
.nextev b { display: block; font-size: 22px; font-weight: 800; color: var(--ink); }
.nextev span { font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.nextev small { font-size: 11.5px; color: var(--ink-soft); }
.day-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.day-row:last-child { border: 0; }
.day-row .dt { width: 76px; font-size: 13px; color: var(--ink-soft); flex: none; font-weight: 600; }
.day-row .evs { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 12.5px; padding: 4px 10px; border-radius: 99px; white-space: nowrap; font-weight: 600; }
.pill.hw { background: var(--ocean); color: #fff; }
.pill.lw { background: var(--sand); color: #8a6520; }
[data-theme="dark"] .pill.lw { color: #e6cb95; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.lw { color: #e6cb95; } }

/* ---------- formularze ---------- */
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ocean2); outline-offset: -1px; }
label { display: block; font-size: 12.5px; color: var(--ink-soft); margin: 11px 0 4px; font-weight: 700; }
.row { display: flex; gap: 9px; }
.row > * { flex: 1; }
.btn {
  border: 0; border-radius: var(--r-sm); padding: 13px 15px; font-weight: 700; cursor: pointer;
  background: linear-gradient(135deg, var(--ocean), var(--ocean2)); color: #fff; width: 100%;
  box-shadow: 0 4px 12px rgba(15,107,125,.25);
}
[data-theme="dark"] .btn { color: #06222a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { color: #06222a; } }
.btn:active { transform: translateY(1px); }
.btn.sec { background: var(--tint); color: var(--ocean); box-shadow: none; }
.btn.ghost { background: none; border: 1.5px solid var(--line); color: var(--ink-soft); box-shadow: none; }
.btn.mini { width: auto; padding: 10px 14px; font-size: 14px; }

/* ---------- rozmówki ---------- */
.search { position: sticky; top: 68px; z-index: 20; background: var(--bg); padding: 2px 0 10px; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 11px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 0; background: var(--card); border-radius: 99px; color: var(--ink-soft);
  padding: 9px 15px; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
  box-shadow: 0 2px 8px rgba(18,58,74,.06);
}
.chip.on { background: linear-gradient(135deg, var(--ocean), var(--ocean2)); color: #fff; }
.ph { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.ph:last-child { border: 0; }
.ph .sw { flex: 1; }
.ph .sw b { font-size: 17.5px; font-weight: 800; }
.ph .sw .pron { font-size: 13px; color: var(--coral); font-weight: 700; letter-spacing: .3px; }
.ph .sw .pl { font-size: 14px; color: var(--ink-soft); margin-top: 1px; }
.ph .say {
  flex: none; border: 0; background: var(--tint); color: var(--ocean); border-radius: 13px;
  width: 42px; height: 42px; font-size: 18px; cursor: pointer;
}
.fav { flex: none; background: none; border: 0; font-size: 20px; cursor: pointer; opacity: .25; padding: 6px 2px; color: var(--ink-soft); }
.fav.on { opacity: 1; color: #f0a92c; }

/* ---------- kasa ---------- */
.conv { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.conv label { margin: 0; width: 54px; flex: none; font-size: 15px; color: var(--ink); font-weight: 800; }
.conv input { font-size: 19px; font-weight: 700; text-align: right; }
.exp { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.exp .who { flex: 1; }
.exp .who b { display: block; font-size: 15px; }
.exp .amt { font-weight: 800; white-space: nowrap; }
.exp .del, .place .del, .contact .del { background: none; border: 0; color: var(--ink-soft); font-size: 17px; cursor: pointer; padding: 4px 6px; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 20px; font-weight: 800; padding-top: 12px; }
table.px { width: 100%; border-collapse: collapse; font-size: 14px; }
table.px td { padding: 8px 0; border-bottom: 1px solid var(--line); }
table.px tr:last-child td { border: 0; }
table.px td:last-child { text-align: right; font-weight: 800; white-space: nowrap; color: var(--ocean); }

/* ---------- miejsca ---------- */
.gps {
  position: relative; border-radius: var(--r); padding: 16px; margin-bottom: 13px;
  color: #fff; overflow: hidden; box-shadow: var(--shadow); isolation: isolate;
}
.gps::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(135deg, #0a4f5e, #17919f);
}
.gps .coord { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gps .acc { font-size: 12px; opacity: .88; margin-top: 2px; }
.place { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.place:last-child { border: 0; }
.place .arrow {
  flex: none; width: 42px; height: 42px; display: grid; place-items: center; font-size: 21px;
  color: var(--ocean); background: var(--tint); border-radius: 50%; transition: transform .3s;
}
.place .info { flex: 1; min-width: 0; }
.place .info b { font-size: 15px; }
.place .info div { font-size: 12.5px; color: var(--ink-soft); }
.place .dist { flex: none; font-size: 13.5px; font-weight: 800; color: var(--ocean); text-align: right; min-width: 60px; }

/* ---------- checklista ---------- */
.chk { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.chk:last-child { border: 0; }
.chk .box {
  width: 26px; height: 26px; border: 2px solid var(--line); border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 15px; color: #fff; transition: .15s;
}
.chk.done .box { background: var(--leaf); border-color: var(--leaf); }
.chk.done span { text-decoration: line-through; color: var(--ink-soft); }
.progress { height: 12px; background: var(--tint); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--leaf), #6cc98d); transition: width .35s; }

/* ---------- info ---------- */
details.acc { border-bottom: 1px solid var(--line); }
details.acc:last-child { border: 0; }
details.acc > summary {
  list-style: none; cursor: pointer; padding: 13px 0; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; gap: 12px;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary .ico {
  width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--tint);
  display: grid; place-items: center; font-size: 19px;
}
details.acc > summary::after { content: "›"; margin-left: auto; color: var(--ink-soft); font-size: 24px; transition: transform .2s; }
details.acc[open] > summary::after { transform: rotate(90deg); }
.kv { padding: 0 2px 14px 52px; }
.kv b { display: block; font-size: 14px; margin-top: 11px; }
.kv p { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }
.contact { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.contact:last-child { border: 0; }
.contact .c-i { flex: 1; }
.contact .c-i b { font-size: 15px; }
.contact .c-i div { font-size: 12.5px; color: var(--ink-soft); }
.contact a.call {
  flex: none; background: var(--leaf); color: #fff; text-decoration: none;
  border-radius: 12px; padding: 10px 15px; font-weight: 700; font-size: 14px;
}
.sos {
  display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit;
  background: var(--card); border-radius: var(--r); padding: 14px 16px; margin-bottom: 13px;
  box-shadow: var(--shadow); border: 1.5px solid rgba(232,84,63,.25);
}
.sos .ring {
  width: 48px; height: 48px; border-radius: 50%; background: var(--coral); color: #fff;
  display: grid; place-items: center; font-size: 22px; flex: none;
  box-shadow: 0 4px 14px rgba(232,84,63,.35);
}
.sos b { display: block; font-size: 16px; color: var(--coral); font-weight: 800; }
.sos span { font-size: 12.5px; color: var(--ink-soft); }
.sos .go { margin-left: auto; color: var(--coral); font-size: 24px; }

.empty { text-align: center; color: var(--ink-soft); font-size: 14px; padding: 20px 8px; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabh) + 20px);
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 99px;
  font-size: 14px; font-weight: 600; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .25s;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
[data-theme="dark"] .toast { background: #e8f4f6; color: #0b171b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #e8f4f6; color: #0b171b; } }
.toast.on { opacity: .97; }
