/*
 * StreamPanel der Bühnenseite /streams/{slug}: Player, Bedienleiste, DVR-Zeitleiste, Vollbild,
 * EPG-Overlay, ChatPanel, Info-Leiste und die Sprungmarken in der Programmliste darunter
 * Pfad: /var/www/moonflow-event-system/public/assets/css/stream-panel.css
 *
 * Nur die Bühnenseite lädt diese Datei ('styles' in lib/routes-app.php), und zwar direkt
 * nach components.css und vor app.css: Die Regeln stehen in der Kaskade wie die übrigen
 * Komponenten, app.css kann sie weiter überschreiben. Farben nur über Tokens
 * (tokens/project.css, CssColorTokensTest).
 */
/* --- Sprungmarke in Programmlisten (StreamPanel) ------------------------------------------ */
.schedule-item__jump {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  min-height: 32px;
  margin-top: 4px;
  padding: 4px 12px;
  box-sizing: border-box;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  color: var(--text-brand);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  cursor: pointer;
}
.schedule-item__jump:hover { background: var(--lilac-100); }
@media (pointer: coarse) { .schedule-item__jump { min-height: var(--tap-min); } }

/* --- ChatPanel (Live-Chat folgt später: Leerzustand, gesperrte Eingabe) -------------------- */
.chat-panel { display: flex; flex-direction: column; min-height: 0; height: 100%; background: var(--surface-night); color: var(--night-text); }
.chat-panel__title {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-night);
  color: var(--night-muted);
  font-size: var(--fs-hint);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
}
.chat-panel__log { display: flex; align-items: center; justify-content: center; flex: 1; min-height: 0; overflow-y: auto; padding: 8px 14px; }
.chat-panel__empty { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0; color: var(--night-muted); font-size: var(--fs-sm); text-align: center; }
.chat-panel__empty i { font-size: 22px; }
.chat-panel__form { display: flex; gap: 8px; margin: 0; padding: 12px; border-top: 1px solid var(--border-night); }
.chat-panel__input {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  border: 1px solid var(--border-night);
  border-radius: var(--radius-pill);
  background: var(--night-700);
  color: var(--night-text);
  font: inherit;
  font-size: var(--fs-sm);
}
.chat-panel__input::placeholder { color: var(--night-muted); }
.chat-panel__send { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: var(--radius-round); background: var(--mf-gradient); color: var(--text-on-brand); cursor: pointer; }
.chat-panel__input:disabled, .chat-panel__send:disabled { opacity: .5; cursor: not-allowed; }

/* --- StreamPanel (components/event/StreamPanel.jsx) ---------------------------------------- */
/* Desktop: Kopfzeile, 16:9-Player + Chat (340 px, gleiche Höhe), weiße Info-Leiste.
   .is-narrow (Panel < 760 px, setzt stream-panel.js): sticky Player, Tabs darunter.
   .sp-stage.is-full: Vollbild (Fullscreen-API oder fixierte Ebene .is-fallback),
   .is-landscape: Handy quer (automatisch), .is-idle: Bedienung nach 2,5 s ausgeblendet. */
:root {
  --sp-chat-w: 340px;
  /* Farben (--sp-black, --sp-ctl-*, --sp-epg-bg …) in tokens/project.css */
}
.stream-panel {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface-night);
  color: var(--night-text);
  box-shadow: var(--shadow-lg);
}
.sp-spacer { flex: 1; }

/* Kopfzeile */
.sp-head { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px 12px 20px; }
.sp-dot { flex: none; width: 8px; height: 8px; border-radius: var(--radius-round); background: var(--night-600); }
.sp-dot.is-live { background: var(--live); box-shadow: var(--shadow-live); animation: mf-live-pulse 1.6s var(--ease) infinite; }
.sp-name {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--night-text);
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
  line-height: var(--lh-heading);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-kind { flex: none; color: var(--night-muted); font-size: var(--fs-hint); white-space: nowrap; }
