/* ═══════════════════════════════════════════════════════════════════════════
   Sizani — the TRUSTED CONTACT view. Every style for the page sizani-watch.js
   builds at /sizani (board 2: the desktop watch page and the phone "Shared with
   you" screen, one responsive file).

   Rules this file holds itself to, the same ones sizani-live.css holds:
   · EVERY class is `sz-live-w-` prefixed. Nothing here may collide with the
     sz-live- set in sizani-live.css (which this page also loads, for the drawn
     map) — `sz-live-watchers` and `sz-live-wave` are the only two classes there
     that begin with those letters, and neither has the hyphen after the w.
   · NOTHING is defined on :root. style.css owns the one :root. This palette
     hangs off .sz-live-w and inherits down, reading GoldChat's own tokens with
     literal fallbacks so the page renders standalone — it is served without
     style.css, because a contact opening a link should not download the whole
     chat app's stylesheet to watch one recording.
   · NO THIRD-PARTY REQUESTS. No font, no icon sheet, no analytics, and no
     third-party tile server — the street map's tiles, glyphs and sprites are
     served from this origin's own /map/. That is the product's central promise
     and its Play Data-safety declaration; a single @import here would make it
     false.
   · Hairlines over shadows. Cream and champagne gold. The one gold that carries
     white at AA (--gold-action) is the fill for every primary control.
   · Colour never carries meaning alone: every state has a WORD beside its tone.
   · Nothing decorative sits over content. No pattern, no overlay, no watermark.
   · A disabled control prints its reason in text next to it — a greyed button
     with only a `title` tells a touch user nothing at all.
   · The body never scrolls sideways: every grid child is min-width:0 and the one
     thing that can genuinely be too wide (a session reference) wraps.
   ═══════════════════════════════════════════════════════════════════════════ */

