/* Malaysia · God Mode — design tokens follow FloodDash: one interactive accent,
   status colours reserved for status, mono for every number that changes. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(../vendor/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(../vendor/fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(../vendor/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(../vendor/fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url(../vendor/fonts/inter-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(../vendor/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-display: swap; src: url(../vendor/fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --paper: #0b0e17; --well: #12162a; --well-2: #181d33; --rule: #232946; --rule-strong: #3b4368;
  --ink: #e6eaf3; --ink-mid: #b4bcd3; --ink-low: #8a93b0;
  --accent: #29e0f2; --accent-ink: #062a30; --accent-dim: rgba(41, 224, 242, .14);
  --brand: #ffcc00;
  --ok: #2fbf71; --alert: #f5c518; --warn: #f08a24; --bad: #e5484d; --bad-ink: #ff6b72;
  --font: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --num: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --r-sm: 7px; --r-md: 11px; --r-lg: 16px; --r-pill: 999px;
  --ctl: 36px; --rail: 400px;
  --shadow: 0 6px 16px rgba(0,0,0,.5), 0 16px 40px rgba(0,0,0,.45);
  --ease: cubic-bezier(.22,.61,.36,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font: 14px/1.45 var(--font); -webkit-text-size-adjust: 100%; text-wrap: pretty; }
body { display: grid; grid-template-rows: auto auto auto auto 1fr auto; min-height: 100dvh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 9999; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-low); } .small { font-size: 12px; }
.eyebrow { font: 600 11px/1.3 var(--num); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-low); margin: 20px 0 8px; }
.eyebrow:first-child { margin-top: 0; }
kbd { font: 10px var(--num); color: var(--ink-low); border: 1px solid var(--rule-strong); border-radius: 4px; padding: 0 4px; margin-left: auto; }

/* buttons */
.btn { min-height: var(--ctl); padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--rule-strong); background: var(--well-2); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--ink-low); text-decoration: none; }
.btn.ghost { background: transparent; } .btn.small { min-height: 32px; font-size: 12.5px; padding: 0 10px; } .btn.block { width: 100%; justify-content: center; margin: 4px 0; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: #fff; }
.icon-btn { width: var(--ctl); height: var(--ctl); border-radius: var(--r-sm); border: 1px solid var(--rule-strong); background: var(--well-2); display: inline-grid; place-items: center; }
.mini { border: 1px solid var(--rule-strong); background: var(--well-2); border-radius: 6px; padding: 2px 8px; }

/* header */
.top { display: grid; grid-template-columns: auto minmax(220px, 520px) 1fr; grid-template-areas: "brand search right" "lenses lenses lenses"; gap: 8px 18px; align-items: center; padding: 10px 16px 8px; border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, #0e1322, var(--paper)); }
.brand { grid-area: brand; display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { width: 34px; height: 34px; color: var(--brand); flex: none; }
.brand h1 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.brand p { margin: 0; font-size: 12px; color: var(--ink-low); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.search { grid-area: search; position: relative; display: flex; gap: 6px; }
.search input { flex: 1; min-width: 0; height: var(--ctl); border-radius: var(--r-sm); border: 1px solid var(--rule-strong); background: var(--well); padding: 0 12px; }
.search input::placeholder { color: var(--ink-low); }
#results { position: absolute; top: calc(var(--ctl) + 4px); left: 0; right: 42px; z-index: 2000; list-style: none; margin: 0; padding: 4px; background: var(--well-2); border: 1px solid var(--rule-strong); border-radius: var(--r-md); box-shadow: var(--shadow); max-height: 60vh; overflow: auto; }
#results li { padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
#results li[aria-selected="true"], #results li:hover { background: var(--accent-dim); }
#results small { color: var(--ink-low); margin-left: auto; white-space: nowrap; }
.kind { font: 600 9.5px var(--num); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-low); border: 1px solid var(--rule-strong); border-radius: 4px; padding: 0 4px; flex: none; }
.top-right { grid-area: right; justify-self: end; display: flex; align-items: center; gap: 8px; }
.status { display: flex; align-items: center; gap: 6px; font: 600 12px var(--num); padding: 0 10px; height: var(--ctl); border-radius: var(--r-sm); border: 1px solid var(--rule); white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-low); }
.status.s-live i { background: var(--ok); animation: pulse 2s infinite; } .status.s-delayed i { background: var(--alert); } .status.s-offline i { background: var(--bad); }
.status #clock { color: var(--ink); font-size: 14px; } .status small { color: var(--ink-low); font-size: 10px; }
.langs { display: flex; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); overflow: hidden; }
.langs button { border: 0; background: transparent; min-width: 40px; height: calc(var(--ctl) - 2px); font-weight: 700; font-size: 12px; color: var(--ink-low); }
.langs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(var(--ctl) + 6px); z-index: 2000; background: var(--well-2); border: 1px solid var(--rule-strong); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 4px; min-width: 220px; }
.menu button { display: flex; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: var(--r-sm); }
.menu button:hover { background: var(--accent-dim); }
.lenses { grid-area: lenses; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.lens { flex: none; min-height: 34px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--rule-strong); background: transparent; font-weight: 600; font-size: 13px; color: var(--ink-mid); transition: .15s var(--ease); }
.lens:hover { color: var(--ink); border-color: var(--ink-low); }
.lens[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* banner + verdict */
.banner { background: var(--bad); color: #fff; padding: 8px 16px; font-weight: 600; font-size: 13.5px; }
.verdict { display: grid; grid-template-columns: minmax(0, 1.3fr) auto auto; gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--rule); background: var(--paper); border-left: 5px solid var(--band, var(--ink-low)); }
.v-calm { --band: var(--ok); } .v-alert { --band: var(--alert); } .v-warning { --band: var(--warn); } .v-danger { --band: var(--bad); } .v-nodata, .v-loading { --band: #6b7280; }
.v-main { display: flex; gap: 12px; align-items: center; text-align: left; background: none; border: 0; padding: 0; min-width: 0; }
.v-plate { width: 38px; height: 38px; border-radius: 8px; background: var(--band); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--band) 25%, transparent); }
.v-danger .v-plate { animation: pulse-band 1.6s infinite; }
.v-text { display: flex; flex-direction: column; min-width: 0; }
.v-verb { font-size: 20px; font-weight: 800; line-height: 1.2; }
.v-why { font-size: 13px; color: var(--ink-mid); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.v-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--rule-strong); font-size: 12px; color: var(--ink-mid); white-space: nowrap; }
.chip b { font-family: var(--num); color: var(--ink); } .chip.warn b { color: var(--alert); } .chip.bad b { color: var(--bad-ink); } .chip.ok b { color: var(--ok); }
.v-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.v-note { font: 10px var(--num); color: var(--ink-low); text-transform: uppercase; letter-spacing: .08em; width: 100%; text-align: right; }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(8, minmax(128px, 1fr)); gap: 1px; background: var(--rule); border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: thin; }
.kpi { background: var(--paper); border: 0; padding: 8px 12px 6px; text-align: left; display: grid; grid-template-rows: auto auto auto auto; gap: 1px; min-width: 128px; position: relative; }
.kpi:hover { background: var(--well); }
.k-l { font-size: 11.5px; color: var(--ink-low); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.k-v { font-size: 22px; font-weight: 600; line-height: 1.2; }
.k-v.ok { color: var(--ok); } .k-v.warn { color: var(--alert); } .k-v.bad { color: var(--bad-ink); } .k-v.muted { color: var(--ink-low); }
.k-s { font-size: 11px; color: var(--ink-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-age { font: 9.5px var(--num); color: var(--ink-low); max-height: 0; overflow: hidden; transition: max-height .2s var(--ease); }
.kpi:hover .k-age, .kpi:focus-visible .k-age { max-height: 14px; }
.kpi .spark { position: absolute; right: 10px; top: 30px; color: var(--accent); opacity: .7; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-low); flex: none; }
.dot.live { background: var(--ok); } .dot.delayed { background: var(--alert); } .dot.stale, .dot.error { background: var(--bad); } .dot.loading { background: #6b7280; animation: blink 1.2s infinite; } .dot.static { background: #5b8def; } .dot.nokey { background: transparent; border: 1.5px solid var(--ink-low); }

/* stage */
.stage { display: grid; grid-template-columns: 1fr var(--rail); min-height: 0; }
.map-wrap { position: relative; min-height: 460px; }
#map { position: absolute; inset: 0; background: #070a12; }
body[data-basemap="none"] #map { background: radial-gradient(ellipse at 50% 40%, #0f1730, #05070d); }
.rail { border-left: 1px solid var(--rule); background: var(--well); display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 190px); }
.tabs { display: flex; border-bottom: 1px solid var(--rule); overflow-x: auto; flex: none; scrollbar-width: none; }
.tabs button { flex: 1 0 auto; min-height: 42px; padding: 0 8px; border: 0; background: transparent; font-weight: 600; font-size: 12px; color: var(--ink-low); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab-body { overflow-y: auto; padding: 16px 16px 28px; flex: 1; }
.tab-body h2 { font-size: 18px; margin: 0 0 6px; }
.tab-body h4 { font-size: 12.5px; margin: 14px 0 6px; color: var(--ink-mid); }
.src { color: var(--ink-low); font-size: 11px; margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.note { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--rule-strong); border-radius: var(--r-md); font-size: 12px; color: var(--ink-low); }
.lede { color: var(--ink-mid); font-size: 13px; margin: 0 0 12px; }

.bcard { border-radius: var(--r-md); background: var(--well-2); border: 1px solid var(--rule); border-top: 3px solid var(--c); padding: 10px 12px; margin-bottom: 10px; }
.bcard h3 { margin: 0 0 6px; font-size: 13px; color: var(--c); text-transform: uppercase; letter-spacing: .06em; }
.bcard ul { margin: 0; padding-left: 18px; } .bcard li { margin: 4px 0; }
.bcard.act { --c: var(--bad-ink); } .bcard.watch { --c: var(--alert); } .bcard.gaps { --c: var(--accent); }
.card { background: var(--well-2); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 8px; }
.card h4 { margin: 0 0 4px; font-size: 13.5px; color: var(--ink); }
.card p { margin: 4px 0; font-size: 13px; }
.card.you { border-color: var(--accent); }
.card.you h3 { margin: 0 0 6px; font-size: 14px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.row:last-child { border-bottom: 0; } .row > span:first-child { color: var(--ink-low); } .row > span:last-child { text-align: right; }
.prayer .row.next { color: var(--accent); } .prayer .row.next span { color: var(--accent); font-weight: 700; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--well-2); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 8px 10px; }
.stat .k { font-size: 11px; color: var(--ink-low); } .stat .v { font-size: 17px; font-weight: 600; } .stat .s { font-size: 10.5px; color: var(--ink-low); }
.stat .spark { color: var(--accent); margin-top: 4px; }
.stack { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--rule); }
.stack span { display: block; }
.keys { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--ink-mid); margin-top: 6px; }
.keys i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.facts { display: grid; gap: 6px; font-size: 13px; }
.facts b { font-size: 15px; color: var(--ink); }
.hero-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.hero-facts div { background: var(--well-2); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 10px; display: flex; flex-direction: column; }
.hero-facts b { font-size: 22px; color: var(--brand); } .hero-facts span { font-size: 12px; color: var(--ink-mid); }
.place-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; } .place-head h2 { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--rule); font-size: 13px; }
.list li:last-child { border-bottom: 0; }
.list > li:not(:has(.rowbtn)) { padding: 9px 0; }
.rowbtn { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 4px; border-radius: var(--r-sm); }
.rowbtn:hover { background: var(--accent-dim); }
.meta { display: block; color: var(--ink-low); font-size: 11px; margin-top: 2px; }
.news a { color: var(--ink); font-weight: 500; }
.srcs li { display: flex; gap: 8px; align-items: baseline; padding: 8px 0; } .srcs li > div { flex: 1; }
.pill { display: inline-block; padding: 1px 7px; border-radius: 4px; font: 700 10.5px var(--num); margin-right: 6px; text-transform: uppercase; }
.p-DANGER { background: var(--bad); color: #fff; } .p-WARNING { background: var(--warn); color: #111; } .p-ALERT { background: var(--alert); color: #111; } .p-NORMAL { background: #173a2a; color: var(--ok); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chips button { min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--rule-strong); background: transparent; font-size: 12.5px; color: var(--ink-mid); }
.chips button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bars { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.bars li { position: relative; display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; font-size: 12.5px; border-radius: 6px; overflow: hidden; z-index: 0; }
.bars li i { position: absolute; inset: 0 auto 0 0; background: var(--accent-dim); z-index: -1; border-radius: 6px; opacity: .9; }
.bars li i[style*="background"] { opacity: .28; }
.bars .bv { color: var(--ink-mid); white-space: nowrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink); text-align: left; text-decoration: underline dotted var(--ink-low); }
.warn-card { border-left: 3px solid var(--warn); }

/* map overlays */
.layer-panel, .legend { position: absolute; z-index: 800; background: rgba(12, 16, 30, .94); border: 1px solid var(--rule-strong); border-radius: var(--r-md); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.layer-panel { top: 10px; right: 10px; width: 262px; max-height: calc(100% - 20px); display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px; background: none; border: 0; font-weight: 700; font-size: 13px; text-align: left; }
.layer-body { overflow-y: auto; padding: 0 12px 10px; font-size: 12.5px; }
.layer-panel.closed { width: auto; } .layer-panel.closed .layer-body { display: none; }
.lp-sec { border-top: 1px solid var(--rule); padding: 8px 0; } .lp-sec .eyebrow { margin: 2px 0 6px; }
.chk { display: flex; align-items: center; gap: 8px; min-height: 30px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.seg { display: flex; gap: 4px; margin: 4px 0; }
.seg button { flex: 1; min-height: 30px; border-radius: 6px; border: 1px solid var(--rule-strong); background: transparent; font-size: 12px; color: var(--ink-mid); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sel { display: grid; gap: 4px; margin-top: 6px; color: var(--ink-low); }
.sel select { width: 100%; min-height: 32px; background: var(--well); border: 1px solid var(--rule-strong); border-radius: 6px; padding: 0 6px; color: var(--ink); }
.legend { left: 10px; bottom: 26px; width: 250px; max-height: 55%; display: flex; flex-direction: column; }
#legendBody { overflow-y: auto; padding: 0 12px 10px; font-size: 11.5px; }
.legend.closed #legendBody { display: none; } .legend.closed { width: auto; }
.legend section { border-top: 1px solid var(--rule); padding: 7px 0; } .legend section b { display: block; font-size: 11.5px; margin-bottom: 4px; }
.sw { display: flex; align-items: center; gap: 7px; margin: 2px 0; color: var(--ink-mid); }
.sw i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.sw i.sq { border-radius: 2px; } .sw i.line { height: var(--w, 3px); width: 16px; border-radius: 2px; }
.sw i.ring { background: transparent; border: 2px solid var(--c); width: var(--s, 11px); height: var(--s, 11px); }
.sw i.hatch { border-radius: 2px; background: repeating-linear-gradient(45deg, var(--c) 0 2px, transparent 2px 5px); border: 1px dashed var(--c); }
.sw i.plane { background: none; width: 12px; height: 12px; clip-path: polygon(50% 0, 62% 38%, 100% 58%, 100% 68%, 60% 58%, 58% 84%, 70% 94%, 50% 90%, 30% 94%, 42% 84%, 40% 58%, 0 68%, 0 58%, 38% 38%); background: var(--c); border-radius: 0; }
.sw i.cross { background: none; border-radius: 0; width: 12px; height: 12px; clip-path: polygon(35% 0, 65% 0, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0 65%, 0 35%, 35% 35%); background: var(--c); }
.ramp { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 4px 0 2px; } .ramp i { flex: 1; }
.ends { display: flex; justify-content: space-between; color: var(--ink-low); font-family: var(--num); font-size: 10px; }
.bins { display: grid; gap: 2px; } .bins span { display: flex; align-items: center; gap: 6px; font: 10.5px var(--num); color: var(--ink-mid); } .bins i { width: 14px; height: 9px; border-radius: 2px; }
.radar-ctl { display: flex; gap: 8px; align-items: center; font: 11px var(--num); margin: 4px 0; }
.caption { position: absolute; left: 50%; transform: translateX(-50%); bottom: 28px; z-index: 790; max-width: min(620px, calc(100% - 560px)); min-width: 280px; text-align: center; background: rgba(8, 11, 20, .9); border: 1px solid var(--rule-strong); padding: 10px 16px; border-radius: var(--r-md); font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow); }
.caption b { color: var(--accent); display: block; font: 600 11px var(--num); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 2px; }

/* leaflet skin */
.leaflet-container { font: 13px var(--font); background: #070a12; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--well-2); color: var(--ink); border: 1px solid var(--rule-strong); box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 12px 14px; min-width: 220px; } .leaflet-popup-content h4 { margin: 0 0 6px; font-size: 14px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--ink-low); }
.leaflet-control-attribution { background: rgba(8, 11, 20, .75) !important; color: var(--ink-low) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--ink-mid) !important; }
.leaflet-bar a { background: var(--well-2); color: var(--ink); border-bottom-color: var(--rule-strong); width: 34px; height: 34px; line-height: 34px; }
.leaflet-tooltip.tip { background: rgba(8, 11, 20, .92); border: 1px solid var(--rule-strong); color: var(--ink); font: 12px var(--font); padding: 3px 8px; box-shadow: none; }
.leaflet-tooltip.tip::before { display: none; }
.leaflet-tooltip.city { font: 600 11px var(--num); padding: 1px 6px; }
.plane { filter: drop-shadow(0 0 2px rgba(0,0,0,.9)); }
.fc { font-size: 22px; text-align: center; line-height: 30px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.9)); }
.hosp { color: #fff; background: var(--bad); border-radius: 4px; font: 700 11px/16px var(--font); text-align: center; box-shadow: 0 0 0 1.5px #0b1220; }
.apt span { display: inline-block; white-space: nowrap; background: rgba(8,11,20,.9); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: 4px; font: 600 10.5px var(--num); padding: 1px 5px; transform: translate(-50%, -50%); }
.pulse { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--c); animation: ring 1.6s infinite; }
.gauge { position: relative; height: 12px; background: var(--rule); border-radius: 6px; margin: 8px 0 4px; overflow: visible; }
.gauge b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; opacity: .9; }
.gauge i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--c); z-index: 1; }
.spark-wrap { color: var(--accent); margin-top: 6px; }

