/* ============================================================================
   LENSCAST 600 — PLUSH LUXURY DESIGN SYSTEM + 600x600 WAVEGUIDE OPTICS
   Zero-Inline CSS | 555nm High-Acuity Palette (#4ade80 / #38bdf8 / #fbbf24)
   Zero Magenta on Waveguide | Pure #000000 Additive Transparency Mask
   ============================================================================ */

:root {
  --bg-obsidian: #040711;
  --bg-surface: rgba(11, 19, 36, 0.86);
  --bg-elevated: rgba(16, 28, 52, 0.92);
  --border-hairline: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(56, 189, 248, 0.42);
  --cyan: #38bdf8;
  --emerald: #4ade80;
  --amber: #fbbf24;
  --danger: #f87171;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 22% 0%, #0d1b36 0%, #040711 65%, #02040a 100%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

.is-hidden {
  display: none !important;
}

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

.w-full {
  width: 100%;
}

/* ============================================================================
   VIEW MODE VISIBILITY SWITCHING (Studio vs Pure Lens vs Mobile Remote)
   ============================================================================ */

.remote-viewport {
  display: none;
}

body.view-remote {
  overflow: hidden;
  height: 100dvh;
  background: radial-gradient(circle at 50% -10%, #112244 0%, #040711 68%);
}

body.view-remote .studio-header,
body.view-remote .studio-main {
  display: none;
}

body.view-remote .remote-viewport {
  display: flex;
}

/* PURE 600x600 META RAY-BAN DISPLAY ADDITIVE WAVEGUIDE MODE */
body.view-lens {
  background: #000000 !important;
  overflow: hidden;
  width: 100vw;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.view-lens .studio-header,
body.view-lens .studio-deck,
body.view-lens .lens-sim-bar,
body.view-lens .remote-viewport {
  display: none !important;
}

body.view-lens .studio-main {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

body.view-lens .lens-column {
  margin: 0;
  padding: 0;
}

body.view-lens .lens-shell {
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #000000;
}

body.view-lens .lens-frame {
  width: min(600px, 100vw, 100dvh);
  height: min(600px, 100vw, 100dvh);
  border-radius: 0;
  border: none;
}

/* ============================================================================
   STUDIO HEADER
   ============================================================================ */

.studio-header {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 24px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-emblem {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.22);
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.badge-optical {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.36);
}

.brand-subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.conn-pill,
.remote-conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.remote-conn-pill {
  cursor: pointer;
}

.conn-pill.online,
.remote-conn-pill.online {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.12);
  color: var(--emerald);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.online .status-dot {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

/* ============================================================================
   STUDIO MAIN GRID
   ============================================================================ */

.studio-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 24px 28px;
  display: grid;
  grid-template-columns: 620px minmax(360px, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 1080px) {
  .studio-main {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .studio-deck {
    width: 100%;
    max-width: 620px;
  }
}

.lens-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 620px;
}

.lens-shell {
  padding: 10px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(7, 13, 28, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(56, 189, 248, 0.08);
}

.lens-shell.sim-passthrough {
  background: radial-gradient(circle at 60% 30%, #334155 0%, #1e293b 50%, #0f172a 100%);
}

.lens-shell.sim-passthrough .lens-frame {
  mix-blend-mode: screen;
}

/* ============================================================================
   600x600 WAVEGUIDE LENS FRAME (PURE #000000 MASK)
   ============================================================================ */

.lens-frame {
  position: relative;
  width: 600px;
  height: 600px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  background: #000000;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.18);
}

.lens-standby {
  position: absolute;
  inset: 0;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  z-index: 4;
}

.lens-standby-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.lens-qr-box {
  padding: 10px;
  border: 2px solid var(--emerald);
  border-radius: 14px;
  background: #000000;
}

#lensQrCanvas {
  display: block;
  width: 216px;
  height: 216px;
  image-rendering: pixelated;
}

.lens-code-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  margin-top: 4px;
}

.lens-code-value {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--amber);
  line-height: 1;
}

.lens-pair-status {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: 0.08em;
}

.lens-gesture-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
  opacity: 0.85;
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* MEDIA STAGE & ASPECT FRAMING CLASSES */
.lens-media-stage {
  position: absolute;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lens-yt-host,
.lens-embed-frame,
.lens-native-video,
.lens-mirror-canvas {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000000;
  display: block;
}

.lens-yt-host iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Pure #000000 Letterbox Cinema Fit (16:9 inside 600x600) */
.lens-media-stage.aspect-fit .lens-yt-host,
.lens-media-stage.aspect-fit .lens-embed-frame {
  width: 100%;
  height: 56.25%;
}

.lens-media-stage.aspect-fit .lens-native-video {
  object-fit: contain;
}

/* Full 1:1 Square Fill */
.lens-media-stage.aspect-fill .lens-yt-host,
.lens-media-stage.aspect-fill .lens-embed-frame {
  width: 177.78%;
  height: 100%;
}

.lens-media-stage.aspect-fill .lens-native-video {
  object-fit: cover;
}

/* 1.6x Center Slide/Action Zoom */
.lens-media-stage.aspect-zoom .lens-yt-host,
.lens-media-stage.aspect-zoom .lens-embed-frame {
  width: 160%;
  height: 160%;
}

.lens-media-stage.aspect-zoom .lens-native-video {
  object-fit: cover;
  transform: scale(1.45);
}

/* 555nm AUTO-HIDING HUD OVERLAY */
.lens-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px;
  z-index: 6;
  transition: opacity 0.35s ease;
}

.lens-hud.hud-faded {
  opacity: 0;
}

.lens-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0, 0, 0, 0.78);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.lens-hud-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lens-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.lens-pill.emerald {
  background: rgba(74, 222, 128, 0.18);
  color: var(--emerald);
  border: 1px solid rgba(74, 222, 128, 0.55);
}

.lens-pill.cyan {
  background: rgba(56, 189, 248, 0.18);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.55);
}

.lens-hud-bottom {
  background: rgba(0, 0, 0, 0.84);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lens-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.lens-state-chip {
  color: var(--emerald);
}

.lens-clock {
  color: #ffffff;
}

.lens-pct {
  color: var(--amber);
}

.lens-progress-canvas {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  display: block;
}

.lens-toast {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.92);
  border: 1.5px solid var(--amber);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* HANDS-FREE NEURAL BAND DECK */
.lens-deck {
  position: absolute;
  inset: 28px;
  z-index: 12;
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--cyan);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lens-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--cyan);
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  padding-bottom: 8px;
}

.lens-deck-sub {
  font-size: 10px;
  color: var(--amber);
}

.lens-deck-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.lens-deck-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  background: #000000;
  border: 1.5px solid rgba(148, 163, 184, 0.32);
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.lens-deck-item.focused {
  border-color: var(--emerald);
  background: rgba(74, 222, 128, 0.16);
  color: var(--emerald);
}

/* SIMULATOR BAR */
.lens-sim-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  font-size: 12px;
  color: var(--text-secondary);
}