.sz-live-w {
  --w-bg:       #ffffff;
  --w-bg2:      #fcfcfb;
  --w-panel:    #ffffff;
  --w-panel2:   #f4f5f6;
  --w-line:     #e9e9e7;
  --w-hairline: #eeeeec;
  --w-lift-1:   var(--lift-1, 0 1px 2px rgba(60, 45, 10, .05));
  --w-lift-2:   var(--lift-2, 0 1px 2px rgba(60, 45, 10, .04), 0 12px 32px rgba(60, 45, 10, .08));

  --w-ink:   #10131d;
  --w-muted: #60636c;
  --w-dim:   #343947;

  --w-gold:      #9b6b13;
  --w-gold-deep: #765008;
  --w-gold-soft: #f2dfb1;
  --w-gold-line: var(--bubble-line, rgba(168, 126, 24, .28));
  --w-on-gold:   #16120a;

  --w-red:      var(--danger, #a33b49);
  --w-red-soft: var(--danger-soft, rgba(163, 59, 73, .10));
  --w-red-line: rgba(163, 59, 73, .42);

  --w-ok:      #218548;
  --w-ok-soft: rgba(44, 110, 52, .10);
  --w-ok-line: rgba(44, 110, 52, .38);

  --w-warn:      #8a5a0a;
  --w-warn-soft: rgba(176, 122, 18, .12);
  --w-warn-line: rgba(176, 122, 18, .42);

  --w-focus: var(--focus, 0 0 0 3px rgba(199, 154, 46, .32));
  --w-pad: 20px;
  --w-r: 8px;
  --w-safe-b: env(safe-area-inset-bottom, 0px);

  /* The drawn map is sizani-live-map.js's, and sizani-live.css styles it against the
     --szl- token names it inherits from the .sz-live panel it normally sits in. This page
     is not that panel, so the same names are re-pointed at this page's palette here. It is
     a mapping, not a second palette: every value below is one of the tokens above. */
  --szl-gold:      var(--w-gold);
  --szl-gold-deep: var(--w-gold-deep);
  --szl-gold-line: var(--w-gold-line);
  --szl-ink:       var(--w-ink);
  --szl-muted:     var(--w-muted);
  --szl-line:      var(--w-line);

  min-height: 100dvh;
  background: var(--w-bg);
  color: var(--w-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
.sz-live-w, .sz-live-w * { box-sizing: border-box; }
.sz-live-w-hidden { display: none !important; }

/* ═══ icons ═══ */

.sz-live-w-ico {
  width: 22px; height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ═══ the shell ═══
   Wide: a fixed sidebar beside a scrolling main column — board 2.4.
   Narrow: one column with a bottom tab bar — board 2.5. Same DOM, and the nav is
   built twice from one list so neither presentation is a second implementation. */

.sz-live-w-shell { display: block; }

.sz-live-w-side { display: none; }

.sz-live-w-main {
  min-width: 0;
  padding: 18px var(--w-pad) calc(96px + var(--w-safe-b));
}
.sz-live-w-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
  min-width: 0;
}

/* ═══ the bottom tab bar (narrow) ═══ */

.sz-live-w-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  display: flex;
  border-top: 1px solid var(--w-hairline);
  background: var(--w-bg2);
  padding-bottom: var(--w-safe-b);
}
.sz-live-w-tab {
  flex: 1 1 0;
  min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 4px;
  background: none; border: none; cursor: pointer;
  color: var(--w-muted);
  font-size: 11.5px; font-weight: 700;
}
.sz-live-w-tab-ico { width: 22px; height: 22px; }
.sz-live-w-tab-on { color: var(--w-gold); }
.sz-live-w-tab-on .sz-live-w-tab-ico path { stroke-width: 2.1; fill: currentColor; fill-rule: evenodd; }

/* ═══ type ═══ */

.sz-live-w-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sz-live-w-h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.sz-live-w-sub { font-size: 14.5px; color: var(--w-muted); }
.sz-live-w-h3 {
  font-size: 12.5px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--w-muted);
}
.sz-live-w-note { font-size: 13.5px; color: var(--w-dim); }
.sz-live-w-note-quiet { font-size: 12.5px; color: var(--w-muted); }
.sz-live-w-ref { font-size: 12.5px; color: var(--w-muted); overflow-wrap: anywhere; }

.sz-live-w-note-warn {
  color: var(--w-warn);
  background: var(--w-warn-soft);
  border: 1px solid var(--w-warn-line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13.5px;
}
.sz-live-w-err {
  color: var(--w-red);
  background: var(--w-red-soft);
  border: 1px solid var(--w-red-line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13.5px;
}
.sz-live-w-done {
  color: var(--w-ok);
  background: var(--w-ok-soft);
  border: 1px solid var(--w-ok-line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13.5px;
}
.sz-live-w-poll { font-size: 12px; color: var(--w-muted); }
.sz-live-w-poll-stale { color: var(--w-warn); font-weight: 600; }

/* ═══ cards ═══ */

.sz-live-w-card {
  background: var(--w-panel);
  border: 1px solid var(--w-line);
  border-radius: var(--w-r);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--w-lift-1);
  min-width: 0;
}
.sz-live-w-empty { align-items: center; text-align: center; padding: 26px 18px; gap: 10px; }
.sz-live-w-empty-ico { width: 34px; height: 34px; color: var(--w-muted); opacity: .75; }
.sz-live-w-empty-title { font-size: 16px; font-weight: 800; }

/* ═══ avatars — no photo, no invented identity ═══ */

.sz-live-w-av {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 999px;
  display: grid; place-items: center;
  background: var(--w-panel2);
  border: 1px solid var(--w-line);
  color: var(--w-dim);
  font-size: 15px; font-weight: 800;
  overflow: hidden;
}
.sz-live-w-av .sz-live-w-ico { width: 20px; height: 20px; }
.sz-live-w-av-sm { width: 26px; height: 26px; font-size: 11px; }
.sz-live-w-av-sm .sz-live-w-ico { width: 15px; height: 15px; }
.sz-live-w-av-stack { margin-left: -9px; border: 2px solid var(--w-bg); }
.sz-live-w-av-stack:first-child { margin-left: 0; }
.sz-live-w-av-empty { color: var(--w-muted); background: var(--w-bg2); border-style: dashed; }
.sz-live-w-faces { display: flex; align-items: center; }

/* ═══ the journey header — board 2.4 ═══ */

.sz-live-w-jhead {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.sz-live-w-jhead-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 240px; }
.sz-live-w-jhead-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.sz-live-w-jsub { font-size: 13.5px; color: var(--w-muted); }

.sz-live-w-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--w-line);
  background: var(--w-panel2);
  color: var(--w-muted);
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
  white-space: nowrap;
}
.sz-live-w-pill-dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; flex: 0 0 auto; }
.sz-live-w-pill-on { border-color: var(--w-ok-line); background: var(--w-ok-soft); color: var(--w-ok); }
.sz-live-w-pill-on .sz-live-w-pill-dot { animation: sz-live-w-breathe 2s ease-in-out infinite; }
@keyframes sz-live-w-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* The padlock and "Private session". It is a statement about the grant, not decoration. */
.sz-live-w-private {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--w-line);
  background: var(--w-bg2);
  color: var(--w-dim);
  font-size: 12.5px; font-weight: 700;
  white-space: nowrap;
}
.sz-live-w-private .sz-live-w-ico { width: 16px; height: 16px; }