.bottom-nav { display: none; }
.foot { display: flex; justify-content: space-between; gap: 12px; padding: 6px 16px; font-size: 11px; color: var(--ink-low); border-top: 1px solid var(--rule); flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); z-index: 5000; background: var(--well-2); border: 1px solid var(--accent); color: var(--ink); padding: 10px 16px; border-radius: var(--r-md); box-shadow: var(--shadow); font-size: 13px; max-width: 90vw; }
dialog { background: var(--well); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: var(--r-lg); max-width: 580px; padding: 22px; }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog h2 { margin-top: 0; }
.qr-row { display: flex; gap: 14px; align-items: center; margin: 14px 0; }
#qr { background: #fff; padding: 8px; border-radius: 8px; } #qr img, #qr canvas { display: block; width: 132px; height: 132px; }
.glyphs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tvqr { display: none; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,191,113,.55); } 70% { box-shadow: 0 0 0 7px rgba(47,191,113,0); } 100% { box-shadow: 0 0 0 0 rgba(47,191,113,0); } }
@keyframes pulse-band { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--band) 0%, transparent); } }
@keyframes ring { from { transform: scale(.35); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* TV / kiosk: big type, no chrome, QR in the corner */
body.tv { --rail: 440px; font-size: clamp(14px, 1.05vw, 20px); }
body.tv .search, body.tv .menu-wrap, body.tv .foot, body.tv .layer-panel, body.tv .bottom-nav, body.tv .v-act .ghost { display: none; }
body.tv .brand h1 { font-size: clamp(18px, 1.5vw, 30px); } body.tv .v-verb { font-size: clamp(22px, 2vw, 40px); } body.tv .k-v { font-size: clamp(22px, 1.8vw, 36px); }
body.tv .caption { font-size: clamp(16px, 1.4vw, 28px); max-width: 60%; }
body.tv .tvqr { display: block; position: fixed; right: calc(var(--rail) + 16px); bottom: 16px; z-index: 900; background: #fff; padding: 6px; border-radius: 8px; }
body.tv .tvqr img, body.tv .tvqr canvas { width: 110px; height: 110px; display: block; }
body.tv { cursor: none; }

/* responsive */
@media (max-width: 1280px) { :root { --rail: 360px; } .brand p { max-width: 240px; } .verdict { grid-template-columns: 1fr auto; } .v-act { grid-column: 1 / -1; justify-content: flex-start; } .v-note { text-align: left; width: auto; } .caption { max-width: calc(100% - 40px); bottom: auto; top: 10px; } }
@media (max-width: 1100px) { .top { grid-template-columns: 1fr auto; grid-template-areas: "brand right" "search search" "lenses lenses"; } .brand p { display: none; } .legend { bottom: 10px; } }
@media (max-width: 900px) {
  body { display: block; padding-bottom: 64px; }
  .top { padding: 8px 12px; gap: 6px 10px; }
  .status small, #statusText { display: none; }
  #tourBtn { display: none; }
  .verdict { grid-template-columns: 1fr; gap: 8px; padding: 8px 12px; }
  .v-verb { font-size: 18px; } .v-chips { flex-wrap: nowrap; overflow-x: auto; }
  .kpis { grid-template-columns: repeat(8, 132px); }
  .stage { display: block; }
  .map-wrap { height: calc(100dvh - 330px); min-height: 360px; }
  .rail { border-left: 0; max-height: none; }
  body[data-view="map"] .rail { display: none; }
  body[data-view="rail"] .map-wrap { display: none; }
  .tab-body { overflow: visible; }
  .caption { display: none; }
  .layer-panel { width: min(280px, calc(100% - 20px)); }
  .legend { width: min(230px, calc(100% - 80px)); max-height: 40%; }
  .foot { display: none; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000; background: var(--well); border-top: 1px solid var(--rule-strong); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav button { flex: 1; min-height: 56px; border: 0; background: none; font-size: 11px; color: var(--ink-low); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: inset 0 3px 0 transparent; }
  .bottom-nav button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
}
@media (pointer: coarse) { :root { --ctl: 44px; } .chk { min-height: 40px; } .seg button, .chips button { min-height: 40px; } }
@media (max-width: 560px) {
  .top { grid-template-columns: minmax(0, 1fr) auto; }
  .brand h1 { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; }
  .mark { width: 28px; height: 28px; }
  #status { display: none; }
  .langs button { min-width: 34px; }
  .kpis { grid-template-columns: repeat(8, 118px); }
  .k-v { font-size: 19px; }
}
.brand > div { min-width: 0; } .brand h1 { overflow: hidden; text-overflow: ellipsis; }
