/* ============================================================================
   Viibestream — public.css
   Modern viewer page: full-bleed video, floating controls, theme-aware.
   ========================================================================= */

body.public {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;          /* page itself never scrolls */
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.public-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.public-brand {
  display: flex; align-items: center; gap: 0.625rem;
  color: var(--text-strong);
  font-weight: 700;
  font-size: 1rem;
}
.public-brand:hover { text-decoration: none; }
.public-brand-logo {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  display: block;
}
.public-brand-name { letter-spacing: -0.01em; }
.public-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 0.5rem; }

/* ── Main player area ──────────────────────────────────────────────────── */
.public-main {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(28rem, 1fr);
  gap: 1rem;
  padding: 1rem 1.25rem;
  width: 100%;
  margin: 0 auto;
}
.player {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
/* Only collapse to a single column on truly narrow screens (phones).
   The page still permits scroll there since both panes can't fit
   side by side. */
@media (max-width: 48rem) {
  body.public { overflow: auto; height: auto; min-height: 100dvh; }
  .public-main {
    grid-template-columns: 1fr;
  }
}
.player-stage {
  position: relative;
  flex: 1 1 auto;          /* fill the column height */
  min-height: 0;
  width: 100%;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.player-stage video {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}
/* Broadcaster paused → hide the video frame instantly so the buffered
   tail can't be seen playing behind the Paused overlay. */
.player-stage video.is-blanked { opacity: 0; }
/* Slight glow descending from the top-center, mirroring the access-code
   (lock) screen. Sits above the video but below the overlays/badges (no
   z-index needed — a positioned pseudo paints over the unpositioned video
   yet under the positioned overlays that follow it in the DOM). */
.player-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(20, 24, 38, 0.5), transparent 60%);
}
.player-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(20,24,38,.45) 0%, rgba(11,13,20,.9) 100%);
  color: #e6e9f2;
  padding: 1.5rem;
  gap: 0.5rem;
}
/* `display: grid` above beats the UA stylesheet's [hidden]{display:none}
   at equal specificity, so without this explicit override the overlay
   stays visible even when JS sets the attribute. */
.player-overlay[hidden] { display: none !important; }

/* Wrapper that keeps the title and sub vertically grouped, so the
   parent .player-overlay's place-items:center centers the pair as a
   single block at the geometric middle of the video window. */
.player-overlay .overlay-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.player-overlay .overlay-eyebrow {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.1;
}
.player-overlay .overlay-sub {
  font-size: 1rem;
  font-weight: 400;
  color: #cdd3e6;
  line-height: 1.3;
}
.player-overlay .overlay-title { font-size: 1.25rem; font-weight: 600; color: #fff; }
.player-overlay .overlay-line  { font-size: 0.9375rem; color: #cdd3e6; }
.player-overlay .overlay-pause-icon { color: #fff; opacity: 0.92; }

/* Now Showing card — replaces the plain "Paused" / "OFF AIR" message in
   the center of the video panel (paused or offline overlay) when an entry
   is selected. The swap is driven by html.has-now-showing (set by info.js). */
.paused-now-showing { display: none; }
html.has-now-showing #paused-overlay .paused-default,
html.has-now-showing #offline-overlay .offline-default { display: none; }
html.has-now-showing .player-overlay .paused-now-showing {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1.25rem;
  align-items: start;
  width: min(34rem, 92%);
  max-height: 92%;
  overflow-y: auto;
  padding: 1.25rem;
  text-align: left;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.paused-ns-poster {
  width: 10rem;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--brand) 24%, var(--panel-2)),
    color-mix(in srgb, var(--brand-2) 18%, var(--panel-2)));
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
}
.paused-ns-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.paused-ns-poster img[hidden] { display: none !important; }
.paused-ns-poster-empty { color: color-mix(in srgb, var(--brand) 80%, #fff); opacity: 0.55; }
.paused-ns-poster-empty[hidden] { display: none !important; }
.paused-ns-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}
.paused-ns-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}
/* Sub-note under the OFF AIR card eyebrow ("Video will start automatically"). */
.paused-ns-note {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.3;
  margin-top: -0.25rem;
}
.paused-ns-title {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-strong);
  margin: 0;
  word-wrap: break-word;
}
.paused-ns-desc {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  margin: 0;
  overflow-wrap: anywhere;
}
.paused-ns-desc[hidden] { display: none !important; }
.paused-ns-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
@media (max-width: 34rem) {
  html.has-now-showing .player-overlay .paused-now-showing {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .paused-ns-links { justify-content: center; }
}

/* Unmute prompt: a small floating pill near the bottom of the player,
   not a full-screen curtain. Auto-played video can keep showing while
   the viewer decides whether to enable audio. */
.unmute-badge {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: rgba(11, 13, 20, 0.78);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.unmute-badge:hover { background: rgba(11, 13, 20, 0.9); }
.unmute-badge[hidden] { display: none !important; }
.unmute-badge svg { display: inline-block; }

/* "Syncing" pill in the control bar — transparent fill, hairline border,
   with a softly pulsing dot. Shown while we catch the playhead up to the
   live edge, so the viewer knows why playback briefly speeds up or jumps. */
.sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.15rem 0.6rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}
.sync-chip[hidden] { display: none; }
.sync-chip-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
  animation: sync-pulse 1s ease-in-out infinite;
}
@keyframes sync-pulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sync-chip-dot { animation: none; }
}

