/* 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; }
/* atrybut hidden musi wygrywać z display:flex/grid ustawionym niżej */
[hidden] { display: none !important; }
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(7, 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: 9.5px; color: var(--ink-soft); height: var(--tabh); justify-content: center;
}
nav.tabs button img { width: 27px; height: 27px; filter: grayscale(.35) opacity(.8); transition: .2s; }
nav.tabs button { position: relative; }
nav.tabs button.on { color: var(--ocean); font-weight: 700; }
nav.tabs button.on::after { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 30px; height: 3px; border-radius: 0 0 3px 3px; background: var(--ocean); }
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:not(.sec):not(.ghost) { color: #06222a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.sec):not(.ghost) { 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: 11px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.ph:last-child { border: 0; }
.ph-pl { flex: 1; min-width: 0; font-size: 14.5px; color: var(--ink-soft); }
.ph-pl b { font-weight: 600; }
.ph-sw { flex: 1.05; min-width: 0; }
.ph-sw b { font-size: 16.5px; font-weight: 800; color: var(--ink); }
.ph-sw .pron { font-size: 12.5px; color: var(--coral); font-weight: 700; }
.ph-act { flex: none; display: flex; gap: 4px; align-items: center; }
.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; }
/* każdy ✕ w wierszu listy - bez własnej reguły przycisk dostawał domyślny wygląd (biały kwadrat) */
button.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; }

/* ================= EKRAN BLOKADY ================= */
#lock {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: 20px; overflow: auto;
  background: #cfe9ef url(img/hero-login.webp) center/cover no-repeat;
  color: #123a4a;
}
#lock::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.05) 40%, rgba(255,255,255,.35));
}
#lock .lock-in { position: relative; width: 100%; max-width: 330px; text-align: center; }
#lock .lock-logo { width: 58px; height: 58px; }
#lock h1 { font-size: 25px; font-weight: 800; color: #0d3b49; text-shadow: 0 1px 8px rgba(255,255,255,.6); }
#lock h1 span { color: #0f6b7d; }
#lock .lock-motto { font-size: 19px; color: #14505f; margin: 2px 0 16px; text-shadow: 0 1px 8px rgba(255,255,255,.6); }
#lock .lock-card {
  background: rgba(255,255,255,.86); border-radius: 26px; padding: 22px 18px 20px;
  box-shadow: 0 18px 44px rgba(9,60,74,.22); backdrop-filter: blur(10px);
}
#lock .kicker { font-size: 11px; letter-spacing: 2px; font-weight: 700; color: #17919f; }
#lock .lock-card h2 { font-size: 26px; font-weight: 800; margin: 4px 0 6px; color: #0d3b49; }
#lock .lock-sub { font-size: 13.5px; color: #5c7a83; margin: 0 0 16px; line-height: 1.45; }
#lock .dots { display: flex; justify-content: center; gap: 13px; margin-bottom: 18px; }
#lock .dots i {
  width: 13px; height: 13px; border-radius: 50%; background: #d3e9ed; transition: .15s;
}
#lock .dots i.on { background: #0f6b7d; transform: scale(1.15); }
#lock .pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
#lock .pad button {
  height: 54px; border-radius: 16px; border: 0; font-size: 22px; font-weight: 700;
  background: #e6f4f6; color: #0d3b49; cursor: pointer; transition: .12s;
}
#lock .pad button:active { background: #c9e8ec; transform: scale(.96); }
#lock .pad button.del { background: transparent; font-size: 19px; color: #5c7a83; }
#lock .orsep {
  display: flex; align-items: center; gap: 10px; margin: 16px 0 12px;
  color: #93aab1; font-size: 11px; letter-spacing: 2px; font-weight: 700;
}
#lock .orsep::before, #lock .orsep::after { content: ""; flex: 1; height: 1px; background: #dceaed; }
#lock .bio {
  width: 100%; border: 0; border-radius: 16px; background: #e6f4f6; color: #0f6b7d;
  padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
#lock .bio:active { background: #c9e8ec; }
#lock .lock-foot {
  margin-top: 16px; font-size: 10.5px; letter-spacing: 1.6px; font-weight: 700;
  color: #16505e; text-shadow: 0 1px 8px rgba(255,255,255,.7);
}
#lock.shake .lock-card { animation: shake .45s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-9px); } 40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); } 80% { transform: translateX(6px); }
}

/* ================= PULPIT ================= */
.cd-card { text-align: center; }
.cd { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.cd-box {
  background: var(--tint); border-radius: 16px; padding: 11px 6px; min-width: 74px; flex: 1; max-width: 108px;
}
.cd-box b { display: block; font-size: 28px; font-weight: 800; color: var(--ocean); line-height: 1.1; }
.cd-box span { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
select.spot { margin-bottom: 12px; font-weight: 600; }
.home-tide { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.home-tide > div:first-child { flex: 1; }
.home-tide b { font-size: 19px; font-weight: 800; }
.home-tide .tide-in {
  background: var(--tint); color: var(--ocean); border-radius: 99px;
  padding: 7px 13px; font-weight: 700; font-size: 13.5px; white-space: nowrap;
}
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 13px; }
.tile {
  background: var(--card); border: 0; border-radius: var(--r); padding: 14px 12px;
  box-shadow: var(--shadow); cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 2px;
}
.tile img { width: 42px; height: 42px; margin-bottom: 4px; }
.tile b { font-size: 15.5px; font-weight: 800; }
.tile span { font-size: 12px; color: var(--ink-soft); }
.tile:active { transform: scale(.98); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.card.mini { padding: 14px; cursor: pointer; }
.card.mini b { display: block; font-size: 21px; font-weight: 800; margin: 2px 0 6px; }
/* „Dziś” 2x2 i „Na skróty” (5.1.119, makieta „pulpit 2”) */
.karta-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.karta-h h2 { margin: 0; flex: 1; min-width: 0; }
.karta-wiecej { flex: none; border: 0; background: none; color: var(--ocean); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 0; }
.karta-h .muted { flex: none; font-size: 11.5px; }
/* minmax(0, 1fr), nie 1fr: długi tytuł w nowrap rozpychał kolumnę i drugi kafelek wychodził poza ekran (5.1.121) */
.dzis-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.dzis-kafel { display: flex; align-items: center; gap: 9px; min-width: 0; text-align: left; padding: 11px 9px 11px 11px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--tint); color: var(--ink); cursor: pointer; }
.dk-ikona { font-size: 20px; line-height: 1; flex: none; }
.dk-tx { flex: 1; min-width: 0; }
.dk-et { display: block; font-size: 10.5px; color: var(--ink-soft); line-height: 1.2; }
.dzis-kafel b { display: block; font-size: 14.5px; line-height: 1.2; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-strz { flex: none; color: var(--ink-soft); font-size: 17px; }
.dzis-kafel.zle b { color: var(--coral); }
/* sześć wejść w jednym rzędzie, jak kafelki statusu - przy siedmiu (przewodnik z paczki) rząd przewija się w bok */
.skroty { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.skroty::-webkit-scrollbar { display: none; }
.skrot { flex: 0 0 calc((100% - 30px) / 6); display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 3px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink-soft); cursor: pointer; }
.sk-ikona { font-size: 20px; line-height: 1; }
.sk-t { font-size: 9px; font-weight: 600; line-height: 1.12; text-align: center; letter-spacing: -.01em; }
.clim-t { display: flex; align-items: center; gap: 14px; }
.clim-t b { font-size: 34px; font-weight: 800; color: var(--ocean); }
.tip p { margin: 0; font-size: 14.5px; line-height: 1.55; }

/* ================= WYKRES PŁYWÓW ================= */
.daynav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.daynav b { font-size: 15px; font-weight: 800; }
.daynav .nav {
  border: 0; background: var(--tint); color: var(--ocean); width: 38px; height: 38px;
  border-radius: 12px; font-size: 22px; font-weight: 700; cursor: pointer;
}
svg.tchart { width: 100%; height: auto; display: block; overflow: visible; }
/* obrys w kolorze karty - etykiety pozostają czytelne nad krzywą */
svg.tchart text { paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }
svg.tchart .tx { font-size: 11px; fill: var(--ink-soft); }
svg.tchart .tv { font-size: 12px; font-weight: 700; fill: var(--ink); }
:root { --sandy: #d9a441; }

/* dobra pora na */
.gt { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.gt:last-child { border: 0; }
.gt-i {
  width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--tint);
  display: grid; place-items: center; font-size: 20px;
}
.gt-t { flex: 1; min-width: 0; }
.gt-t b { font-size: 15px; }
.gt-t .muted { font-size: 12.5px; }
.gt-h { font-size: 13.5px; font-weight: 800; color: var(--ocean); white-space: nowrap; text-align: right; }

/* ================= BUDŻET ================= */
.bud { display: flex; justify-content: space-between; margin: 14px 0 8px; }
.bud .right { text-align: right; }
.bud span { display: block; font-size: 12px; }
.bud b { font-size: 20px; font-weight: 800; }
.progress.big { height: 14px; }
.progress > div.over { background: linear-gradient(90deg, #e8543f, #f08a6c); }
.catrow { margin-top: 12px; }
.catrow-t { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; }
.catrow-t b { font-weight: 700; }
.catbar { height: 9px; background: var(--tint); border-radius: 99px; overflow: hidden; }
.catbar > div { height: 100%; border-radius: 99px; }

/* ================= SYNCHRONIZACJA ================= */
.syncrow { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 4px; }
.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; background: var(--ink-soft); }
.dot.ok { background: var(--leaf); box-shadow: 0 0 0 4px rgba(47,143,78,.18); }
.dot.warn { background: #e2a13c; box-shadow: 0 0 0 4px rgba(226,161,60,.18); }
.dot.off { background: var(--ink-soft); }

/* ================= MAPA WYSPY ================= */
.mapwrap {
  position: relative; border-radius: 16px; overflow: hidden;
  background: #bfe6f0; border: 1px solid var(--line);
}
[data-theme="dark"] .mapwrap { background: #10323a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mapwrap { background: #10323a; } }
#map-svg {
  display: block; width: 100%; height: 58vh; max-height: 520px; min-height: 320px;
  touch-action: none; cursor: grab;
}
#map-svg:active { cursor: grabbing; }
#map-svg .sea { fill: #bfe6f0; }
#map-svg .land { fill: #f2e5c8; stroke: #0f6b7d; stroke-width: 1.6; stroke-linejoin: round; }
[data-theme="dark"] #map-svg .sea { fill: #10323a; }
[data-theme="dark"] #map-svg .land { fill: #26424a; stroke: #4ec3d4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #map-svg .sea { fill: #10323a; }
  :root:not([data-theme="light"]) #map-svg .land { fill: #26424a; stroke: #4ec3d4; }
}
#map-svg .pin { cursor: pointer; }
/* kafelki OSM pod konturem (5.1.83): gdy choć jeden się załadował, ląd staje się samym obrysem, morze bierze kolor OSM */
#map-svg.z-kafelkami .sea { fill: #aad3df !important; }
#map-svg.z-kafelkami .land { fill: none !important; stroke: rgba(15,107,125,.45) !important; stroke-width: 1.2; }   /* !important: reguły motywu ciemnego są bardziej szczegółowe */
#map-svg.z-kafelkami .grid { display: none; }
#map-svg image { image-rendering: auto; }
.map-offline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 13.5px; }
.map-offline .btn { width: auto; flex: 0 0 auto; padding: 9px 14px; font-size: 14px; }
.map-offline .postep { flex: 1 1 100%; height: 6px; background: var(--tint); border-radius: 99px; overflow: hidden; }
.map-offline .postep > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ocean), var(--ocean2)); border-radius: 99px; transition: width .2s; }
#map-svg .pin path { stroke: #fff; stroke-width: 1.5; transition: filter .15s; }
#map-svg .pin.on path { filter: drop-shadow(0 0 6px rgba(232,84,63,.9)); stroke-width: 2.4; }
#map-svg .me-halo { fill: rgba(232,84,63,.28); }
#map-svg .me-dot { fill: #e8543f; stroke: #fff; stroke-width: 2; }
.mapzoom { position: absolute; right: 9px; top: 9px; display: flex; flex-direction: column; gap: 7px; }
.mapzoom button {
  width: 38px; height: 38px; border-radius: 12px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--ocean); font-size: 19px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(18,58,74,.18);
}
.mapzoom button:active { background: #fff; transform: scale(.94); }
.mapinfo { margin-top: 11px; font-size: 13.5px; color: var(--ink-soft); }
.mapinfo.on { color: var(--ink); }
.mi-t { display: flex; align-items: baseline; gap: 10px; margin-bottom: 2px; }
.mi-t b { font-size: 16px; }
.mi-d { margin-left: auto; font-weight: 800; color: var(--ocean); white-space: nowrap; }

/* ================= RESZTA PRZY KASIE ================= */
.notes { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 4px; }
.note {
  border: 0; background: var(--tint); color: var(--ocean); border-radius: 99px;
  padding: 9px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.note:active { transform: scale(.95); }
.change {
  margin-top: 12px; padding: 16px; border-radius: 16px; background: var(--tint); text-align: center;
}
.change b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -1px; margin: 2px 0 4px; color: var(--ink); }
.change.ok { background: rgba(47,143,78,.12); }
.change.ok b { color: var(--leaf); }
.change.short { background: rgba(232,84,63,.12); }
.change.short b { color: var(--coral); font-size: 26px; }
.change .muted { font-size: 12.5px; }
#map-svg .pin-lab {
  font-size: 11px; font-weight: 800; fill: var(--ink);
  paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round;
}
[data-theme="dark"] #map-svg .pin-lab { stroke: #14252b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #map-svg .pin-lab { stroke: #14252b; } }

