:root {
  --sc-bg: #0b0d12;
  --sc-bg-soft: #10141c;
  --sc-surface: rgba(17, 21, 30, 0.86);
  --sc-surface-strong: #151a24;
  --sc-border: rgba(148, 163, 184, 0.18);
  --sc-border-strong: rgba(148, 163, 184, 0.32);
  --sc-text: #f8fafc;
  --sc-muted: #94a3b8;
  --sc-subtle: #64748b;
  --sc-accent: #5b8cff;
  --sc-accent-strong: #3f6ff0;
  --sc-success: #34d399;
  --sc-warning: #fbbf24;
  --sc-danger: #fb7185;
  --sc-radius-sm: 10px;
  --sc-radius: 16px;
  --sc-radius-lg: 24px;
  --sc-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --sc-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html.smashco-ui-enabled,
html.smashco-ui-enabled body {
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 12%, rgba(91, 140, 255, 0.22), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(52, 211, 153, 0.12), transparent 24%),
    linear-gradient(135deg, #080a0f 0%, #0f1420 52%, #111827 100%) !important;
  color: var(--sc-text);
  font-family: var(--sc-font);
}

html.smashco-ui-enabled #header {
  background: rgba(8, 10, 15, 0.72) !important;
  border-bottom: 1px solid var(--sc-border);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.22);
}

html.smashco-ui-enabled #logoname {
  color: var(--sc-text) !important;
  font-weight: 760;
  letter-spacing: -0.04em;
}

html.smashco-ui-enabled #logoname #qos {
  color: var(--sc-accent) !important;
}

html.smashco-ui-enabled .smashco-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

html.smashco-ui-enabled .smashco-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sc-accent), var(--sc-success));
  box-shadow: 0 0 22px rgba(91, 140, 255, 0.7);
}

html.smashco-ui-enabled button,
html.smashco-ui-enabled .gobutton,
html.smashco-ui-enabled input[type="button"],
html.smashco-ui-enabled input[type="submit"] {
  border-radius: var(--sc-radius-sm) !important;
  border: 1px solid var(--sc-border) !important;
  background: linear-gradient(180deg, rgba(91, 140, 255, 0.95), rgba(63, 111, 240, 0.95)) !important;
  color: white !important;
  box-shadow: 0 10px 28px rgba(63, 111, 240, 0.24);
  font-family: var(--sc-font) !important;
  font-weight: 650;
}

html.smashco-ui-enabled input,
html.smashco-ui-enabled textarea,
html.smashco-ui-enabled select {
  border-radius: var(--sc-radius-sm) !important;
  border: 1px solid var(--sc-border-strong) !important;
  background: rgba(15, 23, 42, 0.72) !important;
  color: var(--sc-text) !important;
  font-family: var(--sc-font) !important;
}

html.smashco-ui-enabled #mainmenu,
html.smashco-ui-enabled #directorlayout,
html.smashco-ui-enabled #controlButtons,
html.smashco-ui-enabled #container,
html.smashco-ui-enabled #head1,
html.smashco-ui-enabled #head2,
html.smashco-ui-enabled #head3,
html.smashco-ui-enabled #head4,
html.smashco-ui-enabled #head5 {
  color: var(--sc-text);
}

html.smashco-ui-enabled .smashco-shell-badge {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 999998;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(8, 10, 15, 0.74);
  border: 1px solid var(--sc-border);
  color: var(--sc-muted);
  font: 12px/1.2 var(--sc-font);
  backdrop-filter: blur(16px);
  pointer-events: none;
}

html.smashco-ui-enabled.smashco-ui-enabled body.smashco-lobby-mode > *:not(.smashco-lobby):not(.smashco-shell-badge) {
  visibility: hidden;
}

html.smashco-ui-enabled body.smashco-lobby-mode #header,
html.smashco-ui-enabled body.smashco-lobby-mode #header * {
  visibility: visible;
}

