/* Olo Studio — Pro 3-Column Studio & Mobile Bottom-Sheet Design System
   Palette: pure black, neutral surfaces, ultramarine accent (#4d86ff), 1px hairlines. */

:root {
  --bg: #000000;
  --s1: #0a0a0b;
  --s2: #121214;
  --s3: #1a1a1d;
  --line: rgb(255 255 255 / 0.08);
  --line-2: rgb(255 255 255 / 0.14);
  --t1: #f5f5f6;
  --t2: #a3a3ab;
  --t3: #8b8b94;
  --text-muted: #8b8b94;
  --muted: #8b8b94;
  --accent: #4d86ff;
  --accent-ink: #04122f;
  --gold: #e6b85c;
  --ok: #3fcf8e;
  --warn: #f2b33d;
  --bad: #ff6369;
  --r1: 8px;
  --r2: 12px;
  --r3: 16px;
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --bar-h: 48px;
  --cmd-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --stage-h: clamp(360px, calc(100svh - var(--bar-h) - var(--cmd-h) - 132px), 840px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; overscroll-behavior-y: none; }
body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--t1);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.006em;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: color-mix(in oklab, var(--accent) 40%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* ── Topbar (48px Desktop) ── */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: calc(var(--bar-h) + var(--safe-t));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: var(--safe-t) max(16px, var(--safe-r)) 0 max(16px, var(--safe-l));
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 6px; min-width: 0; }
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--t2);
  text-decoration: none;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.icon-btn:hover { background: var(--s2); color: var(--t1); }
.brand-mark { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.brand-mark img { width: 24px; height: 24px; border-radius: 6px; }
.brand-mark .sub { color: var(--t3); font-weight: 500; }

.seg {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--s2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.seg button {
  height: 30px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
  color: var(--t2);
  white-space: nowrap;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.seg button:hover { color: var(--t1); }
.seg button.active { background: var(--s3); color: var(--t1); box-shadow: 0 1px 0 rgb(255 255 255 / 0.05) inset; }

.bar-end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.mcp-header-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 99px;
  border: 1px solid rgba(77, 134, 255, 0.34);
  background: rgba(77, 134, 255, 0.1);
  color: #b7d1ff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.mcp-header-link:hover { background: rgba(77, 134, 255, 0.22); border-color: var(--accent); color: #fff; }

.voice-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: var(--s2);
  color: var(--t2);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.voice-badge-btn:hover { background: var(--s3); color: var(--t1); }

/* ── Planes de Suscripción (Header Badge) ── */
.tier-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(230, 184, 92, 0.12), rgba(230, 184, 92, 0.03));
  border: 1px solid rgba(230, 184, 92, 0.35);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .16s var(--ease), background .16s var(--ease), color .16s var(--ease);
}
.tier-badge-btn:hover {
  background: linear-gradient(135deg, rgba(230, 184, 92, 0.22), rgba(230, 184, 92, 0.08));
  border-color: rgba(230, 184, 92, 0.65);
  color: #fff;
}
.tier-badge-btn .tier-pill {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(230, 184, 92, 0.18);
  color: var(--gold);
  border: 1px solid rgba(230, 184, 92, 0.4);
}

/* ── Main Studio Layout: 3-Column Pro Desktop (>= 960px) ── */
main.studio {
  min-height: calc(100svh - var(--bar-h));
  display: grid;
  grid-template-columns: minmax(236px, 272px) minmax(0, 1fr) minmax(236px, 272px);
  align-items: start;
  gap: 20px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px calc(var(--cmd-h) + 28px + var(--safe-b));
}

.dock-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--t3);
  padding: 0 2px 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