/* Latency readout in the meta row ("2.9s behind"). */
#latency-chip { color: var(--muted); white-space: nowrap; }
#latency-chip strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* These helpers only exist in the fullscreen overlay. */
.chat-pin-btn { display: none; }
.chat-mute-btn { display: none; }
.chat-edge-trigger { display: none; }
.player-controls-trigger { display: none; }

/* ── Fullscreen: video fills the screen, chat rides on top transparently ─
   The whole .public-main is fullscreened, so the chat panel becomes a
   see-through overlay on the right and the movie shows through it. */
.public-main.is-fullscreen {
  display: block;
  padding: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
}
.public-main.is-fullscreen .player {
  position: absolute;
  inset: 0;
  height: 100%;
  gap: 0;
}
.public-main.is-fullscreen .player-stage {
  flex: 1 1 auto;
  border: none;
  border-radius: 0;
}
/* Control bar floats bottom-left, clearing the chat column on the right.
   It's tucked away by default and slides up when the mouse nears the
   bottom of the screen (or hovers the bar itself). */
.public-main.is-fullscreen .player-controls {
  position: absolute;
  left: 1rem;
  right: calc(min(28rem, 32vw) + 1rem);
  bottom: 1rem;
  z-index: 7;
  border-radius: 999px;
  background: rgba(11, 13, 20, 0.72);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateY(calc(100% + 1.5rem));
  transition: transform 0.25s ease;
}
.public-main.is-fullscreen .player-controls-trigger:hover + .player-controls,
.public-main.is-fullscreen .player-controls:hover {
  transform: translateY(0);
}
/* Bottom hover hot-zone (over the video, clearing the chat column). */
.public-main.is-fullscreen .player-controls-trigger {
  display: block;
  position: absolute;
  left: 0;
  right: min(28rem, 32vw);
  bottom: 0;
  height: 5rem;
  z-index: 5;
}
@media (prefers-reduced-motion: reduce) {
  .public-main.is-fullscreen .player-controls { transition: none; }
}

/* Chat overlay: transparent column on the right, a faint scrim toward the
   edge plus text shadows keep messages readable over any video frame. */
.public-main.is-fullscreen .chat-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(28rem, 32vw);
  z-index: 6;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.26) 45%, rgba(0, 0, 0, 0.44) 100%);
  border: none;
  box-shadow: none;
  transition: transform 0.22s ease;
}
.public-main.is-fullscreen .chat-header,
.public-main.is-fullscreen .chat-messages,
.public-main.is-fullscreen .chat-empty { background: transparent; }
.public-main.is-fullscreen .chat-header { border-bottom-color: transparent; }
.public-main.is-fullscreen .chat-msg { background: transparent; }
.public-main.is-fullscreen .chat-msg-name,
.public-main.is-fullscreen .chat-msg-time,
.public-main.is-fullscreen .chat-msg-text,
.public-main.is-fullscreen .chat-title,
.public-main.is-fullscreen .chat-count,
.public-main.is-fullscreen .chat-empty-title,
.public-main.is-fullscreen .chat-empty-sub {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.9);
}
/* The @you token sits on a solid brand pill — the legibility shadow just
   makes its dark text look fuzzy, so drop it there. */