.sim-toggle,
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
}

.sim-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================================
   STUDIO CARDS & CONTROLS
   ============================================================================ */

.studio-deck {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plush-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 20px;
  padding: 18px 20px;
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.card-eyebrow.emerald {
  color: var(--emerald);
}

.card-eyebrow.amber {
  color: var(--amber);
}

.plush-card h2 {
  margin: 3px 0 0;
  font-size: 16px;
  font-weight: 700;
}

.room-chip,
.mirror-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.14);
  color: var(--amber);
  border: 1px solid rgba(251, 191, 36, 0.4);
  white-space: nowrap;
}

.mirror-badge.live {
  background: rgba(74, 222, 128, 0.16);
  color: var(--emerald);
  border-color: rgba(74, 222, 128, 0.5);
}

.cast-input-row,
.pair-input-row {
  display: flex;
  gap: 8px;
}

.plush-input {
  flex: 1;
  min-width: 0;
  background: rgba(4, 9, 20, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.plush-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.plush-input.mono {
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* BUTTONS */
button {
  font-family: inherit;
}

.btn-primary,
.btn-secondary,
.btn-emerald,
.btn-ghost,
.btn-mini,
.btn-icon-gear {
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary:active,
.btn-secondary:active,
.btn-emerald:active,
.btn-ghost:active,
.btn-mini:active {
  transform: scale(0.97);
}

.btn-primary {
  padding: 11px 16px;
  font-size: 13px;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #030816;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.34);
}

.btn-emerald {
  padding: 11px 16px;
  font-size: 13px;
  background: linear-gradient(135deg, #4ade80, #16a34a);
  color: #031409;
  box-shadow: 0 4px 18px rgba(74, 222, 128, 0.3);
}

.btn-secondary,
.btn-ghost {
  padding: 10px 14px;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.26);
  color: var(--text-primary);
}

.btn-mini {
  padding: 6px 11px;
  font-size: 11px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.26);
  color: var(--text-primary);
}

.btn-mini.cyan {
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--cyan);
}

.btn-mini.emerald {
  border-color: rgba(74, 222, 128, 0.45);
  color: var(--emerald);
}

.btn-icon-gear {
  width: 38px;
  height: 38px;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.26);
  color: var(--text-primary);
}

.quick-demo-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-demo-strip.vertical {
  margin-bottom: 12px;
}

.strip-label {
  font-size: 11px;
  color: var(--text-muted);
}

.chip-btn {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: var(--text-secondary);
  cursor: pointer;
}

.chip-btn:hover,
.chip-btn.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.12);
}

/* TRANSPORT & SEGMENTED FRAMING */
.studio-transport-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid var(--border-hairline);
}