.sp-viewers { display: inline-flex; flex: none; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-medium); white-space: nowrap; }
.sp-viewers .fa-eye { color: var(--night-muted); }
.sp-viewers__unit { color: var(--night-muted); font-weight: var(--fw-book); }
.sp-chat-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-night);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--night-text);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  cursor: pointer;
}
.sp-chat-btn[aria-pressed="false"] { background: var(--night-700); }

/* Player + Chat */
.sp-body { display: grid; grid-template-columns: minmax(0, 1fr) var(--sp-chat-w); transition: grid-template-columns var(--dur-base) var(--ease); }
.stream-panel.is-chat-closed .sp-body { grid-template-columns: minmax(0, 1fr) 0; }
.sp-chat { position: relative; overflow: hidden; border-left: 1px solid var(--border-night); }
.stream-panel.is-chat-closed .sp-chat { border-left: 0; }
.sp-chat > .chat-panel { position: absolute; inset: 0; width: var(--sp-chat-w); height: auto; }
.sp-stage { position: relative; min-width: 0; background: var(--sp-black); }
.sp-stage:focus { outline: none; }
.sp-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--mf-gradient-night); }
.sp-frame > .stream-thumb { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.sp-frame > .stream-thumb .stream-thumb__placeholder { display: none; }   /* der Hinweis liegt in der Mitte */
.sp-video { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--sp-black); object-fit: contain; }

/* Zustände (ohne Zugang, revoked, Fehler) */
.sp-state {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--sp-scrim);
  text-align: center;
}
.sp-state__text { max-width: 460px; margin: 0; color: var(--night-text); font-size: var(--fs-body); font-weight: var(--fw-medium); overflow-wrap: anywhere; }
.sp-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.sp-state__actions:empty { display: none; }
.sp-state__remind { display: inline-flex; align-items: center; gap: 10px; color: var(--night-text); font-weight: var(--fw-medium); }
.sp-state--plain { margin: 0; color: var(--night-text); }
.sp-bigplay { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 0; border: 0; background: var(--sp-scrim); cursor: pointer; }
.sp-bigplay__circle {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-round);
  background: var(--mf-gradient);
  box-shadow: var(--shadow-btn);
  color: var(--text-on-brand);
  font-size: 26px;
}
.sp-bigplay__circle i { margin-left: 4px; }
.sp-bigplay:focus-visible .sp-bigplay__circle { outline: 3px solid var(--sp-accent); outline-offset: 3px; }
.sp-loading { position: absolute; inset: 0; z-index: 1; display: none; place-items: center; color: var(--night-text); font-size: 28px; pointer-events: none; }
.stream-panel.is-loading .sp-loading { display: grid; }
.sp-flash {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 6;
  max-width: 80%;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--night-900);
  color: var(--night-text);
  font-size: var(--fs-sm);
  transform: translateX(-50%);
  animation: mf-fade-up var(--dur-base) var(--ease-out);
}

/* Bedienleiste */
.sp-controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 32px 10px 8px; background: var(--overlay-video); transition: opacity var(--dur-base) var(--ease); }
.sp-bar { display: flex; align-items: center; gap: 2px; min-width: 0; }
.sp-ctl {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-on-brand);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.sp-ctl:hover { background: var(--sp-ctl-hover); }
.sp-ctl[aria-pressed="true"], .sp-ctl[aria-expanded="true"] { background: var(--sp-ctl-on); }
.sp-ctl:focus-visible, .sp-live:focus-visible, .sp-seek__range:focus-visible { outline: 2px solid var(--sp-accent); outline-offset: 1px; }
.sp-ctl__text { font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.sp-ctl__badge { font-size: var(--fs-hint); font-weight: var(--fw-bold); }
.sp-live {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 26px;
  margin-left: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--sp-ctl-hover);
  color: var(--text-on-brand);
  font: inherit;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-overline);
  cursor: pointer;
}
.sp-live__dot { width: 7px; height: 7px; border-radius: var(--radius-round); background: var(--night-muted); }
/* "LIVE" rot, solange der Zuschauer am Live-Punkt ist (player.js setzt .is-live) */
.sp-live.is-live { background: var(--live); cursor: default; }
.sp-live.is-live .sp-live__dot { background: var(--text-on-brand); animation: mf-live-pulse 1.6s var(--ease) infinite; }
.sp-quality { position: relative; flex: none; }
.sp-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  display: grid;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--border-night);
  border-radius: var(--radius-md);
  background: var(--night-900);
  box-shadow: var(--shadow-lg);
}
.sp-menu__head { padding: 6px 10px; color: var(--night-muted); font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-overline); text-transform: uppercase; }
.sp-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--night-text);
  font: inherit;
  font-size: var(--fs-sm);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.sp-menu__item:hover, .sp-menu__item:focus-visible { background: var(--sp-ctl-hover); outline: none; }