.public-main.is-fullscreen .chat-mention--me { text-shadow: none; }

/* Hide the message-list scrollbar in the overlay until the chat is
   hovered. The gutter stays reserved (transparent thumb) so revealing it
   doesn't shift the text. */
.public-main.is-fullscreen .chat-messages { scrollbar-color: transparent transparent; }
.public-main.is-fullscreen .chat-messages::-webkit-scrollbar-thumb { background: transparent; }
.public-main.is-fullscreen .chat-panel:hover .chat-messages {
  scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}
.public-main.is-fullscreen .chat-panel:hover .chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
}

/* Reply banner + /re hint need a solid backing over the video. */
.public-main.is-fullscreen .chat-reply-banner,
.public-main.is-fullscreen .chat-reply-hint {
  background: rgba(11, 13, 20, 0.6);
  border-top-color: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.public-main.is-fullscreen .chat-reply-banner-snippet { color: #cdd3e6; }
/* Compose box → a floating pill that matches the control bar: same pill
   radius, same padding, same translucent blurred backing, and the same
   ~1rem inset from the screen edges. The input goes transparent so it
   blends into the pill. */
.public-main.is-fullscreen .chat-compose {
  margin: 0.5rem 1rem 1rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(11, 13, 20, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.public-main.is-fullscreen .chat-compose-input {
  background: transparent;
  border-color: transparent;
}

/* The initial "join the chat" box gets the same pill treatment. The
   container goes transparent; the join FORM becomes the matching pill. */
.public-main.is-fullscreen .chat-join {
  background: transparent;
  border-top: 0;
  padding: 0.5rem 1rem 1rem;
}
.public-main.is-fullscreen .chat-join-hint {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.9);
}
.public-main.is-fullscreen .chat-join-form {
  padding: 0.625rem 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(11, 13, 20, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.public-main.is-fullscreen .chat-name-input {
  background: transparent;
  border-color: transparent;
}

/* Header toggles (pin + mute + leave) — legible over video in fullscreen. */
.public-main.is-fullscreen .chat-pin-btn,
.public-main.is-fullscreen .chat-mute-btn,
.public-main.is-fullscreen .chat-leave-btn {
  display: inline-grid;
  place-items: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(11, 13, 20, 0.5);
  color: #fff;
  cursor: pointer;
}
.public-main.is-fullscreen .chat-pin-btn:hover,
.public-main.is-fullscreen .chat-mute-btn:hover { background: rgba(11, 13, 20, 0.8); }
.public-main.is-fullscreen .chat-leave-btn:hover { background: rgba(11, 13, 20, 0.8); color: var(--danger); }
/* Pressed = pinned (kept open). Use the brand tint so it reads as active. */
.public-main.is-fullscreen .chat-pin-btn[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
}
/* Pressed = chat muted. A red tint reads as "notifications off". */
.public-main.is-fullscreen .chat-mute-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--danger) 80%, black);
  border-color: var(--danger);
}

/* Unpinned: the chat slides off to the right; hovering the edge trigger or
   the panel (or focusing an input inside it) slides it smoothly back in. */
.public-main.is-fullscreen.is-chat-unpinned .chat-panel { transform: translateX(100%); }
/* Reveal on hover only — moving the mouse out of the chat container slides
   it away again, even if a chat input still has focus. The .is-chat-peek
   class (set briefly by JS on an @mention) reveals it the same way. */
.public-main.is-fullscreen.is-chat-unpinned .chat-edge-trigger:hover + .chat-panel,
.public-main.is-fullscreen.is-chat-unpinned .chat-panel:hover,
.public-main.is-fullscreen.is-chat-unpinned.is-chat-peek .chat-panel { transform: translateX(0); }
.public-main.is-fullscreen.is-chat-unpinned .chat-edge-trigger {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1.5rem;
  z-index: 6;
}
/* A small grab handle hints where to hover to bring the chat back. */
.public-main.is-fullscreen.is-chat-unpinned .chat-edge-trigger::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.25rem;
  width: 0.25rem;
  height: 3rem;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease;
}
/* A matching handle at the bottom hints the control bar can be summoned. */
.public-main.is-fullscreen .player-controls-trigger::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  width: 3rem;
  height: 0.25rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease;
}
/* Hovering the bottom summons the controls, so drop the hint there. */
.public-main.is-fullscreen .player-controls-trigger:hover::before { opacity: 0; }
/* Both grab handles fade out once the mouse goes idle; any move (which
   clears .is-idle via JS) fades them back in. */
