/* 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-schedule-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-schedule-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-schedule-btn { padding: 0 14px; color: #e7cc80; }
.header-schedule-btn .schedule-icon { width: 18px; height: 18px; }
.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; }
.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-schedule-btn { padding: 0 10px; font-size: 13px; }
  .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; }
  .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; }
}
