/* ==========================================================================
   Live-Übertragung · Stylesheet
   Sämtliche Farben, Radien und Schriften kommen als CSS-Variablen aus der
   config.php und werden im <head> gesetzt. Hier steht kein fester Farbwert,
   der nicht aus einer Variable abgeleitet ist.
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

/* Ambientes Licht hinter der Bühne: hebt den Rahmen vom Hintergrund ab,
   ohne dass ein Bild geladen werden muss. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh 0 auto 0;
  height: 70vh;
  background: radial-gradient(60% 60% at 50% 0%,
              color-mix(in srgb, var(--brand) 9%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--brand-ink, var(--brand)); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 24px; top: 12px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--surface-2);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   Kopfzeile
   -------------------------------------------------------------------------- */
.masthead {
  position: relative;
  z-index: 2;
  background: var(--header-bg);
  color: white;
  padding-bottom: 26px;
}
/* Bergkamm als Übergang von der Kopfzeile in die Seite */
.masthead__ridge {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: 34px;
  fill: var(--bg);
  pointer-events: none;
}
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.masthead__logo { display: block; max-height: 90px; width: auto; }
.masthead__logo--right { max-height: 52px; }

/* --------------------------------------------------------------------------
   Titelblock
   -------------------------------------------------------------------------- */
.intro { padding-top: 46px; padding-bottom: 26px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--standby);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--standby) 22%, transparent);
}
[data-state="live"] .eyebrow__dot {
  background: var(--live);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 26%, transparent);
}

.intro__title {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 88%;
  font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.intro__subtitle {
  margin: 14px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------------------
   Bühne: hält vor der Sendung die Uhr, danach den Player.
   Die Ecken-Marken sind Bildfeldmarkierungen, wie im Kamerasucher.
   -------------------------------------------------------------------------- */
.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stage::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border-radius: 2px;
  background:
    linear-gradient(var(--line), var(--line)) left    top    / 22px 1px no-repeat,
    linear-gradient(var(--line), var(--line)) left    top    / 1px 22px no-repeat,
    linear-gradient(var(--line), var(--line)) right   top    / 22px 1px no-repeat,
    linear-gradient(var(--line), var(--line)) right   top    / 1px 22px no-repeat,
    linear-gradient(var(--line), var(--line)) left    bottom / 22px 1px no-repeat,
    linear-gradient(var(--line), var(--line)) left    bottom / 1px 22px no-repeat,
    linear-gradient(var(--line), var(--line)) right   bottom / 22px 1px no-repeat,
    linear-gradient(var(--line), var(--line)) right   bottom / 1px 22px no-repeat;
  opacity: 0.9;
  transition: opacity 0.4s ease;
  z-index: 3;
}
.stage[data-mode="player"]::after { opacity: 0; }

.stage__panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  text-align: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stage__panel[hidden] { display: none; }
.stage__panel.is-out {
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
}

/* Signallampe */
.tally {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px 6px 10px;
  margin-bottom: 26px;
  border: 1px solid color-mix(in srgb, var(--standby) 40%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--standby) 10%, transparent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--standby) 72%, var(--text));
}
.tally__lamp {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--standby);
  animation: breathe 2.6s ease-in-out infinite;
}
.tally--live {
  border-color: color-mix(in srgb, var(--live) 55%, var(--line));
  background: color-mix(in srgb, var(--live) 14%, transparent);
  color: color-mix(in srgb, var(--live) 60%, var(--text));
}
.tally--live .tally__lamp { background: var(--live); animation-duration: 1.4s; }

@keyframes breathe {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 currentColor; }
  50%      { opacity: 0.45; box-shadow: 0 0 10px 1px currentColor; }
}

/* Zifferwerk */
.clock {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(6px, 1.6vw, 16px);
}
.clock__unit { min-width: clamp(56px, 12vw, 108px); }
.clock__value {
  display: block;
  padding: clamp(6px, 1.4vw, 14px) clamp(4px, 1vw, 10px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: clamp(1.75rem, 6.4vw, 3.6rem);
  line-height: 1;
  color: var(--clock-color);
}
.clock__label {
  display: block;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
}
.clock__sep {
  padding-top: clamp(8px, 1.6vw, 18px);
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 4vw, 2.4rem);
  color: var(--line);
}