/* ── Left Dock: Formats, Hooks & Quick-Drop Access ── */
.viral-hook-carousel {
  grid-column: 1;
  grid-row: 1;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100svh - var(--bar-h) - var(--cmd-h) - 56px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.left-dock-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 4px;
}
.left-dock-hooks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.viral-hook-chip {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--s2);
  border: 1px solid var(--line);
  color: var(--t2);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  text-align: left;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.viral-hook-chip:hover {
  background: var(--s3);
  color: var(--t1);
  border-color: var(--line-2);
}
.viral-hook-chip.active {
  background: color-mix(in oklab, var(--accent) 16%, var(--s2));
  border-color: var(--accent);
  color: #fff;
}
.viral-hook-chip .hook-title { color: inherit; font-weight: 550; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viral-hook-chip .hook-tag {
  font-size: 10.5px;
  font-weight: 650;
  color: var(--t3);
  background: rgb(255 255 255 / 0.05);
  padding: 2px 6px;
  border-radius: 5px;
  flex-shrink: 0;
}
.viral-hook-chip.active .hook-tag { color: #d4e3ff; background: rgb(77 134 255 / 0.25); }

.quick-tool-pill {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(77, 134, 255, 0.1);
  border: 1px solid rgba(77, 134, 255, 0.28);
  color: #cfe0ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.quick-tool-pill:hover { background: rgba(77, 134, 255, 0.22); border-color: var(--accent); color: #fff; }

/* ── Center Column: 9:16 Stage & Timeline Scrubber ── */
.monitor {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: min(calc(var(--stage-h) * 9 / 16), 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stage-shell { position: relative; width: 100%; }
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  background: #050506;
  box-shadow: 0 0 0 1px var(--line-2), 0 32px 96px -24px rgb(0 0 0 / 0.95);
  cursor: grab;
  touch-action: none;
}
.stage:active { cursor: grabbing; }
.stage canvas { width: 100%; height: 100%; display: block; }
.stage-loading-overlay {
  position: absolute;
  inset: 0;
  background: #050506;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 20;
  transition: opacity .35s var(--ease);
}
.stage-loading-overlay.loaded { opacity: 0; pointer-events: none; }
.stage-loading-overlay img { width: 56px; height: 56px; border-radius: 14px; animation: breathe 1.8s var(--ease) infinite alternate; }
@keyframes breathe { from { transform: scale(.94); opacity: .55; } to { transform: scale(1); opacity: 1; } }
.loading-label { font-size: 13px; color: var(--t3); }

.stage-chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 10;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px 0 9px;
  border-radius: 99px;
  background: rgb(0 0 0 / 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 550;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.stage:hover .stage-chip, body.is-recording .stage-chip { opacity: 1; }
.stage-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.stage-chip .rec { display: none; }
body.is-recording .stage-chip .live { display: none; }
body.is-recording .stage-chip .rec { display: inline; }
body.is-recording .stage-chip .dot { background: var(--bad); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
body.is-recording .stage { box-shadow: 0 0 0 1px color-mix(in oklab, var(--bad) 55%, transparent), 0 40px 120px -30px rgb(0 0 0 / 0.95); }

.safe-zone-guide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  box-shadow: inset 0 calc(160 / 1920 * 100cqh) 0 rgb(255 99 105 / 0.14), inset 0 -110px 0 rgb(255 99 105 / 0.14), inset -55px 0 0 rgb(242 179 61 / 0.1);
  border: 1px dashed rgb(255 99 105 / 0.5);
  border-radius: inherit;
}
.fallback-2d-banner {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  padding: 6px 10px;
  background: rgb(0 0 0 / 0.7);
  color: var(--t1);
  font-size: 12px;
  border-radius: 8px;
  z-index: 12;
  text-align: center;
}

/* Subtle Watermark Pill (Free tier only) */
.stage-watermark-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 15;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.01em;
  transition: opacity 0.3s var(--ease);
}
.stage-watermark-pill .wm-dot { color: var(--accent); font-weight: 700; }
body.is-creator-pro .stage-watermark-pill,
body.is-agency-plan .stage-watermark-pill {
  opacity: 0;
  pointer-events: none;
}

.scrub { display: flex; align-items: center; gap: 10px; }
.scrub .mono { color: var(--t3); min-width: 40px; }
.scrub .mono:last-child { text-align: right; }
input[type='range'] { flex: 1; accent-color: var(--accent); height: 24px; cursor: pointer; min-width: 0; }
.status { color: var(--t3); font-size: 12.5px; text-align: center; min-height: 18px; text-wrap: balance; }

/* ── Right Dock: Inspector & Creator Tools (#creatorRail) ── */
.creator-rail {
  grid-column: 3;
  grid-row: 1;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100svh - var(--bar-h) - var(--cmd-h) - 56px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.creator-rail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.creator-rail-btn {
  width: 100%;
  min-height: 54px;
  border-radius: 12px;
  background: var(--s2);
  border: 1px solid var(--line);
  color: var(--t2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
  cursor: pointer;
}
.creator-rail-btn:hover {
  background: var(--s3);
  border-color: var(--line-2);
  color: #fff;
}
.creator-rail-btn:active { transform: scale(0.97); }
.creator-rail-btn.active {
  background: rgba(77, 134, 255, 0.16);
  border-color: var(--accent);
  color: #fff;
}
.creator-rail-btn .rail-lbl {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: inherit;
  line-height: 1.1;
  pointer-events: none;
  text-align: center;
}
.creator-rail-btn.rail-btn-gold {
  border-color: rgba(230, 184, 92, 0.36);
  background: linear-gradient(135deg, rgba(230, 184, 92, 0.12), rgba(230, 184, 92, 0.03));
  color: var(--gold);
}
.creator-rail-btn.rail-btn-gold:hover {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(230, 184, 92, 0.22), rgba(230, 184, 92, 0.08));
  color: #fff;
}
.creator-rail-more { display: none; }

/* ── Bottom Command Bar (#cmdBar) ── */
.cmd {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(14px + var(--safe-b));
  transform: translateX(-50%);
  width: min(1080px, calc(100vw - 24px));
  min-height: var(--cmd-h);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: color-mix(in oklab, var(--s1) 88%, transparent);
  backdrop-filter: saturate(1.5) blur(22px);
  -webkit-backdrop-filter: saturate(1.5) blur(22px);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: 0 24px 60px -18px rgb(0 0 0 / 0.9), 0 1px 0 rgb(255 255 255 / 0.04) inset;
}
.cmd-search { position: relative; flex: 1 1 260px; min-width: 180px; }
.cmd-search > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--t3); pointer-events: none; }
.cmd-search input {
  width: 100%;
  height: 46px;
  padding: 0 96px 0 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--s2);
  color: var(--t1);
  font: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.cmd-search input::placeholder { color: var(--t3); }
.cmd-search input:focus { border-color: color-mix(in oklab, var(--accent) 70%, transparent); background: var(--s3); }
.cmd-search kbd {
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%);
  font: 500 11px var(--sans);
  color: var(--t3);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 2px 6px;
  pointer-events: none;
}
.dock-mic-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--t2);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
  touch-action: manipulation;
}
.dock-mic-btn:hover { background: var(--s3); color: var(--t1); border-color: var(--line-2); }
.dock-mic-btn:active { transform: translateY(-50%) scale(0.92); }
.dock-mic-btn.listening {
  color: #ff5252;
  background: rgba(255, 82, 82, 0.16);
  border-color: rgba(255, 82, 82, 0.45);
  animation: dockMicPulse 1.4s infinite;
}
@keyframes dockMicPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(255, 82, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0); }
}