/* ═══ presence line ═══ */

.sz-live-w-presence {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  padding: 2px;
  font-size: 13.5px;
  color: var(--w-muted);
}

/* ═══ the two columns ═══ */

.sz-live-w-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}
.sz-live-w-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ═══ camera tiles ═══
   Drawn at the size the mockup gives them, holding no picture, because there is none to
   hold. Nothing here may look like a feed that has not loaded yet: no gradient, no blur,
   no spinner. */

.sz-live-w-cams { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sz-live-w-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 0; }
.sz-live-w-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--w-r);
  background: var(--w-panel2);
  border: 1px solid var(--w-line);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  min-width: 0;
}
.sz-live-w-tile-inner {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 10px;
  text-align: center;
  max-width: 100%;
}
.sz-live-w-tile-ico { width: 26px; height: 26px; color: var(--w-muted); opacity: .8; }
.sz-live-w-tile-say { font-size: 12.5px; font-weight: 700; line-height: 1.3; color: var(--w-muted); margin: 0; }
.sz-live-w-tile-label {
  position: absolute; left: 10px; bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(45, 36, 20, .82);
  color: #fdf7e8;
  font-size: 11.5px; font-weight: 700;
}
/* Where the mockup prints a frame time. There is no frame, so it says that, in the same
   place, at the same size — an empty corner would read as a clock that had not ticked. */
.sz-live-w-tile-stamp {
  position: absolute; left: 10px; top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--w-panel);
  border: 1px solid var(--w-line);
  color: var(--w-muted);
  font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ═══ the audio row ═══ */

.sz-live-w-audio {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: var(--w-r);
  background: var(--w-panel);
  border: 1px solid var(--w-line);
  box-shadow: var(--w-lift-1);
  min-width: 0;
}
.sz-live-w-audio-ico { width: 20px; height: 20px; color: var(--w-muted); }
/* Flat, always: an animated waveform over silence is the clearest lie this page could
   tell. The line is a line because there is nothing to draw. */
.sz-live-w-wave { flex: 1 1 120px; height: 26px; min-width: 60px; }
.sz-live-w-wave line { stroke: var(--w-line); stroke-width: 2; stroke-linecap: round; }
.sz-live-w-audio-say { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 220px; }
.sz-live-w-audio-say b { font-size: 12.5px; font-weight: 700; color: var(--w-muted); }
.sz-live-w-audio-say span { font-size: 11.5px; color: var(--w-muted); }
.sz-live-w-audio-act { flex: 0 0 auto; margin-left: auto; }
.sz-live-w-audio-act .sz-live-w-btn { min-width: 148px; }
/* The reason takes the whole next line of the row — see audioRow() for why. */
.sz-live-w-audio-why { flex: 1 0 100%; max-width: none; }

/* ═══ the live-location card ═══ */

.sz-live-w-loc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sz-live-w-loc-ico { width: 18px; height: 18px; color: var(--w-gold); flex: 0 0 auto; }
.sz-live-w-loc-title { font-size: 15px; font-weight: 700; margin: 0; flex: 1 1 auto; min-width: 0; }
.sz-live-w-loc-word { font-size: 12.5px; font-weight: 600; color: var(--w-muted); margin-left: auto; }
.sz-live-w-map-shell {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--w-bg2);
  border: 1px solid var(--w-line);
  min-height: 110px;
}
.sz-live-w-loc-foot {
  display: flex; align-items: center; gap: 10px;
  padding-top: 2px;
  min-width: 0;
}
.sz-live-w-loc-foot-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sz-live-w-loc-foot-text b { font-size: 13.5px; font-weight: 700; }
.sz-live-w-loc-foot-text span { font-size: 12px; color: var(--w-muted); }
.sz-live-w-row-chev { width: 18px; height: 18px; color: var(--w-muted); }