/* ================= PORTFEL ================= */
.wgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.wcur {
  background: var(--tint); border-radius: 16px; padding: 12px 10px; text-align: center;
}
.wcur.neg { background: rgba(232,84,63,.12); }
.wcur .wc-n { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--ink-soft); }
.wcur b { display: block; font-size: 21px; font-weight: 800; line-height: 1.2; margin: 1px 0; }
.wcur .muted { font-size: 11.5px; }
.wsum { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.wsum-r { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; font-size: 14px; }
.wsum-v { text-align: right; }
.wsum-r b { font-size: 17px; font-weight: 800; }
.wsum-r.dim { color: var(--ink-soft); }
.wsum-r.good b { color: var(--leaf); }
.wsum-r.bad b { color: var(--coral); }
.wsum-r .muted { font-size: 11.5px; }
.subform {
  margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--bg);
  border: 1px solid var(--line);
}
.subform p.muted { margin-top: 0; }
.wh-t { font-size: 12px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .6px; margin: 16px 0 2px; }
.wh { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.wh:last-child { border: 0; }
.wh-i { flex: 1; min-width: 0; }
.wh-i b { font-size: 15px; }
.wh-i .muted { font-size: 12px; }

/* zobowiązania */
.plan { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.plan:last-child { border: 0; }
.plan-chk {
  width: 28px; height: 28px; flex: none; border-radius: 9px; cursor: pointer;
  border: 2px solid var(--line); background: none; color: #fff; font-size: 15px; font-weight: 700;
}
.plan.paid .plan-chk { background: var(--leaf); border-color: var(--leaf); }
.plan.paid .plan-i b { text-decoration: line-through; color: var(--ink-soft); }
.plan.paid .plan-a { color: var(--ink-soft); text-decoration: line-through; }
.plan-i { flex: 1; min-width: 0; }
.plan-i b { font-size: 15px; }
.plan-i .muted { font-size: 12.5px; }
.plan-a { font-weight: 800; white-space: nowrap; font-size: 15px; }
.wcur .wc-r { font-size: 10.5px; color: var(--ocean); font-weight: 700; margin-top: 1px; }

/* pasek nowej wersji - pokazuje się tylko wtedy, gdy odświeżenie musi poczekać */
.update-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabh) + 14px); z-index: 70;
  border: 0; border-radius: 14px; padding: 13px 16px; cursor: pointer;
  background: var(--ocean); color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(15,107,125,.35);
}
[data-theme="dark"] .update-bar { color: #06222a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .update-bar { color: #06222a; } }

/* ================= WYCIĄG ================= */
.st-day {
  font-size: 11.5px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase;
  letter-spacing: .6px; margin: 16px 0 4px; padding-top: 8px; border-top: 1px solid var(--line);
}
.st-day:first-child { margin-top: 6px; border: 0; padding-top: 0; }
.st { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.st-i { flex: 1; min-width: 0; }
.st-i b { font-size: 15px; }
.st-i .muted { font-size: 12px; }
.st-a { flex: none; text-align: right; }
.st-k { font-size: 15px; font-weight: 800; white-space: nowrap; }
.st-k.plus { color: var(--leaf); }
.st-k.minus { color: var(--ink); }
.st-s { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; margin-bottom: 4px; }

/* przycisk powrotu i karta-odnośnik */
.back {
  border: 0; background: none; color: var(--ocean); font-weight: 700; font-size: 14px;
  padding: 4px 2px 10px; cursor: pointer;
}
button.linkcard {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  border: 0; cursor: pointer; font: inherit; color: inherit;
}
button.linkcard img { width: 42px; height: 42px; flex: none; }
button.linkcard b { display: block; font-size: 16px; }
button.linkcard span span { font-size: 12.5px; color: var(--ink-soft); }
button.linkcard .go { margin-left: auto; color: var(--ink-soft); font-size: 24px; }
.home-wallet { cursor: pointer; }
.wgrid.mini { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.wgrid.mini .wcur { padding: 10px 8px; }
.wgrid.mini .wcur b { font-size: 18px; }
.home-wallet .wsum { margin-top: 11px; padding-top: 9px; }
.cash-sum { text-align: center; margin-top: 14px; }
.cash-sum b { display: block; font-size: 27px; font-weight: 800; color: var(--leaf); line-height: 1.15; }
.cash-sum span { font-size: 12.5px; color: var(--ink-soft); }
.cash-sum.bad b { color: var(--coral); }

/* ================= ZOBOWIĄZANIA W TRANSZACH ================= */
.plan { align-items: flex-start; }
.plan-r { flex: none; text-align: right; }
.plan-r .muted { font-size: 11.5px; }
.plan-bar { height: 6px; background: var(--tint); border-radius: 99px; overflow: hidden; margin: 7px 0 4px; }
.plan-bar > div { height: 100%; background: var(--leaf); border-radius: 99px; }
.plan-act { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.plan-act .btn.mini { font-size: 12.5px; padding: 8px 12px; }
.pays { padding: 4px 0 12px 4px; border-bottom: 1px solid var(--line); }
.pay { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.pay-i { flex: 1; }
.pay-i b { font-size: 14px; }
.pay-i .muted { font-size: 11.5px; }

/* ================= PODRÓŻ ================= */
.ts-big { font-size: 34px; font-weight: 800; color: var(--ocean); letter-spacing: -1px; margin: 2px 0 2px; }
#trip-status-card, .home-trip { text-align: center; }
#trip-status .btn, #trip-status .btn.sec { margin-top: 12px; }
.home-trip { cursor: pointer; }
.filebtn { display: block; }
.filebtn span {
  display: block; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--line); border-radius: var(--r-sm); padding: 14px;
  color: var(--ocean); font-weight: 700; background: var(--bg);
}
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 12px; }
.doc {
  position: relative; border-radius: 14px; overflow: hidden; background: var(--tint);
  cursor: pointer; padding-bottom: 6px;
}
.doc img { width: 100%; height: 96px; object-fit: cover; display: block; }
.doc-pdf { height: 96px; display: grid; place-items: center; font-weight: 800; color: var(--ocean); }
.doc-n { font-size: 11px; padding: 5px 7px 0; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-x {
  position: absolute; top: 5px; right: 5px; border: 0; cursor: pointer;
  width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 12px;
}

/* podgląd dokumentu */
#docview { position: fixed; inset: 0; z-index: 90; background: rgba(6,25,32,.97); display: grid; place-items: center; overflow: auto;
  padding: calc(56px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
#docview[hidden] { display: none !important; }
.dv-body img { max-width: 96vw; max-height: 86vh; border-radius: 10px; }
.dv-close {
  position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 14px; z-index: 2; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.dv-nav { flex-wrap: wrap; }
.dv-gotowe { width: 100%; max-width: 520px; margin-top: 14px; padding: 14px; border-radius: 16px; border: 0; background: #fff; color: #0d3b49; font-weight: 800; font-size: 15px; cursor: pointer; }
.dv-stan { color: #cfe6ec; font-size: 12.5px; margin-top: 8px; text-align: center; }

/* tryb lotu - pełny ekran w klimacie apki: hero jak na Dziś, mapa i liczby w kartach */
#flymode {
  position: fixed; inset: 0; z-index: 95; overflow: auto;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(26px + env(safe-area-inset-bottom));   /* notch i pasek gestów iPhone'a */
  background: var(--bg); color: var(--ink);
}
#flymode[hidden] { display: none !important; }
#flymode > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.fly-hero {
  position: relative; border-radius: 22px; overflow: hidden; padding: 16px 18px 20px; margin-bottom: 13px;
  color: #fff; text-align: center; box-shadow: var(--shadow);
  background: linear-gradient(160deg, #0f6b7d 0%, #123a4a 65%, #06202b 100%);
}
.fly-top { display: flex; align-items: flex-start; gap: 12px; text-align: left; }
.fly-route { font-size: 19px; font-weight: 800; }
.fly-sub { font-size: 12.5px; opacity: .85; }
.fly-close {
  margin-left: auto; border: 0; cursor: pointer; width: 44px; height: 44px;
  border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 17px;
}
.fly-count { font-size: 46px; font-weight: 800; letter-spacing: -1.5px; margin-top: 12px; }
.fly-label { font-size: 13px; opacity: .85; text-transform: uppercase; letter-spacing: 1.4px; }
.fly-map { padding: 0; overflow: hidden; background: #10202a; }
#fly-svg { width: 100%; height: auto; max-height: 44vh; display: block; }
#fly-svg .fly-sea, .now-map .fly-sea { fill: #10202a; }
#fly-svg .fly-land, .now-map .fly-land { fill: #1f3a44; stroke: #2c4f5c; stroke-width: 1; }
#fly-svg .fly-line, .now-map .fly-line { fill: none; stroke: #ffcc4d; stroke-width: 2.5; stroke-dasharray: 6 4; }
#fly-svg .fly-port, .now-map .fly-port { fill: #fff; }
#fly-svg .fly-txt, .now-map .fly-txt { fill: #fff; font-size: 11px; font-weight: 700; }
#fly-svg .fly-halo, .now-map .fly-halo { fill: rgba(255,204,77,.35); }
#fly-svg .fly-plane, .now-map .fly-plane { fill: #ffcc4d; stroke: #fff; stroke-width: 1.5; }
.fly-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fly-cell { background: var(--tint); border-radius: 12px; padding: 10px 12px; }
.fly-cell b { display: block; font-size: 19px; font-weight: 800; color: var(--ink); }
.fly-cell span { font-size: 11.5px; color: var(--ink-soft); }
.fly-gps { font-size: 13px; color: var(--ink-soft); margin: 12px 0 10px; }
.fly-gps b { color: var(--ink); }
.fly-note { font-size: 12.5px; margin-top: 10px; }

.export-row { display: flex; gap: 9px; flex-wrap: wrap; }
.export-row .btn { flex: 1; min-width: 150px; }

/* ================= ODCINKI LOTU I PRZESIADKI ================= */
.leg { padding: 12px 0; border-bottom: 1px solid var(--line); }
.leg-h { display: flex; align-items: baseline; gap: 10px; }
.leg-h b { font-size: 17px; font-weight: 800; }
.leg-no { font-size: 12.5px; color: var(--ink-soft); font-weight: 700; margin-left: auto; }
.leg-t { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; margin: 4px 0 3px; }
.leg-arrow { color: var(--ocean); }
.leg .muted { font-size: 12.5px; }
.leg-act { display: flex; gap: 7px; margin-top: 9px; }
.leg-act .btn.mini { font-size: 12.5px; padding: 7px 12px; }
.transfer { border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 13px; }
.transfer b { display: block; font-size: 14px; }
.transfer.ok { background: var(--tint); color: var(--ink-soft); }
.transfer.uwaga { background: rgba(226,161,60,.14); color: #9a6b18; }
.transfer.zle { background: rgba(232,84,63,.13); color: #a03a25; }
[data-theme="dark"] .transfer.uwaga { color: #f0c078; }
[data-theme="dark"] .transfer.zle { color: #ffb49e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .transfer.uwaga { color: #f0c078; }
  :root:not([data-theme="light"]) .transfer.zle { color: #ffb49e; }
}
#fly-svg .fly-line.dim, .now-map .fly-line.dim { stroke: rgba(255,255,255,.35); stroke-width: 1.8; }

/* ================= FAZA PODRÓŻY ================= */
.faza-h { display: flex; align-items: flex-start; gap: 12px; text-align: left; }
.faza-i { font-size: 30px; line-height: 1; }
.faza-h b { font-size: 17px; font-weight: 800; }
.faza-h .muted { font-size: 13px; }
.faza-zad { margin: 12px 0 10px; text-align: left; }
.faza-zad .chk { padding: 8px 0; }
.faza .progress { margin-top: 4px; }
.faza .btn, .faza .btn.sec { margin-top: 12px; }
.faza { text-align: left; }

/* ================= TRAVEL VAULT ================= */
.quick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick-b {
  flex: none; border: 0; cursor: pointer; background: var(--tint); color: var(--ink);
  border-radius: 16px; padding: 11px 14px; display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.quick-b:active { transform: scale(.96); }
.quick-i { font-size: 19px; }
.quick-c { background: var(--ocean); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; }
.dv-cap { color: #cfe6ec; font-size: 13px; text-align: center; margin-top: 12px; }
.dv-nav { display: flex; gap: 7px; justify-content: center; margin-top: 12px; }
.dv-dot {
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.18); color: #fff; font-size: 13px; font-weight: 700;
}
.dv-dot.on { background: #fff; color: #0d3b49; }

/* ================= PLAN PODRÓŻY ================= */
.plan-item { display: flex; align-items: flex-start; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plan-item:last-child { border: 0; }
.pi-ico { font-size: 22px; line-height: 1.2; flex: none; }
.pi-i { flex: 1; min-width: 0; }
.pi-i b { font-size: 15px; }
.pi-i .muted { font-size: 12.5px; }
.plan-item.minelo { opacity: .5; }
.plan-item.minelo .pi-i b { text-decoration: line-through; }
/* zaliczony punkt planu (5.1.114): zielony ptaszek zamiast szarego, tytuł bez przekreślenia -
   „zrobione” to nie „przepadło”, więc nie może wyglądać jak pozycja, która minęła */
.plan-item.zrobione { opacity: 1; }
.plan-item.zrobione .pi-i b { text-decoration: none; }
.pi-akcja { flex: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--card); color: var(--ink-soft); font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.pi-akcja.on { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); font-weight: 800; }
.home-plan { cursor: pointer; }
.home-plan .st-day:first-child { margin-top: 0; }

/* ================= PODSUMOWANIE WYJAZDU ================= */
.sum-head { text-align: center; margin-bottom: 14px; }
.sum-head b { font-size: 22px; font-weight: 800; display: block; }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; }
.sum-cell { background: var(--tint); border-radius: 16px; padding: 13px 10px; text-align: center; }
.sum-cell b { display: block; font-size: 20px; font-weight: 800; line-height: 1.2; }
.sum-cell span { font-size: 11.5px; color: var(--ink-soft); }
.sum-cell.strong { background: linear-gradient(135deg, var(--ocean), var(--ocean2)); }
.sum-cell.strong b { color: #fff; font-size: 23px; }
.sum-cell.strong span { color: rgba(255,255,255,.85); }
.sum-t { font-size: 12px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase;
  letter-spacing: .6px; margin: 20px 0 8px; }
.sum-list { display: flex; flex-direction: column; gap: 8px; }
.sum-li { font-size: 13.5px; background: var(--bg); border-radius: 12px; padding: 10px 12px; }

/* ================= MOJE PODRÓŻE ================= */
header h1 { cursor: pointer; }
.trip { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0 8px; }
.trip-i { flex: 1; min-width: 0; }
.trip-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trip-h b { font-size: 16.5px; font-weight: 800; }
.trip-badge {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  background: var(--ocean); color: #fff; border-radius: 99px; padding: 2px 9px;
}
.trip-badge.arch { background: var(--ink-soft); }
.trip.arch .trip-i b { color: var(--ink-soft); }
.trip .muted { font-size: 12.5px; }
.trip-act { display: flex; gap: 7px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.trip-act .btn.mini { font-size: 12.5px; padding: 7px 11px; }
.person { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border: 0; }
.person .c-i { flex: 1; min-width: 0; }
.person .c-i b { font-size: 15px; }
.person .c-i .muted { font-size: 12px; }
.person .btn.mini { font-size: 12.5px; padding: 8px 12px; white-space: nowrap; }

/* ---------- grupa: role, salda, rozliczenia ---------- */
#podglad-bar {
  background: var(--sand); color: var(--ink); text-align: center;
  font-size: 12.5px; font-weight: 700; padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
/* Tryb podglądu zdejmuje z ekranu to, czego i tak nie da się zapisać.
   Prawdziwą blokadę stawia serwer - to tylko po to, żeby nie kusiło. */
body.podglad .del,
body.podglad #e-add,
body.podglad #w-add-btn,
body.podglad #w-fx-btn,
body.podglad #plan-add,
body.podglad #trip-new,
body.podglad #person-add,
body.podglad #budget-save { display: none !important; }

.person.ja { background: linear-gradient(90deg, rgba(15,107,125,.07), transparent); }
.person .trip-act { border: 0; padding: 0; }
select.mini {
  font-size: 12.5px; padding: 6px 9px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.hint-warn {
  background: rgba(232,84,63,.1); border-left: 3px solid var(--coral);
  border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 10px;
}

.bal { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bal .c-i { flex: 1; min-width: 0; }
.bal .c-i b { font-size: 15px; }
.bal .c-i .muted { font-size: 12px; }
.bal .amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.bal.plus .amt { color: var(--leaf); }
.bal.minus .amt { color: var(--coral); }
.bal.zero .amt { color: var(--ink-soft); }

.settle { display: flex; align-items: center; gap: 11px; padding: 9px 0; }
.settle .c-i { flex: 1; min-width: 0; }
.settle .c-i b { font-size: 14.5px; }
.settle .c-i .muted { font-size: 12px; }
.settle.done .c-i b { color: var(--ink-soft); font-weight: 600; }
.ok-note {
  background: rgba(47,143,78,.1); border-radius: 10px; padding: 11px 13px;
  font-size: 13.5px; text-align: center; margin-top: 8px;
}

/* Kierunek bez obrysu w paczce - zamiast lądu rysujemy siatkę współrzędnych. */
#map-svg .grid line { stroke: var(--line); stroke-width: 1.2; opacity: .75; }

/* ---------- rozliczenia: udziały, plan ---------- */
.udzial { display: flex; align-items: center; gap: 9px; padding: 4px 0; }
.udzial > span:first-child { flex: 1; font-size: 14px; }
.udzial input { max-width: 110px; }
.udzial .muted { font-size: 12px; min-width: 34px; }
.plan-now b { font-size: 15.5px; }
.plan-konto { margin: 12px 0; }
.plan-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid var(--line); }
.plan-row .c-i { flex: 1; min-width: 0; }
.plan-row .c-i b { font-size: 14.5px; }
.plan-row .c-i .muted { font-size: 12px; }
a.btn { text-decoration: none; display: inline-block; text-align: center; }

/* ---------- wspomnienia ---------- */
.wsp-day { padding: 12px 0; border-bottom: 1px solid var(--line); }
.wsp-day:last-child { border-bottom: 0; }
.wsp-h { display: flex; align-items: baseline; gap: 10px; }
.wsp-h b { font-size: 16px; }
.wsp-facts { margin: 6px 0 4px; }
.wsp-fact { font-size: 13.5px; padding: 2px 0; }
.wsp-note { width: 100%; margin-top: 8px; resize: vertical; }
.wsp-ruch { margin-top: 6px; }
.wsp-ruch .row { margin-top: 6px; }
.wsp-photos { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: none; }
.wsp-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; }
.wsp-add { width: 72px; height: 72px; border-radius: 10px; border: 1.5px dashed var(--line);
  background: transparent; color: var(--ink-soft); font-size: 26px; flex: none; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin: 8px 0; }
label.check input { width: auto; }
.dv-tekst { width: 100%; max-width: 520px; margin: 12px auto 0; background: rgba(255,255,255,.08); color: #eef6f8; border-radius: 14px; padding: 14px; white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.45; font-family: inherit; text-align: left; box-sizing: border-box; }
#map-layers { margin-bottom: 0; }

/* ---------- warstwa online ---------- */
.leg-link { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--ocean); text-decoration: none; font-weight: 700; }
#px-spol { margin-top: 10px; }

/* ---------- Aktualnie ---------- */
nav.tabs button { min-width: 0; }
.now-hero { border-radius: 22px; padding: 22px 18px; margin-bottom: 14px; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--ocean), var(--ocean2)); box-shadow: 0 12px 30px rgba(15,107,125,.28); }
.now-hero.fly { background: linear-gradient(135deg, #0b2a36, #0f6b7d); }
/* zdjęcie kierunku pod gradientem; gradient zostaje mocny, bo na tym tle leży biały tekst
   i szklane kafelki - czytelność wygrywa z ładnym zdjęciem */
.now-hero.ze-zdjeciem { position: relative; overflow: hidden; isolation: isolate; }
.now-hero.ze-zdjeciem::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: var(--img); background-size: cover; background-position: center;
}
.now-hero.ze-zdjeciem::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  /* lżej niż się chce: przy kryciu .86 zdjęcia w ogóle nie było widać, a to ono ma robić
     robotę - czytelność białego tekstu dobiera cień liter, nie gęstszy welon */
  background: linear-gradient(170deg, rgba(15,107,125,.52) 0%, rgba(11,42,54,.74) 62%, rgba(11,42,54,.8) 100%);
}
.now-hero.ze-zdjeciem .now-k,
.now-hero.ze-zdjeciem .now-big,
.now-hero.ze-zdjeciem .now-sub { text-shadow: 0 2px 12px rgba(6,32,42,.55); }
/* bez backdrop-filter - mroził iPhone'a w przeglądarce zdjęć (5.1.63); samo półprzezroczyste
   tło wystarczy, żeby kafelek odciął się od zdjęcia */
.now-hero.ze-zdjeciem .now-zegar { background: rgba(10,40,50,.34); border-color: rgba(255,255,255,.3); }
.now-k { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.now-big { font-size: 34px; font-weight: 800; line-height: 1.15; margin-top: 4px; }
.now-sub { font-size: 13.5px; opacity: .92; margin-top: 6px; }
.now-cyfry { display: flex; justify-content: center; gap: 18px; margin: 8px 0 4px; }
.now-cyfra b { display: block; font-size: 40px; font-weight: 800; line-height: 1; }
.now-cyfra span { font-size: 12px; opacity: .85; }
/* Status dla rodziny (5.1.112, makieta „pulpit 2”): nagłówek z godziną i ⓘ, zielony przycisk,
   jeden rząd kafelków. „Wszystko OK” jest zielone, nie koralowe - koralowy w tej apce znaczy
   ostrzeżenie, a to jest dokładnie przeciwna wiadomość. */
:root { --ok-bg: #e8f6ec; --ok-line: #cdead6; --ok-ink: #1b6b3a; }
[data-theme="dark"] { --ok-bg: #16322a; --ok-line: #24513c; --ok-ink: #8fe0b0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ok-bg: #16322a; --ok-line: #24513c; --ok-ink: #8fe0b0; } }
/* Tytuł trzyma jedną linię, godzina po prawej kurczy się i łamie - odwrotnie nagłówek
   nie mieścił się nawet na 390 px (tytuł schodził na dwie linie i rozpychał kartę). */
.st-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.st-head h2 { margin: 0; flex: 0 1 auto; min-width: 0; white-space: nowrap; }
.st-head-r { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex: 1 1 auto; min-width: 0; padding-top: 1px; }
.st-kiedy { display: flex; flex-direction: column; align-items: flex-end; font-size: 10.5px;
  color: var(--ink-soft); text-align: right; line-height: 1.25; }
.st-kiedy b { font-size: 12.5px; color: var(--ink); font-weight: 700; }
.st-info { flex: none; width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--tint);
  color: var(--ink-soft); font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
.st-wyj { margin-bottom: 10px; }
.st-ok { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid var(--ok-line);
  background: var(--ok-bg); color: var(--ok-ink); border-radius: 16px; font-size: 17px; font-weight: 700; cursor: pointer; }
.st-ok b { flex: 1; text-align: center; font-weight: 700; }
.st-ok-i { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--leaf); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.st-ok-a { flex: none; font-size: 20px; opacity: .6; }
.st-teraz { margin-top: 9px; font-size: 13px; color: var(--ink-soft); text-align: center; }
/* Sześć kafelków na szerokość ekranu, reszta za krawędzią - przewijanie w bok jak w pasku dni. */
.st-kafle { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 12px -2px 0; padding: 2px; }
.st-kafle::-webkit-scrollbar { display: none; }
.st-kafel { flex: 0 0 calc((100% - 30px) / 6); display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 3px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink-soft);
  cursor: pointer; }
.st-kafel-i { font-size: 19px; line-height: 1; }
.st-kafel-t { font-size: 9px; font-weight: 600; line-height: 1.12; text-align: center; letter-spacing: -.01em; }
.st-kafel.on { background: linear-gradient(135deg, var(--ocean), var(--ocean2)); border-color: transparent; color: #fff; }
/* w ciemnym motywie kafelek ma to samo tło co karta i znika - odróżnia go dopiero tint */
[data-theme="dark"] .st-kafel:not(.on) { background: var(--tint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-kafel:not(.on) { background: var(--tint); } }
/* 360 px (mniejsze Androidy): tytuł łamał się na dwie linie i rozpychał nagłówek */
@media (max-width: 380px) {
  .st-head h2 { font-size: 14px; gap: 7px; }
  .st-kiedy { font-size: 10.5px; }
}
.center { text-align: center; margin: 8px 0 10px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.now-map { width: 100%; border-radius: 16px; background: #10202a; margin: 6px 0 10px; display: block; }
.now-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 8px 0; }
.now-cell { background: var(--navy); border-radius: 12px; padding: 10px 12px; }
.now-cell b { display: block; font-size: 17px; }
.now-cell span { font-size: 11.5px; color: var(--ink-soft); }
.now-lot b { font-size: 16px; }
.now-lot .muted { font-size: 13px; }
.now-odprawa { margin: 10px 0; padding: 9px 12px; border-radius: 10px; background: var(--navy); font-size: 13.5px; }
.now-odprawa.open { background: rgba(232,84,63,.12); font-weight: 700; }
.now-odprawa.ok { background: rgba(47,143,78,.12); }
.now-progress { margin: 8px 0 12px; }
.now-photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; margin: 6px 0 10px; }
.fly-done { fill: none; stroke: var(--ocean2); stroke-width: 3.5; }
.fly-halo.est { opacity: .18; }
.fly-txt.small { font-size: 10px; opacity: .8; }
/* ---------- galeria, oś czasu, dziennik ---------- */
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.gal-kafel { position: relative; }
.gal-kafel img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.gal-znak { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.45); color: #fff; border-radius: 99px; padding: 2px 7px; font-size: 12px; }
.dv-meta { margin-top: 10px; width: 100%; max-width: 520px; }
.dv-meta b { display: block; color: #fff; margin-bottom: 6px; }
.dv-meta input { margin-bottom: 6px; }
.tl { margin: 6px 0 4px; }
.tl-row { display: flex; align-items: center; gap: 9px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.tl-t { width: 44px; flex: none; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-soft); }
.tl-i { width: 22px; flex: none; text-align: center; }
.tl-b { flex: 1; min-width: 0; font-size: 14px; }
.tl-b .muted { font-size: 12px; }
.tl-img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.wsp-tytul { margin: 6px 0 4px; }
.wsp-tytul input { font-weight: 700; }
.wsp-moment { display: flex; gap: 12px; align-items: center; margin-top: 8px; padding: 10px; border-radius: 14px; background: linear-gradient(90deg, rgba(232,84,63,.10), transparent); }
.wsp-moment img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; flex: none; }
.wsp-moment .muted { font-size: 13px; }

/* osiem zakładek w pasku: siatka ma tyle kolumn, ile przycisków - bez tego ósmy spada do drugiego rzędu */
nav.tabs { grid-template-columns: repeat(6, 1fr); }
nav.tabs button { flex: 1 1 0; min-width: 0; padding-left: 0; padding-right: 0; font-size: 10px; overflow: hidden; white-space: nowrap; }

/* ---------- pasek dnia na Pulpicie ---------- */
.home-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 12px; }
.hs-cell { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 8px 4px 7px;
  display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; min-width: 0; }
.hs-cell .hs-i { font-size: 17px; line-height: 1.1; }
.hs-cell b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hs-cell .hs-l { font-size: 10px; color: var(--ink-soft); }

.share-url { font-size: 12px; margin-top: 6px; color: var(--ocean); }

/* ---------- hotele i plan w Miejscach ---------- */
#map-svg .pin.plan path { stroke: #fff; }
.place .pl-akcje { display: flex; gap: 6px; flex: none; }
.place .pl-akcje .btn.mini { padding: 7px 10px; font-size: 12.5px; }
.place.bez-pozycji .info div { color: var(--coral); }

/* ---------- rodzina i znajomi (panel właściciela) ---------- */
.rz-os { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rz-os:last-child { border: 0; }
.rz-os .aw { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--ocean), var(--ocean2)); font-size: 16px; }
.rz-os .aw.emo { background: var(--tint); font-size: 19px; }
.rz-os .c-i { flex: 1; min-width: 0; }
.rz-os .c-i b { font-size: 14.5px; }
.rz-os .c-i .muted { font-size: 12px; }
.rz-os.zablok .c-i b { color: var(--ink-soft); text-decoration: line-through; }
.rz-os .btn.mini { padding: 7px 10px; font-size: 12.5px; }
.rz-kom { padding: 7px 0; border-top: 1px dashed var(--line); font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.rz-kom .k-b { flex: 1; min-width: 0; }
.rz-kom .k-b .muted { font-size: 11.5px; }
.rz-kom.zgl { background: rgba(232,84,63,.08); border-radius: 8px; padding: 7px; }
.rz-kom .del { padding: 0 4px; }
.rz-liczby { display: flex; gap: 8px; margin: 4px 0 10px; }
.rz-liczby div { flex: 1; background: var(--tint); border-radius: 12px; padding: 8px 6px; text-align: center; }
.rz-liczby b { display: block; font-size: 18px; }
.rz-liczby span { font-size: 11px; color: var(--ink-soft); }
.rz-nowe { background: var(--coral); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; margin-left: 6px; font-weight: 700; }
.share-sekcja { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; margin: 14px 0 4px; }

/* ---------- rodzina: pytania, ankiety, pozdrowienia ---------- */
.rz-os .aw img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.rz-pz { display: flex; gap: 9px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.rz-pz .e { font-size: 22px; flex: none; width: 30px; text-align: center; }
.rz-pz .k-b { flex: 1; min-width: 0; }
.rz-pz .k-b .muted { font-size: 11.5px; }
.rz-pz.nowe { background: rgba(232,84,63,.07); border-radius: 8px; padding: 8px; }
.rz-ank { padding: 9px 0; border-top: 1px dashed var(--line); }
.rz-ank .o { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 3px 0; }
.rz-ank .o .p { flex: 1; height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.rz-ank .o .p div { height: 100%; background: linear-gradient(90deg, var(--aqua), var(--ocean2)); }
.rz-ank .o .n { width: 44px; text-align: right; font-size: 12px; color: var(--ink-soft); }
.rz-zd { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.rz-zd label { position: relative; margin: 0; }
.rz-zd img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; display: block; border: 3px solid transparent; }
.rz-zd input { position: absolute; left: 4px; top: 4px; width: auto; }
.rz-zd input:checked + img { border-color: var(--ocean2); }
.rz-zd .zw img { border-color: var(--coral); }
.home-rodzina-row { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.home-rodzina-row .e { font-size: 24px; }
.home-rodzina-row b { display: block; }
.home-rodzina-row .muted { font-size: 12.5px; }

/* ---------- Pogaduchy w apce ---------- */
.rz-czat { max-height: 60vh; overflow-y: auto; padding-right: 4px; margin-top: 6px; }
.rz-w { display: flex; gap: 9px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.rz-w:first-child { border-top: 0; }
.rz-w .aw { width: 32px; height: 32px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--ocean), var(--ocean2)); font-size: 15px; }
.rz-w .aw.emo { background: var(--tint); font-size: 18px; }
.rz-w .aw img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.rz-w .w-b { flex: 1; min-width: 0; }
.rz-w .w-h { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.rz-w .w-h .muted { font-size: 11.5px; }
.rz-w .w-t { white-space: pre-wrap; word-break: break-word; }
.rz-w .w-a { display: flex; gap: 10px; margin-top: 3px; }
.rz-w .w-a button { background: none; border: 0; color: var(--ink-soft); font-size: 12px; cursor: pointer; padding: 0; }
.rz-w .w-a button:hover { color: var(--ocean); }
.rz-w .cytat { font-size: 12.5px; color: var(--ink-soft); border-left: 3px solid var(--line); padding-left: 8px; margin: 2px 0 4px; }
.rz-w .w-r { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.rz-w.my { background: linear-gradient(90deg, rgba(15,107,125,.08), transparent); border-radius: 12px; padding: 7px; border-top: 0; }
.rz-w.sys { border-top: 0; padding: 3px 0; }
.rz-w.sys .w-b { font-size: 12.5px; color: var(--ink-soft); text-align: center; }
.rz-w.przyp { background: linear-gradient(90deg, rgba(240,169,44,.14), transparent); border-radius: 12px; padding: 7px; border-top: 0; }
.rz-w.ukryty { opacity: .5; }
.rz-pisz { display: flex; gap: 7px; margin-top: 9px; align-items: flex-end; }
.rz-pisz textarea { flex: 1; min-height: 42px; resize: vertical; font-size: 14px; padding: 9px 12px; }
.rz-odp { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; display: flex; gap: 8px; }
.rz-odp button { background: none; border: 0; color: var(--coral); cursor: pointer; font-size: 12.5px; padding: 0; }

/* ---------- UX 5.0: segmenty, kompaktowe hero, FAB, formularze ---------- */
.hero.small { height: 92px; margin-bottom: 12px; padding: 12px 15px; }
.hero.small h2 { font-size: 20px; }
.hero.small .script { font-size: 16px; }
.seg { display: flex; gap: 4px; margin: 0 0 12px; background: var(--card); border-radius: 14px; padding: 4px; box-shadow: var(--shadow); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; border: 0; background: none; padding: 9px 6px; border-radius: 11px; font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer; min-height: 40px; white-space: nowrap; }
.seg button.on { background: var(--tint); color: var(--ocean); }
.seg button[hidden] { display: none; }
.req, .opt { font-weight: 600; font-size: 11px; letter-spacing: .02em; text-transform: none; }
.req { color: var(--coral); }
.opt { color: var(--ink-soft); }
.subform { margin-top: 10px; }
.field-err { color: #a03a25; font-size: 12.5px; margin: 4px 0 6px; font-weight: 700; }
[data-theme="dark"] .field-err { color: #ffb49e; }
input.err, select.err, textarea.err { border-color: var(--coral) !important; }
.fab { position: fixed; right: 16px; bottom: calc(var(--tabh) + 14px + env(safe-area-inset-bottom)); z-index: 45; width: 54px; height: 54px; border-radius: 50%; border: 0;
  background: linear-gradient(135deg, var(--ocean), var(--ocean2)); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 8px 22px rgba(15,107,125,.38); }
[data-theme="dark"] .fab { color: #06222a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fab { color: #06222a; } }
.fab:active { transform: scale(.96); }
main { padding-bottom: 90px; }
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-bg { position: absolute; inset: 0; background: rgba(6,45,56,.45); }
.sheet-body { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 22px 22px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.2); }
.sheet-body > b { display: block; font-size: 16px; margin-bottom: 10px; }
.sheet-btn { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: var(--tint); color: var(--ink); border-radius: 14px; padding: 13px 14px; font-size: 15px; font-weight: 700; margin-bottom: 8px; cursor: pointer; text-align: left; min-height: 48px; }
.sheet-btn span { font-size: 22px; width: 30px; text-align: center; }
.sheet-body .btn.ghost { margin-top: 4px; }
.gps.compact { padding: 10px 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gps.compact .coord { font-size: 14.5px; }
.gps.compact .acc { font-size: 11.5px; opacity: .9; }
.gps.compact > div:first-child { flex: 1; min-width: 0; }
.gps.compact .btn { width: auto; padding: 8px 14px; font-size: 13px; flex: none; }
button.del { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.tiles .tile span { font-size: 11.5px; }
.linkcard { width: 100%; text-align: left; }
.ustaw-h { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; margin: 6px 0 8px; }
/* Ustawienia po uporządkowaniu (5.1.114): grupy oddzielone powietrzem, opis pod ⓘ przy tytule,
   kasowanie danych we własnej ramce na samym dole. */
.ustaw-h:not(:first-of-type) { margin-top: 20px; }
.card h2.ust-h { justify-content: space-between; }
.card h2.ust-h .st-info { margin-left: auto; }
.ust-opis { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 10px; }
.ust-opis > * { margin-bottom: 6px; }
.ust-opis > :last-child { margin-bottom: 0; }
.ustaw-groza { border: 1px solid rgba(232,84,63,.35); box-shadow: none; }
.ustaw-groza-h { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--coral); font-weight: 700; margin-bottom: 6px; }
.ustaw-groza .muted { margin-bottom: 10px; }
.home-stats.dwie { grid-template-columns: repeat(2, 1fr); }
.home-stats.trzy { grid-template-columns: repeat(3, 1fr); }
.home-stats.cztery { grid-template-columns: repeat(4, 1fr); }
.menu-wiecej { width: auto; max-width: 56px; padding: 8px 6px; font-size: 14px; }
.seg button { font-size: 12.5px; padding: 9px 5px; }
nav.tabs button { font-size: 9px; }
nav.tabs button .kropka { position: absolute; top: 9px; right: calc(50% - 22px); width: 9px; height: 9px; border-radius: 50%; background: var(--coral); border: 2px solid var(--card); }
.fly-close-dol { display: block; margin-top: 2px; font-size: 15px; }
.fly-close { min-width: 44px; min-height: 44px; }
/* kafelki liczb w Dziś: czytelne w obu motywach */
.now-cell { background: var(--tint); color: var(--ink); }
.now-cell b { color: var(--ink); }
.now-map .fly-sea { fill: #10202a; }
.now-map .fly-land { fill: #1f3a44; stroke: #2c4f5c; stroke-width: 1; }
.rz-w .w-foto { max-width: 220px; max-height: 220px; border-radius: 12px; display: block; margin-top: 6px; cursor: zoom-in; }
/* iOS przybliża stronę, gdy pole ma czcionkę < 16 px - na telefonie pola trzymają 16 px, układ stoi w miejscu */
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px; }
  .rz-pisz textarea, .kom-form textarea { font-size: 16px; }
}

/* ---------- czat jak Messenger (apka: Dziennik › Ekipa; strona rodziny: Pogaduchy) ---------- */
.czat { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 8px; }
.czat .msg { display: flex; align-items: flex-end; gap: 6px; max-width: 86%; margin-top: 2px; position: relative; }
.czat .msg.moj { align-self: flex-end; flex-direction: row-reverse; }
.czat .msg.pierwszy { margin-top: 10px; }
.czat .msg .aw { width: 28px; height: 28px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--ocean), var(--ocean2)); visibility: hidden; }
.czat .msg.ostatni .aw { visibility: visible; }
.czat .msg .aw.emo { background: var(--tint); font-size: 16px; }
.czat .msg .aw img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.czat .msg.moj .aw { display: none; }
.czat .kol { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.czat .msg.moj .kol { align-items: flex-end; }
.czat .kto { font-size: 11px; color: var(--ink-soft); margin: 0 0 2px 12px; }
.czat .kto .odznaka { font-size: 10px; background: var(--tint); color: var(--ocean); border-radius: 99px; padding: 0 6px; font-weight: 700; margin-left: 4px; }
.czat .dymek { position: relative; background: var(--tint); color: var(--ink); border-radius: 18px; padding: 8px 12px; font-size: 15px; line-height: 1.35; word-break: break-word; white-space: pre-wrap; cursor: pointer; max-width: 100%; }
.czat .msg.moj .dymek { background: linear-gradient(135deg, var(--ocean), var(--ocean2)); color: #fff; }
[data-theme="dark"] .czat .msg.moj .dymek { color: #06222a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .czat .msg.moj .dymek { color: #06222a; } }
.czat .msg:not(.moj) .dymek { border-bottom-left-radius: 6px; }
.czat .msg.moj .dymek { border-bottom-right-radius: 6px; }
.czat .msg.przyp .dymek { box-shadow: 0 0 0 2px rgba(240,169,44,.7); }
.czat .dymek .cyt { font-size: 12.5px; opacity: .75; border-left: 3px solid currentColor; padding: 2px 0 2px 8px; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.czat .dymek img.foto { display: block; max-width: 240px; max-height: 260px; border-radius: 12px; margin: 2px 0; cursor: zoom-in; }
.czat .dymek.tylko-foto { padding: 3px; background: transparent !important; }
.czat .znaczek { position: absolute; right: 6px; bottom: -10px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 1px 6px; font-size: 12px; line-height: 1.4; box-shadow: 0 2px 6px rgba(0,0,0,.12); white-space: nowrap; z-index: 1; }
.czat .msg.moj .znaczek { right: auto; left: 6px; }
.czat .znaczek.moja { border-color: var(--ocean2); }
.czat .msg.ma-reakcje { margin-bottom: 10px; }
.czat .kiedy { font-size: 11px; color: var(--ink-soft); margin: 3px 12px 0; }
.czat .sep { text-align: center; font-size: 11px; color: var(--ink-soft); margin: 10px 0 4px; letter-spacing: .02em; }
.czat .sys { text-align: center; font-size: 12px; color: var(--ink-soft); margin: 6px 0; align-self: center; display: flex; gap: 6px; align-items: center; }
.czat .sys .del { min-width: 28px; min-height: 28px; font-size: 13px; }
.czat .akcje { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 6px 0 2px; }
.czat .msg.moj .akcje { justify-content: flex-end; }
.czat .akcje .wybierak { display: inline-flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 3px 5px; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.czat .akcje .wybierak button { border: 0; background: none; font-size: 22px; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; line-height: 1; }
.czat .akcje .wybierak button.on { background: var(--tint); }
.czat .akcje .wybierak button:active { transform: scale(1.25); }
.czat .akcje .lnk { border: 0; background: var(--card); color: var(--ink-soft); font-size: 12.5px; border-radius: 99px; padding: 7px 11px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.czat .akcje .lnk.zle { color: var(--coral); }
.czat-pasek { position: sticky; bottom: calc(var(--tabh) + 8px + env(safe-area-inset-bottom)); z-index: 5; background: var(--card); padding: 8px 0 2px; margin-top: 8px; display: flex; align-items: flex-end; gap: 6px; }
.czat-pasek .foto-btn { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--tint); font-size: 20px; cursor: pointer; }
.czat-pasek .pole { flex: 1; display: flex; align-items: flex-end; background: var(--bg); border: 1.5px solid var(--line); border-radius: 22px; padding: 4px 6px 4px 14px; min-width: 0; }
.czat-pasek .pole textarea { flex: 1; border: 0; background: none; padding: 7px 0; min-height: 22px; max-height: 120px; resize: none; font-size: 16px; line-height: 1.3; outline: none; box-shadow: none; }
.czat-pasek .pole textarea:focus { outline: none; }
.czat-pasek .wyslij { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--ocean), var(--ocean2)); color: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
[data-theme="dark"] .czat-pasek .wyslij { color: #06222a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .czat-pasek .wyslij { color: #06222a; } }
.czat-pasek .wyslij:disabled { opacity: .5; }
.czat-odp { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); background: var(--tint); border-radius: 12px; padding: 6px 10px; margin-top: 8px; }
.czat-odp b { color: var(--ink); }
.czat-odp button { margin-left: auto; background: none; border: 0; color: var(--coral); cursor: pointer; font-size: 13px; }
.czat-foto-podglad { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--ink-soft); }
.czat-foto-podglad img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.czat-foto-podglad button { background: none; border: 0; color: var(--coral); cursor: pointer; font-size: 12.5px; padding: 0; }
.czat-wzm { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.czat-wzm button { border: 0; background: var(--tint); color: var(--ocean); border-radius: 99px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; }

/* ---------- menu wiadomości po przytrzymaniu ---------- */
.czat .dymek { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.msg-menu { position: fixed; inset: 0; z-index: 120; background: rgba(6,25,32,.66); }
.msg-blok { position: absolute; max-width: 86%; display: flex; flex-direction: column; gap: 8px; }
.msg-blok.moj { align-items: flex-end; }
.msg-emoji { display: inline-flex; gap: 2px; background: var(--card); border-radius: 99px; padding: 5px 7px; box-shadow: 0 8px 26px rgba(0,0,0,.35); }
.msg-emoji button { border: 0; background: none; font-size: 28px; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; line-height: 1; transition: transform .1s; }
.msg-emoji button.on { background: var(--tint); }
.msg-emoji button:active { transform: scale(1.3); }
.msg-blok .dymek.klon { cursor: default; box-shadow: 0 8px 26px rgba(0,0,0,.35); }
.msg-blok .dymek.klon .znaczek { display: none; }
.msg-lista { background: var(--card); border-radius: 16px; min-width: 230px; overflow: hidden; box-shadow: 0 8px 26px rgba(0,0,0,.35); }
.msg-lista button { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; color: var(--ink); font-size: 15.5px; padding: 13px 16px; cursor: pointer; text-align: left; border-top: 1px solid var(--line); }
.msg-lista button:first-child { border-top: 0; }
.msg-lista button:active { background: var(--tint); }
.msg-lista button.zle { color: var(--coral); }
.msg-lista button span { font-size: 18px; opacity: .75; }
.czat .kiedy { display: none; }
.czat .msg.czas .kiedy { display: block; }

/* ---------- czat 1:1 jak Messenger ---------- */
:root { --mbl: #0a7cff; --mbl2: #0062ff; --mob: #e9edf1; --mob-ink: #0b1a1f; }
[data-theme="dark"] { --mob: #2e3438; --mob-ink: #f2f4f6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mob: #2e3438; --mob-ink: #f2f4f6; } }
.czat { gap: 1px; }
.czat .msg { gap: 8px; max-width: 78%; margin-top: 1px; }
.czat .msg.pierwszy { margin-top: 12px; }
.czat .msg .aw { width: 28px; height: 28px; font-size: 12px; }
.czat .kto { font-size: 11.5px; margin: 0 0 3px 12px; }
.czat .kto .odznaka { font-size: 9.5px; padding: 0 5px; }
.czat .dymek { background: var(--mob); color: var(--mob-ink); border-radius: 18px; padding: 8px 12px; font-size: 15.5px; line-height: 1.33; }
.czat .msg.moj .dymek { background: linear-gradient(180deg, var(--mbl), var(--mbl2)); color: #fff; }
.czat .msg:not(.moj) .dymek { border-radius: 18px; }
.czat .msg.moj .dymek { border-radius: 18px; }
.czat .msg:not(.moj):not(.pierwszy) .dymek { border-top-left-radius: 4px; }
.czat .msg:not(.moj):not(.ostatni) .dymek { border-bottom-left-radius: 4px; }
.czat .msg.moj:not(.pierwszy) .dymek { border-top-right-radius: 4px; }
.czat .msg.moj:not(.ostatni) .dymek { border-bottom-right-radius: 4px; }
.czat .dymek .cyt { opacity: .8; }
.czat .dymek img.foto { max-width: min(68vw, 300px); max-height: 360px; border-radius: 18px; margin: 0; }
.czat .dymek.tylko-foto { padding: 0; }
.czat .znaczek { bottom: -9px; right: 8px; border: 2px solid var(--bg); box-shadow: none; font-size: 12.5px; padding: 1px 6px; }
.czat .msg.moj .znaczek { left: 8px; }
.czat .sep { font-size: 11.5px; font-weight: 600; margin: 14px 0 4px; }
.czat .sys { font-size: 12px; }
.czat .kiedy { font-size: 11px; margin: 3px 12px 0; }
.czat .pusto { text-align: center; color: var(--ink-soft); padding: 30px 12px; }
/* pasek pisania jak w Messengerze: niebieskie ikony, szare pole „Aa”, niebieska strzałka */
.czat-pasek { gap: 4px; padding: 6px 0 4px; align-items: flex-end; }
.czat-pasek .ikony { display: flex; flex: none; padding-bottom: 1px; }
.czat-pasek .ikony button, .czat-pasek .foto-btn { width: 38px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--mbl); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; font-size: 20px; }
.czat-pasek .ikony button svg { width: 25px; height: 25px; fill: currentColor; display: block; }
.czat-pasek .ikony button:disabled { opacity: .45; }
.czat-pasek .pole { background: var(--mob); border: 0; border-radius: 22px; padding: 3px 8px 3px 14px; margin: 0 2px; }
.czat-pasek .pole textarea { color: var(--mob-ink); padding: 8px 0; min-height: 22px; }
.czat-pasek .pole textarea::placeholder { color: var(--ink-soft); }
.czat-pasek .wyslij { background: none; color: var(--mbl); width: 40px; height: 40px; font-size: 22px; box-shadow: none; }
.czat-pasek .wyslij svg { width: 26px; height: 26px; fill: currentColor; display: block; }
/* ekran Ekipa na stronie rodziny: nagłówek grupy, wiadomości na tle, info o grupie osobno */
.czat-ekran { display: flex; flex-direction: column; min-height: calc(100vh - var(--tabh) - 120px); }
.czat-naglowek { display: flex; align-items: center; gap: 10px; padding: 4px 2px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; cursor: pointer; }
.czat-naglowek .stos { display: flex; flex: none; }
.czat-naglowek .stos .awatar { width: 36px; height: 36px; margin-left: -12px; border: 2px solid var(--bg); font-size: 15px; box-shadow: none; }
.czat-naglowek .stos .awatar:first-child { margin-left: 0; }
.czat-naglowek .tyt { flex: 1; min-width: 0; }
.czat-naglowek .tyt b { display: block; font-size: 16.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.czat-naglowek .tyt span { font-size: 12px; color: var(--ink-soft); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.czat-naglowek .info { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--tint); color: var(--mbl); font-weight: 800; font-size: 17px; font-family: Georgia, serif; cursor: pointer; }
.czat-okno { display: flex; flex-direction: column; flex: 1; }
.czat-okno .czat { flex: 1; justify-content: flex-end; padding: 6px 2px 10px; }
.czat-okno .czat-pasek { background: var(--bg); margin-top: 4px; }
.czat-okno .czat-odp, .czat-okno .czat-foto-podglad { margin: 4px 2px; }
.czat-info { position: fixed; inset: 0; z-index: 110; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 12px calc(24px + env(safe-area-inset-bottom)); }
.czat-info-pas { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 0 10px; background: var(--bg); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.czat-info-pas .wroc { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--tint); color: var(--mbl); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 0 4px; }
.czat-info-pas b { font-size: 18px; }
.czat-info-tresc { max-width: 620px; margin: 0 auto; }
/* znaczek reakcji wisi pod rogiem dymka (nie zasłania tekstu); nagłówek grupy przyklejony u góry */
.czat .znaczek { bottom: -13px; right: -4px; }
.czat .msg.moj .znaczek { right: auto; left: -4px; }
.czat .msg.ma-reakcje { margin-bottom: 14px; }
.czat .dymek { min-width: 44px; }
.czat-naglowek { position: sticky; top: 0; z-index: 6; background: var(--bg); padding-top: 8px; }
.czat-naglowek { top: var(--headh, 60px); }
/* kopia dymka w menu po przytrzymaniu leży poza .czat - dostaje pełny styl dymka */
.msg-blok .dymek.klon { align-self: flex-start; background: var(--mob); color: var(--mob-ink); border-radius: 18px; padding: 8px 12px; font-size: 15.5px; line-height: 1.33; white-space: pre-wrap; word-break: break-word; max-width: 100%; position: relative; }
.msg-blok.moj .dymek.klon { align-self: flex-end; background: linear-gradient(180deg, var(--mbl), var(--mbl2)); color: #fff; }
.msg-blok .dymek.klon.tylko-foto { padding: 0; background: transparent; }
.msg-blok .dymek.klon img.foto { display: block; max-width: 220px; max-height: 240px; border-radius: 16px; }
.msg-blok .dymek.klon .cyt { font-size: 12.5px; opacity: .8; border-left: 3px solid currentColor; padding: 2px 0 2px 8px; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.msg-blok.moj { align-items: flex-end; }

/* jedna rozmowa: cytat „o czym” w dymku, przycisk „Napisz w czacie” pod dniem / zdjęciem */
.czat .cyt.o-czym { display: flex; align-items: center; gap: 7px; cursor: pointer; white-space: normal; font-weight: 600; }
.czat .cyt.o-czym img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; flex: none; }
.o-czym-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.o-czym-row .napisz { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--tint); color: var(--mbl); border-radius: 99px; padding: 8px 13px; font-size: 13px; font-weight: 700; cursor: pointer; }
.o-czym-row .ile { border: 0; background: none; color: var(--ink-soft); font-size: 12.5px; cursor: pointer; text-decoration: underline; padding: 0; }

/* ---------- film z dnia jak w Relive ---------- */
.relive { position: relative; width: 100%; max-width: 520px; aspect-ratio: 4 / 5; max-height: 64vh; margin: 12px auto 0; border-radius: 18px; overflow: hidden; background: #0b2233; perspective: 700px; box-shadow: 0 14px 44px rgba(0,0,0,.5); }
.relive-kamera { position: absolute; inset: 0; transform-origin: 50% 60%; will-change: transform; }
.relive-swiat { position: absolute; left: 0; top: 0; will-change: transform; background: radial-gradient(circle at 50% 50%, #17455b, #0b2233 72%); }
.relive-swiat img.kaf { position: absolute; width: 256px; height: 256px; display: block; pointer-events: none; }
.relive-swiat svg { position: absolute; left: 0; top: 0; overflow: visible; }
.relive .trail-bg { fill: none; stroke: rgba(255,255,255,.45); stroke-width: 3; stroke-dasharray: 5 6; }
.relive .trail-cien { fill: none; stroke: rgba(0,0,0,.45); stroke-width: 9; stroke-linejoin: round; stroke-linecap: round; }
.relive .trail { fill: none; stroke: #ff6b4a; stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round; }
.relive .kropka { fill: #ff6b4a; stroke: #fff; stroke-width: 3; }
.relive .puls { fill: rgba(255,107,74,.4); transform-box: fill-box; transform-origin: center; animation: relive-puls 1.4s ease-out infinite; }
@keyframes relive-puls { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
.relive .foto-znak { fill: #fff; stroke: #ff6b4a; stroke-width: 3; }
.relive-hud { position: absolute; left: 14px; top: 12px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.75); font-size: 13px; line-height: 1.25; pointer-events: none; }
.relive-hud b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.relive-dol { position: absolute; left: 14px; right: 12px; bottom: 10px; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.75); font-size: 12px; pointer-events: none; }
.relive-dol .liczby { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; }
.relive-dol .liczby b { font-size: 19px; font-weight: 800; }
.relive-dol .liczby b + * { margin-right: 10px; }
.relive-zrodlo { font-size: 9.5px; opacity: .75; white-space: nowrap; }
.relive-foto { position: absolute; right: 12px; top: 12px; width: 42%; max-width: 200px; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 12px 30px rgba(0,0,0,.55); transform: rotate(3deg); animation: relive-foto .35s ease-out; transition: opacity .4s; }
.relive-foto.znika { opacity: 0; }
@keyframes relive-foto { from { transform: scale(.5) rotate(-8deg); opacity: 0; } to { transform: scale(1) rotate(3deg); opacity: 1; } }
.relive-koniec { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); background: rgba(6,25,32,.86); color: #fff; border-radius: 16px; padding: 14px 18px; text-align: center; min-width: 64%; font-size: 14px; line-height: 1.5; animation: relive-foto .4s ease-out; }
.relive-koniec b { display: block; font-size: 18px; margin-bottom: 4px; }

/* Dziennik: widoki (po dniach / wszystkie zdjęcia / momenty) i filmy w albumie */
.wsp-widok { margin: -2px 0 10px; }
.wsp-photos .mini { position: relative; flex: none; width: 72px; height: 72px; cursor: pointer; }
.wsp-photos .mini img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
/* Dziennik: skok do dziś / do nowego i znaczek „Nowe” od ostatniej wizyty (5.1.34) */
.btn.skok { display: block; width: auto; margin: 0 auto 12px; border-radius: 99px; }
/* Pasek dni (5.1.97, wzór: zakładki segregatora poziomo, decyzja Adriana 14.09): przyklejony pod nagłówkiem, jedno „uszko” na
   dzień, bieżące wyrasta ponad pasek; kropka = dziś (apka) albo nowości od ostatniej wizyty (rodzina); dni przyszłe wyszarzone.
   Wspólny dla apki i strony rodziny (obie ładują app.css); wysokość nagłówka wstawia JS w --hdr. */
.pasek-dni { position: sticky; top: var(--hdr, 66px); z-index: 25; display: flex; gap: 4px; padding: 8px 6px 0; margin: 0 0 12px; background: var(--bg); border-bottom: 2px solid var(--line); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pasek-dni::-webkit-scrollbar { display: none; }
.pasek-dni .ucho { flex: none; min-width: 46px; padding: 6px 9px 7px; border: 1.5px solid var(--line); border-bottom: 0; border-radius: 11px 11px 0 0; background: var(--tint); color: var(--ink-soft); font-family: "Caveat", "Segoe Script", cursive; font-size: 21px; font-weight: 700; line-height: 1; text-align: center; position: relative; top: 2px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pasek-dni .ucho small { display: block; font-family: -apple-system, "Segoe UI", system-ui, sans-serif; font-size: 9.5px; font-weight: 700; letter-spacing: .03em; margin-top: 3px; }
.pasek-dni .ucho.on { background: var(--card); color: var(--ocean); border-color: var(--ocean2); top: 0; box-shadow: inset 0 -3px 0 var(--ocean2); }
.pasek-dni .ucho.przyszly { opacity: .45; cursor: default; }
.pasek-dni .ucho.kropka::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
body.rodzina .pasek-dni { background: var(--bg); }
body.rodzina .pasek-dni .ucho.on { background: var(--paper-card, #fffaf0); }
.edytor .media .dodaj.google { font-size: 20px; }
.now-status .pytania-chip { display: inline-block; margin: 6px 0 10px; background: var(--coral); color: #fff; }
/* polecany przewodnik (5.1.103) */
.card.przewodnik { border: 1.5px solid var(--ocean2); }
.card.przewodnik .przewodnik-imie { display: block; font-family: "Caveat", "Segoe Script", cursive; font-size: 30px; font-weight: 700; color: var(--ocean); line-height: 1; margin: 2px 0 6px; }
.przewodnik-akcje { flex-wrap: wrap; margin-top: 10px; }
.przewodnik-akcje .btn { width: auto; flex: 1 1 auto; text-align: center; text-decoration: none; }
.pasek-dni .ucho.spis { font-family: -apple-system, "Segoe UI", system-ui, sans-serif; font-size: 15px; padding-top: 8px; }
/* jeden dzień na ekranie (5.1.98): strzałki pod kartką i spis dni */
.dzien-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 14px; font-size: 12.5px; }
.dzien-nav .btn { width: auto; flex: 0 0 auto; padding: 9px 14px; border-radius: 99px; }
.dzien-nav .btn:disabled { opacity: .35; }
.spis-dni { display: flex; flex-direction: column; gap: 8px; }
.spis-row { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); cursor: pointer; }
.spis-row .nr { font-family: "Caveat", "Segoe Script", cursive; font-size: 26px; font-weight: 700; color: var(--ocean); width: 34px; flex: none; text-align: center; line-height: 1; }
.spis-row .nr small { display: block; font-family: -apple-system, "Segoe UI", system-ui, sans-serif; font-size: 9px; font-weight: 800; color: var(--ink-soft); margin-top: 2px; white-space: nowrap; }
.spis-row .op { flex: 1; min-width: 0; }
.spis-row .op b { display: block; font-family: "Caveat", "Segoe Script", cursive; font-size: 21px; font-weight: 700; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spis-row .op span { font-size: 11.5px; color: var(--ink-soft); }
.spis-row .mini { display: flex; gap: 3px; flex: none; }
.spis-row .mini img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; display: block; background: var(--tint); }
.spis-row.dzis, .spis-row.nowy { outline: 2px solid var(--ocean2); }
body.rodzina .spis-row { background: #fffaf0; box-shadow: 0 3px 10px rgba(70,50,15,.08); }
.wsp-h .nowe { display: inline-block; background: #e0457b; color: #fff; font: 700 11px/1.6 system-ui, sans-serif; letter-spacing: .3px; border-radius: 99px; padding: 0 8px; margin-left: 8px; vertical-align: middle; transform: rotate(-3deg); }
/* „Na dziś” w Portfelu (5.1.45): kołowy wskaźnik dziennego budżetu */
.daily { display: flex; align-items: center; gap: 14px; }
.daily .ring-box { flex: none; width: 128px; height: 128px; }
.daily .ring { width: 128px; height: 128px; display: block; }
.daily .ring-big { font-size: 26px; font-weight: 800; fill: var(--ink); }
.daily .ring-small { font-size: 11px; fill: var(--ink); opacity: .6; }
.daily .daily-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.daily .daily-big { font-size: 20px; font-weight: 800; line-height: 1.15; color: #1f8f5a; }
.daily .daily-big.bad { color: #c0392b; }
.place .nawiguj { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--tint); font-size: 17px; cursor: pointer; margin-left: 6px; }
.daily.mala { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.daily.mala .ring-box, .daily.mala .ring { width: 96px; height: 96px; }
.daily.mala .daily-big { font-size: 18px; }

/* ---- Portfel: dzień po dniu (5.1.80) - słupki wydatków na tle kroczącego budżetu dnia ---- */
.hist-pod { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.hist-k { background: var(--tint); border-radius: var(--r-sm); padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.hist-k b { font-size: 20px; font-weight: 800; line-height: 1.1; }
.hist-k span { font-size: 11.5px; color: var(--ink-soft); line-height: 1.25; }
.hist-k.ok b { color: #1f8f5a; }
.hist-k.blisko b { color: #d68910; }
.hist-k.ponad b { color: #c0392b; }
.hist-wykres { margin: 0 -4px; }
.hist-wykres.szeroki { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hist-wykres.szeroki::-webkit-scrollbar { display: none; }
.hist-svg { display: block; width: 100%; height: auto; }
.hist-os { stroke: var(--line); stroke-width: 1; }
.hist-slupek { fill: #1f8f5a; opacity: .85; cursor: pointer; }
.hist-slupek.blisko { fill: #d68910; }
.hist-slupek.ponad { fill: #c0392b; }
.hist-slupek.wybrany { opacity: 1; stroke: var(--ink); stroke-width: 1.5; }
.hist-proc { font-size: 9.5px; font-weight: 700; fill: var(--ink-soft); }
.hist-proc.ponad { fill: #c0392b; }
.hist-dzien { font-size: 10px; fill: var(--ink-soft); }
.hist-dzien.dzis { fill: var(--ink); font-weight: 800; }
.hist-linia { fill: none; stroke: var(--ocean); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.hist-linia.plan { stroke-dasharray: 4 4; opacity: .7; }
.hist-legenda { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px; color: var(--ink-soft); margin: 6px 0 4px; }
.hist-leg { display: inline-flex; align-items: center; gap: 5px; }
.hist-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: #1f8f5a; }
.hist-leg.blisko i { background: #d68910; }
.hist-leg.ponad i { background: #c0392b; }
.hist-leg.linia i, .hist-leg.plan i { width: 14px; height: 0; border-top: 2px solid var(--ocean); border-radius: 0; background: none; }
.hist-leg.plan i { border-top-style: dashed; }
.hist-lista { margin-top: 6px; }
.hist-row { padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.hist-row-t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.hist-row-t b { font-weight: 800; }
.hist-row-k { white-space: nowrap; text-align: right; }
.hist-bar { margin-top: 6px; height: 7px; }
.hist-fill { height: 100%; border-radius: 99px; background: #1f8f5a; }
.hist-fill.blisko { background: #d68910; }
.hist-fill.ponad { background: #c0392b; }
.hist-opis { font-size: 12.5px; margin-top: 4px; }
.hist-opis.ponad { color: #c0392b; }
.hist-wydatki { margin-top: 8px; background: var(--tint); border-radius: var(--r-sm); padding: 6px 10px; }
.hist-w { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; }
.hist-w + .hist-w { border-top: 1px solid var(--line); }
.hist-w b { white-space: nowrap; font-weight: 700; }
/* pigułka pod „Na dziś”: ostatnie dni jako mini słupki */
.hist-mini { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 10px 12px; background: var(--tint); border: 0; border-radius: var(--r-sm); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.hist-mini-s { display: flex; align-items: flex-end; gap: 4px; height: 38px; flex: none; }
.hist-mini-k { width: 12px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.hist-mini-k i { display: block; width: 100%; border-radius: 3px 3px 1px 1px; background: #1f8f5a; }
.hist-mini-k.blisko i { background: #d68910; }
.hist-mini-k.ponad i { background: #c0392b; }
.hist-mini-k span { font-size: 8.5px; color: var(--ink-soft); line-height: 1; }
.hist-mini-k.dzis span { color: var(--ink); font-weight: 800; }
.hist-mini-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13.5px; }
.hist-mini-tx b { font-weight: 700; }
.hist-mini-tx .muted { font-size: 12px; }
/* Widoczność wpisu (5.1.41): publiczny / prywatny */
.wid-toggle { display: flex; gap: 8px; margin-top: 4px; }
.wid-toggle button { flex: 1; border: 1.5px solid var(--line, #d9c7a6); background: var(--card); color: var(--ink); border-radius: 14px; padding: 11px 10px; font-weight: 700; font-size: 14px; cursor: pointer; }
.wid-toggle button.on { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.tl-prywatny { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.08); border-radius: 99px; padding: 1px 7px; vertical-align: middle; }
.dv-meta .dv-wpis { margin-top: 6px; font-size: 14px; opacity: .9; }
/* Kto widział (5.1.36): rząd pod dniem i awatary pod ostatnią przeczytaną wiadomością - jak w Messengerze */
.widziane { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; opacity: .8; }
/* stan pusty (5.1.118): cisza ma wyglądać na odpowiedź, nie na brak funkcji - stąd kursywa i oczy.
   Bez własnego `opacity` - `.widziane` ma już .8, a dwie warstwy dawały ledwie widoczny szary. */
.widziane.pusto { font-style: italic; }
.widziane.pusto::before { content: "👀"; font-style: normal; font-size: 13px; }
.wsp-day .widziane { border-top: 1px dashed rgba(120,100,70,.3); margin-top: 12px; padding-top: 10px; color: #5d5344; opacity: 1; }
.widziane .stos-aw { display: flex; padding-left: 6px; flex: none; }
.widziane .aw, .czat .odczyty .aw { width: 22px; height: 22px; border-radius: 50%; margin-left: -6px; border: 2px solid var(--card); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 10px; color: #fff; background: linear-gradient(135deg, var(--ocean), var(--ocean2)); overflow: hidden; flex: none; }
.widziane .aw.emo, .czat .odczyty .aw.emo { background: var(--tint); font-size: 12px; }
.widziane .aw img, .czat .odczyty .aw img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.widziane span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.czat .odczyty { display: flex; justify-content: flex-end; align-self: flex-end; gap: 2px; margin: 1px 4px 3px 0; }
.czat .odczyty .aw { width: 16px; height: 16px; font-size: 8px; margin-left: -4px; border-width: 1px; }
.czat .odczyty .aw.emo { font-size: 10px; }
/* Okładka filmu (5.1.35): kadr, na środku kółko z ▶, u dołu delikatny cień pod czasem trwania */
.film { position: relative; }
.film::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,0)); border-radius: inherit; pointer-events: none; }
.film::after { content: "▶"; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(255,255,255,.88); color: #12303a; font-size: 18px; line-height: 44px; text-align: center; text-indent: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.35); pointer-events: none; }
.mini.film::after { width: 34px; height: 34px; margin: -17px 0 0 -17px; font-size: 14px; line-height: 34px; }
.tl-post .media .mini.film::before, .wsp-photos .mini.film::before { bottom: 22px; }
.tl-post .media .mini.film::after, .wsp-photos .mini.film::after { top: 45%; }
.wideo-znak { position: absolute; left: 5px; bottom: 5px; background: rgba(0,0,0,.62); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 99px; padding: 1px 6px; pointer-events: none; line-height: 1.5; }
.gal-kafel .wideo-znak { left: 6px; bottom: 6px; font-size: 12px; }
.dv-body video.dv-wideo { max-width: 96vw; max-height: 62vh; width: 100%; border-radius: 10px; background: #000; display: block; }

/* ---------- wpis jak post na blogu: edytor na cały ekran i post w osi dnia ---------- */
body.bez-przewijania { overflow: hidden; }
.edytor { position: fixed; inset: 0; z-index: 95; background: var(--bg); color: var(--ink); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 14px calc(40px + env(safe-area-inset-bottom)); }
.edytor-pas { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 0 10px; background: var(--bg); border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.edytor-pas b { font-size: 16px; text-align: center; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edytor-pas .btn { width: auto; flex: none; padding: 9px 14px; box-shadow: none; }
.edytor label { display: block; font-size: 12.5px; color: var(--ink-soft); margin: 14px 0 6px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.edytor input[type=text], .edytor input[type=time], .edytor select, .edytor textarea { width: 100%; }
.edytor input.tytul { font-size: 19px; font-weight: 700; }
.edytor textarea { min-height: 140px; font-size: 16px; line-height: 1.45; resize: vertical; }
.edytor .row { display: flex; gap: 8px; }
.edytor .row > * { flex: 1; min-width: 0; }
.edytor .pin { display: flex; gap: 8px; align-items: stretch; }
.edytor .pin input { flex: 1; min-width: 0; }
.edytor .pin .btn { width: auto; flex: none; padding: 10px 12px; }
.edytor .muted { font-size: 12.5px; margin-top: 6px; }
.edytor .media { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.edytor .media .mini { position: relative; width: 86px; height: 86px; }
.edytor .media .mini img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; cursor: pointer; }
.edytor .media .mini .del { position: absolute; top: -7px; right: -7px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bg); background: var(--coral); color: #fff; font-size: 12px; cursor: pointer; padding: 0; line-height: 1; }
.edytor .media .dodaj { width: 86px; height: 86px; border-radius: 12px; border: 2px dashed var(--ocean); background: var(--tint); color: var(--ocean); font-size: 30px; cursor: pointer; }
.edytor .btn.zle { color: var(--coral); }
.tl-post { padding: 10px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.tl-post .tl-naglowek { display: flex; align-items: center; gap: 9px; }
.tl-post .tl-b b { font-size: 15px; }
.tl-post .opis { white-space: pre-wrap; font-size: 14.5px; line-height: 1.45; margin: 6px 0 0 75px; }
.tl-post .media { display: flex; gap: 6px; overflow-x: auto; margin: 8px 0 0 75px; padding-bottom: 2px; scrollbar-width: none; }
.tl-post .media::-webkit-scrollbar { display: none; }
.tl-post .media .mini { position: relative; flex: none; width: 104px; height: 104px; }
.tl-post .media .mini img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.tl .btn.sec { margin-top: 10px; }
@media (max-width: 420px) { .tl-post .opis, .tl-post .media { margin-left: 0; } }
.tl-opis { white-space: pre-wrap; font-size: 13.5px; line-height: 1.4; margin-top: 4px; color: var(--ink); }

/* ---------- wpis jak kartka z dziennika: karta z kolorowym brzegiem, godzina pismem odręcznym,
   zdjęcia w białych ramkach jak polaroidy (u Ciebie i u rodziny te same style) ---------- */
.tl-post { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 12px 18px; margin: 12px 0; box-shadow: var(--shadow); overflow: hidden; cursor: default; }
.tl-post::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, var(--ocean), var(--ocean2)); }
.tl-post .tl-naglowek { display: flex; align-items: center; gap: 12px; }
.tl-post .tl-t { width: auto; font-family: 'Caveat', 'Segoe Script', cursive; font-size: 24px; font-weight: 600; color: var(--ocean); line-height: 1; }
.tl-post .tl-i { width: 36px; height: 36px; border-radius: 50%; background: var(--tint); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.tl-post .tl-b b { font-size: 17px; font-weight: 800; line-height: 1.2; }
.tl-post .tl-b .muted { font-size: 12.5px; margin-top: 2px; }
.tl-post .opis, .tl-post .media, .tl-post .gal-grid { margin-left: 0; }
.tl-post .opis { margin-top: 10px; font-size: 15px; line-height: 1.5; }
.tl-post .media { margin: 12px -6px 0; padding: 8px 8px 10px; gap: 14px; }
.tl-post .media .mini { width: 128px; height: 128px; padding: 7px 7px 20px; box-sizing: content-box; background: #fff; border-radius: 4px; box-shadow: 0 8px 18px rgba(0,0,0,.22); transform: rotate(-2deg); }
.tl-post .media .mini:nth-child(even) { transform: rotate(1.8deg); }
.tl-post .media .mini img { border-radius: 2px; }
.tl-post .media .mini .wideo-znak { left: 12px; bottom: 26px; }
.tl-post .media .mini .reakcje-znak { position: absolute; right: 10px; bottom: 3px; font-size: 11px; color: #0b1a1f; font-weight: 700; }
.edytor label.przelacznik { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); font-weight: 600; margin-top: 12px; cursor: pointer; }
.edytor label.przelacznik input { width: 20px; height: 20px; margin: 0; flex: none; }

/* ================= karta dnia jak kartka ze scrapbooka (apka i strona rodziny) ================= */
.wsp-day { position: relative; margin: 14px 0; padding: 18px 16px 16px; border-radius: 22px; border: 1px solid #ecdfc8;
  background-color: #fbf5e9;
  background-image: radial-gradient(circle at 12% 8%, rgba(255,255,255,.7), transparent 38%), radial-gradient(circle at 88% 92%, rgba(240,200,150,.25), transparent 40%),
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 0 0.2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  color: #1d2b33; box-shadow: 0 10px 30px rgba(60,40,10,.14), inset 0 0 0 1px rgba(255,255,255,.6); overflow: hidden; }
.wsp-day:last-child { border-bottom: 1px solid #ecdfc8; }
.wsp-day::after { content: "🌴"; position: absolute; right: -6px; bottom: -10px; font-size: 64px; opacity: .13; transform: rotate(-12deg); pointer-events: none; }
.wsp-day .muted { color: #6f7d84; }
.wsp-day b, .wsp-day .tl-b, .wsp-day .wsp-fact, .wsp-day .opis, .wsp-day .tl-opis { color: #1d2b33; }
/* nagłówek: „Dzień 3” z pociągnięciem pędzla, data pismem odręcznym z podkreśleniem */
.wsp-day .wsp-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-right: 0; }
.wsp-day .wsp-h b { position: relative; display: inline-block; flex: 0 0 auto; font-family: 'Caveat', 'Segoe Script', cursive; font-weight: 600; font-size: 38px; line-height: 1; color: #1d2b33; padding: 0 6px; z-index: 0; }
.wsp-day .wsp-h b::before { content: ""; position: absolute; left: -4px; right: -8px; top: 42%; height: 46%; background: rgba(247,168,178,.55); border-radius: 6px 12px 8px 14px; transform: rotate(-2deg); z-index: -1; }
.wsp-day .wsp-h .muted { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 20px; color: #2d3f49; border-bottom: 1.5px solid #2d3f49; padding: 0 4px 0; transform: rotate(-2deg); white-space: nowrap; }
.wsp-day .naklejka { position: absolute; right: 14px; top: 64px; font-family: 'Caveat', 'Segoe Script', cursive; font-size: 19px; color: #1f5a66; transform: rotate(6deg); max-width: 46%; text-align: center; line-height: 1.05; pointer-events: none; opacity: .95; }
.wsp-day .naklejka::before { content: "☀️"; display: block; font-size: 15px; opacity: .8; margin-bottom: 2px; }
/* tytuł dnia i notatka: jak wpisane długopisem */
.wsp-day .wsp-tytul { margin: 6px 0 2px; max-width: 58%; }
.wsp-day .wsp-tytul input, .wsp-tytul-r { font-family: 'Caveat', 'Segoe Script', cursive; font-weight: 600; font-size: 30px; line-height: 1.1; color: #1d2b33; background: transparent; border: 0; border-bottom: 1.5px dashed #d9c7a6; border-radius: 0; padding: 4px 2px; box-shadow: none; }
.wsp-tytul-r { display: block; max-width: 58%; margin: 6px 0 2px; }
.wsp-day .wsp-tytul input::placeholder { color: #b39f7d; }
.wsp-day .wsp-note, .wsp-day .wsp-fact { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 21px; line-height: 1.3; color: #22323b; }
.wsp-day .wsp-note { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 6px 2px; margin-top: 4px; min-height: 60px;
  background-image: repeating-linear-gradient(transparent 0 26px, rgba(120,100,60,.18) 26px 27px); background-attachment: local; }
.wsp-day .wsp-note::placeholder { color: #b39f7d; }
.wsp-day .wsp-facts .wsp-fact { font-family: inherit; font-size: 13.5px; }
/* oś czasu: kropki na pionowej linii, pastelowe kółka z ikoną, godzina nad tytułem */
.wsp-day .tl { position: relative; margin: 10px 0 4px; padding-left: 4px; }
.wsp-day .tl::before { content: ""; position: absolute; left: 11px; top: 14px; bottom: 70px; border-left: 2px dashed #7fb1bd; opacity: .7; }
.wsp-day .tl-row { display: grid; grid-template-columns: 52px 1fr auto; grid-template-areas: "i t x" "i b x"; align-items: center; gap: 0 10px; padding: 8px 0; border-bottom: 0; position: relative; }
.wsp-day .tl-row::before, .wsp-day .tl-post::before { content: ""; position: absolute; left: 6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #2a8fa3; box-shadow: 0 0 0 3px #fbf5e9; }
.wsp-day .tl-row .tl-i { grid-area: i; width: 44px; height: 44px; margin-left: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; background: #dcecf7; box-shadow: 0 3px 8px rgba(30,60,80,.12); }
.wsp-day .tl-row:nth-child(4n+2) .tl-i { background: #fbdada; }
.wsp-day .tl-row:nth-child(4n+3) .tl-i { background: #fff0c2; }
.wsp-day .tl-row:nth-child(4n) .tl-i { background: #d8f0e2; }
.wsp-day .tl-row .tl-t { grid-area: t; width: auto; font-size: 13px; color: #5d6d76; align-self: end; }
.wsp-day .tl-row .tl-b { grid-area: b; font-size: 15px; align-self: start; }
.wsp-day .tl-row .tl-b b { font-size: 21px; font-weight: 800; line-height: 1.1; }
.wsp-day .tl-row .tl-b .muted::before { content: "📍 "; }
.wsp-day .tl-row .tl-img, .wsp-day .tl-row .del { grid-area: x; }
.wsp-day .tl-row .del { background: none; border: 0; color: #2a8fa3; font-size: 16px; }
/* wpis z opisem i zdjęciami: fragment kartki, polaroidy z taśmą i podpisem */
.wsp-day .tl-post { background: rgba(255,255,255,.55); border: 1px solid rgba(217,199,166,.7); box-shadow: 0 6px 18px rgba(60,40,10,.10); margin: 10px 0 10px 24px; padding: 12px 12px 10px 14px; overflow: visible; }
.wsp-day .tl-post::after { display: none; }
.wsp-day .tl-post::before { left: -18px; top: 26px; margin: 0; width: 10px; height: 10px; }
.wsp-day .tl-post .tl-naglowek { display: grid; grid-template-columns: 44px 1fr auto; grid-template-areas: "i t x" "i b x"; gap: 0 10px; align-items: center; }
.wsp-day .tl-post .tl-i { grid-area: i; width: 44px; height: 44px; font-size: 22px; background: #fbdada; }
.wsp-day .tl-post .tl-t { grid-area: t; font-size: 22px; align-self: end; color: #1f5a66; }
.wsp-day .tl-post .tl-b { grid-area: b; }
.wsp-day .tl-post .tl-b b { font-size: 21px; }
.wsp-day .tl-post .tl-b .muted::before { content: "📍 "; }
.wsp-day .tl-post .del { grid-area: x; background: none; border: 0; color: #2a8fa3; }
.wsp-day .tl-post .opis { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 21px; line-height: 1.25; color: #22323b; }
.wsp-day .tl-post .media { margin: 12px -4px 0; padding: 14px 6px 8px; gap: 18px; }
.wsp-day .tl-post .media .mini, .tl-post .media .mini { position: relative; width: 150px; height: 150px; padding: 8px 8px 30px; background: #fff; border-radius: 3px; box-shadow: 0 10px 22px rgba(40,30,10,.22); transform: rotate(-2.5deg); overflow: visible; }
.tl-post .media .mini:nth-child(even) { transform: rotate(2deg); }
.tl-post .media .mini::before { content: ""; position: absolute; left: 50%; top: -9px; width: 70px; height: 20px; margin-left: -35px; background: rgba(247,168,178,.65); transform: rotate(-3deg); border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tl-post .media .mini:nth-child(even)::before { background: rgba(150,210,220,.7); transform: rotate(3deg); }
.tl-post .media .mini .podpis { position: absolute; left: 6px; right: 6px; bottom: 6px; font-family: 'Caveat', 'Segoe Script', cursive; font-size: 17px; line-height: 1; color: #1d2b33; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-post .media .mini .reakcje-znak { bottom: 26px; right: 12px; background: rgba(255,255,255,.85); border-radius: 99px; padding: 1px 6px; }
.tl-post .media .mini .wideo-znak { left: 12px; bottom: 34px; }
/* luźne zdjęcia dnia: małe polaroidy */
.wsp-day .wsp-photos { gap: 12px; padding: 10px 4px 6px; }
.wsp-day .wsp-photos .mini { width: 78px; height: 78px; padding: 5px 5px 14px; box-sizing: content-box; background: #fff; border-radius: 3px; box-shadow: 0 6px 14px rgba(40,30,10,.18); transform: rotate(-3deg); }
.wsp-day .wsp-photos .mini:nth-child(even) { transform: rotate(2.5deg); }
.wsp-day .wsp-photos .mini img { border-radius: 2px; }
.wsp-day .wsp-add { width: 78px; height: 78px; border: 2px dashed #b9a684; color: #6f7d84; background: rgba(255,255,255,.4); border-radius: 8px; }
/* duży „+ Dodaj wpis” i pigułka z krokami */
.wsp-day .tl .btn.sec { display: block; width: min(100%, 360px); margin: 12px auto 4px; border-radius: 999px; padding: 15px 18px; font-size: 18px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #2a8fa3, #4ec3d4); box-shadow: 0 8px 20px rgba(42,143,163,.35); }
.wsp-day .wsp-ruch > .muted { display: inline-block; background: rgba(255,255,255,.7); border: 1px solid #d9c7a6; border-radius: 999px; padding: 8px 14px; font-size: 13.5px; color: #1d2b33; }
.wsp-day .wsp-ruch .row .btn { width: auto; display: inline-block; }
.wsp-day .btn.ghost { border-color: #b9a684; color: #4a5a63; }
.wsp-day .btn.mini { width: auto; display: inline-block; }
/* strona rodziny na papierze: reakcje, przycisk czatu, siatka */
.wsp-day .reakcje .reakcja { background: rgba(255,255,255,.8); border-color: #d9c7a6; }
.wsp-day .o-czym-row .napisz { background: #dcecf7; }
.wsp-day .o-czym-row .ile { color: #5d6d76; }
.wsp-day .gal-grid img { border: 5px solid #fff; box-shadow: 0 6px 14px rgba(40,30,10,.18); }
@media (max-width: 480px) {
  .wsp-day { padding: 16px 12px 14px; }
  .wsp-day .wsp-h b { font-size: 32px; }
  .wsp-day .naklejka { top: 60px; font-size: 16px; max-width: 42%; }
  .wsp-day .tl-post { margin-left: 16px; }
  .wsp-day .tl-post .media .mini, .tl-post .media .mini { width: 128px; height: 128px; }
}

/* ================= strona rodziny i znajomych w klimacie scrapbooka ================= */
body.rodzina { --bg: #f4ecdd; --card: #fffaf0; --tint: #f3e4cf; --line: #e3d5bb; --ink: #1d2b33; --ink-soft: #6f7d84; --ocean: #1f7f93; --ocean2: #3fb3c6; --navy: #1d2b33; --shadow: 0 8px 24px rgba(70,50,15,.13);
  color-scheme: light; color: #1d2b33; background-color: #f4ecdd;
  background-image: radial-gradient(circle at 8% 4%, rgba(255,255,255,.8), transparent 30%), radial-gradient(circle at 92% 96%, rgba(240,200,150,.28), transparent 36%),
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 0 0.2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  }
body.rodzina::after { content: "🌺"; position: fixed; left: -10px; bottom: 74px; font-size: 76px; opacity: .10; transform: rotate(-16deg); pointer-events: none; z-index: 0; }
body.rodzina main { position: relative; z-index: 1; }
/* strona rodziny: „Odbiór z lotniska” i „Słowo dnia” (5.1.81) */
.odbior-big { font-size: 40px; font-weight: 800; line-height: 1.05; margin-top: 2px; }
.odbior-stan { margin-top: 8px; font-size: 14px; }
.odbior-w { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); margin-top: 8px; font-size: 14px; }
.odbior-w b { font-weight: 800; white-space: nowrap; }
.odbior-w .chip { margin-left: auto; }
.odbior-min { width: 84px; flex: none; padding: 8px 10px; font-size: 16px; }
.odbior-akcje { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.odbior-akcje .btn { width: auto; flex: 1 1 auto; text-align: center; text-decoration: none; }
.slowo-big { font-family: "Caveat", cursive; font-size: 40px; line-height: 1.05; color: var(--ocean); }
.slowo-wym { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.slowo-pl { font-size: 16px; font-weight: 700; margin-top: 6px; }
/* nagłówek: kartka, nazwa podróży pismem odręcznym */
body.rodzina header { background: linear-gradient(90deg, #fbf5e9, #f4ecdd); color: #1d2b33; box-shadow: 0 4px 14px rgba(70,50,15,.10); border-bottom: 1px dashed #d9c7a6; }
body.rodzina header h1 { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 30px; font-weight: 600; color: #1d2b33; letter-spacing: 0; }
body.rodzina header h1 span { color: #1f7f93; }
body.rodzina header .sub { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 17px; color: #6f7d84; opacity: 1; margin-top: -2px; }
body.rodzina #theme-btn { display: none; }
/* hero: zdjęcie w białej ramce, lekko przekrzywione */
body.rodzina .hero { height: 176px; border-radius: 4px; margin: 18px 10px 24px; border: 9px solid #fff; border-bottom-width: 30px; box-shadow: 0 12px 26px rgba(70,50,15,.24); transform: rotate(-1.4deg); }
body.rodzina .hero h2 { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 36px; font-weight: 600; }
body.rodzina .hero .script { font-size: 21px; }
/* karty jak kartki z taśmą washi */
body.rodzina .card { position: relative; border-radius: 6px; background-color: #fffaf0;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 0 0.2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  border: 1px solid #ecdfc8; box-shadow: 0 8px 22px rgba(70,50,15,.14); margin: 20px 4px 22px; padding: 20px 16px 16px; }
body.rodzina .card::before { content: ""; position: absolute; top: -10px; left: 50%; width: 96px; height: 22px; margin-left: -48px; background: rgba(247,168,178,.62); transform: rotate(-2.5deg); border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.08); z-index: 1; }
body.rodzina .card:nth-of-type(even)::before { background: rgba(150,210,220,.72); transform: rotate(2deg); }
body.rodzina .card:nth-of-type(3n)::before { background: rgba(255,224,130,.75); transform: rotate(-1deg); }
body.rodzina .card h2 { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 28px; font-weight: 600; color: #1d2b33; margin-bottom: 10px; line-height: 1.05; }
body.rodzina .card h2 img { width: 34px; height: 34px; }
body.rodzina .card.bez-tla { background: none; border: 0; box-shadow: none; padding: 0 2px; margin: 8px 0 12px; }
body.rodzina .card.bez-tla::before { display: none; }
body.rodzina .card.bez-tla > h2 { padding: 0 8px; }
body.rodzina .card.bez-tla > .muted { padding: 0 8px; }
body.rodzina .muted { color: #6f7d84; }
body.rodzina .hint { background: rgba(255,255,255,.55); border: 1px dashed #d9c7a6; }
/* teraz: kafel stanu w białej ramce */
body.rodzina .now-hero { border: 9px solid #fff; border-radius: 4px; box-shadow: 0 12px 26px rgba(70,50,15,.22); transform: rotate(.8deg); margin: 16px 8px 24px; }
/* pasek zakładek na papierze, podpisy pismem odręcznym */
body.rodzina nav.tabs { background: #fbf5e9; border-top: 1px dashed #d9c7a6; box-shadow: 0 -4px 16px rgba(70,50,15,.10); }
body.rodzina nav.tabs button { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 16px; color: #6f7d84; }
body.rodzina nav.tabs button.on { color: #1f7f93; }
body.rodzina nav.tabs button.on::after { background: #1f7f93; }
/* wejście: kartka z taśmą */
body.rodzina #lock .lock-card { position: relative; background: #fffaf0; border: 1px solid #ecdfc8; border-radius: 6px; box-shadow: 0 12px 30px rgba(70,50,15,.22); transform: rotate(-1.2deg); }
body.rodzina #lock .lock-card::before { content: ""; position: absolute; top: -10px; left: 50%; width: 96px; height: 22px; margin-left: -48px; background: rgba(247,168,178,.62); transform: rotate(-2.5deg); border-radius: 2px; }
body.rodzina #lock h1 { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 40px; font-weight: 600; }
body.rodzina #lock .lock-card h2 { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 36px; font-weight: 600; color: #1d2b33; }
body.rodzina #lock .lock-card input { background: #fff; border: 0; border-bottom: 1.5px dashed #d9c7a6; border-radius: 0; font-family: 'Caveat', 'Segoe Script', cursive; font-size: 24px; }
/* galeria: polaroidy */
body.rodzina .gal-grid { gap: 20px 16px; padding: 10px 6px 6px; }
body.rodzina .gal-kafel { background: #fff; padding: 6px 6px 24px; border-radius: 3px; box-shadow: 0 8px 18px rgba(40,30,10,.2); transform: rotate(-2deg); }
body.rodzina .gal-kafel:nth-child(even) { transform: rotate(2deg); }
body.rodzina .gal-kafel:nth-child(3n) { transform: rotate(-.6deg); }
body.rodzina .gal-kafel img { border-radius: 2px; }
body.rodzina .gal-kafel .gal-znak { bottom: 3px; right: 8px; background: none; color: #1d2b33; font-family: 'Caveat', 'Segoe Script', cursive; font-size: 16px; padding: 0; }
body.rodzina .wsp-day .gal-grid img { border: 0; box-shadow: none; }
body.rodzina .wsp-moment img { border: 5px solid #fff; border-radius: 3px; box-shadow: 0 6px 14px rgba(40,30,10,.18); transform: rotate(-2deg); }
/* filtry, reakcje, przyciski na papierze */
body.rodzina .filtry button { background: #fffaf0; border: 1px solid #e3d5bb; }
body.rodzina .reakcja { background: #fff; border-color: #e3d5bb; }
/* pola pisania u rodziny (5.1.52, uwaga Pawła: „słabo widzę literki”): jawny ciemny tekst i białe tło, odporne na
   wymuszany tryb ciemny przeglądarki (Chrome „automatycznie przyciemniaj strony” rozjaśniał tekst, tło zostawiał jasne) */
body.rodzina input, body.rodzina textarea, body.rodzina select { color: #1d2b33 !important; -webkit-text-fill-color: #1d2b33 !important; caret-color: #1f7f93; background-color: #fff !important; }
body.rodzina .czat-pasek .pole { background: #fff !important; border-color: #d9c7a6; }
body.rodzina .czat-pasek .pole textarea { color: #1d2b33 !important; -webkit-text-fill-color: #1d2b33 !important; background: none !important; }
body.rodzina ::placeholder { color: #8a949a !important; -webkit-text-fill-color: #8a949a !important; opacity: 1; }
body.rodzina .btn.sec { background: #fff; border: 1.5px solid #cfe0e4; color: #1f7f93; }
body.rodzina .ekipa-row { border-bottom: 1px dashed #e3d5bb; }
/* czat jak Messenger, tylko na papierze */
body.rodzina .czat-naglowek { border-bottom: 1px dashed #d9c7a6; }
body.rodzina .czat-naglowek .tyt b { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 25px; font-weight: 600; }
body.rodzina .czat-naglowek .stos .awatar { border-color: #f4ecdd; }
body.rodzina .czat .znaczek { border-color: #f4ecdd; }
body.rodzina .czat-pasek .pole { background: #fff; border: 1px solid #e3d5bb; }
/* stopka */
body.rodzina .stopka { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 16px; }
body.rodzina .stopka .script { color: #1f7f93; font-size: 24px; }
@media (max-width: 480px) { body.rodzina .hero { height: 160px; margin: 14px 8px 20px; } body.rodzina .card { margin: 18px 2px 20px; padding: 18px 13px 14px; } }

/* stos polaroidów we wpisie: rozrzucone, jedno na drugim, w całości w okienku */
.tl-post .media.stos { position: relative; display: block; height: 0; padding: 0 0 var(--h, 80%); margin: 14px 2px 6px; overflow: visible; }
.tl-post .media.stos .mini { position: absolute; left: var(--l, 0); top: var(--t, 0); width: var(--w, 50%); height: auto; padding: 4% 4% 13%; box-sizing: border-box; transform: rotate(var(--r, -3deg)); transition: transform .15s, z-index 0s; }
.tl-post .media.stos .mini:nth-child(even) { transform: rotate(var(--r, 3deg)); }
.tl-post .media.stos .mini img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.tl-post .media.stos .mini:active { transform: rotate(0deg) scale(1.04); z-index: 50 !important; }
.tl-post .media.stos .mini .podpis { font-size: 15px; bottom: 4%; }
.tl-post .media.stos .mini::before { width: 44%; margin-left: -22%; height: 14px; top: -7px; }
.tl-post .media.stos .mini .wideo-znak { left: 8%; bottom: 17%; }
.tl-post .media.stos .mini .reakcje-znak { bottom: 14%; right: 8%; }

/* dwa zegary na Dziś: Polska i cel podróży */
/* Kafelki „u nas / tam” na hero (5.1.113, wzór z makiety „pulpit 1”): szkło na zdjęciu,
   ikona pogody przy godzinie, pod spodem miejsce, temperatura i pigułka z opisem. */
.now-zegary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 0; }
.now-zegary.jeden { grid-template-columns: 1fr; }
.now-zegar { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.24); border-radius: 16px;
  padding: 11px 10px 10px; text-align: center; color: #fff; }
.nz-gora { display: flex; align-items: center; justify-content: center; gap: 7px; }
.nz-ikona { font-size: 21px; line-height: 1; }
.now-zegar b { font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.nz-gdzie { display: block; font-size: 11.5px; opacity: .88; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-zegar i { display: block; font-style: normal; font-size: 19px; font-weight: 800; margin-top: 5px; line-height: 1.1; }
.nz-opis { display: block; margin: 6px auto 0; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.18);
  font-size: 10.5px; font-weight: 600; line-height: 1.2; }

/* strona rodziny: dzwonek powiadomień w nagłówku, karta „Dodaj do ekranu głównego” */
body.rodzina #dzwonek { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #e3d5bb; background: #fffaf0; font-size: 19px; cursor: pointer; flex: none; box-shadow: 0 2px 8px rgba(70,50,15,.12); }
body.rodzina #dzwonek.on { background: #dcecf7; border-color: #9fd0dc; }
body.rodzina #dzwonek[hidden] { display: none; }
body.rodzina .card.instaluj { border-left: 6px solid #1f7f93; }
body.rodzina .card.instaluj .btn { width: auto; display: inline-block; margin-right: 8px; }

/* nagłówek grupy i lista ekipy także w apce (style bazowe awatara i wiersza - strona rodziny ma swoje w bliscy.html) */
.awatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--ocean), var(--ocean2)); overflow: hidden; }
.awatar.emo { background: var(--tint); font-size: 20px; }
.awatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ekipa-row { display: flex; gap: 11px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ekipa-row:last-child { border: 0; }
.ekipa-row .e-i { flex: 1; min-width: 0; }
.ekipa-row .e-i b { font-size: 15px; }
.ekipa-row .e-i .muted { font-size: 12.5px; }
.ekipa-row .e-n { flex: none; font-size: 11.5px; color: var(--ink-soft); text-align: right; }
.ekipa-row.zablok { opacity: .55; }
#wsp-czat .czat-naglowek { position: static; margin: -4px 0 6px; }

/* toast: krótki = pigułka, dłuższy = prostokąt z zawijaniem (długi tekst w pigułce zamieniał się w koło) */
.toast { max-width: min(92vw, 420px); width: max-content; white-space: normal; text-align: center; line-height: 1.35; }
.toast.dlugi { border-radius: 16px; padding: 12px 16px; font-size: 14px; }

/* przyciski przy osobie w liście ekipy (apka właściciela) */
.ekipa-row { flex-wrap: wrap; }
.ekipa-row .e-akcje { display: flex; gap: 6px; width: 100%; padding-left: 45px; margin-top: 2px; }
.ekipa-row .e-akcje .btn.mini { width: auto; display: inline-block; padding: 6px 11px; font-size: 12.5px; }
.ekipa-row .e-akcje .btn.zle { color: var(--coral); border-color: rgba(232,84,63,.45); }

/* ===== Przeglądarka zdjęć i filmów (5.1.42) - jedna dla apki (szczegolZdjecia) i strony rodziny (lightbox) =====
   Style przeniesione z bliscy.html; zmieniaj tu, nie tam. */
/* Przeglądarka zdjęć (5.1.40, wzór od Adriana): jasny ekran, nagłówek z licznikiem, karta zdjęcia z pinezką i naklejką,
   arkusz z reakcjami i kafelkami. Przesunięcie palcem po zdjęciu zmienia je. */
.lb { position: fixed; inset: 0; z-index: 200; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: linear-gradient(180deg, var(--tint) 0%, var(--bg) 38%, var(--bg) 100%); color: var(--ink); }
.lb .lb-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 14px 0; }
.lb .lb-top .okr { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.12); font-size: 22px; line-height: 42px; text-align: center; cursor: pointer; flex: none; }
.lb .lb-top .logo { flex: 1; text-align: center; font-family: "Caveat", cursive; font-size: 24px; color: var(--ocean); line-height: 1; }
.lb .lb-top .logo small { display: block; font-family: system-ui, sans-serif; font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-soft, #6b7a80); margin-top: 3px; }
.lb .lb-tyt { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 8px 18px 10px; }
.lb .lb-tyt b { font-size: 24px; font-weight: 800; display: block; line-height: 1.15; }
.lb .lb-tyt .sub { font-size: 13.5px; opacity: .75; margin-top: 3px; }
.lb .lb-licz { flex: none; font-size: 13px; font-weight: 700; background: #fff; border-radius: 99px; padding: 6px 12px; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.lb .lb-karta { position: relative; margin: 0 12px; border-radius: 20px; overflow: hidden; background: #0b171b; box-shadow: 0 10px 30px rgba(0,0,0,.18); touch-action: pan-y; }
.lb .lb-karta img, .lb .lb-karta video { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: #0b171b; }
@keyframes lb-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.lb .lb-pin { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); color: var(--ink); border-radius: 99px; padding: 7px 12px 7px 9px; font-size: 13.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.15); max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.lb .lb-nakl { position: absolute; right: 12px; bottom: 12px; background: rgba(20,30,34,.6); color: #fff; font-family: "Caveat", cursive; font-size: 19px; line-height: 1.05; padding: 8px 14px; border-radius: 14px; max-width: 46%; text-align: center; pointer-events: none; }
.lb .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); font-size: 26px; line-height: 46px; padding: 0; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.18); z-index: 2; }
.lb .lb-nav.lewo { left: 10px; } .lb .lb-nav.prawo { right: 10px; }
.lb .lb-gest { position: absolute; left: 50%; top: 50%; z-index: 3; pointer-events: none; color: #fff; font-size: 64px; line-height: 1; opacity: 0; transform: translate(-50%, -50%); animation: lb-gest 1.4s ease-in-out 3; animation-delay: .5s; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.lb .lb-gest::after { content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(255,255,255,.6); animation: lb-gest-palec 1.4s ease-in-out 3; animation-delay: .5s; }
@keyframes lb-gest { 0% { opacity: 0; transform: translate(-50%, -50%) translateX(40px); } 25% { opacity: .3; } 75% { opacity: .3; } 100% { opacity: 0; transform: translate(-50%, -50%) translateX(-60px); } }
@keyframes lb-gest-palec { 0% { transform: translateX(70px); } 100% { transform: translateX(-30px); } }
.lb .lb-arkusz { margin: -18px 0 0; padding: 10px 16px calc(24px + env(safe-area-inset-bottom)); background: var(--card); border-radius: 24px 24px 0 0; position: relative; }   /* 5.1.63: bez backdrop-filter - mroził renderowanie na iPhonie */
.lb .lb-uchwyt { width: 44px; height: 5px; border-radius: 99px; background: rgba(0,0,0,.18); margin: 0 auto 12px; }
.lb .lb-info { display: flex; align-items: flex-start; gap: 10px; }
.lb .lb-info .ik { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.1); display: grid; place-items: center; font-size: 18px; flex: none; }
.lb .lb-info .tx { flex: 1; min-width: 0; }
.lb .lb-info .tx b { font-size: 17px; display: block; }
.lb .lb-info .tx .kiedy { font-size: 13px; opacity: .7; margin-top: 2px; }
.lb .lb-info .liczby { display: flex; gap: 14px; font-size: 15px; font-weight: 700; flex: none; padding-top: 8px; }
.lb .lb-info .liczby span { display: inline-flex; align-items: center; gap: 5px; }
.lb .lb-opis { font-size: 15.5px; margin: 10px 0 0 50px; line-height: 1.4; }
.lb .lb-akcje { display: flex; gap: 10px; align-items: stretch; margin-top: 14px; }
.lb .lb-akcje .reakcje { display: flex; gap: 6px; margin: 0; background: #fff; border-radius: 18px; padding: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.08); overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.lb .lb-akcje .reakcje .reakcja { flex: none; background: var(--tint); border: 1px solid transparent; border-radius: 14px; padding: 8px 10px; font-size: 20px; line-height: 1; display: inline-flex; align-items: center; gap: 4px; transition: transform .12s; }
.lb .lb-akcje .reakcje .reakcja span { font-size: 12.5px; font-weight: 700; }
.lb .lb-akcje .reakcje .reakcja.on { background: var(--ocean); color: #fff; }
.lb .lb-akcje .reakcje .reakcja.czeka { transform: scale(1.18); }
.lb .lb-akcje .o-czym-row { margin: 0; flex: none; }
.lb .lb-akcje .o-czym-row .napisz { height: 100%; background: linear-gradient(135deg, var(--ocean), var(--ocean2)); color: #fff; border-radius: 18px; padding: 0 16px; font-size: 15px; box-shadow: 0 4px 14px rgba(31,127,147,.35); }
.lb .lb-akcje .o-czym-row .napisz::after { content: "›"; font-size: 20px; margin-left: 4px; }
.lb .lb-akcje .o-czym-row .ile { display: none; }
.lb .lb-kafle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.lb .lb-kafle button { border: 0; background: #fff; border-radius: 16px; padding: 10px; display: flex; align-items: center; gap: 8px; text-align: left; box-shadow: 0 2px 10px rgba(0,0,0,.08); color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.2; cursor: pointer; min-height: 62px; }
.lb .lb-kafle button .ik { width: 40px; height: 40px; border-radius: 12px; background: var(--tint); display: grid; place-items: center; font-size: 20px; flex: none; overflow: hidden; position: relative; }
.lb .lb-kafle button .ik img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb .lb-kafle button .ik .pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -85%); font-size: 18px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.lb .lb-kafle button .tx { flex: 1; min-width: 0; }
.lb .lb-kafle button .tx small { display: block; font-weight: 600; opacity: .65; font-size: 11.5px; }
.lb .lb-kafle button::after { content: "›"; font-size: 18px; opacity: .45; }
.lb .lb-kafle button:disabled { opacity: .45; cursor: default; }
.lb .lb-stopka { text-align: center; font-family: "Caveat", cursive; font-size: 22px; color: var(--ocean); margin-top: 22px; line-height: 1.1; }
.mapa-wybor { position: fixed; inset: 0; z-index: 250; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.mapa-wybor .arkusz { background: var(--card); color: var(--ink); border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); width: 100%; max-width: 560px; }
.mapa-wybor .arkusz b { display: block; margin-bottom: 10px; }
.mapa-wybor .arkusz .btn { margin-top: 8px; }
.lb .lb-pola input { width: 100%; box-sizing: border-box; margin-top: 8px; border: 1.5px solid var(--line, #d9c7a6); border-radius: 12px; padding: 11px 12px; font-size: 16px; background: var(--card); color: var(--ink); }   /* 16 px: iOS nie przybliża strony przy fokusie */
.lb .lb-stan { font-size: 12.5px; opacity: .75; margin-top: 10px; text-align: center; }
.lb .lb-kafle button.on .ik { background: var(--ocean); color: #fff; }
.lb .lb-kafle button.zle { color: #b23b3b; }
/* emotka reakcji w locie (strona rodziny): duża na zdjęciu, potem wlatuje w przycisk */
.emo-lot { position: fixed; z-index: 260; pointer-events: none; font-size: 40px; line-height: 1; transform: translate(-50%, -50%); filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); will-change: transform, opacity; }
/* Historia wydatków: kwota w złotych pod kwotą w walucie (5.1.60) */
.amt .amt-pln { font-size: 12px; font-weight: 600; opacity: .6; margin-top: 2px; text-align: right; }
/* Historia: ołówek edycji zamiast ✕ (5.1.61) */
.del.edytuj { font-size: 16px; opacity: .8; }
.mapa-wybor .arkusz label { margin-top: 10px; }
.mapa-wybor .arkusz .row { display: flex; gap: 8px; }
.mapa-wybor .arkusz .btn.zle { color: #b23b3b; }
/* zdjęcie z czatu (strona rodziny): ciemne okno, bez arkusza (audyt 2026-09-09) */
.lb.czat-foto { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0b171b; color: #fff; padding: 16px; }
.lb.czat-foto img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 12px; }
.lb.czat-foto .cap { margin-top: 10px; font-size: 14px; text-align: center; }
.lb.czat-foto .lb-x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 20px; }
/* ekran wejścia rodziny: bez backdrop-filter nad tłem z szumem (mroził iPhone'a) */
body.rodzina #lock .lock-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
/* pasek importu zdjęć i filmów (5.1.69): przyklejony u dołu nad paskiem zakładek */
.import-pasek { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabh) + 14px + env(safe-area-inset-bottom)); z-index: 120; background: var(--card); color: var(--ink); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.import-pasek b { display: block; font-size: 14px; margin-bottom: 8px; }
.import-slupek { height: 8px; border-radius: 99px; background: rgba(0,0,0,.08); overflow: hidden; }
.import-slupek div { height: 100%; width: 0; background: linear-gradient(90deg, var(--ocean), var(--ocean2)); transition: width .25s; }
.import-pasek .muted { font-size: 12.5px; line-height: 1.35; }
.import-pasek .import-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 16px; color: var(--ink-soft); cursor: pointer; }
/* zdjęcie, którego plik iOS zgubił (5.1.74) */
img.uszk { object-fit: contain !important; background: #f3dcd4; }
.edytor .media .mini.uszk { outline: 2px dashed #c0392b; outline-offset: -2px; }
/* kafelek postępu importu w rzędzie zdjęć edytora (5.1.77) */
.edytor .media .mini.ladowanie { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--tint); border: 2px dashed var(--ocean2); color: var(--ink); animation: ladowanie-puls 1.2s ease-in-out infinite; }
.edytor .media .mini.ladowanie b { font-size: 15px; }
.edytor .media .mini.ladowanie small { font-size: 10.5px; opacity: .75; text-align: center; }
@keyframes ladowanie-puls { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