html.smashco-ui-enabled .smashco-lobby {
  visibility: visible;
  position: relative;
  z-index: 30;
  width: min(1120px, calc(100vw - 40px));
  margin: 92px auto 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  color: var(--sc-text);
}

html.smashco-ui-enabled .smashco-hero-card,
html.smashco-ui-enabled .smashco-status-card {
  border: 1px solid var(--sc-border);
  background: linear-gradient(180deg, rgba(21, 26, 36, 0.92), rgba(12, 16, 24, 0.88));
  border-radius: var(--sc-radius-lg);
  box-shadow: var(--sc-shadow);
  backdrop-filter: blur(22px);
}

html.smashco-ui-enabled .smashco-hero-card {
  padding: clamp(28px, 4vw, 56px);
}

html.smashco-ui-enabled .smashco-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--sc-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html.smashco-ui-enabled .smashco-kicker span,
html.smashco-ui-enabled .smashco-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sc-success);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.72);
}

html.smashco-ui-enabled .smashco-hero-card h1 {
  max-width: 820px;
  margin: 0;
  color: var(--sc-text);
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.94;
  letter-spacing: -0.07em;
  font-weight: 820;
}

html.smashco-ui-enabled .smashco-hero-copy {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--sc-muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
}

html.smashco-ui-enabled .smashco-room-card {
  max-width: 620px;
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius);
  background: rgba(8, 10, 15, 0.42);
  display: grid;
  gap: 10px;
}

html.smashco-ui-enabled .smashco-room-card label {
  color: var(--sc-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

html.smashco-ui-enabled .smashco-room-card em {
  color: var(--sc-subtle);
  font-style: normal;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

html.smashco-ui-enabled .smashco-room-card input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  font-size: 15px;
}

html.smashco-ui-enabled .smashco-role-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

html.smashco-ui-enabled .smashco-role-grid button {
  min-height: 118px;
  padding: 18px;
  text-align: left;
  border-radius: var(--sc-radius) !important;
  background: rgba(15, 23, 42, 0.7) !important;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

html.smashco-ui-enabled .smashco-role-grid button:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 140, 255, 0.62) !important;
  background: rgba(25, 34, 52, 0.92) !important;
}

html.smashco-ui-enabled .smashco-role-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--sc-text);
  font-size: 16px;
}

html.smashco-ui-enabled .smashco-role-grid span {
  display: block;
  color: var(--sc-muted);
  font-size: 13px;
  line-height: 1.45;
}

html.smashco-ui-enabled .smashco-status-card {
  align-self: start;
  padding: 22px;
  display: grid;
  gap: 14px;
  color: var(--sc-muted);
  font-size: 13px;
}

html.smashco-ui-enabled .smashco-status-card div {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 860px) {
  html.smashco-ui-enabled .smashco-lobby {
    grid-template-columns: 1fr;
    width: min(100vw - 24px, 720px);
    margin-top: 76px;
  }

  html.smashco-ui-enabled .smashco-role-grid {
    grid-template-columns: 1fr;
  }
}

html.smashco-ui-enabled body.smashco-director-mode {
  padding: 86px 24px 32px;
}

html.smashco-ui-enabled .smashco-director-shell {
  width: min(1380px, calc(100vw - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  color: var(--sc-text);
}

html.smashco-ui-enabled .smashco-director-main,
html.smashco-ui-enabled .smashco-sidebar-card {
  border: 1px solid var(--sc-border);
  background: linear-gradient(180deg, rgba(21, 26, 36, 0.92), rgba(12, 16, 24, 0.88));
  border-radius: var(--sc-radius-lg);
  box-shadow: var(--sc-shadow);
  backdrop-filter: blur(22px);
}

html.smashco-ui-enabled .smashco-director-main {
  min-height: 520px;
  padding: 26px;
}

html.smashco-ui-enabled .smashco-director-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

html.smashco-ui-enabled .smashco-director-topbar h1 {
  margin: 0;
  color: var(--sc-text);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

html.smashco-ui-enabled .smashco-director-topbar p {
  max-width: 660px;
  margin: 14px 0 0;
  color: var(--sc-muted);
  font-size: 15px;
  line-height: 1.55;
}

html.smashco-ui-enabled .smashco-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--sc-border);
  border-radius: 999px;
  color: var(--sc-muted);
  background: rgba(8, 10, 15, 0.5);
  font-size: 12px;
  font-weight: 700;
}

html.smashco-ui-enabled .smashco-live-pill span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--sc-success);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.72);
}

