/* Scoped V3.3 pages; shared product tokens and native controls are retained. */
body[data-view="studio"]:has(.wizard-studio) .topbar { display: none; }
.wizard-studio { padding-top: 64px; padding-bottom: calc(100px + env(safe-area-inset-bottom) + var(--wizard-keyboard, 0px)); }
/* A transformed view animation would make fixed navigation relative to the
   entire step content until its last frame. Keep the bars viewport anchored. */
.wizard-studio.view.active { animation: none; }
body[data-view="studio"]:has(.wizard-studio) .toast { pointer-events: none; bottom: calc(88px + env(safe-area-inset-bottom) + var(--wizard-keyboard, 0px)); }
.wizard-studio [hidden], .wizard-pane[hidden] { display: none; }
#studio-form > article[hidden], .wizard-studio .panel[hidden] { display: none; }
.wizard-header { position: fixed; z-index: 8; top: 0; left: 50%; transform: translateX(-50%); width: min(100%, 780px); display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 12px; align-items: center; padding: max(8px, env(safe-area-inset-top)) 16px 8px; border-bottom: 1px solid var(--line); background: var(--black); }
.wizard-header strong { min-width: 0; text-align: center; font-size: 14px; }
.wizard-header button { min-width: 44px; min-height: 44px; }
.wizard-progress { display: grid; gap: 8px; width: 100%; min-height: 48px; padding: 8px 0; border: 0; color: var(--muted); background: transparent; text-align: left; font-size: 12px; }
.wizard-progress progress { appearance: none; width: 100%; height: 3px; border: 0; border-radius: 4px; background: var(--line); }
.wizard-progress progress::-webkit-progress-bar { background: var(--line); border-radius: 4px; }
.wizard-progress progress::-webkit-progress-value { background: var(--brand-bright); border-radius: 4px; }
.wizard-progress progress::-moz-progress-bar { background: var(--brand-bright); }
.wizard-heading { margin: 20px 0 24px; }
.wizard-heading h2 { margin: 0 0 8px; font-size: clamp(24px, 6.6vw, 30px); line-height: 1.18; letter-spacing: -.025em; }
.wizard-heading p { margin: 0; color: var(--muted); }
.wizard-studio .studio-workspace { display: flex; flex-direction: column; gap: 24px; }
.wizard-studio .studio-form { width: 100%; gap: 0; }
.wizard-pane { display: grid; gap: 20px; min-width: 0; align-content: start; }
.wizard-pane > .panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
.wizard-pane .panel.form-panel, .wizard-backgrounds, .wizard-montage, .wizard-format { display: grid; gap: 16px; }
.wizard-pane > .field, .wizard-pane > .upload-field { margin: 0; }
.wizard-pane .settings-disclosure { border: 0; padding: 0; }
.wizard-pane .settings-disclosure > summary { margin-bottom: 16px; }
.wizard-pane .settings-disclosure-content { padding: 0; }
.wizard-studio .studio-composition { position: relative; top: auto; z-index: 1; width: 100%; padding: 12px; }
.wizard-studio .composition-frame[data-format="9:16"] { width: 100px; height: 150px; }
.wizard-studio .composition-frame[data-format="4:5"] { width: 120px; height: 150px; }
.wizard-studio .composition-frame[data-format="1:1"] { width: 140px; height: 140px; }
.wizard-studio .composition-source { font-size: 12px; }
.wizard-scenarios { display: grid; gap: 12px; }
.wizard-scenario { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; padding: 20px 16px; min-height: 100px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); color: var(--ink); text-align: left; }
.wizard-scenario .ui-icon { width: 28px; height: 28px; grid-row: span 2; color: var(--brand-pale); }
.wizard-scenario strong { font-size: 16px; line-height: 1.4; }
.wizard-scenario small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.wizard-scenario[aria-pressed="true"] { background: var(--surface-selected); border-color: var(--brand); }
.wizard-scenario:disabled { opacity: .55; cursor: default; }
.wizard-footer { position: fixed; z-index: 8; left: 50%; transform: translateX(-50%); bottom: var(--wizard-keyboard, 0px); width: min(100%, 780px); display: grid; grid-template-columns: minmax(80px, .65fr) minmax(0, 1.35fr); gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--black); }
.wizard-footer button { min-height: 48px; width: 100%; padding-inline: 12px; }
.wizard-message { margin: 16px 0 0; color: var(--brand-pale); font-size: 13px; overflow-wrap: anywhere; }
.wizard-message:empty { display: none; }
.wizard-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wizard-tabs [aria-pressed="true"] { border-color: var(--brand); background: var(--surface-selected); color: var(--brand-pale); }
.wizard-status { padding: 16px; margin: 0; background: var(--surface); border-radius: var(--radius-control); font-size: 13px; }
.wizard-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px - env(safe-area-inset-bottom)); padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-card); background: var(--surface); color: var(--ink); overflow-y: auto; }
.wizard-dialog::backdrop { background: rgba(0,0,0,.72); }
.wizard-dialog > button, .wizard-dialog > input { display: block; width: 100%; margin-top: 12px; min-height: 44px; }
.wizard-dialog h3 { margin-top: 0; }
.wizard-step-link { display: grid; gap: 4px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-control); text-align: left; color: var(--ink); background: var(--surface-input); }
.wizard-dialog > .wizard-step-link { display: grid; }
.wizard-step-link strong, .wizard-step-link small { display: block; }
.wizard-step-link small { color: var(--muted); font-size: 12px; }
.wizard-step-link:disabled { opacity: .5; }
.wizard-track-list { display: grid; gap: 12px; margin-top: 16px; }
.wizard-track-list button { white-space: normal; text-align: left; overflow-wrap: anywhere; }
.wizard-review-row { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.wizard-review-row > div { min-width: 0; }
.wizard-review-row small, .wizard-review-row strong { display: block; overflow-wrap: anywhere; white-space: pre-wrap; }
.wizard-review-row small { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.wizard-review-row .text-button { min-height: 44px; flex: 0 0 auto; }
.wizard-cost { margin: 0; font-size: 20px; font-weight: 800; color: var(--brand-pale); }
.wizard-pane #word-editor { display: grid; gap: 16px; }
.wizard-pane #word-editor.hidden { display: none; }
.wizard-pane #word-editor-rows { max-height: none; overflow: visible; }
.wizard-pane #lyrics-design > h3, .wizard-pane #timed-text-panel > .section-head { display: none; }
@media (min-width: 700px) {
  .wizard-scenarios { grid-template-columns: 1fr 1fr; }
  .wizard-studio .studio-workspace:has(.studio-composition:not([hidden])) { display: grid; grid-template-columns: minmax(0, 1fr) 240px; align-items: start; }
  .wizard-studio .studio-form { grid-column: 1; grid-row: 1; }
  .wizard-studio .studio-composition { grid-column: 2; grid-row: 1; position: sticky; top: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .wizard-studio, .wizard-studio * { scroll-behavior: auto; transition: none; animation: none; }
}