.public-main.is-fullscreen.is-idle .chat-edge-trigger::before,
.public-main.is-fullscreen.is-idle .player-controls-trigger::before { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .public-main.is-fullscreen .chat-panel { transition: none; }
}

/* ── Floating control bar ─────────────────────────────────────────────── */
.player-controls {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.player-btn {
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.player-btn:hover { background: var(--panel-2); }
.player-btn--right { margin-left: auto; }

/* ── Reaction palette (control bar) ──────────────────────────────────── */
.player-controls-right {
  margin-left: auto;            /* pin this group (reactions + fullscreen) right */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
/* Reaction palette + particles + "who reacted" pill live in chat.css so
   both the viewer and the broadcaster preview can share them. */
.player-meta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-left: 0.25rem;
}
.player-meta-label { color: var(--text); font-weight: 500; }

.quality-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-left: 0.5rem;
  padding: 0.1875rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.quality-chip[hidden] { display: none !important; }
.quality-chip-q   { color: var(--brand); font-weight: 700; }
.quality-chip-br  { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.quality-chip-sep { color: var(--border); }

.volume {
  width: 8rem;
  appearance: none;
  background: transparent;
}
.volume::-webkit-slider-runnable-track {
  height: 0.25rem;
  background: var(--panel-2);
  border-radius: 999px;
}
.volume::-moz-range-track {
  height: 0.25rem;
  background: var(--panel-2);
  border-radius: 999px;
}
.volume::-webkit-slider-thumb {
  appearance: none;
  width: 0.875rem; height: 0.875rem;
  background: var(--brand);
  border-radius: 50%;
  border: 0;
  margin-top: -0.3125rem;
  cursor: pointer;
}
.volume::-moz-range-thumb {
  width: 0.875rem; height: 0.875rem;
  background: var(--brand);
  border-radius: 50%;
  border: 0;
  cursor: pointer;
}

/* ── Live chat ──  (component styles moved to chat.css) ──────────── */

/* ── Now Showing modal ─────────────────────────────────────────────── */
.info-modal-root[hidden] { display: none !important; }
.info-modal-root {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
}
.info-modal-root .modal-backdrop {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}
.info-modal {
  position: relative;
  width: min(40rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 4rem);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: modal-pop 180ms cubic-bezier(.2,.7,.2,1);
}
.info-modal-close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 2;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
}
.info-modal-grid {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1.25rem;
  padding: 1.25rem;
  max-height: calc(100dvh - 4rem);
  overflow: hidden;
}
.info-poster {
  width: 12rem;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--brand) 24%, var(--panel-2)),
    color-mix(in srgb, var(--brand-2) 18%, var(--panel-2)));
  box-shadow: var(--shadow-md);
  position: relative;
  display: grid;
  place-items: center;
}
.info-poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.info-poster-placeholder {
  color: color-mix(in srgb, var(--brand) 80%, #fff);
  opacity: 0.55;
}
.info-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  overflow-y: auto;
}
.info-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}
.info-title {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-strong);
  margin: 0;
  word-wrap: break-word;
}
.info-desc {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  margin: 0;
  overflow-wrap: anywhere;
}
.info-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.info-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.4375rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, transform 60ms ease;
}
.info-link:hover {
  background: var(--panel);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  text-decoration: none;
}
.info-link:active { transform: scale(0.97); }
.info-link--accent {
  background: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 70%, black);
  color: var(--brand-fg);
}
.info-link--accent:hover {
  background: color-mix(in srgb, var(--brand) 90%, white);
  border-color: var(--brand);
}
.info-link[hidden] { display: none !important; }
.info-modal-root[hidden] { display: none !important; }