html.smashco-ui-enabled .smashco-director-stage {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--sc-border-strong);
  border-radius: var(--sc-radius-lg);
  background:
    radial-gradient(circle at 50% 0%, rgba(91, 140, 255, 0.14), transparent 38%),
    rgba(8, 10, 15, 0.34);
  text-align: center;
  color: var(--sc-muted);
}

html.smashco-ui-enabled .smashco-stage-label {
  color: var(--sc-text);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

html.smashco-ui-enabled .smashco-metric-grid {
  width: min(100%, 720px);
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

html.smashco-ui-enabled .smashco-metric-card,
html.smashco-ui-enabled .smashco-status-row {
  border: 1px solid var(--sc-border);
  background: rgba(15, 23, 42, 0.55);
}

html.smashco-ui-enabled .smashco-metric-card {
  padding: 14px;
  border-radius: var(--sc-radius);
  text-align: left;
}

html.smashco-ui-enabled .smashco-metric-card span,
html.smashco-ui-enabled .smashco-status-row span {
  display: block;
  color: var(--sc-subtle);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

html.smashco-ui-enabled .smashco-metric-card strong,
html.smashco-ui-enabled .smashco-status-row strong {
  display: block;
  margin-top: 7px;
  color: var(--sc-text);
  font-size: 15px;
  letter-spacing: -0.03em;
}

html.smashco-ui-enabled.smashco-cue-connected #smashco-channel-status,
html.smashco-ui-enabled.smashco-cue-connected #smashco-channel-metric {
  color: var(--sc-success);
}

html.smashco-ui-enabled .smashco-connection-card {
  display: grid;
  gap: 10px;
}

html.smashco-ui-enabled .smashco-status-row {
  padding: 12px;
  border-radius: var(--sc-radius-sm);
}

html.smashco-ui-enabled .smashco-director-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
}

html.smashco-ui-enabled .smashco-sidebar-card {
  padding: 18px;
}

html.smashco-ui-enabled .smashco-sidebar-title {
  color: var(--sc-text);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

html.smashco-ui-enabled .smashco-sidebar-card p,
html.smashco-ui-enabled .smashco-sidebar-card span {
  color: var(--sc-muted);
  font-size: 13px;
  line-height: 1.45;
}

html.smashco-ui-enabled .smashco-mini-card {
  display: grid;
  gap: 8px;
}

html.smashco-ui-enabled .smashco-mini-card strong {
  color: var(--sc-success);
  font-size: 22px;
  letter-spacing: -0.04em;
}

html.smashco-ui-enabled #remote-cue-panel.is-docked {
  position: static;
  width: 100%;
  max-width: none;
  margin-top: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--sc-text);
}

html.smashco-ui-enabled #remote-cue-panel.is-docked .rd-panel-header {
  margin-bottom: 12px;
}

html.smashco-ui-enabled #remote-cue-panel.is-docked .rd-panel-title,
html.smashco-ui-enabled #remote-cue-panel.is-docked .rd-panel-subtitle {
  display: none;
}

html.smashco-ui-enabled #remote-cue-panel.is-docked .rd-status-pill {
  background: rgba(15, 23, 42, 0.82);
  border-color: var(--sc-border);
  color: var(--sc-muted);
}

html.smashco-ui-enabled #remote-cue-panel.is-docked .rd-label {
  color: var(--sc-muted);
}

