/* Live Map — full-bleed hazard map with floating glass panels. Theme tokens come from app.css. */
.wm-slot, .wm { position: relative; height: 100%; width: 100%; }
.wm { --wm-panel: 360px; --wm-gap: 12px; font-size: 13.5px; }
.wm-map { position: absolute; inset: 0; background: var(--bg); }
.wm .leaflet-container { background: var(--bg); font: inherit; }
.wm-glass { background: var(--card-2); border: 1px solid var(--line-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow); }

/* ---------- top bar ---------- */
.wm-top { position: absolute; z-index: 600; top: var(--wm-gap); left: var(--wm-gap); right: calc(var(--wm-panel) + var(--wm-gap) * 2); display: flex; gap: 10px; align-items: center; pointer-events: none; }
.wm-top > * { pointer-events: auto; }
.wm-brand { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 14px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.wm-brand h1 { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.wm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: wm-pulse 2.4s infinite; }
@keyframes wm-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.wm-search { position: relative; flex: 1; min-width: 0; max-width: 420px; }
.wm-search input { width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); outline: none; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.wm-search input:focus { border-color: var(--accent); }
.wm-sres { position: absolute; top: 48px; left: 0; right: 0; border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.wm-sres button, .wm-sres div { display: block; width: 100%; text-align: left; padding: 10px 14px; background: none; border: 0; border-bottom: 1px solid var(--line); }
.wm-sres button:hover, .wm-sres button:focus-visible { background: var(--accent-soft); outline: none; }
.wm-topbtns { display: flex; gap: 6px; margin-left: auto; }
.wm-iconbtn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--muted-2); background: var(--card-2); border: 1px solid var(--line-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.wm-iconbtn:hover { color: var(--text); border-color: var(--accent); }
.wm :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- layers ---------- */
.wm-layers { position: absolute; z-index: 590; top: calc(var(--wm-gap) + 54px); left: var(--wm-gap); width: 262px; max-height: calc(100% - 130px); display: none; flex-direction: column; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow); overflow: hidden; }
.wm-layers.open { display: flex; }
.wm-lh { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px 14px; font-family: var(--display); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; color: var(--muted-2); }
.wm-x { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; width: 28px; height: 28px; border-radius: 8px; }
.wm-x:hover { color: var(--text); background: var(--bg-2); }
.wm-lscroll { overflow-y: auto; padding: 0 8px 10px; overscroll-behavior: contain; }
.wm-lg { padding: 6px 0 2px; }
.wm-lgh { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 4px 6px; }
.wm-lrow { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--muted-2); }
.wm-lrow:hover { background: var(--bg-2); }
.wm-lrow.on { color: var(--text); }
.wm-lrow input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wm-sw { flex: none; width: 28px; height: 16px; border-radius: 10px; background: var(--line-2); position: relative; transition: background .15s; }
.wm-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted-2); transition: transform .15s, background .15s; }
.wm-lrow input:checked + .wm-sw { background: var(--accent); }
.wm-lrow input:checked + .wm-sw::after { transform: translateX(12px); background: #fff; }
.wm-lrow input:focus-visible + .wm-sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.wm-ln { flex: 1; min-width: 0; line-height: 1.25; }
.wm-st { font-family: var(--mono); font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
.wm-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.wm-st.stale::before, .wm-st.warn::before { background: var(--med); }
.wm-st.err::before { background: var(--high); }
.wm-st.err { color: var(--high); }
.wm-st.idle::before { background: var(--faint); }
.wm-st.load::before { background: var(--info); animation: wm-blink 1s infinite; }
@keyframes wm-blink { 50% { opacity: .2; } }
.wm-layers select { width: 100%; height: 34px; margin-top: 4px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); padding: 0 8px; }
.wm-zoomnote { position: absolute; z-index: 580; left: 50%; transform: translateX(-50%); bottom: 34px; max-width: min(520px, calc(100% - 32px)); padding: 6px 12px; border-radius: 20px; font-size: 12px; color: var(--muted-2); background: var(--card-2); border: 1px solid var(--line-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); text-align: center; }

/* ---------- side panel / bottom sheet ---------- */
.wm-panel { position: absolute; z-index: 600; top: var(--wm-gap); right: var(--wm-gap); bottom: var(--wm-gap); width: var(--wm-panel); display: flex; flex-direction: column; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow); overflow: hidden; }
.wm-grab { display: none; }
.wm-tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); flex: none; }
.wm-tabs button { flex: 1; height: 36px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.wm-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.wm-pip { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--high); color: #fff; font: 600 10px var(--mono); letter-spacing: 0; vertical-align: 1px; }
.wm-pbody { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 10px 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.wm-pbody .empty { padding: 22px 12px; }
.wm-feedbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.wm-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.wm-seg button { height: 28px; padding: 0 10px; background: none; border: 0; color: var(--muted); font-size: 12px; }
.wm-seg button.on { background: var(--accent-soft); color: var(--accent-soft-text); }
.wm-cnts { display: flex; gap: 8px; font-size: 11.5px; color: var(--muted); }
.wm-cnt { display: inline-flex; align-items: center; gap: 4px; }
.wm-cnt b { color: var(--c); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wm-note { font-size: 12px; color: var(--muted); padding: 8px 10px; border-radius: 10px; background: var(--bg-2); line-height: 1.4; }
.wm-item { display: flex; gap: 10px; width: 100%; text-align: left; padding: 9px 10px 9px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); }
.wm-item:hover { border-color: var(--line-2); background: var(--card); }
.wm-stripe { flex: none; width: 4px; border-radius: 0 3px 3px 0; background: var(--c); }
.wm-it { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wm-t { font-weight: 600; line-height: 1.25; }
.wm-s { display: block; color: var(--muted-2); font-size: 12.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wm-m { color: var(--muted); font-family: var(--mono); font-size: 11px; line-height: 1.4; }
.wm-m a { color: var(--muted-2); }
.wm-err { color: var(--high); font-size: 12px; line-height: 1.35; }
.wm-empty { padding: 14px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted-2); line-height: 1.45; }
.wm-empty b { color: var(--text); }
.wm-empty p { margin: 6px 0 0; }

/* places */
.wm-pc { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--bg-2); display: flex; flex-direction: column; gap: 6px; }
.wm-pc.sel { border-color: var(--line-2); border-left-color: var(--c); box-shadow: 0 0 0 1px var(--accent-soft); }
.wm-pch { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wm-pcn { background: none; border: 0; padding: 0; color: var(--text); font-family: var(--display); font-weight: 600; font-size: 15px; text-align: left; }
.wm-lvl { flex: none; font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c); padding: 3px 7px; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, transparent); }
.wm-hits, .wm-near { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wm-hits li, .wm-near li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.3; }
.wm-hd { flex: none; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--c); }
.wm-clear { color: var(--ok); font-size: 12.5px; }
.wm-notes { font-size: 12.5px; color: var(--muted-2); white-space: pre-wrap; padding: 8px; border-radius: 8px; background: var(--card); }
.wm-pca { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.wm .btn.on { border-color: var(--hud); color: var(--hud); }
.wm .btn.ghost { border-color: transparent; background: none; }
.wm-form { display: flex; flex-direction: column; gap: 6px; }
.wm-form h3 { font-family: var(--display); font-size: 15px; margin-bottom: 4px; }
.wm-form label { font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.wm-form input, .wm-form select, .wm-form textarea { width: 100%; min-height: 38px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); outline: none; }
.wm-form input:focus, .wm-form select:focus, .wm-form textarea:focus { border-color: var(--accent); }
.wm-form .wm-pca { margin-top: 8px; }
.wm-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wm-2 > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

/* point briefing */
.wm-coords { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.wm-coords > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wm-coords .mono { font-size: 12.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wm-k { flex: none; width: 70px; font: 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.wm-copy { margin-left: auto; flex: none; height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-2); background: none; color: var(--muted); font: 11px var(--mono); }
.wm-copy:hover { color: var(--text); border-color: var(--accent); }
.wm-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.wm-sh { font: 600 11px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.wm-wx { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px; align-items: center; line-height: 1.35; }
.wm-temp { font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1; }
.wm-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wm-days > div { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 10px; background: var(--bg-2); font-size: 12px; min-width: 0; }
.wm-days .wm-k { width: auto; }

/* sources */
.wm-src { padding: 9px 11px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.wm-srch { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wm-pill { flex: none; font: 600 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; color: var(--ok); background: var(--ok-soft); }
.wm-pill.stale, .wm-pill.degraded { color: var(--med); background: color-mix(in srgb, var(--med) 14%, transparent); }
.wm-pill.error { color: var(--high); background: var(--high-soft); }
.wm-pill.idle { color: var(--muted); background: var(--bg-2); }

/* ---------- map markers & popups ---------- */
.wm-sev { display: inline-block; font: 600 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.wm .leaflet-popup-content-wrapper, .wm .leaflet-popup-tip { background: var(--bg); color: var(--text); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.wm .leaflet-popup-content-wrapper { border-radius: 12px; }
.wm .leaflet-popup-content { margin: 12px 14px; font-size: 13px; line-height: 1.4; }
.wm .leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.wm-pop { display: flex; flex-direction: column; gap: 5px; }
.wm-pop-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11px; font-family: var(--mono); }
.wm-pop b { font-size: 14px; }
.wm-pop-sub { color: var(--muted-2); }
.wm-pop details summary { cursor: pointer; color: var(--accent); font-size: 12px; }
.wm-pop-txt { white-space: pre-wrap; max-height: 220px; overflow-y: auto; font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.wm-pop-a { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.wm-pop-a .btn { text-decoration: none; }
.wm .leaflet-bar a, .wm .leaflet-bar a:hover { background: var(--card-2); color: var(--text); border-color: var(--line-2); backdrop-filter: var(--blur); }
.wm .leaflet-bar { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.wm .leaflet-control-attribution { background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--muted); font-size: 10px; }
.wm .leaflet-control-attribution a { color: var(--muted-2); }
.wm .leaflet-control-scale-line { background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--muted-2); border-color: var(--muted); }
.wm .leaflet-bottom.leaflet-right { right: calc(var(--wm-panel) + var(--wm-gap)); }
.wm-fac span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--c); color: #fff; font: 700 11px/1 var(--font); box-shadow: 0 1px 4px rgba(0,0,0,.45); border: 1.5px solid rgba(255,255,255,.85); }
.wm-near .wm-fac { flex: none; }
.wm-ac span { display: block; width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 15px; color: #7CB8FF; text-shadow: 0 0 3px #000, 0 0 1px #000; transform-origin: 50% 50%; }
.wm-ac.mil span { color: #C9A2FF; } .wm-ac.heli span { color: #4FE3A8; font-size: 13px; } .wm-ac.emerg span { color: #FF4060; font-size: 18px; }
.wm-place { width: 0; height: 0; }
.wm-place span { position: absolute; left: -12px; top: -26px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); border: 2px solid #fff; }
.wm-place span svg { transform: rotate(45deg); width: 12px; height: 12px; }
.wm-place b { position: absolute; left: 16px; top: -24px; white-space: nowrap; font: 600 12px var(--font); color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000, 0 0 1px #000; }
.wm-xhair span { position: absolute; inset: 0; border: 2px solid var(--hud); border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,.35), inset 0 0 0 2px rgba(0,0,0,.25); }
.wm-xhair span::before, .wm-xhair span::after { content: ""; position: absolute; background: var(--hud); left: 50%; top: -8px; bottom: -8px; width: 2px; transform: translateX(-50%); }
.wm-xhair span::after { top: 50%; left: -8px; right: -8px; bottom: auto; width: auto; height: 2px; transform: translateY(-50%); }
.wm-ringlbl { font: 600 11px var(--mono); color: #5FD8FF; text-shadow: 0 0 3px #000, 0 0 2px #000; white-space: nowrap; text-align: center; }

/* ---------- phone & small tablets: map full screen, details in a bottom sheet ---------- */
@media (max-width: 899px) {
  .wm { --wm-panel: 0px; --wm-gap: 10px; }
  .wm-top { right: var(--wm-gap); top: calc(var(--wm-gap) + env(safe-area-inset-top, 0px)); left: max(var(--wm-gap), env(safe-area-inset-left, 0px)); }
  .wm-brand h1, .wm-topbtns [data-wm="refresh"] { display: none; }
  .wm-brand { padding: 0 12px; }
  .wm-layers { top: calc(var(--wm-gap) + 54px + env(safe-area-inset-top, 0px)); left: var(--wm-gap); right: var(--wm-gap); width: auto; max-height: 55%; }
  .wm-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; border-radius: 18px 18px 0 0; padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px)); transition: height .2s ease; border-bottom: 0; }
  .wm-panel[data-sheet="min"] { height: calc(96px + var(--nav-h) + env(safe-area-inset-bottom, 0px)); }
  .wm-panel[data-sheet="mid"] { height: 48%; }
  .wm-panel[data-sheet="max"] { height: calc(100% - 70px - env(safe-area-inset-top, 0px)); }
  .wm-panel[data-sheet="min"] .wm-pbody { overflow: hidden; }
  .wm-grab { display: grid; place-items: center; height: 18px; background: none; border: 0; flex: none; }
  .wm-grab span { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); }
  .wm-tabs { padding-top: 0; }
  /* scale and credits sit under the search bar, clear of the sheet */
  .wm .leaflet-bottom { top: calc(var(--wm-gap) + 52px + env(safe-area-inset-top, 0px)); bottom: auto; }
  .wm .leaflet-bottom.leaflet-right { right: 0; }
  .wm .leaflet-control-attribution { max-width: 60vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wm-zoomnote { top: calc(var(--wm-gap) + 84px + env(safe-area-inset-top, 0px)); }
  .wm-zoomnote { bottom: auto; }
  .wm-layers.open ~ .wm-zoomnote { display: none; }
}
@media (prefers-reduced-motion: reduce) { .wm-dot, .wm-st.load::before { animation: none; } .wm-panel { transition: none; } }

/* ---------- presets, collapsible groups ---------- */
.wm-lens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 10px 6px; padding: 3px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.wm-lens button { height: 28px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.wm-lens button.on { background: var(--accent); color: var(--accent-text); }
.wm-lnote { font-size: 11.5px; color: var(--muted); padding: 2px 6px 4px; }
button.wm-lgh { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0; border-radius: 7px; cursor: pointer; text-align: left; padding: 6px; }
button.wm-lgh:hover { background: var(--bg-2); color: var(--muted-2); }
.wm-lgh.static { padding-top: 8px; }
.wm-chev { display: inline-grid; transition: transform .15s; }
.wm-lg.open .wm-chev { transform: rotate(90deg); }
.wm-gn { margin-left: auto; font-size: 10px; letter-spacing: .06em; color: var(--accent-soft-text); background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; text-transform: none; }
.wm-tag { font: 9.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 3px; vertical-align: 1px; }
.wm-st.key { color: var(--med); } .wm-st.key::before { background: var(--med); }
.wm-tabs button { font-size: 11px; letter-spacing: .05em; padding: 0 2px; }
.wm-pill.key { color: var(--med); background: color-mix(in srgb, var(--med) 14%, transparent); }

/* ---------- markers ---------- */
.wm-ship span { display: block; width: 14px; height: 14px; clip-path: polygon(50% 0, 85% 100%, 50% 78%, 15% 100%); background: var(--c); filter: drop-shadow(0 0 1px #000); transform-origin: 50% 55%; }
.wm-site span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 12px; line-height: 1; color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); border: 1.5px solid rgba(255,255,255,.8); }
.wm-site.nuc span { background: #C9A400; } .wm-site.mil span { background: #4A5A7A; }
.wm-choke span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #0E4C7A; color: #fff; font-size: 13px; border: 1.5px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.5); }
.wm-camimg img { display: block; width: 100%; max-height: 190px; object-fit: cover; border-radius: 8px; background: var(--bg-2); margin: 2px 0 4px; }
.wm-links { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.35; }
.wm-links a { color: var(--text); text-decoration: none; }
.wm-links a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- brief: place, city, country ---------- */
.wm-where { display: flex; align-items: center; gap: 10px; }
.wm-where b { font-family: var(--display); font-size: 15px; display: block; line-height: 1.2; }
.wm-bigflag { font-size: 26px; line-height: 1; }
.wm-cams { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wm-cam { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--muted-2); font-size: 11px; line-height: 1.25; min-width: 0; }
.wm-cam img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; background: var(--bg-2); max-width: 100%; }
.wm-cam span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-wiki { display: flex; gap: 10px; align-items: flex-start; }
.wm-wiki img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; }
.wm-wiki p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted-2); }
.wm-country { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.wm-csh:empty { display: none; }
.wm-chead { display: flex; align-items: center; gap: 10px; }
.wm-flagimg { width: 46px; height: auto; max-height: 32px; object-fit: contain; border-radius: 3px; box-shadow: 0 0 0 1px var(--line-2); }
.wm-cname { font-family: var(--display); font-size: 18px; display: block; line-height: 1.15; }
.wm-signals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wm-sig { display: flex; flex-direction: column; gap: 1px; padding: 8px 9px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--c); min-width: 0; }
.wm-sig b { font-size: 14px; }
.wm-sig .wm-k, .wm-stat .wm-k { width: auto; font-size: 9.5px; }
.wm-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.wm-stat { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; border-radius: 9px; background: var(--bg-2); min-width: 0; }
.wm-stat b { font-size: 14px; font-variant-numeric: tabular-nums; }
.wm-govs { display: flex; flex-direction: column; gap: 5px; }
.wm-gov { display: grid; grid-template-columns: 1fr 90px 44px; gap: 8px; align-items: center; font-size: 12px; }
.wm-gov .mono { text-align: right; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.wm-govbar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.wm-govbar i { display: block; height: 100%; border-radius: 3px; }
.wm-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 12.5px; }
.wm-facts dt { color: var(--muted); font: 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding-top: 2px; }
.wm-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.wm-hot { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.wm-hot .wm-k { width: auto; margin-right: 2px; }
.wm-chip { height: 26px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted-2); font-size: 12px; white-space: nowrap; }
.wm-chip:hover { border-color: var(--accent); color: var(--text); }
.wm-chip b { font-family: var(--mono); font-size: 11px; color: var(--accent-soft-text); margin-left: 2px; }
.wm-news { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.wm-news a.wm-t { color: var(--text); text-decoration: none; }
.wm-news a.wm-t:hover { color: var(--accent); }
.wm-flagbtn { background: none; border: 0; padding: 0 1px; font-size: 14px; line-height: 1; cursor: pointer; vertical-align: -1px; }

/* ---------- search plans ---------- */
.wm-drawbar { position: absolute; z-index: 650; top: calc(var(--wm-gap) + 54px); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center;
  max-width: calc(100% - 24px); padding: 8px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--hud); box-shadow: var(--shadow); font-size: 12.5px; }
.wm-map.wm-drawing, .wm-drawing { cursor: crosshair; }
.wm-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.wm-plans-h { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.wm-plan { padding: 8px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--c); display: flex; flex-direction: column; gap: 5px; }
.wm-mini { height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); padding: 0 6px; font-size: 12px; }
.wm-rings { display: grid; grid-template-columns: 1fr 80px; gap: 6px; }
.wm-plpt span { display: grid; place-items: center; height: 18px; padding: 0 5px; border-radius: 5px; background: #FF8A3D; color: #fff; font: 700 10px var(--mono); border: 1.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); white-space: nowrap; }
.wm-plpt.point span { background: #5B8CFF; font-size: 11px; }
.leaflet-tooltip.wm-pltip { background: rgba(0,0,0,.55); color: #fff; border: 0; box-shadow: none; font: 600 11px var(--font); padding: 2px 6px; }
.leaflet-tooltip.wm-pltip::before { display: none; }
@media (max-width: 899px) { .wm-drawbar { top: calc(var(--wm-gap) + 54px + env(safe-area-inset-top, 0px)); } }
.wm-port span { display: grid; place-items: center; width: 14px; height: 14px; font-size: 10px; color: #0E4C7A; background: #fff; border-radius: 50%; box-shadow: 0 0 0 1px #0E4C7A; }
.wm-storm span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, #FF4060 30%, rgba(255,64,96,.35) 70%); color: #fff; font: 700 10px var(--mono); box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,.5); }
.wm-zchip { display: inline-block; font-size: 11.5px; padding: 1px 6px; margin: 1px 2px 1px 0; border-radius: 5px; color: var(--text); background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); }

/* ---------- live TV ---------- */
.wm-tv { position: absolute; z-index: 640; top: calc(var(--wm-gap) + 54px); left: var(--wm-gap); right: calc(var(--wm-panel) + var(--wm-gap) * 2); max-height: calc(100% - 80px); display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line-2); box-shadow: var(--shadow); overflow: hidden; }
.wm-tvhead { display: flex; flex-direction: column; gap: 6px; }
.wm-tvh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wm-tvh > b { font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.wm-tvh .wm-hot { flex: 1; min-width: 0; }
.wm-tvch { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.wm-chip.on { background: var(--accent-soft); color: var(--accent-soft-text); border-color: var(--accent); }
.wm-chip.off { opacity: .55; }
.wm-live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #FF4060; margin-right: 5px; vertical-align: 1px; }
.wm-tvgrid { display: grid; gap: 6px; min-height: 0; overflow-y: auto; }
.wm-tvgrid.m1 { grid-template-columns: 1fr; }
.wm-tvgrid.m4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wm-tvcell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wm-tvcell iframe, .wm-tvcell .empty { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; max-width: 100%; }
.wm-tvgrid.m1 .wm-tvcell iframe { max-height: calc(100vh - 260px); }
.wm-tvlbl { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.wm-tvlbl a { margin-left: auto; color: var(--muted-2); }
@media (max-width: 899px) { .wm-tv { right: var(--wm-gap); top: calc(var(--wm-gap) + 54px + env(safe-area-inset-top, 0px)); max-height: 60%; } .wm-tvgrid.m4 { grid-template-columns: 1fr; } }

/* ---------- cell coverage ---------- */
.wm-cellctl { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 2px 6px 8px 42px; }
.wm-cellctl .wm-chip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--cc); margin-right: 5px; }
.wm-cellctl .wm-seg button { height: 24px; padding: 0 8px; }
.wm-cdot { flex: none; width: 10px; height: 10px; margin-top: 3px; border-radius: 3px; background: var(--c); }

/* ---------- markers ---------- */
.wm-sat span { display: block; width: 8px; height: 8px; margin: 1px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 0 1px #000, 0 0 6px var(--c); }
.wm-chain span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #2B7BE4; color: #fff; font-size: 11px; border: 1.5px solid #fff; }
.wm-chain.s3 span { background: #B5179E; }
.wm-apt span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #111; font-size: 13px; border: 1.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.wm-aqi span { display: grid; place-items: center; width: 26px; height: 20px; border-radius: 6px; background: var(--c); color: #111; font: 700 10.5px var(--mono); border: 1px solid rgba(0,0,0,.45); }
.wm-aprs { width: 0; height: 0; }
.wm-aprs span { position: absolute; left: -7px; top: -8px; color: #FFD166; font-size: 14px; text-shadow: 0 0 2px #000; }
.wm-aprs b { position: absolute; left: 9px; top: -9px; white-space: nowrap; font: 700 11px var(--mono); color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.wm-aprs.stale span, .wm-aprs.stale b { opacity: .55; }
.wm-mkts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.wm-mkts li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; }
.wm-mkts a { color: var(--text); text-decoration: none; }
.wm-mkts b { font-family: var(--mono); color: var(--accent-soft-text); }
.wm-mkts .muted { grid-column: 1 / -1; font-size: 11px; }

/* ---------- fixes: layer list scroll, contrast ---------- */
/* the hidden checkbox stays inside its row, so focusing it can't scroll the whole panel out of view */
.wm-lrow { position: relative; }
.wm-layers, .wm-panel { overflow: clip; }
.wm-lscroll { position: relative; }
/* more solid panels and darker secondary text, so they read over any base map in light themes */
.wm-layers, .wm-panel, .wm-brand, .wm-search input, .wm-iconbtn { background: color-mix(in srgb, var(--bg) 93%, transparent); }
.wm-lgh, .wm-lh { color: var(--muted-2); }
.wm-lrow { color: var(--text); }
.wm-lrow:not(.on) .wm-ln { color: var(--muted-2); }
.wm-st { color: var(--muted); }
.wm-lnote, .wm-m { color: var(--muted); }
.wm-sw { background: color-mix(in srgb, var(--muted) 45%, transparent); }

/* ---------- round 4: workspaces, camera wall, risk, timeline, AI brief ---------- */
.wm-ws { display: flex; align-items: center; gap: 10px; width: calc(100% - 20px); margin: 0 10px 8px; padding: 7px 10px 7px 7px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); text-align: left; cursor: pointer; }
.wm-ws:hover { border-color: var(--accent); }
.wm-wsi, .wmz-wsic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-soft-text); font-family: var(--display); font-weight: 800; font-size: 15px; }
.wm-wst { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; } .wm-wst b { font-size: 14px; }
.wm-wsc { font-size: 12px; font-weight: 600; color: var(--link); }
.wmz-ws { position: absolute; z-index: 700; top: calc(var(--wm-gap) + 54px); right: calc(var(--wm-panel) + var(--wm-gap) * 2); width: min(420px, calc(100% - 24px)); max-height: calc(100% - 80px); overflow-y: auto; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.wmz-wsh { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; } .wmz-wsh b { display: block; font-size: 15px; }
.wmz-wsl { display: flex; flex-direction: column; gap: 6px; }
.wmz-wsi { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); text-align: left; cursor: pointer; }
.wmz-wsi:hover { border-color: var(--faint); } .wmz-wsi.on { border-color: var(--accent); background: var(--accent-soft); }
.wmz-wsi b { display: block; font-size: 14px; margin-bottom: 2px; } .wmz-wsi .wm-m { display: block; line-height: 1.35; }
.wmz-wsf { margin-top: 10px; }
.wmz-cams { position: absolute; z-index: 650; top: calc(var(--wm-gap) + 54px); left: var(--wm-gap); right: calc(var(--wm-panel) + var(--wm-gap) * 2); max-height: calc(100% - 80px); display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 94%, transparent); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.wmz-camgrid { display: grid; gap: 6px; overflow-y: auto; min-height: 0; }
.wmz-camgrid.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wmz-camgrid.n9 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .wmz-camgrid.n16 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wmz-cam { position: relative; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #000; aspect-ratio: 16 / 10; cursor: zoom-in; }
.wmz-cam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wmz-cam.bad img { visibility: hidden; } .wmz-cam.bad::after { content: 'Image unavailable'; position: absolute; inset: 0; display: grid; place-items: center; color: #8FA3BC; font-size: 12px; }
.wmz-camt { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #fff; text-align: left; display: flex; flex-direction: column; font-size: 11px; line-height: 1.25; }
.wmz-camt b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .wmz-camt span { opacity: .8; }
.wmz-big { display: flex; flex-direction: column; gap: 8px; min-height: 0; } .wmz-big img { width: 100%; max-height: calc(100vh - 260px); object-fit: contain; background: #000; border-radius: 8px; } .wmz-big .btn { align-self: flex-start; }
@media (max-width: 899px) { .wmz-cams, .wmz-ws { right: var(--wm-gap); left: var(--wm-gap); width: auto; max-height: 62%; } .wmz-camgrid.n9, .wmz-camgrid.n16 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wmz-risk { display: flex; flex-direction: column; gap: 4px; }
.wmz-rr { display: flex; gap: 6px; align-items: stretch; }
.wmz-star { flex: none; width: 30px; border: 0; background: none; color: var(--faint); font-size: 16px; border-radius: 8px; cursor: pointer; } .wmz-star.on { color: var(--accent); } .wmz-star:hover { background: var(--bg-2); }
.wmz-rn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); text-align: left; cursor: pointer; }
.wmz-rn:hover { border-color: var(--faint); }
.wmz-rt { display: flex; gap: 8px; align-items: baseline; } .wmz-rt > span:first-child { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wmz-rt b { font-family: var(--mono); font-size: 15px; }
.wmz-up { color: var(--high); font-size: 11px; font-weight: 700; } .wmz-down { color: var(--ok); font-size: 11px; font-weight: 700; }
.wmz-bar { display: block; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; } .wmz-bar span { display: block; height: 100%; border-radius: 2px; }
.wmz-tl { margin: 2px 0 8px; padding: 8px 8px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); }
.wmz-tl svg { width: 100%; height: 46px; display: block; }
.wmz-tll { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 10px; color: var(--muted); margin-top: 3px; } .wmz-tll b { display: block; color: var(--muted-2); font-family: var(--mono); font-weight: 600; }
.wmz-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--line-2); }
.wmz-ai.on { display: block; border-style: solid; border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.wmz-aib { color: var(--accent-soft-text) !important; }
.wmz-aih { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.wmz-ait { font-size: 13.5px; line-height: 1.45; } .wmz-ait ul { margin: 2px 0 6px; padding-left: 18px; } .wmz-ait li { margin: 2px 0; } .wmz-ait p { margin: 4px 0; }
.wmz-aiq { margin-top: 6px; font-family: var(--display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12.5px; color: var(--muted-2); }

.wmz-wsi .wm-m, .wmz-wsf, .wmz-camf { font-family: var(--font); }
.wm-phonebtns { display: none; gap: 6px; margin: 0 10px 8px; } .wm-phonebtns .btn { flex: 1; justify-content: center; }
@media (max-width: 560px) { .wm-topbtns [data-z="cams"], .wm-topbtns [data-wm="tv"], .wm-topbtns [data-z="ws"] { display: none; } .wm-phonebtns { display: flex; } }

/* help guide */
.wm-help { font-family: var(--display); font-weight: 800; font-size: 19px; color: var(--accent) !important; }
@media (max-width: 560px) { .wm-topbtns .wm-help { display: none; } }
.wm-lguide { display: block; margin: -2px 10px 8px; padding: 2px 0; border: 0; background: none; color: var(--link); font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; }
.help .set-box { width: min(920px, 100%); }
/* the guide scrolls inside its box; the title bar and section menu stay put */
.set.help, .set.pinned { overflow: hidden; align-items: center; }
.help .set-box, .pinned .set-box { display: flex; flex-direction: column; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: hidden; }
.help .set-h, .pinned .set-h { flex: none; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.help-toc, .pinned-toc { flex: none; position: static; padding: 0 14px; border-bottom: 0; background: color-mix(in srgb, var(--accent) 16%, var(--card-2)); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .45); }
.help-toc a, .pinned-toc a { color: var(--text); opacity: .82; padding: 10px 10px 9px; }
.help-toc a:hover, .help-toc a:focus-visible, .pinned-toc a:hover, .pinned-toc a:focus-visible { opacity: 1; border-bottom-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.help-body, .pinned-body { flex: 1; min-height: 0; overflow-y: auto; scroll-padding-top: 8px; overscroll-behavior: contain; }
@media (max-width: 640px) { .set.help, .set.pinned { padding: 0; } .help .set-box, .pinned .set-box { max-height: 100vh; max-height: 100dvh; height: 100%; } }
.help-body p { font-size: 14px; line-height: 1.5; }
.help-body h4 { margin: 18px 0 6px; font-family: var(--display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; color: var(--accent-soft-text); }
.help-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 8px; font-size: 14px; } .help-dl dt { font-weight: 700; } .help-dl dd { margin: 0; color: var(--muted-2); }
@media (max-width: 560px) { .help-dl { grid-template-columns: 1fr; } .help-dl dd { margin-bottom: 6px; } }
.help-sev { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; font-size: 13px; } .help-sev i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.help-fac { display: inline-flex; align-items: center; gap: 5px; margin: 2px 10px 2px 0; font-size: 13px; } .help-fac b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; color: #fff; font-size: 11px; }
#help-q { margin: 4px 0 6px; }
.help-layer { padding: 10px 12px; margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.help-lh { display: flex; justify-content: space-between; align-items: center; gap: 10px; } .help-lh b { font-size: 14.5px; }
.help-layer p { margin: 4px 0; color: var(--muted-2); }
.help-key { color: var(--med); font-weight: 700; }

/* legend */
.wmz-legend { position: absolute; z-index: 560; left: calc(var(--wm-gap) + 270px); right: calc(var(--wm-panel) + var(--wm-gap) * 2 + 54px); bottom: 24px; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.wmz-legend > * { pointer-events: auto; }
.lg-h { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--text); box-shadow: var(--shadow); cursor: pointer; font-size: 12.5px; }
.lg-h b { font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; font-size: 12.5px; }
.wmz-legend.open .lg-h { border-radius: 12px 12px 0 0; border-bottom-color: transparent; box-shadow: none; }
.lg-b { max-width: 100%; max-height: 32vh; overflow-y: auto; padding: 8px 12px 6px; border-radius: 12px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg) 94%, transparent); box-shadow: var(--shadow); }
.lg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 3px 0; font-size: 12px; color: var(--muted-2); }
.lg-row + .lg-row { border-top: 1px solid var(--line); }
.lg-n, .lg-k { flex: none; min-width: 120px; font-weight: 700; color: var(--text); } .lg-k { min-width: 0; }
.lg-i { display: inline-flex; align-items: center; gap: 5px; }
.lg-dot { display: inline-block; border-radius: 50%; background: var(--c); border: 1px solid rgba(0, 0, 0, .35); }
.lg-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 5px; background: var(--c); font-size: 10.5px; }
.lg-sym { font-size: 14px; line-height: 1; }
.lg-line { display: inline-block; width: 22px; border-top: 3px solid var(--c); }
.lg-scale { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; } .lg-scale span { display: inline-flex; align-items: center; gap: 4px; } .lg-scale i { width: 12px; height: 12px; border-radius: 3px; }
.lg-tiles .lg-i { white-space: normal; }
.lg-more { margin-top: 4px; border: 0; background: none; color: var(--link); font-size: 12px; font-weight: 600; padding: 2px 0; cursor: pointer; }
@media (max-width: 1100px) { .wmz-legend { left: calc(var(--wm-gap) + 60px); } }
@media (max-width: 899px) { .wmz-legend { left: var(--wm-gap); right: auto; top: calc(var(--wm-gap) + 104px + env(safe-area-inset-top, 0px)); bottom: auto; align-items: flex-start; max-width: calc(100% - 24px); } .lg-n { min-width: 0; width: 100%; } }

/* situation board */
.board .set-box { width: min(1180px, 100%); }
.board .set-h { align-items: flex-start; } .wmb-hb { display: flex; gap: 8px; align-items: center; } .wmb-at { display: block; margin-top: 2px; }
.wmb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; padding: 14px 0; }
.wmb-sec { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.wmb-sec.wide { grid-column: 1 / -1; }
.wmb-sec h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 15px; color: var(--muted-2); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.wmb-sec .wm-k { display: block; margin: 10px 0 4px; }
.wmb-list { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; }
.wmb-sec.wide .wmb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); max-height: 360px; }
.wmb-row { display: flex; gap: 8px; align-items: flex-start; width: 100%; padding: 7px 8px; border-radius: 8px; border: 1px solid transparent; background: var(--card); color: var(--text); text-align: left; text-decoration: none; cursor: pointer; font-size: 13px; }
.wmb-row:hover { border-color: var(--line-2); } .wmb-row.static { cursor: default; }
.wmb-rt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .wmb-rt b { font-weight: 600; } .wmb-rt span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.wmb-sev { flex: none; min-width: 64px; text-align: center; padding: 2px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #0F1C2E; background: var(--c); }
.wmb-src { flex: none; max-width: 40%; color: var(--muted); font-size: 11.5px; text-align: right; }
.wmb-n { flex: none; font-family: var(--mono); font-weight: 700; font-size: 15px; }
.wmb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.wmb-card { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--card); color: var(--text); text-align: left; cursor: pointer; }
.wmb-card:hover { border-color: var(--line-2); border-left-color: var(--c); }
.wmb-ch { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; } .wmb-ch b { font-size: 14px; }
.wmb-cn { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--muted-2); } .wmb-cn b { color: var(--text); font-family: var(--mono); }
.wmb-cl { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wmb-kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; margin: 8px 0; } .wmb-kv span { color: var(--muted-2); } .wmb-kv b { text-align: right; }
.wmb-air { margin-top: 10px; } .wmb-airh { display: flex; gap: 8px; align-items: center; font-size: 15px; }
@media (max-width: 640px) { .wmb-grid { grid-template-columns: 1fr; } .wmb-sec.wide .wmb-list { grid-template-columns: 1fr; } }

/* top bar: fewer buttons on narrower screens */
@media (max-width: 1280px) { .wm-topbtns [data-wm="refresh"] { display: none; } }
@media (max-width: 560px) { .wm-topbtns [data-z="board"] { display: none; } }

.help-guide { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; }
body.embed .wm-globe { display: none; }
/* switch to the 3D globe: the same orange pill as "Flat map" on the globe */
.wm-globebtn { height: 42px; padding: 0 14px 0 11px; border-radius: 12px; display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow); }
.wm-globebtn:hover { background: #F2A65A; color: var(--accent-text); }
.wm-globebtn svg { flex: none; }
@media (max-width: 1100px) { .wm-globebtn span { display: none; } .wm-globebtn { padding: 0; width: 42px; justify-content: center; } }