/* ═══ status cards — the six dimensions ═══
   The mockup puts three cards across the bottom. There are six facts and they fail
   separately, so six are drawn: folding them into three is exactly the collapse that lets
   a screen say "recording" when nothing is being saved. auto-fit keeps the board's
   three-across look on a desktop and stacks them on a phone. */

.sz-live-w-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 10px;
  min-width: 0;
}
.sz-live-w-stat {
  display: flex; flex-direction: column; gap: 6px;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--w-panel);
  border: 1px solid var(--w-line);
  box-shadow: var(--w-lift-1);
  min-width: 0;
}
.sz-live-w-stat-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sz-live-w-stat-ico { width: 30px; height: 30px; color: var(--w-muted); flex: 0 0 auto; }
.sz-live-w-stat-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sz-live-w-stat-name { font-size: 15px; font-weight: 700; min-width: 0; }
/* A glyph AND a word, never the colour on its own. */
.sz-live-w-stat-mark {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--w-muted);
  white-space: nowrap;
}
.sz-live-w-stat-mark .sz-live-w-ico { width: 15px; height: 15px; stroke-width: 2.3; }
.sz-live-w-stat-word { font-size: 12.5px; font-weight: 600; }
.sz-live-w-stat-why { font-size: 12.5px; color: var(--w-muted); }

.sz-live-w-stat-ok { border-color: var(--w-ok-line); }
.sz-live-w-stat-ok .sz-live-w-stat-mark, .sz-live-w-stat-ok .sz-live-w-stat-ico { color: var(--w-ok); }
.sz-live-w-stat-warn { border-color: var(--w-warn-line); }
.sz-live-w-stat-warn .sz-live-w-stat-mark, .sz-live-w-stat-warn .sz-live-w-stat-ico { color: var(--w-warn); }
.sz-live-w-stat-bad { border-color: var(--w-red-line); }
.sz-live-w-stat-bad .sz-live-w-stat-mark, .sz-live-w-stat-bad .sz-live-w-stat-ico { color: var(--w-red); }

/* ═══ the footer bar ═══ */