.sp-menu__item[aria-checked="true"] { background: var(--sp-soft); }
.sp-menu__item .fa-check { width: 14px; color: var(--sp-accent); opacity: 0; }
.sp-menu__item[aria-checked="true"] .fa-check { opacity: 1; }
.sp-menu__hd { margin-left: auto; color: var(--night-muted); font-size: 10px; font-weight: var(--fw-bold); }

/* DVR-Zeitleiste (fehlt im Design): dünn, gespielt in Lila, Puffer heller */
.sp-seek { display: flex; align-items: center; gap: 10px; padding: 0 8px 2px; }
.sp-seek__range {
  --played: 100%;
  --buffered: 100%;
  flex: 1;
  min-width: 0;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.sp-seek__range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--mf-purple-light) 0 var(--played), var(--sp-seek-buffer) var(--played) var(--buffered), var(--sp-seek-track) var(--buffered) 100%);
}
.sp-seek__range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--mf-purple-light) 0 var(--played), var(--sp-seek-buffer) var(--played) var(--buffered), var(--sp-seek-track) var(--buffered) 100%);
}
.sp-seek__range::-webkit-slider-thumb { width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: var(--radius-round); background: var(--text-on-brand); -webkit-appearance: none; appearance: none; }
.sp-seek__range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: var(--radius-round); background: var(--text-on-brand); }
.sp-seek__time { flex: none; min-width: 52px; color: var(--night-text); font-size: var(--fs-hint); font-variant-numeric: tabular-nums; text-align: right; }

