/* MeSAR — wygląd zgodny z makietą (Design: „Makieta – noc (A)” i wersje dzienne B).
 * Noc: czerń + żółty #FFD400. Dzień: biel + czerwony #D7261E. Ekran SOS zawsze ciemny. */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(../vendor/fonts/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF; }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(../vendor/fonts/inter-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1EFF; }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(../vendor/fonts/inter-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF; }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(../vendor/fonts/inter-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1EFF; }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(../vendor/fonts/inter-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF; }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(../vendor/fonts/inter-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1EFF; }
@font-face { font-family: Inter; font-weight: 800; font-display: swap; src: url(../vendor/fonts/inter-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF; }
@font-face { font-family: Inter; font-weight: 800; font-display: swap; src: url(../vendor/fonts/inter-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1EFF; }

:root, :root[data-theme="noc"] {
  --bg: #000; --mapbg: #0b0b0b; --surf: #141414; --surf2: #181818; --surf3: #161616; --bord: #3a3a3a; --bord2: #444;
  --text: #fff; --muted: #c8c8c8; --dim: #dcdcdc;
  --acc: #ffd400; --on-acc: #000; --acc-t: rgba(255,212,0,.16); --acc-b: rgba(255,212,0,.45);
  --ok: #46c37b; --ok-t: #7fe0a8; --ok-bg: rgba(70,195,123,.15); --ok-b: rgba(70,195,123,.4);
  --warn: #e8b339; --warn-bg: rgba(232,179,57,.12);
  --red: #e5484d; --red-t: #ff7a7f; --red-bg: rgba(229,72,77,.14); --sos: #ff2d2d; --blue: #5aa9ff;
  --me: #ffd400; --track: #ffd400; --water: #2f6f9f;
  --map-filter: invert(1) hue-rotate(180deg) brightness(.6) contrast(1.15) saturate(.35);
}
:root[data-theme="dzien"] {
  --bg: #fff; --mapbg: #eef0e8; --surf: #f2f2f2; --surf2: #ececec; --surf3: #f2f2f2; --bord: #9a9a9a; --bord2: #666;
  --text: #111; --muted: #3d3d3d; --dim: #2a2a2a;
  --acc: #d7261e; --on-acc: #fff; --acc-t: rgba(215,38,30,.16); --acc-b: rgba(215,38,30,.45);
  --ok: #157a3c; --ok-t: #157a3c; --ok-bg: rgba(21,122,60,.12); --ok-b: rgba(21,122,60,.45);
  --warn: #8a5a00; --warn-bg: rgba(138,90,0,.1);
  --red: #b3141c; --red-t: #b3141c; --red-bg: rgba(179,20,28,.1); --sos: #d7261e; --blue: #0057d9;
  --me: #0057d9; --track: #0057d9; --water: #2f6f9f;
  --map-filter: saturate(.5) contrast(1.05);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; display: flex; flex-direction: column; overscroll-behavior: none; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.scroll { flex: 1; min-height: 0; overflow: auto; }
.pad { padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.t12 { font-size: 12px; } .t13 { font-size: 13px; } .t16 { font-size: 16px; font-weight: 700; } .t17 { font-size: 17px; font-weight: 700; } .t20 { font-size: 20px; font-weight: 700; }
.sec { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.ok { color: var(--ok-t); } .warn { color: var(--warn); } .bad { color: var(--red-t); }

/* karty, chipy */
.card { border-radius: 18px; background: var(--surf); border: 1px solid var(--bord); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.acc { background: var(--acc-t); border-color: var(--acc-b); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid var(--bord); background: var(--surf); color: var(--dim); }
.chip.ok { background: var(--ok-bg); border-color: var(--ok-b); color: var(--ok-t); }
.chip.warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.chip.bad { background: var(--red-bg); border-color: var(--red); color: var(--red-t); }
.chip.acc { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.chip .d { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill { flex: 1; padding: 8px 10px; border-radius: 14px; background: var(--surf); border: 1px solid var(--bord); font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill b { color: var(--text); }

/* przyciski */
.btn { min-height: 52px; border-radius: 14px; border: 1px solid var(--bord); background: var(--surf); color: var(--text); font-weight: 700; font-size: 15px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn.big { min-height: 64px; border-radius: 16px; }
.btn.acc { background: var(--acc); border-color: var(--acc); color: var(--on-acc); font-weight: 800; }
.btn.tint { background: var(--acc-t); border-color: var(--acc-b); color: var(--acc); font-weight: 600; font-size: 13px; }
.btn.dark { background: var(--surf2); border-color: var(--bord2); font-weight: 600; font-size: 13px; }
.btn.sos { background: var(--sos); border-color: var(--sos); color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .04em; }
.btn.redline { background: var(--red-bg); border-color: var(--red); color: var(--red-t); }
.btn.small { min-height: 40px; font-size: 13px; border-radius: 12px; padding: 0 12px; }
.btn.on { background: var(--acc-t); border-color: var(--acc); color: var(--acc); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; }
.ibtn { width: 44px; height: 44px; border-radius: 14px; background: var(--surf); border: 1px solid var(--bord); display: inline-flex; align-items: center; justify-content: center; color: var(--text); flex: none; padding: 0; }
.ibtn svg, .btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stbtn { min-height: 52px; border-radius: 12px; background: var(--surf); border: 1px solid var(--bord); color: var(--muted); font-weight: 600; font-size: 11px; padding: 4px; }
.stbtn.on { background: var(--acc-t); border-color: var(--acc); color: var(--acc); font-weight: 700; }
.repbtn { min-height: 64px; border-radius: 16px; background: var(--surf); border: 1px solid var(--bord); color: var(--text); font-weight: 600; font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; }
.repbtn svg { width: 18px; height: 18px; fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.found { min-height: 64px; border-radius: 18px; background: var(--acc); border: 0; color: var(--on-acc); font-weight: 800; font-size: 20px; letter-spacing: .03em; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.found span { font-size: 12px; font-weight: 600; letter-spacing: 0; opacity: .75; }

/* formularze */
label { font-size: 13px; color: var(--muted); }
input, select, textarea { min-height: 48px; border-radius: 14px; border: 1px solid var(--bord); background: var(--surf); padding: 0 14px; width: 100%; color: var(--text); }
textarea { padding: 12px 14px; min-height: 80px; resize: vertical; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; }

/* listy */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { padding: 12px 14px; border-radius: 14px; background: var(--surf); border: 1px solid var(--bord); display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; color: var(--text); width: 100%; }
.item b { font-size: 15px; font-weight: 700; }
.item .s { font-size: 12px; color: var(--muted); }
.item.sos { border-color: var(--red); background: var(--red-bg); }
.item.warn { border-color: var(--warn); background: var(--warn-bg); }
.item.sel { border-color: var(--acc); }
.sq { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); }
.dot.warn { background: var(--warn); } .dot.bad { background: var(--sos); } .dot.off { background: var(--bord); }

/* nagłówek podstrony ratownika */
.hdr { display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; }
.back { width: 44px; height: 44px; border-radius: 14px; background: var(--surf); border: 1px solid var(--bord); display: flex; align-items: center; justify-content: center; color: var(--text); flex: none; }
.back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

/* mapa ratownika: pełny ekran z pływającymi kartami */
.mapfull { position: absolute; inset: 0; }
.map { width: 100%; height: 100%; background: var(--mapbg); }
.leaflet-container { background: var(--mapbg); font-family: Inter, system-ui, sans-serif; }
.leaflet-tile-pane { filter: var(--map-filter); }
.ov-top { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 600; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.ov-top > * { pointer-events: auto; }
.ov-right { position: absolute; right: 12px; bottom: 178px; z-index: 600; display: flex; flex-direction: column; gap: 8px; }
.ov-bottom { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 600; border-radius: 22px; padding: 14px; background: var(--surf); border: 1px solid var(--bord); display: flex; flex-direction: column; gap: 12px; }
.prog { width: 64px; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; flex: none; }
.prog > div { height: 100%; background: var(--acc); }
.bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.bar > div { height: 100%; }

/* etykiety na mapie (bez ramek, jak na makiecie) */
.leaflet-tooltip.ml { background: transparent; border: 0; box-shadow: none; padding: 0; font: 700 12px Inter, sans-serif; color: var(--text); text-shadow: 0 0 3px var(--bg), 0 0 3px var(--bg), 0 0 6px var(--bg); }
.leaflet-tooltip.ml::before { display: none; }
.leaflet-tooltip.ml.warn { color: var(--warn); } .leaflet-tooltip.ml.acc { color: var(--acc); } .leaflet-tooltip.ml.bad { color: var(--red-t); letter-spacing: .04em; }
.leaflet-tooltip.mlbox { background: var(--bg); border: 0; box-shadow: none; padding: 4px 10px; border-radius: 8px; font: 700 14px Inter, sans-serif; color: var(--text); }
.leaflet-tooltip.mlbox::before { display: none; }

/* dolne menu ratownika */
nav.tabs { height: 72px; display: flex; justify-content: space-around; align-items: center; background: var(--surf); border-top: 2px solid var(--bord); flex: none; }
nav.tabs button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--muted); min-width: 64px; min-height: 56px; justify-content: center; }
nav.tabs button.on { color: var(--acc); }
nav.tabs svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* menu startowe ratownika */
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; color: var(--dim); }
.kv b { color: var(--text); } .kv b.ok { color: var(--ok-t); }
.menuitem { min-height: 76px; border-radius: 18px; background: var(--surf); border: 1px solid var(--bord); display: flex; align-items: center; gap: 18px; padding: 0 22px; font-size: 18px; font-weight: 800; letter-spacing: .02em; color: var(--text); width: 100%; text-align: left; }
.menuitem svg { width: 26px; height: 26px; fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.banner { border-radius: 14px; background: var(--warn); color: #111; font-weight: 700; font-size: 13px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; }

/* prowadzenie do punktu */
.compass { width: 200px; height: 200px; margin: 0 auto; display: block; }
.nums { display: flex; justify-content: center; gap: 32px; }
.nums div { text-align: center; } .nums b { font-size: 44px; font-weight: 800; display: block; letter-spacing: -.01em; } .nums span { font-size: 12px; color: var(--muted); }

/* SOS na pełnym ekranie (zawsze ciemny) */
#sosScreen { position: fixed; inset: 0; background: #140000; color: #fff; z-index: 2000; display: flex; flex-direction: column; align-items: center; padding: calc(40px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); gap: 14px; overflow: auto; }
#sosScreen .lbl { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: #ffb3b6; }
#sosScreen .ring { width: 212px; height: 212px; border-radius: 50%; background: rgba(255,45,45,.22); display: flex; align-items: center; justify-content: center; margin: 8px 0; }
#sosScreen .core { width: 160px; height: 160px; border-radius: 50%; background: #ff2d2d; display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 800; letter-spacing: .06em; }
#sosScreen .srow { width: 100%; display: flex; justify-content: space-between; padding: 12px 16px; border-radius: 14px; background: #1c1414; border: 1px solid #3a2a2a; font-size: 14px; color: #ffd6d8; }
#sosScreen .srow b { color: #fff; }
#sosScreen .note { width: 100%; padding: 12px 16px; border-radius: 14px; border: 1px dashed rgba(70,195,123,.5); color: #7fe0a8; font-size: 13px; background: rgba(70,195,123,.06); }
.hold { position: relative; overflow: hidden; }
.hold .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.28); pointer-events: none; }

/* komunikaty */
#toast { position: fixed; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); z-index: 3000; padding: 14px 16px; border-radius: 14px; background: var(--acc); color: var(--on-acc); font-weight: 700; font-size: 15px; max-width: 520px; margin: 0 auto; }

/* ---------- dowódca (tablet) ---------- */
.dhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 2px solid var(--bord); flex: none; }
.dhead h1 { font-size: 20px; font-weight: 800; margin: 0; white-space: nowrap; }
.dtabs { display: flex; gap: 6px; padding: 10px 20px; border-bottom: 2px solid var(--bord); flex: none; overflow-x: auto; }
.dtabs button { min-height: 40px; padding: 0 16px; border-radius: 12px; background: none; border: 1px solid transparent; color: var(--dim); font-weight: 700; font-size: 14px; white-space: nowrap; }
.dtabs button.on { background: var(--acc-t); border-color: var(--acc-b); color: var(--acc); }
.dbody { flex: 1; min-height: 0; display: flex; }
.dcol { width: 270px; flex: none; display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow: auto; }
.dcol.l { border-right: 2px solid var(--bord); } .dcol.r { border-left: 2px solid var(--bord); width: 290px; }
.dmap { flex: 1; min-width: 0; position: relative; }
.dmap .chips { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 600; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.dmap .chips > * { pointer-events: auto; }
.dmap .chips .chip { font-size: 12px; padding: 8px 12px; border-radius: 10px; }
.dmap .br { position: absolute; right: 12px; bottom: 12px; z-index: 600; }
.dmap .bl { position: absolute; left: 12px; bottom: 12px; z-index: 600; }
.ditem { padding: 10px 12px; border-radius: 12px; background: var(--surf); border: 1px solid var(--bord); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ditem b { font-size: 14px; } .ditem .s { font-size: 12px; color: var(--muted); }
.ditem.sos { border-color: var(--red); background: var(--red-bg); }
.ditem.warn { border-color: var(--warn); background: var(--warn-bg); }
.ditem.warn .s { color: var(--warn); }
.dgrid { flex: 1; min-height: 0; overflow: auto; padding: 16px 20px; display: grid; gap: 16px; }
.dgrid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dgrid .card { border-radius: 18px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--bord); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.stag { display: inline-flex; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--red); color: var(--red-t); font-weight: 700; font-size: 13px; background: var(--red-bg); }
.scols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; min-height: 220px; }
.scol { border-radius: 14px; border: 1px solid var(--bord); display: flex; flex-direction: column; justify-content: space-between; padding: 12px 8px 8px; text-align: center; font-weight: 800; font-size: 15px; gap: 6px; }
.scol .f { font-size: 12px; font-weight: 700; padding-top: 6px; border-top: 1px solid currentColor; }
.chipsel { min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surf); border: 1px solid var(--bord); font-weight: 700; font-size: 14px; color: var(--text); }
.chipsel.on { background: var(--acc-t); border-color: var(--acc); color: var(--acc); }
.statbtn { min-height: 48px; border-radius: 12px; background: var(--surf); border: 1px solid var(--bord); display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 13px; font-weight: 700; text-align: left; color: var(--text); }
.statbtn.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.kpi { border-radius: 12px; background: var(--surf); border: 1px solid var(--bord); padding: 10px 12px; }
.kpi span { display: block; font-size: 12px; color: var(--muted); } .kpi b { font-size: 18px; }
.note-ok { border-radius: 12px; border: 1px solid var(--ok-b); background: var(--ok-bg); color: var(--ok-t); font-size: 13px; padding: 10px 12px; }
.legend { display: flex; gap: 14px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--bord); font-size: 12px; }
input[type=range] { min-height: 0; padding: 0; accent-color: var(--acc); }

/* telefon w roli dowódcy: kolumny jedna pod drugą */
@media (max-width: 899px) {
  .dbody { flex-direction: column; overflow: auto; }
  .dcol, .dcol.r { width: auto; border: 0 !important; overflow: visible; }
  .dmap { min-height: 420px; flex: none; }
  .dgrid.c3 { grid-template-columns: 1fr; }
  .dgrid.c3 > .card { grid-column: auto !important; }
  .scols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dhead { flex-wrap: wrap; }
}

/* PIN dowódcy */
#pinScreen { position: fixed; inset: 0; z-index: 2500; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; padding: 20px; }
.pinbox { width: 100%; max-width: 340px; background: var(--surf); border: 1px solid var(--bord); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pindots { display: flex; gap: 16px; margin: 8px 0 0; }
.pindots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); }
.pindots span.on { background: var(--acc); border-color: var(--acc); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.pinpad button { min-height: 60px; border-radius: 16px; background: var(--surf2); border: 1px solid var(--bord); color: var(--text); font-size: 24px; font-weight: 700; }
.pinpad button[data-k="x"] { font-size: 14px; color: var(--muted); }

/* zaznaczanie tekstu tylko w polach formularza (wklejanie danych) */
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* podkład zdjęciowy / topograficzny GUGiK: bez odwracania kolorów w nocy, tylko przyciemnienie */
:root[data-theme="noc"][data-basemap="photo"] .leaflet-tile-pane { filter: brightness(.7) contrast(1.05); }
:root[data-theme="dzien"][data-basemap="photo"] .leaflet-tile-pane { filter: none; }
/* arkusz warstw mapy */
#sheet { position: fixed; inset: 0; z-index: 2400; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheetbox { width: 100%; max-width: 520px; background: var(--surf); border: 1px solid var(--bord); border-radius: 22px 22px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; max-height: 85vh; overflow: auto; }
/* potwierdzenie przycisku */
#confirm { position: fixed; inset: 0; z-index: 2600; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.confbox { width: 100%; max-width: 340px; background: var(--surf); border: 1px solid var(--acc); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.confbar { width: 100%; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--text) 12%, transparent); overflow: hidden; }
.confbar > div { width: 100%; height: 100%; background: var(--acc); transition: width 3s linear; }
/* kontrola czasu: pasek alarmów dowódcy */
.alarms { display: flex; flex-direction: column; gap: 6px; padding: 8px 20px; background: var(--red-bg); border-bottom: 2px solid var(--red); flex: none; }
.alarm { display: flex; align-items: center; gap: 10px; color: var(--red-t); font-size: 15px; }
.alarm .d { width: 12px; height: 12px; border-radius: 50%; background: var(--sos); flex: none; animation: blink 1s steps(2) infinite; }
.alarm .btn { min-height: 38px; }
@keyframes blink { 50% { opacity: .25; } }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--acc); color: var(--on-acc); font-size: 12px; line-height: 20px; margin-left: 4px; }
.t12.acc, b.acc { color: var(--acc); }
/* wywiad: wskazówki i pierścienie ISRID */
.hints { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--dim); }
.hints li { margin-bottom: 4px; }
.rings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rings > div { border: 1px solid var(--bord); border-radius: 12px; padding: 6px 8px; display: flex; flex-direction: column; }
.rings span { font-size: 12px; color: var(--muted); } .rings b { font-size: 15px; }
/* znaleziska */
.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--bord); flex: none; cursor: pointer; }
.num { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--acc); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex: none; }
.num.bad { border-color: var(--red); }
.ditem.sel { border-color: var(--acc); }
/* czuwak: jak potwierdzenie, ale nad wszystkim i bez zamykania kliknięciem w tło */
#czuwak { position: fixed; inset: 0; z-index: 2700; background: rgba(120,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 20px; }
#czuwak .confbox { border-color: var(--red); }