@media (max-width: 30rem) {
  .info-modal-grid {
    grid-template-columns: 1fr;
    place-items: center;
    text-align: center;
  }
  .info-links { justify-content: center; }
}

/* ── Lock screen ──────────────────────────────────────────────────────── */
.lock-screen {
  position: fixed; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  /* Fully opaque so nothing behind the lock screen is ever visible —
     not the player, not chat, not the Now Showing card. A soft glow
     descending from the top-center sits on top of the solid base so it
     still feels styled. */
  background:
    radial-gradient(1200px 600px at 50% -10%, #141826, transparent 60%),
    var(--bg);
  z-index: 50;
}
.lock-screen[hidden] { display: none !important; }

/* While the lock screen is up we also hide the rest of the page
   markup entirely. Belt-and-suspenders on top of the opaque overlay:
   no devtools peek, no screen-reader leak of viewer count / chat /
   Now Showing, no FOUC if the overlay's background fails to paint. */
body.locked > .public-header,
body.locked > .public-main,
body.locked > footer { display: none !important; }

/* ── Safari performance warning ────────────────────────────────────────
   Fixed above everything (incl. the lock screen at z-index 50) so a Safari
   user sees it before entering an access code. Not covered by body.locked's
   hide rules above, so it persists on the lock screen. */
.browser-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  background: #ffbc00;
  color: #1a1205;
  font-size: 0.9375rem;
  line-height: 1.3;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.35);
}
.browser-warning[hidden] { display: none !important; }
.browser-warning-icon { flex: 0 0 auto; }
.browser-warning-text { flex: 1 1 auto; }
.browser-warning-text strong { font-weight: 700; }
.browser-warning-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.browser-warning-close:hover { background: rgba(0, 0, 0, 0.14); }

/* Push the in-flow page down so the fixed banner doesn't cover the sticky
   header. The lock screen is position:fixed and unaffected — its centered
   card clears the banner on its own. */
body.has-browser-warning { padding-top: 2.75rem; }
.lock-card {
  width: min(24rem, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}
.lock-logo {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
}
.lock-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-strong);
}
.lock-sub {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
  margin-top: -0.25rem;
}
.lock-form {
  display: grid;
  gap: 0.625rem;
  width: 100%;
}
.lock-input {
  height: 3rem;
  padding: 0 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5rem;
  text-align: center;
  text-transform: uppercase;
  color: var(--text-strong);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 100%;
}
.lock-input::placeholder { letter-spacing: 0.25rem; color: var(--muted); font-weight: 400; }
.lock-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent);
}
.lock-error {
  font-size: 0.8125rem;
  color: var(--danger);
  font-weight: 500;
}
/* Friendly headphones reminder for would-be voice-chat participants. */
.lock-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
  text-align: left;
  background: color-mix(in srgb, var(--nav-active-fg, var(--brand)) 8%, var(--bg-elev));
  border: 1px solid var(--border-soft, var(--border));
  border-radius: var(--radius-md);
}
.lock-hint svg { flex: 0 0 auto; margin-top: 0.0625rem; color: var(--brand); }

/* Lock-screen footer — version + admin sign-in, pinned to the bottom of
   the overlay so the card stays optically centered. Hidden along with
   the rest of the overlay once #lock-screen gets the `hidden` attribute. */
.lock-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.lock-foot-link {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
.lock-foot-link:hover { color: var(--brand); text-decoration: underline; }
.lock-foot-sep { color: var(--border); }
.lock-foot-version { font-variant-numeric: tabular-nums; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.public-foot {
  flex: 0 0 auto;
  padding: 0.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 36rem) {
  .public-header { padding: 0.625rem 0.875rem; }
  .public-main { padding: 0.875rem; }
  .player-controls { flex-wrap: wrap; }
  .volume { width: 6rem; }
}