.stage__note {
  margin: 26px 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}
.stage__note strong { color: var(--text); font-weight: 600; }

/* Fortschrittslinie am unteren Bühnenrand */
.stage__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--line);
  z-index: 4;
}
.stage__progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand);
  transition: width 1s linear;
}
.stage[data-mode="player"] .stage__progress { display: none; }

/* Abschlussbildschirm */
.stage__headline {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 88%;
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Player
   -------------------------------------------------------------------------- */
.stage__player { position: absolute; inset: 0; z-index: 2; }
.stage__player[hidden] { display: none; }
.stage__player .video-js { width: 100%; height: 100%; background: black; }

.video-js .vjs-control-bar {
  background: linear-gradient(to top,
              color-mix(in srgb, var(--bg) 92%, black), transparent);
  height: 3.4em;
}
.video-js .vjs-play-progress,
.video-js .vjs-volume-level { background-color: var(--brand); }
.video-js .vjs-big-play-button {
  width: 84px; height: 84px;
  line-height: 82px;
  border: 2px solid color-mix(in srgb, var(--text) 70%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}
.video-js:hover .vjs-big-play-button { background: var(--brand); border-color: var(--brand); }
.video-js .vjs-live-display,
.video-js .vjs-seek-to-live-control { font-family: var(--font-mono); letter-spacing: 0.08em; }

/* Ton-einschalten-Hinweis über dem stumm gestarteten Player */
.unmute {
  position: absolute;
  left: 50%; bottom: 74px;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px color-mix(in srgb, black 45%, transparent);
}
.unmute[hidden] { display: none; }
.unmute:hover { filter: brightness(1.1); }

/* --------------------------------------------------------------------------
   Textspalte und Sendedaten
   -------------------------------------------------------------------------- */
.content {
  display: block;
  padding-top: 44px; padding-bottom: 60px;
}

.content__body {
  width: 100%;
}

.content__body p {
  margin: 0 0 1.1em;
  max-width: none;
  width: 100%;
  font-size: 1.0625rem;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
}

.facts {
  margin: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.facts__title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.facts__row:first-of-type { border-top: 0; }
.facts__key { color: var(--muted); }
.facts__value { text-align: right; font-weight: 500; }

/* --------------------------------------------------------------------------
   Fußzeile
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 34px;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.875rem;
  color: var(--muted);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--text); }
.footer__credit { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Schmale Bildschirme
   -------------------------------------------------------------------------- */
   
   
  
   
   
   
   
@media (max-width: 860px) {
  .content { grid-template-columns: 1fr; padding-top: 34px; }
  .intro { padding-top: 32px; }
  .masthead__inner { min-height: 62px; }
  .masthead__logo { max-height: 34px; }
  .masthead__logo--right { max-height: 40px; }
  .wrap { padding: 0 18px; }
  .clock__sep { display: none; }
  .clock { gap: 6px; }
  .unmute { bottom: 58px; font-size: 0.875rem; }
}

@media (max-width: 420px) {
  .clock__unit { min-width: 0; flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}



@media (max-width: 860px) {

  /* Allgemeines Seitenlayout */
  .wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* Kopfbereich */
  .masthead__inner {
    min-height: 72px;
    padding: 12px 18px;
  }

  .masthead__logo {
    max-height: 48px;
    max-width: 210px;
  }

  /* Titelbereich */
  .intro {
    padding-top: 26px;
    padding-bottom: 20px;
  }

  .eyebrow {
    margin-bottom: 14px;
    font-size: 10px;
    line-height: 1.8;
    letter-spacing: 0.15em;
  }

  .intro__title {
    font-size: clamp(2rem, 9vw, 2.7rem);
    line-height: 1.02;
  }

  .intro__subtitle {
    font-size: 1rem;
  }


  /* ---------------------------------------------------------
     Countdown-Bühne
     --------------------------------------------------------- */

  /*
   * 16:9 funktioniert beim Video,
   * ist aber für den Countdown auf Mobilgeräten zu niedrig.
   */
  .stage[data-mode="clock"] {
    aspect-ratio: auto;
    min-height: 420px;
  }

  .stage[data-mode="clock"] .stage__panel {
    position: relative;
    min-height: 420px;
    padding: 34px 18px 28px;
  }

  .stage[data-mode="clock"] .stage__panel > div {
    width: 100%;
  }


  /* Countdown */
  .clock {
    width: 100%;
    gap: 7px;
    align-items: flex-start;
  }

  .clock__unit {
    min-width: 0;
    flex: 1 1 0;
  }

  .clock__value {
    padding: 11px 3px;
    font-size: clamp(1.8rem, 9vw, 2.7rem);
  }

  .clock__label {
    margin-top: 8px;
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .clock__sep {
    display: none;
  }

  .tally {
    margin-bottom: 24px;
  }

  .stage__note {
    margin-top: 30px;
    font-size: 0.95rem;
    line-height: 1.55;
  }


  /* ---------------------------------------------------------
     Fließtext
     --------------------------------------------------------- */

  .content {
    display: block;
    padding-top: 30px;
    padding-bottom: 44px;
  }

  .content__body {
    width: 100%;
    max-width: none;
  }

  .content__body p {
    width: 100%;
    max-width: none;
    margin: 0 0 1.25em;
    font-size: 1rem;
    line-height: 1.65;
  }


  /* Player bleibt echtes 16:9 */
  .stage[data-mode="player"] {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .unmute {
    bottom: 58px;
    font-size: 0.875rem;
  }
}




@media (max-width: 480px) {

  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .intro {
    padding-top: 24px;
  }

  .intro__title {
    font-size: clamp(2rem, 10.5vw, 2.55rem);
  }

  .stage[data-mode="clock"],
  .stage[data-mode="clock"] .stage__panel {
    min-height: 410px;
  }

  .stage[data-mode="clock"] .stage__panel {
    padding: 30px 14px 24px;
  }

  .clock {
    gap: 5px;
  }

  .clock__value {
    font-size: clamp(1.7rem, 10vw, 2.45rem);
    padding: 10px 2px;
  }

  .clock__label {
    font-size: 7.5px;
    letter-spacing: 0.1em;
  }

  .stage__note {
    margin-top: 26px;
    font-size: 0.9rem;
  }

  .content {
    padding-top: 26px;
  }

  .content__body p {
    font-size: 1rem;
    line-height: 1.65;
  }
}

.stage[data-mode="clock"] {
  aspect-ratio: auto;
  min-height: 420px;
}

.stage[data-mode="player"] {
  aspect-ratio: 16 / 9;
}

/* ==========================================================================
   Alpenverein-Ausgabe: Anmeldung, Chat, helle Bühne
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.stage {
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent),
              0 18px 40px -24px color-mix(in srgb, var(--text) 30%, transparent);
}

.eyebrow { color: var(--brand-ink); font-weight: 600; }

/* --- Angemeldet als … ---------------------------------------------------- */
.whoami {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  text-align: right;
}
.whoami__who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.whoami__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, white 62%, var(--header-bg));
}
.whoami__name {
  font-size: 0.9375rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 34ch;
}
.whoami__out {
  padding: 7px 14px;
  border: 1px solid color-mix(in srgb, white 35%, transparent);
  border-radius: 999px;
  background: transparent;
  color: white;
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}
.whoami__out:hover { background: color-mix(in srgb, white 12%, transparent); }

/* --- Zugangsformular ----------------------------------------------------- */
.gate {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--text) 30%, transparent);
}
.gate__info {
  position: relative;
  padding: clamp(28px, 4vw, 52px);
  background: linear-gradient(160deg, color-mix(in srgb, var(--header-bg) 88%, var(--brand)) 0%, var(--header-bg) 70%);
  color: white;
  overflow: hidden;
}
/* Gipfel im Hintergrund der Infospalte */
.gate__info::after {
  content: "";
  position: absolute;
  left: -5%; right: -5%; bottom: 0;
  height: 42%;
  background: color-mix(in srgb, white 6%, transparent);
  clip-path: polygon(0 100%, 0 62%, 14% 40%, 24% 55%, 40% 12%, 52% 38%, 61% 26%, 76% 58%, 88% 30%, 100% 50%, 100% 100%);
  pointer-events: none;
}
.gate__info > * { position: relative; z-index: 1; }
.gate__info .tally {
  color: white;
  border-color: color-mix(in srgb, white 30%, transparent);
  background: color-mix(in srgb, white 8%, transparent);
  margin-bottom: 22px;
}
.gate__title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.gate__intro {
  margin: 0 0 22px;
  max-width: 46ch;
  color: color-mix(in srgb, white 80%, var(--header-bg));
}
.gate__when {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 22px;
  padding: 12px 16px;
  border-left: 3px solid var(--brand);
  background: color-mix(in srgb, white 7%, transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.gate__when span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, white 62%, var(--header-bg));
}
.gate__points {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: color-mix(in srgb, white 86%, var(--header-bg));
}
.gate__points li { position: relative; padding: 5px 0 5px 26px; }
.gate__points li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.72em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}

.gate__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(28px, 4vw, 52px);
}
.gate__error {
  margin: 0;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--live) 45%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--live) 8%, var(--surface));
  color: color-mix(in srgb, var(--live) 75%, var(--text));
  font-size: 0.9375rem;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 0.875rem; font-weight: 600; }