html.smashco-ui-enabled #remote-cue-panel.is-docked textarea,
html.smashco-ui-enabled #remote-cue-panel.is-docked input,
html.smashco-ui-enabled #remote-cue-panel.is-docked select {
  background: rgba(15, 23, 42, 0.7) !important;
  border-color: var(--sc-border-strong) !important;
  color: var(--sc-text) !important;
}

html.smashco-ui-enabled #remote-cue-panel.is-docked .rd-btn-primary {
  background: linear-gradient(180deg, var(--sc-accent), var(--sc-accent-strong));
  color: white;
}

html.smashco-ui-enabled #remote-cue-panel.is-docked .rd-btn-secondary {
  background: rgba(15, 23, 42, 0.72);
  border-color: var(--sc-border);
  color: var(--sc-text);
}

html.smashco-ui-enabled body.smashco-streamer-mode {
  overflow: hidden;
  background: #020617 !important;
}

html.smashco-ui-enabled body.smashco-streamer-mode #header {
  display: none !important;
}

html.smashco-ui-enabled .smashco-streamer-shell {
  position: fixed;
  inset: 0;
  z-index: 999990;
  pointer-events: none;
  color: var(--sc-text);
  font-family: var(--sc-font);
}

html.smashco-ui-enabled .smashco-streamer-topbar,
html.smashco-ui-enabled .smashco-streamer-bottom {
  position: absolute;
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

html.smashco-ui-enabled .smashco-streamer-topbar {
  top: max(12px, env(safe-area-inset-top));
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

html.smashco-ui-enabled .smashco-streamer-topbar strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.03em;
}

html.smashco-ui-enabled .smashco-streamer-topbar span {
  display: block;
  margin-top: 2px;
  color: var(--sc-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html.smashco-ui-enabled .smashco-streamer-pill,
html.smashco-ui-enabled .smashco-streamer-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--sc-muted);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

html.smashco-ui-enabled .smashco-streamer-pill span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--sc-warning);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.62);
}

html.smashco-ui-enabled.smashco-streamer-connected .smashco-streamer-pill span {
  background: var(--sc-success);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.72);
}

html.smashco-ui-enabled.smashco-streamer-connected .smashco-streamer-channel {
  color: var(--sc-success);
}

html.smashco-ui-enabled .smashco-streamer-bottom {
  bottom: max(14px, env(safe-area-inset-bottom));
}

html.smashco-ui-enabled .smashco-streamer-hint {
  max-width: min(560px, 58vw);
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.46);
  color: var(--sc-muted);
  backdrop-filter: blur(16px);
  font-size: 12px;
  line-height: 1.35;
}

html.smashco-ui-enabled body.smashco-streamer-mode .smashco-shell-badge {
  display: none;
}

@media (max-width: 720px) {
  html.smashco-ui-enabled .smashco-streamer-topbar,
  html.smashco-ui-enabled .smashco-streamer-bottom {
    align-items: stretch;
  }

  html.smashco-ui-enabled .smashco-streamer-bottom {
    display: grid;
  }

  html.smashco-ui-enabled .smashco-streamer-hint {
    max-width: none;
  }
}

@media (max-width: 980px) {
  html.smashco-ui-enabled .smashco-director-shell {
    grid-template-columns: 1fr;
  }

  html.smashco-ui-enabled .smashco-metric-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  html.smashco-ui-enabled body.smashco-director-mode {
    padding: 76px 12px 24px;
  }

  html.smashco-ui-enabled .smashco-director-shell {
    width: 100%;
  }

  html.smashco-ui-enabled .smashco-director-topbar {
    display: block;
  }

  html.smashco-ui-enabled .smashco-live-pill {
    margin-top: 14px;
  }
}

html.smashco-ui-enabled.smashco-room-locked body {
  overflow: hidden;
}

.smashco-room-gate {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 30%, rgba(91, 140, 255, 0.18), transparent 32%),
    rgba(8, 10, 15, 0.86);
  backdrop-filter: blur(18px);
}

