/* Hawk Mesh Live. Same brand tokens as the 3D planner (../3d/wb.css) and the
 * Field Test report, so the three read as one product. */
:root {
  --char: #0a0a0a;
  --panel: #16161c;
  --panel-2: #1d1d25;
  --ink: #f5f3f0;
  --muted: #8c8c92;
  --line: rgba(255, 255, 255, .10);
  --red: #A81824;
  --red-bright: #c81f2e;
  --red-glow: rgba(168, 24, 36, .30);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 20px;
  --pill: 100px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--char); color: var(--ink); font: 15px/1.45 var(--sans); overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
b { font-weight: 600; }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }

#map { position: fixed; inset: 0; background: var(--char); }
#map::after { /* brand glow + edge vignette so the chrome reads over the map */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(circle at 50% 0%, rgba(168, 24, 36, .18), transparent 55%),
    linear-gradient(to bottom, rgba(10,10,10,.75), transparent 18%, transparent 62%, rgba(10,10,10,.7));
}
.maplibregl-ctrl-attrib { background: rgba(10,10,10,.6) !important; color: var(--muted); font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }
.maplibregl-ctrl-bottom-right { z-index: 2; }

/* ── top bar ─────────────────────────────────────────── */
.topbar {
  position: fixed; z-index: 5; left: 0; right: 0; top: 0;
  padding: calc(var(--safe-t) + 12px) 16px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 11px; letter-spacing: .34em; color: var(--ink); white-space: nowrap; }
.brand img { height: 30px; width: auto; display: block; filter: drop-shadow(0 0 10px var(--red-glow)); }
.brand b { color: var(--red-bright); font-weight: 600; }
.top-right { display: flex; gap: 8px; }
.icon-btn {
  width: 46px; height: 46px; border-radius: var(--pill); border: 1px solid var(--line);
  background: rgba(22, 22, 28, .9); display: grid; place-items: center; cursor: pointer;
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  transition: border-color .2s, background .2s, transform .1s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 2px; }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.icon-btn[aria-pressed="true"] { border-color: var(--red-bright); background: rgba(168, 24, 36, .28); }
#btnPlay .i-play { display: none; }
#btnPlay.paused .i-play { display: block; }
#btnPlay.paused .i-pause { display: none; }

/* ── the "now playing" card ──────────────────────────── */
.now {
  position: fixed; z-index: 6; left: 0; right: 0; bottom: 0;
  padding: 16px 18px calc(16px + var(--safe-b));
  background: rgba(20, 20, 26, .975);   /* solid: a backdrop blur over a moving map costs more than the map */
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -18px 50px rgba(0,0,0,.55), 0 -1px 0 rgba(200, 31, 46, .35) inset;
  max-height: 72dvh; overflow-y: auto;
}
@media (min-width: 900px) {
  .now { left: 16px; right: auto; bottom: 16px; width: 380px; border-radius: var(--radius); border-bottom: 1px solid var(--line); padding: 20px; }
}
.now-head { display: flex; align-items: center; gap: 9px; }
.eyebrow { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--red-bright); }
.now-time { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.live-dot.on { background: var(--red-bright); box-shadow: 0 0 0 0 rgba(200,31,46,.7); animation: beat 1.6s infinite; }
@keyframes beat { 70% { box-shadow: 0 0 0 9px rgba(200,31,46,0); } 100% { box-shadow: 0 0 0 0 rgba(200,31,46,0); } }
.now-title { font-size: clamp(21px, 5.6vw, 26px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; min-width: 0; }
.stat .k { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }

.latest { margin: 12px 0 0; font-size: 13px; color: var(--muted); min-height: 1.45em; }
.latest b { color: var(--ink); }
.latest:empty { display: none; }

.net { margin: 12px 0 0; font: 500 12px/1.5 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.net b { color: var(--ink); font-weight: 600; }
.now-foot { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: var(--pill); border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: .03em; text-decoration: none; cursor: pointer; }
.pill.primary { background: var(--red); border-color: var(--red); }
.pill.primary:hover { background: var(--red-bright); }
.pill.ghost { background: none; color: var(--muted); }
.pill.ghost:hover, .pill.ghost[aria-expanded="true"] { color: var(--ink); }
.about { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); font-size: 13px; color: var(--muted); }
.about p { margin: 0 0 8px; } .about p:last-child { margin: 0; }
.about b { color: var(--ink); }
.about .fine { font-size: 11.5px; }

/* A phone in portrait has little map left: keep the card to what matters. */
@media (max-width: 899px) and (max-height: 760px) { .stats { margin-top: 10px; } .net { display: none; } }

/* ── repeater pop-up (shared look with the planner's) ── */
.maplibregl-popup { z-index: 4; }
.maplibregl-popup-content { background: rgba(22, 22, 28, .97); color: var(--ink); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; box-shadow: 0 12px 34px rgba(0,0,0,.6); font: 13px/1.4 var(--sans); min-width: 190px; max-width: 260px; }
.maplibregl-popup-tip { border-top-color: rgba(22, 22, 28, .97) !important; border-bottom-color: rgba(22, 22, 28, .97) !important; }
.maplibregl-popup-close-button { color: var(--muted); font-size: 18px; padding: 2px 8px; }
.rp-name { font-weight: 600; font-size: 14px; margin: 0 14px 6px 0; overflow-wrap: anywhere; }
.rp-state { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.rp-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--muted); }
.rp-dot[data-level="live"] { background: var(--red-bright); box-shadow: 0 0 0 0 rgba(200,31,46,.7); animation: beat 1.6s infinite; }
.rp-dot[data-level="active"] { background: var(--red-bright); }
.rp-dot[data-level="today"] { background: #8a5a5f; }
.rp-detail { color: var(--muted); font-size: 12px; margin: 3px 0 0 17px; }
.rp-link { display: inline-block; margin: 9px 0 0; color: var(--ink); font-weight: 600; font-size: 12.5px; text-decoration: none; border-bottom: 1px solid var(--red-bright); }

.toast { position: fixed; z-index: 11; left: 50%; top: calc(var(--safe-t) + 72px); transform: translate(-50%, -12px); opacity: 0; padding: 10px 18px;
  border-radius: var(--pill); background: var(--ink); color: var(--char); font-weight: 600; font-size: 13px; transition: .25s; pointer-events: none;
  max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* cookie choice: the planner's own banner (../3d/gate.js builds it) */
.consent3d { position: fixed; z-index: 12; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 12px); max-width: 560px; margin: 0 auto;
  padding: 14px 16px; border-radius: var(--radius); background: rgba(20,20,26,.98); border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(168,24,36,.14); font-size: 13px; color: var(--muted); }
.consent3d p { margin: 0 0 10px; line-height: 1.5; }
.consent3d div { display: flex; gap: 8px; justify-content: flex-end; }
.consent3d .pill { min-height: 44px; }
@media (min-width: 900px) { .consent3d { left: 412px; right: 16px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
