/* Skala: odstępy 4/8/12/16/24/32, tekst 19 px bazowo (czytelnie dla starszych osób), przyciski min. 48 px.
   Kolory tekstu sprawdzone na WCAG AA (4,5:1) w obu motywach. */
:root {
  --bg: #f6f3ec;
  --surface: #ffffff;
  --text: #1f2a1f;
  --muted: #505a50;
  --brand: #2f5d3a;
  --brand-contrast: #ffffff;
  --brand-soft: #e3ece4;
  --accent: #9a4f12;
  --danger: #9b2c2c;
  --border: #cfc8b8;
  --shadow: 0 1px 3px #0000001f, 0 4px 14px #00000014;
  /* szansa: te same barwy co strefy na mapie (STREFY w lib/teren.js): zieleń, bursztyn, szarość */
  --high: #1b7a34;
  --mid: #7a5600;
  --low: #5f655f;
  --none: #666b66;
  --bar-mid: #e0b000;
  --bar-low: #8f8f8f;
  /* map scale (KOLORY in lib/pulpit.js) and trend colours; red stays for errors and safety only */
  --k0: #eceee3; --k1: #d3e4b8; --k2: #a6cb78; --k3: #5e9c3e; --k4: #24561f;
  --up: #2f7a28;
  --down: #8a4e12;
  --akcent-bg: #24561f; --akcent-txt: #ffffff; --akcent-sub: #d6e8c8; --akcent-btn: #f2a33a;
  --cieply-bg: #fbebd6; --cieply-txt: #5a3a10;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r: 14px;
  --nav-h: 72px;
}
/* Night mode: switched by hand (🌙 in the header, app.js ustawMotyw), not by the system setting */
:root[data-motyw="noc"] {
  --bg: #0d1410;
  --surface: #16201a;
  --text: #eef2ea;
  --muted: #a9b7aa;
  --brand: #5fa845;
  --brand-contrast: #0d1410;
  --brand-soft: #22382a;
  --accent: #f2a33a;
  --danger: #f19191;
  --border: #2f3d33;
  --shadow: 0 1px 3px #0008;
  --high: #8fd16f;
  --mid: #ffd54f;
  --low: #b9c0b9;
  --none: #a9b0a9;
  --bar-mid: #ffd54f;
  --bar-low: #8f8f8f;
  --k0: #22382a; --k1: #2f6334; --k2: #5fa845; --k3: #9ad65a; --k4: #c8f07a;
  --up: #9ad65a;
  --down: #f2a33a;
  --akcent-bg: #22382a; --akcent-txt: #eef2ea; --akcent-sub: #b6cdb0;
  --cieply-bg: #33260f; --cieply-txt: #f6d7a8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* text size (Journal tab, for older eyes): every size in the app is in rem, so one root value scales it all */
:root { --tekst: 19px; }
:root[data-tekst="duzy"] { --tekst: 22px; }
:root[data-tekst="bardzo"] { --tekst: 25px; }
html { font-size: var(--tekst); -webkit-text-size-adjust: 100%; }
/* high contrast: text black on white (night: white on black), darker hints and borders; after the night tokens */
:root[data-kontrast="tak"] { --bg: #ffffff; --surface: #ffffff; --text: #000000; --muted: #262f26; --border: #4a4f4a; --brand: #1d3d25; --cieply-bg: #fff1dc; --cieply-txt: #2e1c04; }
:root[data-motyw="noc"][data-kontrast="tak"] { --bg: #000000; --surface: #070a08; --text: #ffffff; --muted: #e3e9e3; --border: #b4beb5; --brand: #8fe06a; --cieply-bg: #2a1d07; --cieply-txt: #ffe7c2; }
.jezyk.kontrast input { width: 24px; height: 24px; margin: 0; }
.jezyk { flex-wrap: wrap; } .jezyk select { flex-shrink: 0; max-width: 100%; } /* the select keeps its full text with large text: it wraps under the label */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--s4));
}
a { color: var(--brand); }
h2 { font-size: 1.3rem; line-height: 1.25; margin: var(--s5) 0 var(--s2); }
h3 { font-size: 1.15rem; margin: 0; }
p { margin: var(--s2) 0; }
.lead { font-size: 1.1rem; }
.hint { color: var(--muted); font-size: .9rem; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.error { color: var(--danger); font-weight: 600; }

/* ---------- Nagłówek ---------- */
.top { background: var(--brand); color: #fff; padding-top: env(safe-area-inset-top); }
[data-motyw="noc"] .top { background: #13201a; }
.top-in { max-width: 760px; margin: 0 auto; padding: var(--s3) var(--s4); display: flex; align-items: center; gap: var(--s3); }
.logo { width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 0 0 2px #ffffff40; }
.brand { flex: 1; min-width: 0; }
.top h1 { margin: 0; font-size: 1.35rem; line-height: 1.2; letter-spacing: .01em; }
.tagline { margin: 0; font-size: .85rem; opacity: .92; }
.badge { background: #fff3e0; color: #7a3e00; border-radius: 99px; padding: 4px 12px; font-size: .8rem; font-weight: 700; }

/* ---------- Zakładki: dolny pasek na telefonie, u góry na komputerze ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px #0000001a;
}
.tabs button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--nav-h); padding: var(--s2) var(--s1); border: none; border-radius: 0;
  background: transparent; color: var(--muted); font-size: .85rem; font-weight: 600;
  border-top: 4px solid transparent;
}
.tab-ico { font-size: 1.6rem; line-height: 1; }
/* the four tab labels must fit a 375 px phone even with extra large text */
.tabs button { font-size: min(.85rem, 4.3vw); min-width: 0; }
.tab-ico { font-size: min(1.6rem, 8vw); }
.tabs button[aria-selected="true"] { color: var(--brand); border-top-color: var(--brand); background: var(--brand-soft); }
@media (min-width: 900px) {
  body { padding-bottom: var(--s6); }
  .tabs {
    position: static; max-width: 760px; margin: var(--s4) auto 0; padding: 0 var(--s4);
    display: flex; gap: var(--s2); background: none; border: none; box-shadow: none;
  }
  .tabs button {
    flex: 1; flex-direction: row; gap: var(--s2); min-height: 52px; font-size: 1rem;
    border: 2px solid var(--border); border-radius: 99px; color: var(--text); background: var(--surface);
  }
  .tab-ico { font-size: 1.25rem; }
  .tabs button[aria-selected="true"] { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
}

main { max-width: 760px; margin: 0 auto; padding: 0 var(--s4); }
.panel { padding: var(--s2) 0 var(--s4); }
.panel > h2:first-child, .hero > h2:first-child { margin-top: var(--s4); }

/* ---------- Przyciski i pola ---------- */
button { font: inherit; min-height: 48px; border-radius: var(--r); padding: 12px 18px; border: 2px solid transparent; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.big { width: 100%; font-size: 1.3rem; padding: 20px; font-weight: 700; min-height: 68px; }
.primary { background: var(--brand); color: var(--brand-contrast); box-shadow: var(--shadow); }
.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.danger { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.wide { width: 100%; margin: var(--s2) 0; }
.row { display: flex; gap: var(--s3); flex-wrap: wrap; margin: var(--s3) 0; }
.row > * { flex: 1 1 200px; }
.stack { display: grid; gap: var(--s3); margin: var(--s4) 0; }
.stack > button { width: 100%; font-size: 1.1rem; min-height: 56px; }
input, select {
  font: inherit; min-height: 52px; padding: 10px 14px; border-radius: var(--r); border: 2px solid var(--border);
  background: var(--surface); color: var(--text); min-width: 0;
}
.search { display: flex; gap: var(--s2); margin: var(--s3) 0; }
.search input { flex: 1; }

/* ---------- Auto ---------- */
.hero { text-align: center; padding: var(--s4) 0; }
.hero .lead { max-width: 30em; margin: var(--s3) auto var(--s5); }
.compass { width: min(78vw, 340px); margin: var(--s4) auto 0; }
.compass svg { width: 100%; display: block; }
.dial { fill: var(--surface); stroke: var(--border); stroke-width: 2.5; }
.n { fill: var(--muted); font-size: 9px; text-anchor: middle; font-weight: 700; }
.needle { fill: var(--accent); }
#arrow-g { transform-origin: 50px 50px; transition: transform .25s ease-out; }
.distance { font-size: 3rem; font-weight: 800; text-align: center; margin: var(--s2) 0 0; line-height: 1.1; }
.dir { font-size: 1.2rem; text-align: center; margin: var(--s1) 0 0; }
canvas#trail {
  width: 100%; max-width: 440px; aspect-ratio: 1; display: block; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
}
.points { list-style: none; padding: 0; margin: var(--s2) 0 0; }
.points li { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px solid var(--border); }
.points li span:last-child { color: var(--muted); }
.steps li { margin-bottom: var(--s2); }

/* ---------- Wysyp ---------- */
.place { font-weight: 700; font-size: 1.15rem; margin-top: var(--s4); }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s3) var(--s4); }
.gcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow);
  padding: var(--s4); margin: var(--s3) 0;
}
.gcard-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3); }
.gcard-name { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.gcard-word { font-weight: 700; font-size: 1rem; }
.score { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.gcard p { margin: var(--s2) 0 0; }
.gcard .las { color: var(--muted); font-size: .9rem; }
.gcard.small { padding: var(--s3) var(--s4); box-shadow: none; }
.gcard.small .score { font-size: 1.6rem; }
.gcard.small .gcard-name { font-size: 1.1rem; }
.bar { height: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; margin: var(--s3) 0 0; }
.bar > span { display: block; height: 100%; border-radius: 99px; }
.lvl-high { color: var(--high); } .bar-high { background: #1b7a34; }
.lvl-mid { color: var(--mid); } .bar-mid { background: var(--bar-mid); }
.lvl-low { color: var(--low); } .bar-low { background: var(--bar-low); }
.lvl-none { color: var(--none); } .bar-none { background: var(--none); }
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); }
.chip { border: 1px solid var(--border); border-radius: 99px; padding: 2px 12px; font-size: .9rem; background: var(--bg); }
.ikona { display: block; flex: none; }
.more { margin: var(--s4) 0; }
.more > summary, .tools > summary {
  list-style: none; cursor: pointer; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: var(--s2);
  border: 2px solid var(--border); border-radius: var(--r); background: var(--surface); font-weight: 700; padding: var(--s2) var(--s4);
}
.more > summary::-webkit-details-marker, .tools > summary::-webkit-details-marker { display: none; }
.more > summary::after, .tools > summary::after { content: "▾"; font-size: 1.1rem; }
.more[open] > summary::after, .tools[open] > summary::after { content: "▴"; }

/* ---------- Mapa ---------- */
.teren { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s3); margin: var(--s3) 0 var(--s2); }
.fit { display: flex; align-items: center; gap: var(--s2); font-weight: 700; flex-wrap: wrap; }
.teren .hint { flex-basis: 100%; margin: var(--s1) 0 0; }
.tools { margin: var(--s2) 0 var(--s3); }
.tools[open] { background: var(--surface); border-radius: var(--r); padding-bottom: var(--s3); }
.tools[open] > summary { border-color: var(--brand); }
.tools > :not(summary) { margin-left: var(--s3); margin-right: var(--s3); }
.layers { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.layers button { flex: 1 1 140px; font-size: .9rem; padding: 8px 10px; background: var(--surface); color: var(--text); border: 2px solid var(--border); }
.layers button[aria-pressed="true"] { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
.layers button:disabled { opacity: .55; cursor: not-allowed; }
.layers button small { font-weight: 400; }
/* NISAR: one banner instead of hatching when the whole forest in view got wetter */
.nisar-baner { position: absolute; z-index: 3; left: 50%; bottom: 36px; transform: translateX(-50%); max-width: calc(100% - 24px); display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 18px; background: #0d47a1; color: #fff; font-size: .85rem; box-shadow: var(--shadow); }
.nisar-wiersz summary { cursor: pointer; }
.nisar-wiersz .info-i { margin-left: 6px; }
#map { width: 100%; height: max(380px, calc(100dvh - 330px)); border-radius: var(--r); border: 1px solid var(--border); }
@media (min-width: 760px) { #map { height: max(420px, calc(100vh - 300px)); } }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .9rem; margin-top: var(--s3); }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #0004; }
.dot-car { background: #c62828; } .dot-me { background: #1565c0; } .dot-pt { background: #8b4a1c; } .dot-empty { background: #9e9e9e; }
.line { display: inline-block; width: 22px; height: 4px; background: #e07a1f; border-radius: 2px; }
.legend-img { display: block; margin: var(--s2) var(--s3); max-width: calc(100% - 24px); background: #fff; border-radius: 8px; padding: 4px; }

/* Opis lasu: panel wysuwany od dołu na telefonie, karta pod mapą na komputerze. */
.sheet {
  position: fixed; left: 0; right: 0; z-index: 25;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  max-height: 50vh; overflow: auto; background: var(--surface); color: var(--text);
  border-radius: 20px 20px 0 0; border-top: 1px solid var(--border); box-shadow: 0 -6px 24px #00000033;
  padding: var(--s4) var(--s4) var(--s5);
}
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--border); margin: -4px auto var(--s3); }
.sheet-close { position: absolute; top: var(--s2); right: var(--s2); width: 48px; height: 48px; padding: 0; background: var(--bg); color: var(--text); border-color: var(--border); border-radius: 99px; font-size: 1.1rem; }
#stand-body > p:first-child { margin-top: 0; padding-right: 52px; }
.sheet ul { margin: var(--s1) 0; padding-left: 0; list-style: none; }
.sheet li { display: flex; align-items: center; gap: var(--s2); padding: 2px 0; }
@media (min-width: 760px) {
  .sheet { position: relative; bottom: auto; left: auto; right: auto; margin-top: var(--s3); max-height: none; border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--shadow); }
  .sheet::before { display: none; }
}

/* ---------- Okno znaleziska ---------- */
.dlg { border: none; border-radius: 18px; padding: var(--s3); width: min(96vw, 480px); overflow-x: hidden; max-height: 92vh; background: var(--surface); color: var(--text); }
.dlg::backdrop { background: #0009; }
.dlg h2 { margin-top: 0; }

/* ---------- Miejscówki i wyjścia ---------- */
.star-btn {
  width: 100%; min-height: 72px; margin: var(--s4) 0 0; font-size: 1.35rem; font-weight: 800;
  background: #fff4d6; color: #5a3c00; border: 2px solid #e8a317; box-shadow: var(--shadow);
}
[data-motyw="noc"] .star-btn { background: #3a2f12; color: #ffe08a; border-color: #c9962e; }
.link-btn { min-height: 44px; padding: 4px 8px; background: none; border: none; color: var(--muted); text-decoration: underline; font-size: .9rem; }
.last-trip { margin-top: var(--s5); text-align: left; }
.trip-wynik { font-size: 1.4rem; font-weight: 800; margin: 0; }
.wyjscia li { align-items: center; }
.wyjscia li > button { flex: none; min-width: 112px; }
.miniatura { margin-top: var(--s2); max-width: 160px; border-radius: 10px; display: block; }
.liczniki { display: grid; gap: var(--s2); margin: var(--s2) 0 var(--s3); }
.licznik { display: grid; grid-template-columns: 26px minmax(0, 1fr) 46px 2.6ch 46px 46px; align-items: center; gap: 4px; }
.licznik .ikona { width: 26px; height: 26px; }
.licznik-nazwa { font-weight: 700; font-size: .95rem; }
.licznik-btn { min-height: 48px; padding: 0; font-size: 1.4rem; font-weight: 800; background: var(--surface); color: var(--text); border-color: var(--border); }
.licznik-btn.plus5 { font-size: 1rem; }
.licznik-n { text-align: center; font-size: 1.3rem; font-weight: 800; }
.photo { display: grid; gap: var(--s2); margin: var(--s3) 0; font-weight: 600; }
.photo input { min-height: auto; padding: var(--s2); }

/* ---------- Mapa sztabowa ---------- */
.co-nowego { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s3) var(--s4); margin: var(--s3) 0; box-shadow: var(--shadow); }
.co-nowego h2 { margin: 0 0 var(--s2); font-size: 1.15rem; }
.co-nowego ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.co-nowego li { line-height: 1.4; }
.co-nowego .orient { color: var(--muted); font-size: 0.9rem; }
.co-nowego li b { font-weight: 600; }
.co-nowego:not(.rozwin) #co-nowego-lista li:nth-child(n + 3) { display: none; }
#co-nowego-wiecej { min-height: 44px; margin-top: var(--s1); }
.kom-miejsca { display: grid; gap: var(--s1); margin-top: var(--s1); }
.kom-miejsce { text-align: left; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--brand-soft); color: var(--text); font: inherit; cursor: pointer; }
.werdykt { background: var(--surface); border: 2px solid var(--brand); border-radius: var(--r); padding: var(--s4); margin: var(--s3) 0; display: grid; gap: var(--s2); box-shadow: var(--shadow); }
.werdykt p { margin: 0; line-height: 1.45; }
.werdykt-tekst { font-size: 1.2rem; font-weight: 700; }
.werdykt-dalej:empty { display: none; }
.gcard-wiecej summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--brand); font-weight: 600; }
/* telefon: mapa ma być od razu widać, więc w karcie tylko najważniejszy komunikat (reszta pod „Wszystkie regiony”) */
@media (max-width: 899px) {
  .co-nowego { padding: var(--s2) var(--s3); }
  .co-nowego h2 { font-size: 1rem; margin-bottom: var(--s1); }
  .co-nowego:not(.rozwin) #co-nowego-lista li:nth-child(n + 2) { display: none; }
}
.sytuacja { display: flex; flex-wrap: nowrap; overflow-x: auto; align-items: center; gap: var(--s2); margin: var(--s3) 0 var(--s2); padding-bottom: 4px; scrollbar-width: thin; }
.sytuacja .fit { flex: none; }
.sytuacja select { min-height: 44px; padding: 6px 10px; }
.syt:empty { display: none; }
.syt { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 4px 12px; font-size: .9rem; min-height: 40px; }
.syt .ikona { width: 22px; height: 22px; }
.syt .link-btn { min-height: 32px; padding: 0 2px; color: var(--brand); font-weight: 700; }
.map-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-bottom: var(--s2); }
.map-actions button { font-size: .95rem; padding: 8px 10px; }
#btn-szczegoly[aria-pressed="true"] { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
.map-actions button { min-height: 48px; line-height: 1.2; }
.slupek { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s3); margin-bottom: var(--s2); }
.slupek label { font-weight: 700; }
.slupek select { width: 100%; }
.slupek .hint button { min-height: 44px; margin: 4px 4px 0 0; }
.legenda-stref { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: var(--s2); font-weight: 700; }
.strefa-chip { display: inline-flex; align-items: center; gap: 6px; }
.strefa-chip i, .meldunek-strefa i { display: inline-block; width: 18px; height: 18px; border-radius: 4px; border: 1px solid #0006; }
.meldunek-strefa { display: flex; align-items: center; gap: var(--s2); font-size: 1.2rem; font-weight: 800; }
.dot-star { background: #e8a317; }
.hity { display: grid; gap: var(--s2); margin-top: var(--s2); }
.hity button { text-align: left; }
.legenda-stref .ikona { display: inline-block; vertical-align: middle; }

/* Komputer: mapa na całe okno pod zakładkami, panele na niej (klasa ustawiana w app.js, ukladMapy). */
@media (min-width: 900px) {
  body.mapa-full { padding-bottom: 0; overflow: hidden; }
  .mapa-full main { max-width: none; padding: 0; }
  .mapa-full #tab-mapa { position: fixed; left: 0; right: 0; bottom: 0; top: var(--map-top, 150px); padding: 0; }
  .mapa-full #map { position: absolute; top: 0; left: 0; bottom: 0; right: var(--panel-w); width: auto; height: auto; border: none; border-radius: 0; }
  .mapa-full .map-panel {
    position: absolute; z-index: 5; top: 0; right: 0; bottom: 0; width: var(--panel-w); overflow: auto;
    background: var(--bg); border-left: 1px solid var(--border); padding: var(--s4);
  }
  .mapa-full .sytuacja { flex-wrap: wrap; overflow: visible; }
  .mapa-full .map-actions { grid-template-columns: 1fr 1fr; }
  .mapa-full .sheet { position: absolute; z-index: 6; top: var(--s3); left: var(--s3); right: auto; width: 380px; max-height: calc(100% - 24px); margin: 0; }
  .mapa-full .legenda-mapy { position: absolute; z-index: 4; left: var(--s3); bottom: var(--s3); max-width: min(520px, calc(100% - var(--panel-w) - 200px)); }
  .mapa-full .hype { position: absolute; z-index: 4; top: var(--s3); left: calc((100% - var(--panel-w)) / 2); transform: translateX(-50%); max-width: calc(100% - var(--panel-w) - 140px); }
  /* panel na komputerze: ok. 16–17 px zamiast 19 px z telefonu */
  .mapa-full .map-panel, .mapa-full .sheet { font-size: .87rem; }
}

/* ---------- Trafność (bez „trust me”) ---------- */
.badge-traf { min-height: 28px; padding: 1px 10px; margin-top: 4px; border-radius: 99px; font-size: .8rem; font-weight: 700; border: 1px solid var(--border); background: var(--bg); color: var(--muted); cursor: pointer; }
.badge-traf.traf-ok { color: var(--high); border-color: var(--high); }
.traf-ok-txt { color: var(--high); }
.traf-orient-txt { color: var(--muted); }
.legenda-stref .badge-traf { margin-top: 0; }
#jak-tabela { overflow-x: auto; } /* wide with extra large text: the table scrolls, not the page */
.tabela-traf { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabela-traf th, .tabela-traf td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabela-traf td .ikona { display: inline-block; vertical-align: middle; }
.gcard .score { font-size: 1.5rem; }
.ciekawe { background: var(--brand-soft); border-radius: 10px; padding: 6px 10px; }
/* species (i) in a list: a small button at the end of the row, the explanation opens under the row */
li:has(> .gat-info) { flex-wrap: wrap; }
.gat-info { margin-left: auto; }
.gat-info > summary { list-style: none; cursor: pointer; min-width: 44px; min-height: 44px; display: grid; place-items: center; color: var(--muted); }
.gat-info > summary::-webkit-details-marker { display: none; }
.gat-info[open] { flex-basis: 100%; margin-left: 0; }
.gat-info[open] > summary { justify-content: end; }
.gat-info-tresc { background: var(--brand-soft); border-radius: 10px; padding: 4px 10px; font-size: .9rem; }
.gat-info-tresc p { margin: 4px 0; }

/* ---------- Grywalizacja ---------- */
.staty { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s2); margin: var(--s2) 0 var(--s3); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s2) var(--s3); display: grid; }
.stat-n { font-size: 1.3rem; font-weight: 800; }
.odznaki { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: var(--s2); }
.odznaka { min-width: 0; overflow-wrap: anywhere; display: grid; gap: 2px; padding: var(--s2) var(--s3); border: 1px dashed var(--border); border-radius: var(--r); color: var(--muted); }
.odznaka .odznaka-ikona { font-size: 1.8rem; opacity: .4; }
.odznaka.zdobyta { border-style: solid; border-color: var(--brand); background: var(--brand-soft); color: var(--text); }
.odznaka.zdobyta .odznaka-ikona { opacity: 1; color: var(--brand); }
.toast { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 16px); background: var(--brand); color: var(--brand-contrast); padding: var(--s3) var(--s4); border-radius: var(--r); box-shadow: var(--shadow); max-width: 92vw; }
@media (min-width: 900px) { .toast { bottom: 24px; } }
.map-actions .wide-2 { grid-column: 1 / -1; }

/* ---------- Chcę na grzyby (Top 5) ---------- */
.explore { display: grid; gap: var(--s2); margin: var(--s2) 0; }
.explore-form { display: grid; gap: var(--s2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s3); }
.explore-form label { font-weight: 700; }
.explore-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s2); }
.explore-row label { display: grid; gap: 4px; }
.explore-row select { width: 100%; min-width: 0; }
.explore-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.sortuj { display: flex; align-items: center; gap: 6px; font-size: .9rem; margin: 4px 0; }
.sortuj button { min-height: 36px; padding: 2px 12px; border-radius: 99px; background: var(--surface); color: var(--text); border-color: var(--border); font-size: .9rem; }
.sortuj button[aria-pressed="true"] { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
.top5 { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.miejsce { width: 100%; display: grid; grid-template-columns: 36px 1fr; gap: var(--s2); text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s3); box-shadow: var(--shadow); font-size: .95rem; }
.miejsce:hover { border-color: var(--brand); }
.nr { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-contrast); font-weight: 800; font-size: 1.05rem; }
/* map pin: number, plus "place · drive time" when zoomed in on desktop or after a tap (focus) on a phone */
.pinezka { display: inline-flex; align-items: center; min-width: 34px; height: 34px; min-height: 0; padding: 0; border: 3px solid #fff; border-radius: 99px; box-shadow: 0 2px 6px #0006; cursor: pointer; background: #2f5d3a; color: #fff; font-weight: 800; font-size: 1.05rem; }
.pinezka-nr { min-width: 28px; text-align: center; }
.pinezka-opis { display: none; padding-right: 10px; font-size: .8rem; white-space: nowrap; }
.z-etykietami .pinezka-opis, .pinezka:focus .pinezka-opis { display: inline; }
.strefa-chip i.kontur { background: #6a3d9a33; border: 2px solid #6a3d9a; box-sizing: border-box; }
.miejsce-tresc { display: grid; gap: 2px; }
.miejsce-tresc .linia { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.miejsce-tresc .ikona { display: inline-block; }
.dlaczego { color: var(--muted); }
a.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px; border-radius: var(--r); text-decoration: none; font-weight: 700; border: 2px solid var(--border); }
a.btn.primary { border-color: var(--brand); }
a.btn.secondary { color: var(--text); }
.parking { margin: var(--s2) 0; }
.parking .btn { width: 100%; }
.parking .hint { margin: var(--s1) 0 0; }
.wiecej summary { cursor: pointer; margin-top: var(--s2); color: var(--brand); font-weight: 700; }
#map + .explore-wynik { margin-top: var(--s3); }
@media (min-width: 900px) { :root { --panel-w: 440px; } }
@media (min-width: 1300px) { :root { --panel-w: 480px; } }
.profile-tytul { font-weight: 700; }
.profile { display: flex; flex-wrap: wrap; gap: 6px; }
.profile button { min-height: 44px; padding: 6px 12px; border-radius: 99px; background: var(--surface); color: var(--text); border-color: var(--border); font-size: .95rem; }
.profile button[aria-pressed="true"] { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
.miejsce { cursor: pointer; }
.map-info { margin-top: var(--s2); }
.nowrap { white-space: nowrap; }
.meldunek-szansa { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.map-stopka summary { cursor: pointer; list-style: none; min-width: 44px; min-height: 44px; display: grid; place-items: center; font-size: 1.3rem; color: var(--brand); }
.map-stopka summary::-webkit-details-marker { display: none; }
.map-stopka[open] summary { justify-content: start; }

/* ---------- Jeden widok: mapa z wysypem. Pasek „Skąd · ile · grzyb” w nagłówku, panel przy mapie ---------- */
.pasek, .pasek-link, .uchwyt, .map-fab { display: none; }
body.na-mapie .pasek { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; min-width: 0; }
.pasek input { flex: 1 1 140px; min-width: 0; min-height: 44px; }
/* po wyszukaniu „Chcę na grzyby” jest już zrobione: zostaje lista */
#explore:has(#explore-wynik:not([hidden])) #btn-chce { display: none; }
.pasek select { min-height: 44px; min-width: 0; max-width: 11em; }
/* place suggestions (lib/podpowiedzi.js): a list under the search bar, over the map, the county under each name */
body.na-mapie .pasek { position: relative; }
.podpowiedzi { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; margin: 0; padding: var(--s1) 0; list-style: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); max-height: min(50vh, 420px); overflow-y: auto; }
.podpowiedzi[hidden] { display: none; }
@media (min-width: 900px) { .podpowiedzi { right: auto; width: min(100%, 26rem); } }
.podpowiedzi li { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 6px var(--s3); cursor: pointer; }
.podpowiedzi li[aria-selected="true"], .podpowiedzi li:hover { background: var(--brand-soft); }
.podp-nazwa { font-weight: 700; }
.podp-opis { font-size: .85rem; color: var(--muted); }
.pasek-ikona { min-width: 44px; min-height: 44px; padding: 0; background: #ffffff26; border: 1px solid #ffffff66; color: #fff; font-size: 1.2rem; }
.pasek .pasek-szukaj { min-height: 44px; padding: 6px 16px; background: #fff; color: var(--brand); border-color: #fff; }
.profile-box { flex-basis: 100%; display: grid; gap: 6px; background: var(--surface); color: var(--text); border-radius: var(--r); padding: var(--s2) var(--s3); }
.profile-box[hidden] { display: none; }
/* computer: the group (i) and walking-style boxes open as a dropdown over the map; in the page flow they slid
   under the fixed map, which painted over them (Radek 2026-10-20: "(i) shows nothing") */
@media (min-width: 900px) {
  body.na-mapie .top { position: relative; z-index: 30; }
  body.na-mapie .pasek { position: relative; }
  body.na-mapie .pasek .profile-box { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 31; box-shadow: var(--shadow); max-height: calc(100vh - var(--map-top, 80px) - 24px); overflow: auto; }
}
.pasek-link { min-height: 44px; padding: 6px 14px; gap: 6px; background: #ffffff26; border: 1px solid #ffffff66; color: #fff; border-radius: 99px; white-space: nowrap; }
.fab { width: 52px; height: 52px; min-height: 0; padding: 0; border-radius: 50%; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 1.4rem; }
.map-panel .werdykt { background: none; border: none; box-shadow: none; padding: 0; margin: 0 0 var(--s2); }
.map-panel .werdykt-tekst { font-size: 1.1rem; }
.wysyp-gatunki > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--brand); font-weight: 700; }
.wysyp-gatunki .place { margin-top: 0; font-size: 1rem; }

/* telefon: mapa na cały ekran między paskiem a zakładkami, panel wysuwany od dołu w 3 stanach */
@media (max-width: 899px) {
  body.na-mapie { padding-bottom: 0; }
  body.na-mapie .top { position: fixed; top: 0; left: 0; right: 0; z-index: 30; }
  body.na-mapie .top-in { padding: 6px 8px; }
  body.na-mapie .logo, body.na-mapie .brand, body.na-mapie .pasek-szukaj { display: none; }
  body.na-mapie main { max-width: none; padding: 0; }
  body.na-mapie #tab-mapa { padding: 0; }
  body.na-mapie #map { position: fixed; left: 0; right: 0; top: var(--map-top, 60px); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); height: auto; border: none; border-radius: 0; }
  body.na-mapie .map-panel {
    position: fixed; left: 0; right: 0; z-index: 20; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
    background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: 0 -6px 24px #00000033;
    padding: 0 var(--s3) var(--s3); overflow: auto; overscroll-behavior: contain; transition: max-height .25s ease;
  }
  body.na-mapie .map-panel[data-stan="zwiniety"] { max-height: 34vh; overflow: hidden; }
  body.na-mapie .map-panel[data-stan="polowa"] { max-height: 58vh; }
  body.na-mapie .map-panel[data-stan="pelny"] { max-height: calc(100dvh - var(--map-top, 60px) - var(--nav-h)); }
  body.na-mapie .uchwyt { display: block; position: sticky; top: 0; z-index: 1; width: 100%; height: 30px; min-height: 0; padding: 0; margin: 0 0 4px; border: none; border-radius: 0; background: var(--surface); touch-action: none; cursor: grab; }
  body.na-mapie .uchwyt::before { content: ""; display: block; width: 48px; height: 5px; border-radius: 99px; background: var(--border); margin: 12px auto; }
  body.na-mapie .map-fab { display: grid; gap: 10px; position: fixed; left: 10px; top: calc(var(--map-top, 60px) + 10px); z-index: 15; }
  body.na-mapie .map-stopka { display: none; }
  body.na-mapie #stand { z-index: 26; max-height: calc(100dvh - var(--map-top, 60px) - var(--nav-h)); }
  body.na-mapie .map-panel .explore { margin-top: 0; }
}

/* komputer: logo, pasek i Dziennik w nagłówku; bez zakładek (Auto tylko na telefonie), panel z lewej, meldunek z prawej */
@media (min-width: 900px) {
  .tabs { display: none; }
  .top-in { max-width: none; }
  .tagline { display: none; }
  .brand { flex: 0 0 auto; }
  .pasek-link { display: inline-flex; align-items: center; margin-left: auto; }
  .mapa-full .map-fab { display: grid; gap: 10px; position: absolute; right: calc(var(--panel-w) + 10px); bottom: 64px; z-index: 5; }
  .pasek input { flex: 1 1 200px; max-width: 420px; }
  .mapa-full #fab-auto { display: none; }
  .mapa-full .werdykt { background: var(--brand-soft); border-radius: 10px; padding: 8px 12px; margin: var(--s2) 0 0; }
  .mapa-full .map-panel .werdykt-tekst { font-size: 1rem; }
  body:not(.na-mapie) main { max-width: 1100px; }
  #tab-info:not([hidden]) { column-count: 2; column-gap: 32px; }
  #tab-info > * { break-inside: avoid; }
}
.meldunek-szczegoly > summary, .wysyp-gatunki > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--brand); font-weight: 700; }
.jezyk { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: var(--s3); font-weight: 600; } .jezyk select { min-height: 44px; }

/* ---------- Pulpit (PRD „Mapa z pulpitem”): wysypometr, najlepiej, nadleśnictwa, sezon, ciekawostka ---------- */
.karta { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; margin: 0 0 var(--s3); box-shadow: var(--shadow); }
.karta-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); margin: 0 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.karta-tekst { margin: 4px 0 0; font-size: .9rem; line-height: 1.35; }
.info { min-width: 44px; min-height: 44px; margin: -12px -12px -12px 0; padding: 0; background: none; border: none; color: var(--muted); font-size: 1.1rem; }
.wm-dzien { display: flex; margin: 4px 0 2px; border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.wm-dzien button { flex: 1 1 auto; min-height: 40px; min-width: 0; padding: 2px 8px; white-space: nowrap; border: none; border-radius: 0; background: none; color: var(--muted); font: inherit; letter-spacing: inherit; text-transform: inherit; }
.wm-dzien button[aria-pressed="true"] { background: var(--brand); color: var(--brand-contrast); }
/* forecast days past the trusted ones: dashed underline, the note under the switch says why */
.wm-dzien button.niepewny { text-decoration: underline dashed; text-underline-offset: 4px; }
.wm-dzien button + button { border-left: 1px solid var(--border); }
.wm-niepewny { margin: 2px 0 0; }
.wm-wynik { display: flex; align-items: flex-end; gap: var(--s3); flex-wrap: wrap; }
.wm-liczba { font-size: 4rem; font-weight: 800; line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wm-boki { display: grid; padding-bottom: 4px; line-height: 1.25; }
.wm-skala { color: var(--muted); }
.wm-trend { font-weight: 700; font-size: .85rem; }
.wm-polska { margin-left: auto; padding-bottom: 4px; color: var(--muted); font-weight: 700; font-size: .9rem; }
.tr-gora { color: var(--up); } .tr-dol { color: var(--down); } .tr-rowno { color: var(--muted); }
.wm-pasek { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin: 10px 0 4px; }
.wm-pasek i { height: 8px; border-radius: 4px; background: var(--border); }
.k0 { background: var(--k0) !important; } .k1 { background: var(--k1) !important; } .k2 { background: var(--k2) !important; } .k3 { background: var(--k3) !important; } .k4 { background: var(--k4) !important; }
.wm-zdanie { margin: 6px 0 0; font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.wm-zdanie:empty { display: none; }
/* until the first number arrives the meter keeps the place of the score, bar and sentence (no layout shift) */
.wysypometr.czeka :is(.wm-wynik, .wm-pasek, .wm-zdanie) { visibility: hidden; }
.wysypometr.czeka .wm-pasek { min-height: 8px; }
.wysypometr.czeka .wm-zdanie { display: block; min-height: 1.35em; }
#wm-tytul { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wysypometr .werdykt { margin: var(--s2) 0 0; }
.wysypometr .werdykt-tekst { font-size: .95rem; font-weight: 600; }
.karta-akcent { background: var(--akcent-bg); color: var(--akcent-txt); border-color: transparent; }
.karta-akcent .karta-head { color: var(--akcent-sub); }
.nl-nazwa { display: block; font-size: 1.45rem; line-height: 1.15; font-weight: 800; }
.nl-fakty { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 10px; font-size: .9rem; color: var(--akcent-sub); }
.nl-grzyb { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--akcent-txt); }
.nl-akcje { display: flex; flex-wrap: wrap; gap: var(--s2); }
.nl-btn { min-height: 44px; padding: 0 20px; border-radius: 22px; background: var(--akcent-btn); color: #1c2a1f; font-weight: 700; border: none; }
.nl-btn-2 { background: transparent; color: var(--akcent-txt); border: 1px solid var(--akcent-sub); }
.regiony-lista { list-style: none; margin: 0; padding: 0; }
.region { width: 100%; min-height: 44px; display: grid; grid-template-columns: 20px minmax(0, 1fr) 72px 58px; align-items: center; gap: 10px; padding: 4px 0; border: none; border-radius: 8px; background: none; color: var(--text); text-align: left; font-size: .95rem; }
.region:hover { background: var(--brand-soft); }
.region-nr { font-weight: 800; color: var(--accent); }
.region-nazwa { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-pasek { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.region-pasek i { display: block; height: 100%; border-radius: 4px; }
.region-wynik { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.karty-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); align-items: start; }
.karty-2 .karta { margin: 0 0 var(--s3); }
.karta-ciepla { background: var(--cieply-bg); color: var(--cieply-txt); border-color: transparent; }
.karta-ciepla .karta-head { color: var(--cieply-txt); }
.sezon-wykres { display: block; width: 100%; height: 56px; overflow: visible; }
.sezon-linia { fill: none; stroke: var(--k3); stroke-width: 3; stroke-linejoin: round; }
.sezon-dzis { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 3 3; }
.sezon-kropka { fill: var(--accent); }
.szacunek { margin: 0 0 var(--s3); font-size: .8rem; }
.szacunek .link-btn { min-height: 32px; padding: 0 4px; font-size: .8rem; }
.co-nowego.karta { padding: 14px 16px; }
/* map overlays: legend with sources, "what's happening" pill, phone dashboard's full-map button */
.legenda-mapy { position: relative; padding-right: 40px !important; background: var(--surface); color: var(--text); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); font-size: .8rem; }
.legenda-stref { display: grid; gap: 4px; margin: 0; font-weight: 400; }
.leg-tytul { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.leg-skala { display: flex; gap: 2px; }
.leg-skala i { width: 40px; height: 12px; border: 1px solid #0004; }
.leg-skala i:first-child { border-radius: 3px 0 0 3px; } .leg-skala i:last-child { border-radius: 0 3px 3px 0; }
.leg-opis { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.legenda-mapy .map-stopka { position: absolute; right: 2px; top: 2px; }
.legenda-mapy .map-stopka[open] { position: static; max-width: 460px; }
.legenda-mapy .map-stopka summary { min-height: 32px; min-width: 32px; font-size: 1rem; }
.hype { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 18px; border: none; border-radius: 22px; background: #1c2a1f; color: #fff; font-size: .85rem; box-shadow: var(--shadow); text-align: left; }
.hype > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hype-kropka { flex: none; width: 8px; height: 8px; border-radius: 4px; background: #f2a33a; }
[data-motyw="noc"] .hype { background: #22382a; }
.mapa-pelna { display: none; }
.tryb-nocny { flex: none; }
[data-motyw="noc"] #map canvas { filter: invert(1) hue-rotate(180deg) brightness(.92); }
[data-motyw="noc"] .maplibregl-ctrl-group { filter: invert(1) hue-rotate(180deg); }

@media (max-width: 899px) {
  /* phone, full map: the sheet carries the meter, the Top 5 and the news; the rest lives on "Dziś" */
  body.na-mapie:not(.tryb-pulpit) :is(#regiony, .karty-2, .szacunek, #najlepiej) { display: none !important; }
  body.na-mapie:not(.tryb-pulpit) .wm-liczba { font-size: 2.6rem; }
  body.na-mapie:not(.tryb-pulpit) .karta { box-shadow: none; }
  body.na-mapie:not(.tryb-pulpit) .legenda-mapy { position: fixed; z-index: 15; left: 72px; top: calc(var(--map-top, 60px) + 10px); padding: 6px 10px !important; }
  /* header on the phone stays one row: place · 📍 · time · 🚶 · 🌙 */
  body.na-mapie .pasek input { flex: 1 1 80px; }
  body.na-mapie .pasek select { max-width: 5.5em; }
  .region { grid-template-columns: 18px minmax(0, 1fr) 44px 54px; gap: 8px; }
  body.na-mapie:not(.tryb-pulpit) .legenda-mapy .map-stopka, body.na-mapie:not(.tryb-pulpit) .leg-tytul { display: none; }
  body.na-mapie:not(.tryb-pulpit) .leg-skala i { width: 26px; height: 10px; }
  body.na-mapie:not(.tryb-pulpit) .hype { position: fixed; z-index: 15; left: 72px; right: 56px; top: calc(var(--map-top, 60px) + 66px); }
  /* phone "Dziś": one scrolling page, the map a small picture under the meter (a tap opens the full map) */
  body.na-mapie.tryb-pulpit { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--s4)); }
  body.na-mapie.tryb-pulpit .top { position: sticky; }
  body.na-mapie.tryb-pulpit #tab-mapa { display: flex; flex-direction: column; padding: var(--s3) var(--s3) 0; }
  body.na-mapie.tryb-pulpit .map-panel { display: contents; }
  body.na-mapie.tryb-pulpit #map { position: relative; top: auto; bottom: auto; height: 240px; margin: 0 0 var(--s3); border: 1px solid var(--border); border-radius: 18px; order: 2; overflow: hidden; }
  body.na-mapie.tryb-pulpit .mapa-pelna { display: block; order: 2; align-self: flex-end; position: relative; z-index: 2; margin: -64px 10px 20px 0; min-height: 40px; padding: 4px 14px; border-radius: 20px; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); font-weight: 700; font-size: .9rem; }
  body.na-mapie.tryb-pulpit #wysypometr { order: 1; }
  body.na-mapie.tryb-pulpit :is(#najlepiej, #explore) { order: 3; }
  body.na-mapie.tryb-pulpit #co-nowego { order: 4; }
  body.na-mapie.tryb-pulpit #regiony { order: 5; }
  body.na-mapie.tryb-pulpit .karty-2 { order: 6; }
  body.na-mapie.tryb-pulpit :is(.szacunek, #wysyp-gatunki, .map-info) { order: 7; }
  body.na-mapie.tryb-pulpit :is(.uchwyt, .map-fab, .map-actions, #slupek-form, #map-tools, .legenda-mapy, .hype) { display: none !important; }
  body.na-mapie.tryb-pulpit .maplibregl-ctrl-top-right, body.na-mapie.tryb-pulpit .maplibregl-ctrl-bottom-right { display: none; }
  body.na-mapie.tryb-pulpit .co-nowego:not(.rozwin) #co-nowego-lista li:nth-child(n + 3) { display: none; }
  body.na-mapie.tryb-pulpit .co-nowego:not(.rozwin) #co-nowego-lista li:nth-child(2) { display: list-item; }
  .tabs button { font-size: .8rem; }
}
[data-motyw="noc"] .leg-skala i { filter: invert(1) hue-rotate(180deg) brightness(.92); }

/* ---------- Uwaga dziś (kleszcze, polowania, ASF): ostrzeżenia, więc bursztyn, nie czerwień ---------- */
.zagrozenia { display: grid; gap: 4px; margin: var(--s2) 0 0; }
.zagrozenie > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 10px; background: var(--cieply-bg); color: var(--cieply-txt); font-weight: 600; font-size: .9rem; }
.zagrozenie > summary::-webkit-details-marker { display: none; }
.zagrozenie > p { margin: 4px 10px 6px; }
.asf-zasady { margin: 6px 10px 4px; padding-left: 18px; }
.zagr-ikona { font-size: 1.1rem; }
.zagr-skala { display: inline-flex; gap: 2px; }
.zagr-skala i { width: 10px; height: 8px; border-radius: 2px; background: var(--border); }
.zagr-skala i.pelne { background: var(--akcent-btn); }
.info-i { margin-left: auto; color: var(--muted); }
/* Lyme in a high-incidence voivodeship: its own line under the tick activity */
.zagr-lyme { order: 5; flex-basis: 100%; padding-left: 26px; margin-top: -6px; font-size: .8rem; }
.zagrozenie.asf { margin-top: var(--s4); }
.kleszcze { background: var(--cieply-bg); color: var(--cieply-txt); border-radius: 10px; padding: 8px 12px; }

/* Opened inside Messenger / Facebook / Instagram: their storage can lose the car, so a warm warning strip */
.inapp { display: grid; grid-template-columns: auto 1fr auto; column-gap: var(--s2); align-items: start; padding: var(--s2) var(--s2) 0 var(--s4); background: var(--cieply-bg); color: var(--cieply-txt); font-size: .9rem; }
.inapp > .sym { margin-top: 3px; }
.inapp > p { margin: var(--s1) 0 0; }
.inapp .inapp-akcje { grid-column: 2 / 4; display: flex; flex-wrap: wrap; column-gap: var(--s4); }
.inapp .inapp-akcje a, .inapp .inapp-akcje button { min-height: 44px; display: inline-flex; align-items: center; }
.inapp .inapp-zamknij { min-width: 44px; justify-content: center; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }
/* SOS: full screen, big numbers to read out to 112 */
.sos-btn { width: 100%; margin: var(--s2) 0 0; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.sos { position: fixed; inset: 0; z-index: 100; overflow-y: auto; background: var(--bg); color: var(--text); padding: calc(env(safe-area-inset-top) + var(--s3)) var(--s4) calc(env(safe-area-inset-bottom) + var(--s5)); }
.sos > * { max-width: 640px; margin-left: auto; margin-right: auto; }
.sos-gora { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.sos-gora h2 { margin: 0; }
.sos-gora button { padding: 0; min-width: 48px; display: inline-flex; align-items: center; justify-content: center; }
.sos-dzwon { display: flex; align-items: center; justify-content: center; gap: var(--s2); margin: var(--s4) auto; min-height: 72px; border-radius: var(--r); background: var(--danger); color: var(--surface); font-size: 1.6rem; font-weight: 800; text-decoration: none; box-shadow: var(--shadow); }
.sos-dzwon .sym { width: 30px; height: 30px; }
.sos-lead { font-weight: 700; margin: var(--s4) auto var(--s2); }
.sos-dane { margin-top: 0; margin-bottom: var(--s4); }
.sos-dane dt { color: var(--muted); font-size: .9rem; margin-top: var(--s3); }
.sos-dane dd { margin: 2px 0 0; font-size: 1.3rem; font-weight: 700; overflow-wrap: anywhere; }
.sos-duze { display: block; font-size: 1.7rem; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.sos-dane dd .hint { display: block; font-weight: 400; }
body.sos-otwarte { overflow: hidden; }
/* offline packs: the compartment you stand in (forest tab) and the list in the info tab */
.w-oddziale { font-weight: 700; margin: var(--s2) 0; }
.paczki li { align-items: center; }
.toast .link-btn { color: var(--brand-contrast); font-weight: 700; text-decoration: underline; }

/* Line icons (lib/symbole.js) instead of emoji: they take the text colour and sit on the text line */
.sym { display: inline-block; vertical-align: -0.2em; flex-shrink: 0; }
button > .sym:first-child:not(:only-child), .btn > .sym:first-child { margin-right: 8px; }
.big { display: inline-flex; align-items: center; justify-content: center; }
.big .sym { width: 26px; height: 26px; }
.pasek-ikona, .fab, .info { display: inline-flex; align-items: center; justify-content: center; }
.pasek-ikona .sym { width: 22px; height: 22px; }
.fab .sym { width: 26px; height: 26px; }
.tab-ico .sym { width: 1em; height: 1em; vertical-align: middle; }
.zagr-ikona { display: inline-flex; }
.info-i .sym, .info .sym { width: 20px; height: 20px; }
.fakt { display: inline-flex; align-items: center; gap: 4px; }
.fakt .sym { color: var(--muted); }
.dir .sym { vertical-align: middle; }

/* Why this score: four factor rows, each raising or lowering the score */
.wm-dlaczego { margin: 0 0 -6px -8px; align-self: flex-end; }
.wm-dlaczego[aria-expanded="true"] { color: var(--brand); }
.wm-powody { margin: 10px 0 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, var(--bg)); }
.wm-powody-tytul { display: block; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.wm-powody-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.powod { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 400; }
.powod-ikona { display: inline-flex; color: var(--muted); }
.powod-tekst { flex: 1; }
.powod-kier { font-weight: 800; min-width: 1.2em; text-align: right; }
.powod.tr-gora .powod-kier { color: var(--up); }
.powod.tr-dol .powod-kier { color: var(--down); }
.powod.tr-rowno .powod-kier { color: var(--muted); }
.wm-brakuje { margin: 8px 0 0; font-weight: 700; }
.wm-brakuje .hint { font-weight: 400; }
.wm-brakuje:empty { display: none; }
.wm-powody .hint { margin: 6px 0 0; }

/* species groups: members with their share (picker) or points (card), look-alike warnings in the warning colour */
.grupa-lista { margin: 4px 0; padding-left: 18px; }
.ostrzezenie-grupy { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0; padding: 6px 10px; border-radius: 10px; background: var(--cieply-bg); color: var(--cieply-txt); font-weight: 600; }
/* partly closed forest (reserves, military, refuges): information in the caution colour; red stays for no entry */
.uwaga-zamkniete { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0; padding: 6px 10px; border-radius: 10px; background: var(--cieply-bg); color: var(--cieply-txt); }
.uwaga-zamkniete .sym { flex: none; margin-top: 2px; }
.ostrzezenie-grupy .sym { flex: none; width: 18px; height: 18px; margin-top: 2px; }

/* tap card: the chance colour as a round dot (a square swatch read as an empty checkbox), a ban first in red */
.meldunek-strefa i.kropka { width: 14px; height: 14px; border-radius: 50%; border: none; box-shadow: 0 0 0 1px #0003; flex: none; }
.karta-zakaz { border-left: 4px solid #b3261e; background: #b3261e14; padding: 6px 10px; margin: 6px 0; border-radius: 6px; color: #8c1d18; }
.karta-zakaz p { margin: 2px 0; }
/* national park or reserve: the purple of the map layer, not the red of entry bans */
.karta-rezerwat { border-left: 4px solid #6a3d9a; background: #6a3d9a14; padding: 6px 10px; margin: 6px 0; border-radius: 6px; }
.karta-rezerwat .sym { width: 18px; height: 18px; vertical-align: -3px; }
.karta-zakaz .sym { width: 18px; height: 18px; vertical-align: -3px; }