.sz-live-w-footbar {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: var(--w-r);
  background: var(--w-panel);
  border: 1px solid var(--w-line);
  box-shadow: var(--w-lift-1);
  min-width: 0;
}
.sz-live-w-footbar-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sz-live-w-footbar-text b { font-size: 14.5px; font-weight: 700; }
.sz-live-w-footbar-text span { font-size: 12.5px; color: var(--w-muted); }
.sz-live-w-footbar-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sz-live-w-footbar-tick { width: 28px; height: 28px; padding: 6px; border-radius: 999px; background: var(--w-gold); color: #fff; stroke-width: 2.6; flex: 0 0 auto; }

/* ═══ buttons ═══ */

.sz-live-w-btn {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, color .15s, border-color .15s;
}
.sz-live-w-btn:disabled { opacity: .52; cursor: default; }
.sz-live-w-btn-ico { width: 18px; height: 18px; }
.sz-live-w-btn-primary { background: var(--w-gold); color: var(--w-on-gold); }
.sz-live-w-btn-primary:hover:not(:disabled) { background: var(--w-gold-deep); }
.sz-live-w-btn-outline { background: var(--w-panel); border-color: var(--w-line); color: var(--w-ink); }
.sz-live-w-btn-outline:hover:not(:disabled) { border-color: var(--w-gold-line); background: var(--w-bg2); }
.sz-live-w-btn-quiet { background: var(--w-panel2); color: var(--w-dim); }
.sz-live-w-btn-quiet:hover:not(:disabled) { background: var(--w-line); color: var(--w-ink); }
.sz-live-w-btn-wide { width: 100%; }
.sz-live-w-btn-lg { min-height: 56px; font-size: 16.5px; }

.sz-live-w-quietlink {
  background: none; border: none; cursor: pointer;
  min-height: 44px;
  padding: 10px 8px;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  color: var(--w-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sz-live-w-quietlink:hover { color: var(--w-ink); }

/* The reason a disabled control is disabled, printed where the control is. A greyed
   button whose only explanation is a `title` attribute explains nothing on a phone. */
.sz-live-w-why {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 12px;
  color: var(--w-muted);
  max-width: 44ch;
}
.sz-live-w-why .sz-live-w-ico { width: 14px; height: 14px; margin-top: 2px; }

/* ═══ fields and rows ═══ */

.sz-live-w-field { display: flex; gap: 8px; flex-wrap: wrap; }
.sz-live-w-input {
  flex: 1 1 200px;
  font: inherit;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--w-line);
  background: var(--w-bg2);
  color: var(--w-ink);
  min-height: 46px;
  min-width: 0;
}
.sz-live-w-input:focus { outline: none; border-color: var(--w-gold-line); box-shadow: var(--w-focus); }

.sz-live-w-rows { padding: 4px; gap: 0; }
.sz-live-w-row {
  width: 100%;
  min-height: 56px;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 10px;
  text-align: left;
  background: none; border: none;
  border-radius: 12px;
  color: inherit; font: inherit;
  min-width: 0;
}
button.sz-live-w-row { cursor: pointer; }
button.sz-live-w-row:hover { background: var(--w-bg2); }
.sz-live-w-rows > .sz-live-w-row + .sz-live-w-row { border-top: 1px solid var(--w-hairline); border-radius: 0; }
.sz-live-w-row-ico { width: 20px; height: 20px; color: var(--w-gold); }
.sz-live-w-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sz-live-w-row-label { font-size: 14.5px; font-weight: 700; }
.sz-live-w-row-value { font-size: 12.5px; color: var(--w-muted); }

/* ═══ circle counts ═══ */

.sz-live-w-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sz-live-w-count {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px;
  border-radius: 12px;
  background: var(--w-bg2);
  border: 1px solid var(--w-line);
  text-align: center;
}
.sz-live-w-count-num { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sz-live-w-count-label { font-size: 11.5px; font-weight: 700; color: var(--w-dim); }
.sz-live-w-count-why { font-size: 10.5px; color: var(--w-muted); line-height: 1.25; }
.sz-live-w-person-state { font-size: 12.5px; font-weight: 700; color: var(--w-muted); }
.sz-live-w-person-ok .sz-live-w-person-state { color: var(--w-ok); }
.sz-live-w-person-warn .sz-live-w-person-state { color: var(--w-warn); }

/* ═══ focus ═══ */

.sz-live-w :focus-visible {
  outline: 2px solid var(--w-gold);
  outline-offset: 2px;
  border-radius: 10px;
}

/* ═══ wide — board 2.4 ═══ */

@media (min-width: 900px) {
  .sz-live-w-shell {
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    min-height: 100dvh;
  }
  .sz-live-w-tabbar { display: none; }

  .sz-live-w-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px 16px;
    background: var(--w-bg2);
    border-right: 1px solid var(--w-hairline);
    position: sticky;
    top: 0;
    align-self: start;
    height: 100dvh;
    min-width: 0;
  }
  .sz-live-w-side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
  .sz-live-w-side-mark { width: 28px; height: 28px; color: var(--w-gold); }
  .sz-live-w-side-mark path { fill: var(--w-gold-soft); stroke: var(--w-gold); stroke-width: 1.4; }
  .sz-live-w-side-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
  .sz-live-w-side-name { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }

  .sz-live-w-nav { display: flex; flex-direction: column; gap: 2px; }
  .sz-live-w-navitem {
    display: flex; align-items: center; gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 12px;
    background: none; border: none; cursor: pointer;
    color: var(--w-dim);
    font-family: inherit; font-size: 14.5px; font-weight: 700;
    text-align: left;
  }
  .sz-live-w-navitem:hover { background: var(--w-panel); color: var(--w-ink); }
  .sz-live-w-nav-ico { width: 20px; height: 20px; }
  .sz-live-w-navitem-on {
    background: var(--w-panel);
    color: var(--w-gold);
    border: 1px solid var(--w-gold-line);
  }

  .sz-live-w-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
  .sz-live-w-who { display: flex; align-items: center; gap: 10px; padding: 6px; min-width: 0; }
  .sz-live-w-who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
  .sz-live-w-who-text b { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sz-live-w-who-text span { font-size: 11.5px; color: var(--w-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .sz-live-w-main {
    padding: 24px 28px 40px;
    max-height: 100dvh;
    overflow-y: auto;
  }
  .sz-live-w-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 350px); gap: 16px; }
  /* Three across, exactly as the board draws them — auto-fit alone put four on a wide
     monitor, which turns the row of status cards into a strip of chips. */
  .sz-live-w-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sz-live-w-h1 { font-size: 27px; }
  .sz-live-w-tile { aspect-ratio: 16 / 10; }
}

/* On a narrow screen the location card comes BEFORE the camera tiles — board 2.5 puts the
   route directly under the owner's card, where a person glancing at a phone looks first. */
@media (max-width: 899px) {
  .sz-live-w-col-aside { order: -1; }
}

@media (max-width: 600px) {
  .sz-live-w-h1 { font-size: 21px; }
  /* Top-aligned: the avatar belongs beside the first line of the title, not floating against
     the middle of a title that has wrapped onto three lines. */
  .sz-live-w-jhead { align-items: flex-start; gap: 10px; }
  .sz-live-w-jhead-text { flex: 1 1 100%; }
  .sz-live-w-main { padding-left: 14px; padding-right: 14px; }
  .sz-live-w-audio-act { margin-left: 0; width: 100%; }
  .sz-live-w-audio-act .sz-live-w-btn { width: 100%; }
}

/* ═══ reduced motion ═══
   Everything that moves here is decoration on top of a fact already written in words, so
   it can all stop. */
@media (prefers-reduced-motion: reduce) {
  .sz-live-w *, .sz-live-w *::before, .sz-live-w *::after {
    animation: none !important;
    transition: none !important;
  }
  .sz-live-w-pill-on .sz-live-w-pill-dot { animation: none !important; opacity: 1; }
}

/* ---------- the live picture ----------
   A tile holding a real stream, rather than the placeholder it shows the rest of the time.
   The <video> is the element the media layer made and this page MOVES between repaints, so
   these rules have to work on a node that arrives already playing. object-fit: cover keeps
   a portrait phone camera filling a landscape tile instead of sitting in letterbox bars. */
.sz-live-w-tile-live { background: #000; }
.sz-live-w-tile-live video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* The corner stamp says "Live" over the picture, so it needs its own ground to stay
   readable against whatever the camera happens to be pointing at. */
.sz-live-w-tile-stamp-live {
  background: var(--w-gold, #d4a53c);
  color: #1a1206;
  font-weight: 700;
  letter-spacing: .04em;
}
/* The label sits over the picture too, and a plain text shadow is not enough on a bright
   frame. A short gradient behind the bottom edge carries it on any scene. */
.sz-live-w-tile-live .sz-live-w-tile-label {
  background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
  color: #fff;
  padding: 18px 10px 8px;
  left: 0; right: 0; bottom: 0;
  width: auto;
}
/* The audio element is a control, not a layout element: it is in the row so the browser
   has somewhere to play from, and the row already says what it is in words. */
.sz-live-w-audio audio { display: none; }

.sz-live-w * { letter-spacing: 0 !important; }
.sz-live-w :is(h1, h2, h3, p) { margin: 0; }
.sz-live-w :is(button, input, select) { font-family: inherit; }
.sz-live-w :is(button, input, summary):focus-visible { outline: 2px solid #9b6b13; outline-offset: 3px; }
.sz-live-w-embedded { position: fixed; inset: 0; z-index: 70; overflow-y: auto; }
.sz-live-w-mobile-head { display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 6px; }
.sz-live-w-mobile-brand { display: flex; align-items: center; gap: 8px; flex: 1; }
.sz-live-w-mobile-mark { width: 34px; height: 44px; background: url('/sizani-shield.svg') center / contain no-repeat; }
.sz-live-w-mobile-mark path { opacity: 0; }
.sz-live-w-mobile-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.sz-live-w-mobile-brand-text b { font-size: 24px; }
.sz-live-w-mobile-brand-text span { font-size: 11px; }
.sz-live-w-close { width: 36px; min-height: 44px; border: 0; background: none; color: var(--w-muted); font-size: 26px; cursor: pointer; }
.sz-live-w-av { position: relative; overflow: hidden; background: #f8f3e7; color: #74551b; box-shadow: inset 0 0 0 1px #e9dfc9; }
.sz-live-w-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sz-live-w-card, .sz-live-w-stat { border-radius: 8px; box-shadow: none; }
.sz-live-w-btn { border-radius: 8px; min-height: 44px; }
.sz-live-w-btn-lg { min-height: 56px; }
.sz-live-w-rule { justify-content: center; max-width: none; }
.sz-live-w-audio-say { flex: 0 1 auto; }
.sz-live-w-wave { flex: 1 1 160px; }
.sz-live-w-livevideo, .sz-live-w-narrow-only { display: none; }
.sz-live-w-btn-primary { background: linear-gradient(115deg, #b08b47, #f1dba4 50%, #ba9654); color: #15120b; }
.sz-live-w-btn-primary:hover:not(:disabled) { background: #dfc080; }
.sz-live-w-btn-outline { border-color: #a67c2f; }
.sz-live-w-tile { border: 1px solid #e5e8ed; border-radius: 8px; background: #f5f6f8; }
.sz-live-w-tile-ico { width: 48px; height: 48px; padding: 11px; border: 1px solid #dfe3e9; border-radius: 50%; background: #fff; color: #616b7a; opacity: 1; }
.sz-live-w-tile-live { border-color: transparent; }
.sz-live-w-tile-label, .sz-live-w-tile-live .sz-live-w-tile-label { background: #14171fdb; color: #fff; border: 0; border-radius: 5px; left: 7px; bottom: 7px; right: auto; width: auto; padding: 4px 8px; }
.sz-live-w-tile-stamp { background: #14171fdb; color: #fff; border: 0; border-radius: 5px; left: 7px; top: 7px; padding: 4px 8px; }
.sz-live-w-audio-say b { font-size: 13px; }
.sz-live-w-audio { border-radius: 8px; }
.sz-live-w-private { background: none; border: 0; padding: 0; }
.sz-live-w-details > summary { min-height: 44px; padding: 12px 0; color: var(--w-muted); cursor: pointer; font-size: 12px; }
.sz-live-w-stat-ok .sz-live-w-stat-why { display: none; }
.sz-live-w-details .sz-live-w-stat-why { display: block; }
.sz-live-w-footbar { border-radius: 8px; background: #f8f1e3; }
.sz-live-w-map-shell { border-radius: 8px; background: #f1f5f6; min-height: 170px; display: grid; align-items: center; }
.sz-live-w-map-shell .sz-live-map-empty { padding: 38px 18px; }
.sz-live-w-tabbar { background: #fff; }
.sz-live-w-tab-on { color: #956409; background: none; }
.sz-live-w-h1 { overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .sz-live-w-mobile-head { display: none; }
  .sz-live-w-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sz-live-w-side { padding: 24px 16px; background: #fff; }
  .sz-live-w-side-mark { width: 38px; height: 48px; background: url('/sizani-shield.svg') center / contain no-repeat; }
  .sz-live-w-side-mark path { opacity: 0; }
  .sz-live-w-side-name { font-size: 26px; }
  .sz-live-w-navitem { font-weight: 500; min-height: 50px; border-radius: 8px; }
  .sz-live-w-signout { color: var(--w-dim); }
  .sz-live-w-jhead { gap: 18px; }
  .sz-live-w-jhead .sz-live-w-av { width: 92px; height: 92px; font-size: 32px; }
  .sz-live-w-jhead .sz-live-w-av .sz-live-w-ico { width: 40px; height: 40px; }
  .sz-live-w-join-off { display: none; }
  .sz-live-w-ack:not(.sz-live-w-ack-result) { display: none; }
  .sz-live-w-navitem-on { background: linear-gradient(115deg, #dfc38e, #f5e4bd); border: 0; color: var(--w-ink); }
  .sz-live-w-main { padding: 30px 24px; }
  .sz-live-w-cols { grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr); }
  .sz-live-w-tile { aspect-ratio: 5 / 6; }
  .sz-live-w-map-shell { min-height: 300px; }
  .sz-live-w-stat { min-height: 78px; justify-content: center; }
  .sz-live-w-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sz-live-w-stat-mark { white-space: normal; }
  .sz-live-w-stat-head { gap: 12px; }
  .sz-live-w-audio-act .sz-live-w-btn { min-width: 112px; }
}
@media (max-width: 899px) {
  .sz-live-w-main { padding-top: 18px; max-width: 480px; margin: 0 auto; }
  .sz-live-w-pane { gap: 10px; }
  .sz-live-w-jhead { flex-wrap: wrap; }
  .sz-live-w-jhead-text { flex: 1 1 150px; }
  .sz-live-w-h1 { font-size: 27px; }
  .sz-live-w-jhead .sz-live-w-h1 { font-size: 18px; }
  .sz-live-w-jhead .sz-live-w-av { width: 48px; height: 48px; }
  .sz-live-w-narrow-only { display: flex; }
  .sz-live-w-private, .sz-live-w-presence-none, .sz-live-w-loc-head { display: none; }
  .sz-live-w-tile-stamp:not(.sz-live-w-tile-stamp-live) { display: none; }
  .sz-live-w-tile-label-x { display: none; }
  .sz-live-w-livevideo { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; color: var(--w-muted); }
  .sz-live-w-livevideo-on { color: var(--w-ok); }
  .sz-live-w-ack, .sz-live-w-footbar { order: 1; }
  .sz-live-w-stats { order: 2; }
  .sz-live-w-details { order: 3; }
  .sz-live-w-pane > .sz-live-w-note-quiet, .sz-live-w-pane > .sz-live-w-ref { order: 4; }
  .sz-live-w-tile { aspect-ratio: 5 / 4; }
  .sz-live-w-stats { grid-template-columns: 1fr; }
  .sz-live-w-stat { padding: 10px 12px; }
  .sz-live-w-poll:not(.sz-live-w-poll-stale) { font-size: 10px; }
}

/* ═══ the street map ═══
   The live map (sizani-map.js, MapLibre on our own tileset) sits in the same shell as the
   drawn map. The shell's default rules above — a grid that centres the drawn map's sentence
   — are for the fallback; `-live` turns it into a fixed-height block the map can fill,
   because a WebGL canvas needs a height it can measure and a map with no height is a map
   nobody sees. The drawn map keeps its own look untouched. These rules come last in the file
   so they win over the shell overrides above them. */
.sz-live-w-map-shell-live {
  display: block;
  height: 260px;
  min-height: 0;
  padding: 0;
  background: #eef2f3;
}
.sz-live-w-map-host { position: relative; min-width: 0; }
.sz-live-w-map-shell-live .sz-live-w-map-host { position: absolute; inset: 0; }
/* The sentence over the host while the first tiles arrive. Never an empty box: a frame with
   nothing in it reads as a place with nobody in it. It is removed the moment the map is
   drawn, or replaced by the drawn map's sentence when the street map cannot load. */
.sz-live-w-map-wait {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--w-muted);
  pointer-events: none;
}
/* Recentre: shown only after the viewer has panned away from the marker, in the corner the
   drawn map's locate control uses. A word beside the glyph, because every control on this
   page says what it does. */
.sz-live-w-recentre {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px;
  padding: 6px 12px 6px 9px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--w-line);
  color: var(--w-ink);
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  box-shadow: var(--w-lift-1);
}
.sz-live-w-recentre:hover { border-color: var(--w-gold-line); color: var(--w-gold-deep); }
.sz-live-w-recentre .sz-live-w-ico { width: 16px; height: 16px; }
/* The caption under the map and the reason beside the header word. Tabular numerals so
   "Updated 9 s ago" does not jitter into "Updated 10 s ago" a pixel wider. */
.sz-live-w-map-cap {
  font-size: 12.5px;
  color: var(--w-muted);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.sz-live-w-map-cap-stale { color: var(--w-warn); font-weight: 600; }
.sz-live-w-loc-why { flex: 1 0 100%; font-size: 12px; color: var(--w-muted); }
/* MapLibre's own chrome inside this page: the attribution control is a legal requirement
   (OpenStreetMap, ODbL) and stays; it is only kept to this page's type. */
.sz-live-w-map-host .maplibregl-ctrl-attrib { font-family: inherit; font-size: 10.5px; }
.sz-live-w-map-host .maplibregl-canvas:focus { outline: none; }
@media (min-width: 900px) {
  .sz-live-w-map-shell-live { height: 340px; }
}