.smashco-room-gate-card {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius-lg);
  background: linear-gradient(180deg, rgba(21, 26, 36, 0.96), rgba(13, 17, 26, 0.96));
  box-shadow: var(--sc-shadow);
}

.smashco-room-gate-card h1 {
  margin: 12px 0 8px;
  color: var(--sc-text);
  font-size: 28px;
  letter-spacing: -0.04em;
}

.smashco-room-gate-card p,
.smashco-gate-note {
  color: var(--sc-muted);
  line-height: 1.55;
}

.smashco-room-gate-card label {
  display: block;
  margin: 18px 0 8px;
  color: var(--sc-text);
  font-size: 13px;
  font-weight: 650;
}

.smashco-room-gate-card input {
  width: 100%;
  box-sizing: border-box;
}

.smashco-room-gate-card button {
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px !important;
}

.smashco-room-gate-card button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.smashco-gate-note {
  margin-top: 14px;
  font-size: 12px;
}

.smashco-gate-error {
  min-height: 18px;
  margin-top: 10px;
  color: var(--sc-danger);
  font-size: 13px;
}


/* Hotfix: keep the original VDO director UI visible and usable during the reshell phase. */
html.smashco-ui-enabled body.smashco-director-mode {
  padding: 86px 430px 32px 24px;
}

html.smashco-ui-enabled .smashco-director-rail {
  position: fixed;
  top: 84px;
  right: 18px;
  bottom: 18px;
  width: 388px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  color: var(--sc-text);
}

html.smashco-ui-enabled .smashco-director-rail .smashco-sidebar-card {
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  html.smashco-ui-enabled body.smashco-director-mode {
    padding: 76px 12px 360px;
  }

  html.smashco-ui-enabled .smashco-director-rail {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 330px;
  }
}


/* Phase 9: SmashCo full VDO reskin layer. Keep VDO DOM/engine intact; restyle the visible shell. */
html.smashco-ui-enabled body.smashco-vdo-reskin {
  background:
    radial-gradient(circle at 16% 10%, rgba(91, 140, 255, 0.18), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(20, 184, 166, 0.12), transparent 26%),
    linear-gradient(135deg, #070a10 0%, #0b1020 48%, #0f172a 100%) !important;
}

html.smashco-ui-enabled body.smashco-vdo-reskin::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

html.smashco-ui-enabled body.smashco-vdo-reskin #header {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px !important;
  background: rgba(7, 10, 16, 0.82) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.28);
}

html.smashco-ui-enabled body.smashco-vdo-reskin #logoname {
  display: inline-flex !important;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

html.smashco-ui-enabled body.smashco-vdo-reskin #header a,
html.smashco-ui-enabled body.smashco-vdo-reskin #header span,
html.smashco-ui-enabled body.smashco-vdo-reskin #header div {
  font-family: var(--sc-font) !important;
}

html.smashco-ui-enabled body.smashco-vdo-reskin #mainmenu,
html.smashco-ui-enabled body.smashco-vdo-reskin #container,
html.smashco-ui-enabled body.smashco-vdo-reskin #directorlayout,
html.smashco-ui-enabled body.smashco-vdo-reskin #controlButtons {
  font-family: var(--sc-font) !important;
}

html.smashco-ui-enabled body.smashco-vdo-reskin #controlButtons {
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  border-radius: 22px !important;
  background: rgba(10, 14, 23, 0.72) !important;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  padding: 10px !important;
}

html.smashco-ui-enabled body.smashco-vdo-reskin #controlButtons button,
html.smashco-ui-enabled body.smashco-vdo-reskin #controlButtons .button,
html.smashco-ui-enabled body.smashco-vdo-reskin .smashco-vdo-action {
  min-height: 34px;
  margin: 3px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.78) !important;
  color: #dbeafe !important;
  box-shadow: none !important;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