.field__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.field__input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}

.check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: white;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn-primary:hover { filter: brightness(0.94); }
.btn-primary:active { transform: translateY(1px); }

/* --- Bühne + Chat nebeneinander ----------------------------------------- */
.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: stretch;
}
/* Höhe 0 + min-height 100 %: der Chat übernimmt die Höhe der Bühne,
   ohne die Zeile selbst wachsen zu lassen. */
.live-grid .chat { height: 0; min-height: 100%; }

.chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--text) 30%, transparent);
}
.chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 60%, var(--surface));
}
.chat__title { margin: 0; font-size: 1rem; font-weight: 700; }
.chat__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.chat__status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
.chat__status.is-bad::before { background: var(--live); }

.chat__list {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chat__empty {
  padding: 30px 22px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
}

.msg { padding: 9px 18px; }
.msg + .msg { border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.msg__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  font-size: 0.8125rem;
}
.msg__name { font-weight: 700; }
.msg__medium { color: var(--brand-ink); font-weight: 500; }
.msg__time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.msg__text {
  margin: 3px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg--mod { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); box-shadow: inset 3px 0 0 var(--brand); }
.msg--pending { opacity: 0.66; }
.msg__flag {
  display: inline-block;
  margin-top: 5px;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--standby) 16%, transparent);
  color: color-mix(in srgb, var(--standby) 60%, var(--text));
  font-size: 11px;
  font-weight: 600;
}

.chat__form {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.chat__input {
  display: block;
  width: 100%;
  min-height: 58px;
  max-height: 160px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  resize: vertical;
}
.chat__input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}
.chat__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
}
.chat__hint { font-size: 0.75rem; color: var(--muted); line-height: 1.35; }
.chat__hint.is-bad { color: var(--live); font-weight: 600; }
.chat__send {
  flex: none;
  padding: 9px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: white;
  font: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
}
.chat__send:hover { filter: brightness(0.94); }
.chat__send:disabled { opacity: 0.55; cursor: progress; }

.footer { background: var(--surface); }

@media (max-width: 1080px) {
  .live-grid { grid-template-columns: 1fr; }
  .live-grid .chat { height: 520px; min-height: 0; }
}

@media (max-width: 860px) {
  .gate { grid-template-columns: 1fr; }
  .masthead { padding-bottom: 18px; }
  .masthead__ridge { height: 22px; }
  .whoami__label { display: none; }
  .whoami__name { max-width: 20ch; font-size: 0.8125rem; }
  .live-grid .chat { height: 460px; }
}

@media (max-width: 480px) {
  .whoami__who { display: none; }
}