/* Presentation only: playback, telemetry and source settings remain in index.html. */
:root {
  --bg-body: #101112;
  --bg-card: #17191b;
  --text-main: #f3f4f4;
  --text-muted: #a5abad;
  --text-dim: #80898d;
  --border-subtle: #2a2e30;
  --radius-md: 8px;
}
body { background: #101112; }
body, button, input, a { letter-spacing: 0; }
button, a, input { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid #70d6e4;
  outline-offset: 3px;
}
.top-header.home-command-bar {
  width: 100%;
  max-width: none;
  min-height: 76px;
  flex-shrink: 0;
  margin: 0;
  padding: 12px 24px;
  gap: 24px;
  border: 0;
  border-bottom: 1px solid #2a2e30;
  border-radius: 0;
  background: #161819;
  box-shadow: none;
  backdrop-filter: none;
  transition: none;
}
.top-header::before, .logo-aura-glow, .ambient-glow, .standby-wave { display: none; }
.brand-logo-wrap, .brand-logo-wrap:hover { transform: none; filter: none; }
.brand-logo-img { width: 184px; height: auto; max-height: 52px; object-fit: contain; filter: none; }
.header-center-cluster { gap: 8px; }
.command-pill, .header-help-btn {
  height: 44px;
  min-height: 44px;
  border: 1px solid #363b3e;
  border-radius: 6px;
  background: #202426;
  box-shadow: none;
  color: #e9edef;
  font-size: 14px;
  font-weight: 700;
  transition: background .15s, border-color .15s;
}
.command-pill:hover, .header-help-btn:hover {
  background: #2a3033;
  border-color: #728087;
  box-shadow: none;
  transform: none;
}
.command-pill[aria-expanded="true"] {
  background: #193236;
  border-color: #64c9d8;
  color: #9de5ee;
}
.command-icon { width: 24px; height: 24px; border: 0; border-radius: 0; background: none; color: #8bd9e4; }
.remote-command { padding: 0 12px; gap: 8px; }
.header-help-btn { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; color: #e7cc80; cursor: pointer; font-family: inherit; }
.header-help-btn .help-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.stream-help-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: min(90dvh, 760px);
  padding: 0;
  overflow: auto;
  border: 1px solid #3a4448;
  border-radius: 8px;
  background: #171b1e;
  color: #f3f4f4;
  box-shadow: 0 20px 70px #000a;
}
.stream-help-dialog::backdrop { background: #050708d9; }
.stream-help-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid #30383b; }
.stream-help-header h2 { margin: 0; font-size: 17px; line-height: 1.5; }
.stream-help-close { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid #3d4549; border-radius: 6px; background: #252b2e; color: #d0d7da; cursor: pointer; }
.stream-help-close:hover { background: #343d41; }
.stream-help-content { display: grid; gap: 14px; padding: 16px; }
.stream-help-player { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: #050607; }
.stream-help-player:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.stream-help-player video { display: block; width: 100%; height: 100%; object-fit: contain; background: #050607; }
.stream-help-controls { position: absolute; inset: auto 0 0; z-index: 2; padding: 24px 12px 6px; color: #fff; background: linear-gradient(transparent, #000d); direction: ltr; }
.stream-help-seek { display: block; width: 100%; height: 4px; margin: 0 0 6px; accent-color: #efc61a; cursor: pointer; }
.stream-help-control-row, .stream-help-control-group { display: flex; align-items: center; }
.stream-help-control-row { justify-content: space-between; gap: 12px; }
.stream-help-control-group { gap: 8px; }
.stream-help-player .player-btn { width: 40px; height: 40px; padding: 0; color: #fff; }
.stream-help-player .player-btn:hover { color: #f1cb29; }
.stream-help-player .player-btn svg { width: 20px; height: 20px; }
.stream-help-player svg[hidden] { display: none !important; }
.stream-help-player #stream-help-quality-toggle { width: auto; min-width: 62px; gap: 5px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.stream-help-player #stream-help-quality-toggle svg { width: 19px; height: 19px; }
.stream-help-time { color: #e8ecee; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stream-help-volume { width: 66px; height: 4px; accent-color: #fff; }
.stream-help-quality-wrap { position: relative; }
.stream-help-quality-menu { position: absolute; right: 0; bottom: 42px; display: grid; gap: 3px; width: max-content; min-width: 190px; padding: 8px; border: 1px solid #3b4245; border-radius: 6px; background: #171b1e; box-shadow: 0 8px 28px #0009; direction: rtl; }
.stream-help-quality-menu[hidden] { display: none; }
.stream-help-quality-menu strong { padding: 5px 8px; color: #aab5ba; font-size: 12px; }
.stream-help-quality-menu button { min-height: 36px; padding: 6px 9px; border: 0; border-radius: 4px; background: transparent; color: #edf1f2; text-align: right; font: inherit; font-size: 12px; cursor: pointer; }
.stream-help-quality-menu button:hover, .stream-help-quality-menu button.is-selected { background: #293236; color: #f1d363; }
.stream-help-player:fullscreen .stream-help-controls { padding: 48px 24px 14px; }
.stream-help-status { min-height: 0; margin: 0; color: #f0b7b7; font-size: 13px; }
.stream-help-status:empty { display: none; }
.viewer-count-badge {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  padding: 0 4px;
  color: #a5abad;
  font-size: 13px;
  white-space: nowrap;
}
.viewer-count-num { color: #f3f4f4; font-variant-numeric: tabular-nums; }
.viewer-dot, .obs-dot, .remote-status-dot { width: 6px; height: 6px; box-shadow: none !important; animation: none !important; }
.obs-command.obs-live { color: #a7e8c0; border-color: #3c7653; background: #192c21; box-shadow: none; }
.obs-badge.obs-live .obs-dot { background: #61cc8c; }
.obs-command.obs-recording { background: #302a1c; border-color: #786539; }
.obs-badge.obs-disconnected { opacity: 1; color: #9ba3a8; }
.stage-wrapper { padding: 16px; gap: 16px; }
.player-theater-card { border-color: #25282a; border-radius: 6px; box-shadow: none; }
#player-card.video-fill #player video { object-fit: cover !important; }
.video-fit-select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 4px 6px;
  border: 1px solid #40484c;
  border-radius: 4px;
  background: #202426;
  color: #f3f4f4;
  font: inherit;
  font-size: 12px;
  direction: rtl;
}
.offline-overlay {
  container: standby / size;
  background: #101314;
  padding: 24px;
  text-align: center;
}
.standby-composition {
  width: min(440px, 100%);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.standby-identity {
  display: grid;
  place-items: center;
  position: relative;
  width: 144px;
  height: 136px;
  flex: 0 0 auto;
}
.standby-identity::before, .standby-identity::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: #42606a;
  border-style: solid;
}
.standby-identity::before { top: 0; right: 0; border-width: 1px 1px 0 0; }
.standby-identity::after { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.standby-identity img { display: block; width: 112px; height: 112px; object-fit: contain; }
.standby-copy { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.standby-status-tag {
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
  color: #cbbd90;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0;
}
.standby-dot-pulse { animation: none; box-shadow: none; width: 5px; height: 5px; background: #d9bf79; }
.offline-title { font-size: 28px; line-height: 1.4; font-weight: 700; color: #e9f0f1; overflow-wrap: anywhere; }
.standby-signal { width: 224px; max-width: 100%; height: 4px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; direction: ltr; }
.standby-signal span:nth-child(1) { background: #b0b9bc; }
.standby-signal span:nth-child(2) { background: #d3be78; }
.standby-signal span:nth-child(3) { background: #76c4cd; }
.standby-signal span:nth-child(4) { background: #83b49a; }
.standby-signal span:nth-child(5) { background: #a09ab5; }
.standby-signal span:nth-child(6) { background: #bd8581; }
.standby-signal span:nth-child(7) { background: #638cac; }
.scan-badge { padding: 0; border: 0; background: none; color: #9aa8ad; font-size: 12px; line-height: 1.5; gap: 10px; }
.standby-pips { display: flex; align-items: center; gap: 4px; height: 6px; direction: ltr; }
.standby-pips i { width: 3px; height: 3px; background: #8bced6; animation: standby-pip 1.8s ease-in-out infinite; }
.standby-pips i:nth-child(2) { animation-delay: .2s; }
.standby-pips i:nth-child(3) { animation-delay: .4s; }
@keyframes standby-pip { 0%, 70%, 100% { opacity: .25; } 35% { opacity: 1; } }
/* Adapt to the actual video area, including portrait phones and Remote splits. */
@container standby (max-height: 300px) {
  .standby-composition { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 12px 18px; width: min(344px, 100%); }
  .standby-identity { width: 68px; height: 68px; }
  .standby-identity img { width: 56px; height: 56px; }
  .standby-identity::before, .standby-identity::after { width: 12px; height: 12px; }
  .standby-copy { align-items: flex-start; text-align: right; gap: 6px; }
  .offline-title { font-size: 20px; }
  .standby-signal { grid-column: 1 / -1; width: 100%; height: 3px; }
  .scan-badge { grid-column: 1 / -1; justify-content: center; font-size: 11px; }
}
@container standby (max-width: 330px) {
  .standby-composition { column-gap: 12px; }
  .offline-title { font-size: 18px; }
  .standby-status-tag { font-size: 11px; }
}
@container standby (max-height: 155px) {
  .standby-composition { grid-template-columns: 52px minmax(0, 1fr); gap: 8px 12px; }
  .standby-identity { width: 52px; height: 52px; }
  .standby-identity img { width: 44px; height: 44px; }
  .standby-copy { gap: 3px; }
  .offline-title { font-size: 18px; }
  .standby-status-tag { font-size: 10px; }
}
.remote-shell { border-radius: 8px; border-color: #363b3e; background: #17191b; box-shadow: none; backdrop-filter: none; }
.remote-header { min-height: 60px; flex-shrink: 0; padding: 10px 12px; background: #202426; border-color: #363b3e; }
.side-title { font-size: 14px; gap: 16px; }
.remote-close-btn, .obs-panel-close {
  flex: 0 0 36px;
  min-width: 36px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid #3d4549;
  background: #252b2e;
  color: #d0d7da;
  transform: none;
}
.obs-command-panel {
  width: min(360px, calc(100vw - 24px));
  top: calc(var(--header-h, 76px) + 12px);
  padding: 18px;
  max-height: calc(100dvh - var(--header-h, 76px) - 24px);
  overflow-y: auto;
  border: 1px solid #41494d;
  border-radius: 8px;
  background: #1b1f21;
  box-shadow: 0 16px 40px #0006;
  backdrop-filter: none;
}
.obs-panel-head { margin: 0 0 16px; align-items: flex-start; }
.obs-panel-title { min-width: 0; gap: 6px; }
.obs-panel-title strong { font-size: 16px; }
.obs-panel-title span { color: #aab5ba; font-size: 13px; }
.obs-home-actions { gap: 10px; }
.obs-home-btn { min-width: 0; min-height: 46px; padding: 8px; border-radius: 6px; font-size: 14px; }
.obs-home-btn.start { background: #294b36; border-color: #558969; color: #c6f1d5; }
.obs-home-btn.stop { background: #412a2e; border-color: #85545c; color: #f3c1c8; }
.obs-home-btn:disabled { opacity: .4; cursor: not-allowed; }
.obs-home-error { min-height: 0; margin-top: 10px; line-height: 1.6; }
.obs-home-error:empty { display: none; }
.auth-overlay { background: #101112ef; backdrop-filter: blur(8px); }
.auth-card { border-radius: 8px; border-color: #485054; background: #1b1f21; box-shadow: 0 16px 48px #0005; }
.auth-input { border-radius: 6px; background: #111516; }
.auth-submit { border-radius: 6px; background: #83d6e2; color: #132529; }
.stats-twitch-modal { border-color: #40484c; background: #171b1e; box-shadow: 0 12px 32px #0005; }
.site-loader { background: #101112; }
.loader-fill { background: #70cbd8; }
@media (min-width: 981px) {
  body.remote-open .stage-wrapper { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 980px) {
  .top-header.home-command-bar { padding: 10px 16px; gap: 12px; }
  .brand-logo-img { width: 155px; }
  .remote-shell { left: auto; right: 12px; bottom: 12px; width: min(380px, calc(100vw - 24px)); height: min(70dvh, 600px); }
}
@media (max-width: 640px) {
  .top-header.home-command-bar { min-height: 64px; padding: 10px 12px; gap: 10px; grid-template-columns: minmax(0, 1fr) auto; }
  .brand-logo-img { width: 150px; max-width: 100%; }
  .header-left-cluster { min-width: 0; }
  .header-right-cluster { gap: 10px; }
  .header-help-btn { padding: 0 10px; font-size: 13px; }
  .stream-help-dialog { width: calc(100vw - 20px); max-height: 92dvh; }
  .stream-help-header { padding: 10px 12px; }
  .stream-help-header h2 { font-size: 15px; }
  .stream-help-content { gap: 12px; padding: 12px; }
  .stream-help-control-row { gap: 6px; }
  .stream-help-control-group { gap: 3px; }
  .stream-help-volume { display: none; }
  .stream-help-player .player-btn { width: 38px; height: 38px; }
  .stream-help-time { font-size: 11px; }
  .header-center-cluster { justify-content: flex-start; border-top: 1px solid #303537; padding-top: 10px; }
  body.remote-disabled.obs-disabled .header-center-cluster { display: none; }
  .viewer-count-badge { font-size: 12px; }
  .stage-wrapper { padding: 8px; gap: 8px; }
  .obs-command-panel { top: calc(var(--header-h, 120px) + 8px); }
  .offline-overlay { padding: 16px; }
  .auth-card { padding: 24px; }
}
@media (max-width: 360px) {
  .brand-logo-img { width: 122px; }
  .header-right-cluster { gap: 6px; }
  .header-help-btn .help-label { display: none; }
  .viewer-count-badge { font-size: 11px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .top-header *, .remote-shell, .obs-command-panel { transition: none; }
  .standby-pips i { animation: none; opacity: .7; }
}