html.smashco-ui-enabled body.smashco-vdo-reskin #controlButtons button:hover,
html.smashco-ui-enabled body.smashco-vdo-reskin #controlButtons .button:hover,
html.smashco-ui-enabled body.smashco-vdo-reskin .smashco-vdo-action:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 140, 255, 0.42) !important;
  background: rgba(30, 41, 59, 0.88) !important;
}

html.smashco-ui-enabled body.smashco-vdo-reskin #directorlayout {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background: rgba(8, 13, 23, 0.46) !important;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  padding: 18px !important;
  overflow: hidden;
}

html.smashco-ui-enabled body.smashco-vdo-reskin #roomHeader {
  margin-bottom: 12px !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.54) !important;
  color: var(--sc-text) !important;
}

html.smashco-ui-enabled body.smashco-vdo-reskin #guestFeeds,
html.smashco-ui-enabled body.smashco-vdo-reskin .smashco-vdo-guest-feeds {
  gap: 14px !important;
}

html.smashco-ui-enabled body.smashco-vdo-reskin #guestFeeds > div,
html.smashco-ui-enabled body.smashco-vdo-reskin .smashco-vdo-media-card {
  border-radius: 20px !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  background: rgba(2, 6, 23, 0.56) !important;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26) !important;
  overflow: hidden;
}

html.smashco-ui-enabled body.smashco-vdo-reskin video,
html.smashco-ui-enabled body.smashco-vdo-reskin iframe,
html.smashco-ui-enabled body.smashco-vdo-reskin canvas {
  border-radius: 18px !important;
}

html.smashco-ui-enabled body.smashco-vdo-reskin input:not([type="checkbox"]):not([type="radio"]),
html.smashco-ui-enabled body.smashco-vdo-reskin textarea,
html.smashco-ui-enabled body.smashco-vdo-reskin select {
  min-height: 38px;
  padding: 9px 11px !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.76) !important;
  color: var(--sc-text) !important;
  outline: none !important;
}

html.smashco-ui-enabled body.smashco-vdo-reskin input:focus,
html.smashco-ui-enabled body.smashco-vdo-reskin textarea:focus,
html.smashco-ui-enabled body.smashco-vdo-reskin select:focus {
  border-color: rgba(91, 140, 255, 0.62) !important;
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.16) !important;
}

html.smashco-ui-enabled body.smashco-vdo-reskin .hidden {
  transition: opacity 160ms ease;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-vdo-reskin {
  padding-top: 82px;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-vdo-reskin #directorlayout:not(.hidden) {
  min-height: calc(100vh - 122px);
}

@media (max-width: 980px) {
  html.smashco-ui-enabled body.smashco-vdo-reskin #directorlayout {
    border-radius: 20px;
    padding: 12px !important;
  }
}

/* Phase 10: SmashCo reshell. Hide legacy chrome and present VDO runtime inside a new SaaS shell. */
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell {
  padding: 96px 430px 24px 24px !important;
  min-height: 100vh;
  overflow: auto;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #header {
  display: none !important;
}

html.smashco-ui-enabled .smashco-app-topbar {
  position: fixed;
  top: 16px;
  left: 24px;
  right: 24px;
  z-index: 1400;
  height: 58px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(7, 10, 16, 0.84);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(22px);
  color: var(--sc-text);
}

html.smashco-ui-enabled .smashco-app-brand,
html.smashco-ui-enabled .smashco-app-context,
html.smashco-ui-enabled .smashco-app-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

html.smashco-ui-enabled .smashco-app-brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.04em;
}

html.smashco-ui-enabled .smashco-app-brand span:not(.smashco-brand-dot),
html.smashco-ui-enabled .smashco-app-context span {
  display: block;
  color: var(--sc-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html.smashco-ui-enabled .smashco-app-context,
html.smashco-ui-enabled .smashco-app-live {
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  color: var(--sc-muted);
  font-size: 12px;
  font-weight: 720;
}

html.smashco-ui-enabled .smashco-app-context strong {
  color: var(--sc-text);
  font-size: 12px;
}

html.smashco-ui-enabled .smashco-app-live span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--sc-success);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.74);
}