.cmd-cats { display: flex; gap: 2px; flex-shrink: 0; }
.cmd-cat {
  height: 46px;
  padding: 0 11px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  color: var(--t1);
  flex: 0 0 auto;
  transition: background-color .15s var(--ease);
}
.cmd-cat:hover, .cmd-cat[aria-expanded='true'] { background: var(--s3); }
.cmd-cat .k {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.cmd-cat .caret { color: var(--t3); transition: transform .2s var(--ease); flex-shrink: 0; }
.cmd-cat[aria-expanded='true'] .caret { transform: rotate(180deg); color: var(--t1); }
.cmd-cat .sum { font-size: 11px; color: var(--t3); max-width: 104px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-cat .sum:empty { display: none; }
.cmd-sep { width: 1px; height: 30px; background: var(--line-2); margin: 0 2px; flex: none; }

.btn {
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  user-select: none;
  transition: transform .12s var(--ease), background-color .15s var(--ease), opacity .15s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.accent:hover:not(:disabled) { background: color-mix(in oklab, var(--accent) 88%, white); }
.btn.quiet { background: var(--s2); color: var(--t1); border: 1px solid var(--line); }
.btn.quiet:hover:not(:disabled) { background: var(--s3); }
.btn.outline { border: 1px solid var(--line-2); }
.btn.outline:hover { background: var(--s2); }
.btn.icon { width: 46px; padding: 0; }
.btn.accent.export {
  background: linear-gradient(135deg, #4d86ff 0%, #2964e0 100%);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px rgba(77, 134, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn.accent.export:hover:not(:disabled) {
  background: linear-gradient(135deg, #5c92ff 0%, #3672ed 100%);
  box-shadow: 0 6px 24px rgba(77, 134, 255, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}
.play .i-pause, .play[data-playing] .i-play { display: none; }
.play[data-playing] .i-pause { display: block; }

.cmd-results {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: min(480px, calc(100vw - 20px));
  max-height: min(380px, 52svh);
  overflow-y: auto;
  list-style: none;
  padding: 6px;
  background: var(--s1);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgb(0 0 0 / 0.9);
}
.cmd-head { padding: 8px 10px 6px; color: var(--t3); font-size: 12px; font-weight: 550; }
.cmd-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.cmd-opt .g { color: var(--t3); font-size: 12px; white-space: nowrap; }
.cmd-opt.on, .cmd-opt:hover { background: var(--s3); }
.cmd-opt.on .t { color: var(--t1); }
.cmd-toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: calc(var(--cmd-h) + 34px + var(--safe-b));
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--s3);
  border: 1px solid var(--line-2);
  font-size: 13px;
  font-weight: 550;
  box-shadow: 0 12px 30px -10px rgb(0 0 0 / 0.8);
}

/* ── Inspector Popovers (.cmd-pop) ── */
.cmd-pop {
  position: fixed;
  z-index: 55;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--cmd-h) + 30px + var(--safe-b));
  width: min(560px, calc(100vw - 20px));
  max-height: min(62svh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 18px 20px;
  background: color-mix(in oklab, var(--s1) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(24px);
  -webkit-backdrop-filter: saturate(1.4) blur(24px);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.95);
  animation: popIn .22s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.pop-head {
  position: sticky;
  top: -6px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 8px;
  margin: 0 -2px;
  background: inherit;
}
.pop-head h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.pop-head .icon-btn { width: 34px; height: 34px; }

@media (min-width: 1180px) {
  .cmd-pop {
    left: auto;
    right: 20px;
    transform: none;
    top: calc(var(--bar-h) + 16px);
    bottom: calc(var(--cmd-h) + 28px + var(--safe-b));
    max-height: none;
    width: min(420px, calc((100vw - var(--stage-h) * 9 / 16) / 2 - 36px));
    animation-name: popSideRight;
  }
  @keyframes popSideRight { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
}

/* ── Panel Controls ── */
.lede { color: var(--t2); font-size: 14px; text-wrap: pretty; margin-bottom: 4px; }
.label { color: var(--t3); font-size: 12px; font-weight: 550; margin: 20px 0 8px; display: flex; align-items: center; gap: 8px; }
.label:first-child { margin-top: 6px; }
.label .end { margin-left: auto; color: var(--t2); font-weight: 500; font-variant-numeric: tabular-nums; }
.list { border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }
.field { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 12px; padding: 0 14px; min-height: 46px; }
.field label { color: var(--t2); font-size: 13.5px; }
.field input { width: 100%; height: 44px; background: none; border: 0; color: var(--t1); font: inherit; font-size: 14.5px; outline: none; }
.script-wrap { padding: 12px 14px 6px; }
.script-wrap label { display: block; color: var(--t2); font-size: 13.5px; margin-bottom: 6px; }
.script-input { width: 100%; min-height: 150px; resize: vertical; background: none; border: 0; outline: none; color: var(--t1); font-family: var(--mono); font-size: 12.5px; line-height: 1.65; }
.script-input::placeholder { color: var(--t3); }
.hint { color: var(--t3); font-size: 12px; margin-top: 8px; }
.hint code { font-family: var(--mono); color: var(--t2); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btn-row .btn { flex: 1 1 auto; height: 42px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
  border: 1px solid var(--line-2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease);
}
.chip-btn:hover { color: var(--t1); background: var(--s2); }
.chip-btn.active { color: var(--t1); background: var(--s3); border-color: transparent; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 70%, transparent); }
.chip-btn:disabled { opacity: .35; }
.swatch-dot { width: 12px; height: 12px; border-radius: 50%; background: #f4f1ec; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25); }
.preset-row { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
.preset-btn { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'name check' 'cat check'; align-items: center; column-gap: 12px; text-align: left; padding: 10px 14px; min-height: 52px; transition: background-color .15s var(--ease); }
.preset-btn + .preset-btn { border-top: 1px solid var(--line); }
.preset-btn:hover { background: var(--s2); }
.preset-name { grid-area: name; font-size: 14.5px; font-weight: 500; }
.preset-cat { grid-area: cat; color: var(--t3); font-size: 12px; }
.preset-btn::after { grid-area: check; content: ''; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.preset-btn.active::after { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.2l3 3 6-6.4' fill='none' stroke='%2304122f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 52px; width: 100%; text-align: left; }
.row .main { flex: 1; min-width: 0; }
.row .title { font-size: 14.5px; font-weight: 500; }
.row .sub { color: var(--t3); font-size: 12px; display: block; }
.switch { width: 44px; height: 26px; border-radius: 99px; background: var(--s3); position: relative; flex: none; transition: background-color .2s var(--ease); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--t1); transition: transform .22s var(--ease); }
[aria-checked='true'] .switch { background: var(--accent); }
[aria-checked='true'] .switch::after { transform: translateX(18px); }
.range-row { display: flex; align-items: center; gap: 12px; }
.meter { padding: 14px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--t3); }
.meter-head strong { color: var(--t1); font-weight: 600; font-variant-numeric: tabular-nums; }
.meter p { margin: 8px 0 12px; font-size: 14.5px; }
.track { height: 6px; background: var(--s3); border-radius: 99px; overflow: hidden; }
.fill { height: 100%; width: 28%; background: var(--accent); border-radius: inherit; transition: width .4s var(--ease); }

.panel-commercial-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(77, 134, 255, 0.08);
  border: 1px solid rgba(77, 134, 255, 0.22);
}
.panel-commercial-bar .chip-btn { text-decoration: none; }

/* Escaleta / Modo Director */
.beat-list { display: flex; flex-direction: column; }
.beat-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13px; cursor: pointer; transition: background-color .15s var(--ease); }
.beat-item + .beat-item { border-top: 1px solid var(--line); }
.beat-item:hover { background: var(--s2); }
.beat-item.current { background: var(--s3); }
.beat-item.current .beat-tc { color: var(--accent); }
.beat-tc { font-family: var(--mono); font-size: 11.5px; color: var(--t3); }
.speaker-badge-pill { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; color: #000; }
.beat-item-actions { display: flex; gap: 3px; align-items: center; }
.beat-icon-btn { border: 1px solid var(--line); color: var(--t2); border-radius: 6px; padding: 2px 6px; font-size: 12px; }
.beat-icon-btn:hover { color: var(--t1); background: var(--s3); }
.beat-inspector-card { margin-top: 12px; padding: 14px; background: var(--s2); border: 1px solid color-mix(in oklab, var(--accent) 60%, transparent); border-radius: var(--r2); display: flex; flex-direction: column; gap: 10px; }
.signals { display: grid; gap: 4px; color: var(--t3); }
.link-btn { color: var(--t2); font-size: 13px; font-weight: 550; padding: 6px 8px; border-radius: 6px; }
.link-btn:hover { color: var(--t1); background: var(--s2); }

/* Alertas del guion */
.script-alert-wrap { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.script-alert { padding: 8px 10px; border-radius: 8px; font-size: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.script-alert.warning { background: rgb(242 179 61 / 0.1); color: var(--warn); }
.script-alert.error { background: rgb(255 99 105 / 0.1); color: var(--bad); }
.script-alert-btn { border: 1px solid currentColor; color: inherit; border-radius: 6px; padding: 2px 8px; font-size: 11.5px; font-weight: 600; }

/* Exportación */
.export-card {
  position: fixed;
  z-index: 65;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--cmd-h) + 30px + var(--safe-b));
  width: min(440px, calc(100vw - 20px));
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--s1);
  border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px -12px rgb(0 0 0 / 0.9);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.export-head { display: flex; justify-content: space-between; align-items: baseline; }
.export-head strong { font-weight: 600; }
.export-card .fill { width: 0%; transition: width .15s linear; background: var(--accent); }
.export-foot { display: flex; justify-content: space-between; align-items: center; color: var(--t3); font-size: 12.5px; }
.done-actions { display: flex; align-items: center; gap: 8px; }
.done-actions .btn { flex: 1; height: 42px; }

/* Modales */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-card {
  background: var(--s1);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.85);
  overscroll-behavior: contain;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-title { font-size: 18px; font-weight: 650; }
.modal-close {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--t2);
  padding: 4px;
  border-radius: 10px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.modal-close:hover, .modal-close:active { color: var(--t1); background: var(--s2); }

/* ── Modal de Precios y Tiers (#modalPricing) ── */
.pricing-modal-card {
  max-width: 1040px;
  width: 95vw;
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: radial-gradient(circle at 50% 0%, rgba(230, 184, 92, 0.09) 0%, transparent 60%), #0c0c0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 34px 30px 32px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}
.pricing-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pricing-kicker {
  font-size: 11.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pricing-main-title { font-size: clamp(24px, 3.5vw, 34px); font-weight: 800; letter-spacing: -0.035em; color: #fff; margin-bottom: 6px; }
.pricing-main-sub { font-size: 14.5px; color: var(--t2); max-width: 720px; line-height: 1.5; text-wrap: pretty; }
.pricing-context-msg {
  background: linear-gradient(135deg, rgba(230, 184, 92, 0.16), rgba(230, 184, 92, 0.06));
  border: 1px solid rgba(230, 184, 92, 0.45);
  color: #f7e2a9;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 550;
  margin-bottom: 20px;
  text-align: center;
}
.pricing-cycle-bar { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 16px 0 26px; flex-wrap: wrap; }
.pricing-cycle-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.pricing-cycle-btn {
  height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .18s var(--ease);
  cursor: pointer;
}
.pricing-cycle-btn:hover { color: var(--t1); }
.pricing-cycle-btn.active { background: #1c1c22; color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.annual-discount-pill {
  font-size: 11px;
  font-weight: 800;
  color: #04122f;
  background: linear-gradient(135deg, #e6b85c, #d49e35);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: -0.01em;
}

.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.pricing-card {
  background: rgba(18, 18, 22, 0.65);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.pricing-card:hover { border-color: rgba(255, 255, 255, 0.18); transform: translateY(-3px); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.85); }
.pricing-card.is-popular {
  background: linear-gradient(180deg, rgba(230, 184, 92, 0.07) 0%, rgba(20, 20, 26, 0.82) 100%);
  border: 1px solid rgba(230, 184, 92, 0.45);
  box-shadow: 0 0 36px -8px rgba(230, 184, 92, 0.22), 0 20px 40px -10px rgba(0, 0, 0, 0.85);
  transform: scale(1.02);
  z-index: 2;
}
.pricing-card.is-popular:hover { border-color: var(--gold); transform: scale(1.03) translateY(-3px); }
.pricing-card.is-agency {
  border-color: rgba(77, 134, 255, 0.35);
  background: linear-gradient(180deg, rgba(77, 134, 255, 0.05) 0%, rgba(20, 20, 26, 0.8) 100%);
}
.card-badge {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--t2);
  margin-bottom: 12px;
}
.card-badge.gold-badge { background: linear-gradient(135deg, #e6b85c, #d49e35); color: #04122f; }
.card-badge.purple-badge { background: rgba(77, 134, 255, 0.16); color: #8cb8ff; border: 1px solid rgba(77, 134, 255, 0.4); }
.card-title { font-size: 20px; font-weight: 750; color: #fff; margin-bottom: 5px; letter-spacing: -0.02em; }
.card-tagline { font-size: 13px; color: var(--t2); min-height: 38px; line-height: 1.45; margin-bottom: 16px; }
.card-price-wrap { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.card-price-val { font-size: 40px; font-weight: 850; letter-spacing: -0.04em; color: #fff; font-variant-numeric: tabular-nums; line-height: 1; }
.card-price-period { font-size: 13.5px; color: var(--t3); }
.pricing-discount-badge { font-size: 12px; font-weight: 600; color: var(--gold); margin-bottom: 12px; min-height: 18px; }
.card-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: var(--t2);
  flex: 1;
}
.card-feature-list li { display: flex; align-items: flex-start; gap: 9px; line-height: 1.42; }
.card-feature-list li strong { color: #fff; font-weight: 650; }
.feat-icon { flex: none; font-weight: 700; color: var(--ok); margin-top: 1px; }
.feat-icon.gold-check { color: var(--gold); }
.feat-icon.purple-check { color: #7cb0ff; }
.card-action { margin-top: auto; }
.card-action .btn { width: 100%; height: 48px; font-size: 14px; font-weight: 700; border-radius: 13px; }
.btn-gold-cta {
  background: linear-gradient(135deg, #e6b85c 0%, #caa049 100%);
  color: #04122f;
  font-weight: 750;
  border: none;
  box-shadow: 0 4px 20px rgba(230, 184, 92, 0.35);
}
.btn-gold-cta:hover:not(:disabled) { background: linear-gradient(135deg, #f0c36b 0%, #d4aa53 100%); transform: translateY(-1px); }
.pricing-modal-footer { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.trust-pill-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; font-size: 12.5px; color: var(--t3); text-align: center; }
.trust-pill { display: inline-flex; align-items: center; gap: 6px; }

/* ── Bóveda Proof-of-Play, Re-Roast, Bulk y Export Options ── */
.pop-vault-card { max-width: 840px; }
.vault-kicker { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); display: block; margin-bottom: 4px; }
.vault-kicker.purple-kicker { color: #8cb8ff; }
.vault-sub { font-size: 13.5px; color: var(--t2); margin-top: 4px; line-height: 1.45; }
.pop-stats-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
}
.pop-stat-box { display: flex; flex-direction: column; gap: 3px; }
.pop-stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--t3); }
.pop-stat-num { font-size: 18px; font-weight: 750; color: #fff; font-variant-numeric: tabular-nums; }
.pop-stat-num.accent-text { color: var(--gold); }
.pop-shelf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pop-skin-card {
  background: rgba(22, 22, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.pop-skin-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.2); }
.pop-skin-card.is-equipped { border-color: var(--gold); box-shadow: 0 0 20px -4px rgba(230, 184, 92, 0.3); }
.pop-skin-card.is-locked { opacity: 0.75; }
.skin-pedestal {
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  border-radius: 12px;
}
.skin-orb { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4); }
.skin-orb-vinyl { background: linear-gradient(135deg, #bbb, #555); }
.skin-orb-cyberglow { background: linear-gradient(135deg, #00ffff, #0077aa); box-shadow: 0 0 20px #00ffff99; }
.skin-orb-chrome { background: linear-gradient(135deg, #ffffff, #8899aa); }
.skin-orb-obsidian { background: linear-gradient(135deg, #2b2438, #0d0a12); box-shadow: inset 0 2px 5px #aa88ff55; }
.skin-orb-gold24k { background: linear-gradient(135deg, #ffe066, #b8860b); box-shadow: 0 0 16px #ffcc0066; }
.skin-orb-uranium { background: linear-gradient(135deg, #55ff55, #008800); box-shadow: 0 0 24px #39ff14bb; }
.skin-rarity-pill { position: absolute; bottom: 4px; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 999px; }
.rarity-common { background: rgba(255, 255, 255, 0.1); color: var(--t2); }
.rarity-uncommon { background: rgba(0, 255, 204, 0.15); color: #00ffcc; border: 1px solid rgba(0, 255, 204, 0.4); }
.rarity-rare { background: rgba(140, 184, 255, 0.15); color: #8cb8ff; border: 1px solid rgba(140, 184, 255, 0.4); }
.rarity-epic { background: rgba(180, 120, 255, 0.18); color: #c49eff; border: 1px solid rgba(180, 120, 255, 0.4); }
.rarity-legendary { background: linear-gradient(135deg, #e6b85c, #d49e35); color: #04122f; }
.rarity-mythic { background: rgba(57, 255, 20, 0.2); color: #39ff14; border: 1px solid rgba(57, 255, 20, 0.5); }
.skin-info { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.skin-title { font-size: 14.5px; font-weight: 700; color: #fff; margin: 0; }
.skin-material { font-size: 11px; color: var(--t3); }
.skin-desc { font-size: 12px; color: var(--t2); line-height: 1.35; margin: 4px 0; }
.skin-req { font-size: 11px; color: var(--gold); display: flex; align-items: center; gap: 5px; margin-top: auto; }
.field-stack { display: flex; flex-direction: column; gap: 14px; }
.field-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.export-option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.option-title-line { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.option-desc { font-size: 12.5px; color: var(--t2); margin: 0; line-height: 1.4; }
.export-section-card { padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); }
.switch-control { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch-control input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; inset: 0; background-color: rgba(255, 255, 255, 0.16); transition: .2s; border-radius: 24px; }
.switch-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .2s; border-radius: 50%; }
.switch-control input:checked + .switch-slider { background-color: var(--gold); }
.switch-control input:checked + .switch-slider:before { transform: translateX(20px); }
.switch-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.bulk-results-area { max-height: 200px; overflow-y: auto; margin-top: 10px; }
.bulk-scenes-list { list-style: none; display: flex; flex-direction: column; gap: 6px; padding: 0; margin: 8px 0 0; }
.bulk-scene-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); font-size: 12.5px; }
.bulk-idx { font-family: var(--mono); color: var(--t3); font-size: 11px; }
.bulk-title { flex: 1; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-cat { font-size: 11px; color: var(--t2); padding: 2px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }

/* ── Mobile & Tablet (< 960px): Stage on Top, >=44px Touch Targets, Bottom Sheet Dock ── */
@media (max-width: 959px) {
  :root {
    --bar-h: 52px;
    --cmd-h: 114px;
    --stage-h: clamp(290px, calc(100svh - var(--bar-h) - var(--cmd-h) - 180px), 660px);
  }
  html, body { max-width: 100%; overflow-x: clip; }

  /* Responsive Topbar without overflow:hidden cropping */
  .bar {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    padding: calc(6px + var(--safe-t)) max(10px, var(--safe-r)) 8px max(10px, var(--safe-l));
    gap: 8px;
    overflow: visible;
  }
  .brand { grid-column: 1; grid-row: 1; }
  .bar-end {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .bar .seg {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: space-between;
    padding: 3px;
  }
  .seg button {
    flex: 1 1 0;
    min-height: 44px;
    height: 44px;
    padding: 0 8px;
    font-size: 13px;
  }
  .icon-btn { min-width: 44px; min-height: 44px; width: 44px; height: 44px; }
  .bar-end #btnAuthTrigger.olo-ab-header-chip { margin-right: 0 !important; padding: 0 10px !important; min-height: 44px !important; height: 44px !important; font-size: 12px !important; }
  .bar-end #btnAuthTrigger .olo-ab-label { max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bar-end .tier-badge-btn .tier-label, .bar-end .tier-badge-btn svg { display: none; }
  .bar-end .tier-badge-btn { min-height: 44px; height: 44px; padding: 0 10px; }
  .bar-end .voice-badge-btn .voice-badge-text { display: none; }
  .bar-end .voice-badge-btn { min-width: 44px; min-height: 44px; width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .bar-end .mcp-header-link { min-height: 44px; height: 44px; padding: 0 10px; font-size: 11.5px; }
  .bar-end .mcp-header-link .mcp-desktop-only { display: none; }

  /* Single-column flow: Stage on top, Docks below without overlapping 9:16 canvas */
  main.studio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px 10px calc(var(--cmd-h) + 28px + var(--safe-b));
  }
  .monitor {
    order: 1;
    width: min(calc(var(--stage-h) * 9 / 16), calc(100vw - 20px));
    gap: 8px;
  }
  .stage { border-radius: 20px; }

  .creator-rail {
    order: 2;
    width: 100%;
    max-height: none;
    padding: 10px;
    border-radius: 16px;
  }
  .creator-rail .dock-panel-head { display: none; }
  .creator-rail-grid {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .creator-rail-grid::-webkit-scrollbar { display: none; }
  .creator-rail-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 64px;
    min-height: 48px;
    padding: 6px 10px;
    touch-action: manipulation;
  }
  .creator-rail:not(.is-expanded) .creator-rail-secondary { display: none; }
  .creator-rail-more { display: flex !important; }

  .viral-hook-carousel {
    order: 3;
    width: 100%;
    max-height: none;
    padding: 10px;
    border-radius: 16px;
  }
  .viral-hook-carousel .dock-panel-head { margin-bottom: 6px; }
  .left-dock-quick {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 8px;
  }
  .left-dock-quick::-webkit-scrollbar { display: none; }
  .quick-tool-pill { flex: 0 0 auto; min-height: 44px; padding: 0 14px; }
  .left-dock-hooks {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 8px;
  }
  .left-dock-hooks::-webkit-scrollbar { display: none; }
  .viral-hook-chip {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    padding: 0 14px;
    touch-action: manipulation;
  }

  /* Bottom Sheet Command Bar */
  .cmd {
    flex-wrap: wrap;
    bottom: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    border-width: 1px 0 0;
    gap: 6px;
    padding: 8px 10px calc(8px + var(--safe-b));
  }
  .cmd-search { order: 1; flex: 1 1 0; min-width: 0; }
  .cmd-search kbd { display: none; }
  .cmd-search input { padding-right: 52px; height: 44px; font-size: 16px; }
  .dock-mic-btn { width: 44px; height: 44px; right: 2px; }
  .cmd .play { order: 2; height: 44px; min-height: 44px; width: 44px; }
  .cmd .export { order: 3; height: 44px; min-height: 44px; width: 44px; padding: 0; }
  .cmd #btnOpenExportSettings { order: 3; height: 44px; min-height: 44px; width: 44px; padding: 0; }
  .cmd .export .lbl { display: none; }
  .cmd-sep { display: none; }
  .cmd-cats {
    order: 4;
    flex: 1 0 100%;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 6px;
    padding: 2px 4px;
    -webkit-overflow-scrolling: touch;
  }
  .cmd-cats::-webkit-scrollbar { display: none; }
  .cmd-cat {
    height: 44px;
    min-height: 44px;
    flex: none;
    padding: 0 14px;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    touch-action: manipulation;
  }
  .cmd-cat .sum { display: none; }

  .cmd-pop {
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    bottom: calc(var(--cmd-h) + var(--safe-b));
    border-radius: 20px 20px 0 0;
    border-width: 1px 0 0;
    max-height: 62svh;
    animation-name: sheetIn;
    padding-bottom: calc(24px + var(--safe-b));
  }
  @keyframes sheetIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  .cmd-results { width: calc(100vw - 20px); }
  .export-card { bottom: calc(var(--cmd-h) + 10px + var(--safe-b)); }
  .cmd-toast { bottom: calc(var(--cmd-h) + 14px + var(--safe-b)); }

  .modal-overlay { align-items: flex-end !important; padding: 0 !important; }
  .modal-card, .pricing-modal-card, .pop-vault-card {
    width: 100% !important;
    max-width: 100vw !important;
    max-height: 88svh !important;
    border-radius: 28px 28px 0 0 !important;
    border-bottom: none !important;
    margin: 0 !important;
    padding: 14px 18px calc(24px + var(--safe-b)) !important;
    overscroll-behavior: contain !important;
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.85) !important;
    animation: sheetSlideUp 0.3s var(--ease) !important;
  }
  @keyframes sheetSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .pricing-grid { grid-template-columns: 1fr; gap: 16px; }
  .pricing-card.is-popular { transform: none; }
  .pricing-card.is-popular:hover { transform: translateY(-2px); }
  .trust-pill-row { flex-direction: column; gap: 8px; }
  .pop-shelf-grid { grid-template-columns: 1fr; }
  .pop-stats-ribbon { grid-template-columns: 1fr; }
  .field-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .brand-mark .sub { display: none; }
}
@media (max-width: 360px) {
  .brand-mark span { display: none; }
}
@media (hover: none) {
  .cmd-search kbd { display: none; }
  .cmd-search input { padding-right: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ── Chat Mode Isolation ── */
body.is-chat main.studio {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  max-width: none;
  padding: 0 !important;
}
body.is-chat .creator-rail,
body.is-chat .viral-hook-carousel,
body.is-chat .safe-zone-guide {
  display: none !important;
  pointer-events: none !important;
}