/* Vollbild */
.sp-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 40px;
  background: var(--sp-topbar-bg);
  color: var(--text-on-brand);
  transition: opacity var(--dur-base) var(--ease);
}
.sp-topbar__name { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: var(--fw-bold); white-space: nowrap; }
.sp-topbar__title { min-width: 0; overflow: hidden; color: var(--night-muted); text-overflow: ellipsis; white-space: nowrap; }
.sp-topbar__viewers { display: inline-flex; flex: none; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.sp-stage.is-full { display: flex; align-items: center; justify-content: center; }
.sp-stage.is-fallback { position: fixed; inset: 0; z-index: 1000; }
.sp-stage.is-full .sp-frame { width: 100%; max-width: calc(100vh * 16 / 9); max-height: 100%; }
.sp-stage.is-full .sp-topbar { display: flex; }
.sp-stage.is-full.is-idle { cursor: none; }
.sp-stage.is-idle .sp-controls, .sp-stage.is-idle .sp-topbar, .sp-stage.is-idle .sp-swipe-hint { opacity: 0; pointer-events: none; }
.stream-panel.has-full .sp-top { z-index: 1001; }
html.sp-lock, html.sp-lock body { overflow: hidden; }
.sp-stage.is-landscape .sp-topbar { padding: 10px 16px 30px; }
.sp-stage.is-landscape .sp-topbar__name { font-size: var(--fs-input); }
.sp-stage.is-landscape .sp-topbar__title { font-size: var(--fs-xs); }
.sp-swipe-hint { display: none; }
.sp-stage.is-landscape .sp-swipe-hint {
  position: absolute;
  left: 50%;
  bottom: 88px;
  z-index: 3;
  display: block;
  margin: 0;
  color: var(--sp-hint);
  font-size: var(--fs-2xs);
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity var(--dur-base) var(--ease);
}
.sp-stage.has-overlay .sp-swipe-hint { display: none; }
.sp-fschat {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: 340px;
  max-width: 360px;
  border-left: 1px solid var(--border-night);
  background: var(--sp-fschat-bg);
  animation: mf-fade-up var(--dur-base) var(--ease-out);
}
.sp-stage.is-landscape .sp-fschat { width: 42%; }
.sp-fschat__slot { flex: 1; min-height: 0; }
.sp-fschat .chat-panel { background: transparent; }
.sp-fschat__close { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; border: 0; border-radius: 8px; background: var(--sp-soft); color: var(--text-on-brand); cursor: pointer; }

/* EPG-Overlay (components/event/EpgOverlay.jsx) */
.sp-epg { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; border-top: 1px solid var(--border-night); background: var(--sp-epg-bg); color: var(--night-text); }
.sp-stage.is-full .sp-epg { top: 38%; }
.sp-stage.is-landscape .sp-epg { top: 30%; }
.epg { --epg-row: 52px; --epg-lane: 170px; display: contents; }
.sp-epg.is-compact .epg { --epg-row: 44px; --epg-lane: 110px; }
.epg__head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.sp-epg.is-compact .epg__head { padding: 10px 12px; }
.epg__title { font-family: var(--font-display); font-size: 17px; font-weight: var(--fw-bold); }
.epg__now { color: var(--night-muted); font-size: var(--fs-hint); font-variant-numeric: tabular-nums; }
.epg__close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 10px; background: var(--sp-soft); color: var(--text-on-brand); cursor: pointer; }
.epg__scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; }
.epg__grid { display: flex; min-height: 100%; }
.epg__lanes { flex: none; width: var(--epg-lane); padding-top: 24px; }
.epg__lane {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: var(--epg-row);
  padding: 0 12px 0 18px;
  box-sizing: border-box;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--night-text);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-align: left;
  cursor: pointer;
}
.sp-epg.is-compact .epg__lane { padding-left: 12px; font-size: var(--fs-hint); }
.epg__lane:hover { background: var(--sp-soft); }
.epg__lane.is-current { border-left-color: var(--sp-accent); background: var(--sp-soft); font-weight: var(--fw-bold); }
.epg__lane-dot { flex: none; width: 7px; height: 7px; border-radius: var(--radius-round); background: var(--night-600); }
.epg__lane-dot.is-live { background: var(--live); }
.epg__lane-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epg__timeline { position: relative; flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; }
.epg__canvas { position: relative; width: var(--epg-w); height: calc(24px + var(--epg-rows) * var(--epg-row) + 6px); }
.epg__hour { position: absolute; top: 0; bottom: 0; left: var(--x); border-left: 1px solid var(--border-night); }
.epg__hour span { position: absolute; top: 4px; left: 6px; color: var(--night-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.epg__row { position: absolute; left: 0; right: 0; top: calc(24px + var(--i) * var(--epg-row)); height: var(--epg-row); }
.epg__block {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: var(--x);
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: var(--w);
  padding: 0 10px;
  box-sizing: border-box;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--track-soft);
  color: var(--track);
  font: inherit;
  text-align: left;
  opacity: .75;
  cursor: pointer;
}
.epg__block.is-past { opacity: .35; }
.epg__block.is-running { opacity: 1; box-shadow: 0 0 0 2px var(--text-on-brand); }
.epg__block:focus-visible { outline: 2px solid var(--sp-accent); outline-offset: 2px; opacity: 1; }
.epg__block-title { overflow: hidden; color: var(--ink-900); font-size: 12.5px; font-weight: var(--fw-bold); text-overflow: ellipsis; white-space: nowrap; }
.epg__block-time { font-size: 11px; font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-epg.is-compact .epg__block-title { font-size: 11px; }
.sp-epg.is-compact .epg__block-time { display: none; }
.epg__now-line { position: absolute; top: 20px; bottom: 0; left: var(--x); z-index: 2; width: 2px; background: var(--live); pointer-events: none; }
.epg__now-line::before { content: ""; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: var(--radius-round); background: var(--live); }

/* Info-Leiste */
.sp-info { display: grid; gap: 8px; padding: 20px 24px; background: var(--surface-card); color: var(--text-body); }
.sp-info__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.sp-info__meta:empty { display: none; }
.sp-info__time { color: var(--text-strong); font-family: var(--font-display); font-size: var(--fs-sm); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.sp-info__host { margin: 0; color: var(--text-muted); font-size: var(--fs-xs); }
.sp-info__title { margin: 0; color: var(--text-heading); font-family: var(--font-display); font-size: 1.75rem; font-weight: var(--fw-black); letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.sp-info__desc { max-width: 720px; margin: 0; color: var(--text-strong); font-size: var(--fs-input); line-height: 1.65; }
.sp-info__desc:empty { display: none; }
.sp-info__next { margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--border-hairline); color: var(--text-muted); font-size: var(--fs-sm); }
.sp-info__next strong { color: var(--text-strong); font-weight: var(--fw-medium); }

/* Handy-Layout (Panel < 760 px) */
.stream-panel.is-narrow { overflow: visible; border-radius: 0; background: transparent; box-shadow: none; }
.stream-panel.is-narrow .sp-top { position: sticky; top: var(--header-h); z-index: 6; display: flex; flex-direction: column; background: var(--night-900); }
.stream-panel.is-narrow .sp-head { order: 2; gap: 10px; padding: 10px 16px; background: var(--surface-night); }
.stream-panel.is-narrow .sp-name { font-size: var(--fs-input); }
.stream-panel.is-narrow .sp-viewers__unit, .stream-panel.is-narrow .sp-chat-btn, .stream-panel.is-narrow .sp-chat { display: none; }
.stream-panel.is-narrow .sp-body { display: block; }
.stream-panel.is-narrow .sp-ctl__text { display: none; }
.stream-panel.is-narrow .sp-info { gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--border-hairline); }
.stream-panel.is-narrow .sp-info__title { font-size: 1.1875rem; letter-spacing: -.01em; line-height: 1.2; }
.stream-panel.is-narrow .sp-info > .sp-info__desc, .stream-panel.is-narrow .sp-info .sp-info__host { display: none; }
.stream-panel.is-narrow .sp-info__next { margin: 0; padding: 0; border: 0; font-size: var(--fs-xs); }
.sp-tabs__bar { position: sticky; top: calc(var(--header-h) + var(--sp-sticky-h, 0px)); z-index: 5; padding: 12px 16px; background: var(--surface-page); }
.sp-tabs__list { display: flex; width: 100%; }
.sp-tabs__list .tabs__item { flex: 1; border: 0; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.sp-tabs__list .tabs__item:not(.is-active) { background: transparent; }
.sp-tabs__panel { padding: 0 16px; }
.sp-tabs__panel--chat { height: max(340px, calc(100dvh - var(--header-h) - var(--sp-sticky-h, 0px) - 160px)); margin: 0 16px; padding: 0; overflow: hidden; border-radius: var(--radius-lg); }
.sp-tabs__panel--info { display: grid; gap: 12px; padding-top: 4px; }
.sp-tabs__panel--info .sp-info__desc { display: block; }
/* Ohne Player (Zustände ohne Zugang) gibt es kein JS-Layout: schmale Panels ohne Chat-Spalte */
.stream-panel:not([data-sp-state="ready"]) { container: sp-static / inline-size; }
@container sp-static (max-width: 759px) {
  .sp-body { display: block; }
  .sp-chat, .sp-viewers__unit { display: none; }
}
@media (max-width: 767px) {
  /* Handy: Panel bis an den Rand; vor dem ersten JS-Layout keine Chat-Spalte */
  .stream-panel { margin: 0 calc(-1 * var(--space-4)); border-radius: 0; }
  .stream-panel:not(.is-narrow) .sp-body { display: block; }
  .stream-panel:not(.is-narrow) .sp-chat, .sp-viewers__unit { display: none; }
  .sp-state .btn--lg { padding: .65rem 1.25rem; font-size: var(--fs-input); }
  .sp-state__text { font-size: var(--fs-sm); }
}