html.smashco-ui-enabled .smashco-stage-label {
  position: fixed;
  top: 94px;
  left: 42px;
  z-index: 1150;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: var(--sc-muted);
  font: 12px/1.2 var(--sc-font);
  backdrop-filter: blur(16px);
  pointer-events: none;
}

html.smashco-ui-enabled .smashco-stage-label span {
  color: var(--sc-text);
  font-weight: 760;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #controlButtons {
  position: fixed !important;
  left: 24px !important;
  right: 430px !important;
  bottom: 18px !important;
  top: auto !important;
  width: auto !important;
  max-height: 86px;
  overflow: auto;
  z-index: 1160;
  border-radius: 22px !important;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #directorlayout {
  position: relative !important;
  display: block;
  width: 100% !important;
  min-height: calc(100vh - 220px) !important;
  margin: 0 !important;
  border-radius: 28px !important;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.52)) !important;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #roomHeader {
  display: none !important;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell .smashco-director-rail {
  top: 96px;
  bottom: 18px;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell .smashco-shell-badge {
  display: none;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #mainmenu,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #head1,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #head2,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #head3,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #head4,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #head5,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #dirroomid,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #saveRoom,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #togglePreviewMode,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #meshDebugBtn {
  display: none !important;
}

@media (max-width: 980px) {
  html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell {
    padding: 92px 12px 380px !important;
  }

  html.smashco-ui-enabled .smashco-app-topbar {
    left: 12px;
    right: 12px;
    grid-template-columns: 1fr;
    height: auto;
    padding: 12px;
  }

  html.smashco-ui-enabled .smashco-app-context,
  html.smashco-ui-enabled .smashco-app-live {
    display: none;
  }

  html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #controlButtons {
    left: 12px !important;
    right: 12px !important;
    bottom: 354px !important;
  }
}

/* Phase 10.1: Layer stabilization for SmashCo reshell.
   Keep VDO media/control DOM interactive while SmashCo chrome sits in reserved zones. */
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell {
  box-sizing: border-box;
  padding: 92px 430px 112px 24px !important;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #directorlayout {
  position: relative !important;
  z-index: 100 !important;
  width: 100% !important;
  min-height: calc(100vh - 228px) !important;
  margin: 0 !important;
  overflow: visible !important;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #guestFeeds,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #directorlayout video,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #directorlayout canvas,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #directorlayout iframe {
  position: relative;
  z-index: 120;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #controlButtons {
  z-index: 700 !important;
  left: 24px !important;
  right: 430px !important;
  bottom: 18px !important;
  max-height: 78px !important;
}

html.smashco-ui-enabled .smashco-app-topbar {
  z-index: 800 !important;
  pointer-events: none;
}

html.smashco-ui-enabled .smashco-app-topbar * {
  pointer-events: none;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell .smashco-director-rail {
  z-index: 900 !important;
  top: 92px !important;
  right: 18px !important;
  bottom: 18px !important;
  width: 388px !important;
  pointer-events: auto;
}

html.smashco-ui-enabled .smashco-stage-label {
  display: none !important;
}

html.smashco-ui-enabled .smashco-room-gate {
  z-index: 5000 !important;
}

html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell [role="dialog"],
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell .modal,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell .popup,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #settings,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #deviceSelection,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #chatModule,
html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #translateDiv {
  z-index: 3000 !important;
}

@media (max-width: 980px) {
  html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell {
    padding: 86px 12px 390px !important;
  }

  html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell #controlButtons {
    left: 12px !important;
    right: 12px !important;
    bottom: 342px !important;
  }

  html.smashco-ui-enabled body.smashco-director-mode.smashco-full-reshell .smashco-director-rail {
    top: auto !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    width: auto !important;
    max-height: 320px !important;
  }
}