.transport-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-circle.primary {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #38bdf8, #4ade80);
  color: #030a14;
  border-color: transparent;
  font-size: 16px;
  font-weight: 900;
}

.segmented-pill {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: rgba(4, 9, 20, 0.9);
  border: 1px solid var(--border-hairline);
  gap: 3px;
}

.seg-btn {
  padding: 7px 12px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.seg-btn.active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--cyan);
}

/* SCREEN MIRROR STUDIO GRID */
.mirror-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 640px) {
  .mirror-grid {
    grid-template-columns: 1fr;
  }
}

.mirror-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#studioCropCanvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #030712;
  border: 1px solid rgba(74, 222, 128, 0.28);
  cursor: crosshair;
  display: block;
}

.crop-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.mirror-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-cast-label {
  display: block;
  text-align: center;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px dashed rgba(56, 189, 248, 0.42);
  background: rgba(56, 189, 248, 0.06);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.crop-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* WATCH QUEUE */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
}

.queue-empty {
  padding: 16px;
  text-align: center;
  border-radius: 12px;
  background: rgba(4, 9, 20, 0.55);
  color: var(--text-muted);
  font-size: 12px;
}

.queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(8, 15, 30, 0.9);
  border: 1px solid var(--border-hairline);
}

.queue-row.active {
  border-color: var(--emerald);
  background: rgba(74, 222, 128, 0.09);
}

.queue-row-main {
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.queue-row-title {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-row-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.queue-row-del {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
}

/* ============================================================================
   ZERO-SCROLL PLUSH IPHONE REMOTE VIEW (100dvh Apple HIG Standard)
   ============================================================================ */

.remote-viewport {
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 10px) + 6px) 16px calc(env(safe-area-inset-bottom, 12px) + 8px);
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
}

.remote-header {
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remote-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.remote-emblem {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.remote-title {
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.remote-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remote-cast-bar {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.remote-url-input {
  flex: 1;
  min-width: 0;
  background: rgba(8, 15, 30, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 13px;
  padding: 10px 12px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
}

.remote-url-input:focus {
  border-color: var(--cyan);
}

.btn-remote-paste {
  padding: 0 11px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-remote-send {
  padding: 0 15px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #38bdf8, #4ade80);
  color: #030a14;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

/* NOW PLAYING PLUSH CARD */
.remote-now-card {
  flex: 1;
  min-height: 0;
  background: linear-gradient(160deg, rgba(16, 28, 52, 0.88), rgba(7, 13, 27, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 22px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.now-media-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.now-thumb-wrap {
  width: 78px;
  height: 58px;
  border-radius: 12px;
  overflow: hidden;
  background: #02050d;
  border: 1px solid rgba(56, 189, 248, 0.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.now-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.now-thumb-placeholder {
  font-size: 22px;
  color: var(--cyan);
}

.now-meta {
  min-width: 0;
  flex: 1;
}

.now-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.now-room-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--amber);
}

.now-title {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-author {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SCRUBBER */
.scrubber-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plush-scrubber {
  width: 100%;
  accent-color: #4ade80;
  height: 6px;
  cursor: pointer;
}

.scrubber-times {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.remote-transport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-remote-ctrl {
  flex: 1;
  height: 48px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.btn-remote-play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #38bdf8, #4ade80);
  color: #030a14;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 8px 26px rgba(56, 189, 248, 0.36);
}

/* FRAMING & BOTTOM DOCK */
.remote-framing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(11, 19, 36, 0.8);
  border: 1px solid var(--border-hairline);
}

.framing-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.remote-bottom-dock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.remote-utility-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.util-pill {
  padding: 10px 6px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.util-pill.active {
  border-color: var(--emerald);
  color: var(--emerald);
  background: rgba(74, 222, 128, 0.14);
}

.util-pill.cyan {
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--cyan);
}

.btn-remote-mirror {
  width: 100%;
  height: 50px;
  border-radius: 16px;
  border: 1px solid rgba(74, 222, 128, 0.48);
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.18), rgba(56, 189, 248, 0.18));
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.mirror-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

/* ============================================================================
   MODAL SHEETS (Settings & Queue)
   ============================================================================ */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(2, 6, 18, 0.76);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-card {
  width: 100%;
  max-width: 520px;
  max-height: 84dvh;
  background: #0a1224;
  border-top: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 24px 24px 0 0;
  padding: 12px 20px calc(env(safe-area-inset-bottom, 16px) + 16px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  margin: 0 auto;
}

.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-top h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.settings-section {
  padding: 12px 0;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.settings-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-msg {
  font-size: 12px;
  color: var(--emerald);
  min-height: 16px;
}

.probe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.probe-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(4, 9, 20, 0.85);
  border: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.probe-item strong {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--emerald);
}

.drm-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.app-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(7, 14, 28, 0.96);
  border: 1px solid var(--cyan);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}
