.film-frame.intent-intimate > img { filter: saturate(.78); animation-duration: 20s; }
.film-frame.intent-intimate .shade { background: rgba(8, 9, 13, .42); }
.film-frame.intent-motion > img { animation-duration: 4s; }
.film-frame.intent-motion .film-copy { animation: gentleFloat 2.2s ease-in-out infinite alternate; }
.film-frame.intent-clear .film-copy strong { font-size: clamp(62px, 9vw, 126px); text-shadow: 0 5px 30px #000, 0 0 4px #000; }
@keyframes gentleFloat { from { margin-top: -7px; } to { margin-top: 7px; } }

/* Batch A+B: feedback and honesty */
.field-error{display:block;margin-top:6px;color:#ffb3b3;font-size:14px;font-weight:700;line-height:1.35}
.field-error[hidden]{display:none}
input[aria-invalid="true"]{border-color:#ff8a8a!important;box-shadow:0 0 0 2px rgba(255,138,138,.35)}
.wizard-hint{margin:0;padding:8px 4px 0;color:#ffe680;font-size:14px;font-weight:700;text-align:center}
.wizard-hint[hidden]{display:none}
.wizard-note{margin:14px 0 0;color:#c9dcf8;font-size:14px;line-height:1.45}
.wizard .recipe{position:relative}
.wizard .recipe.selected{border:2px solid #ffe000;box-shadow:0 0 0 3px rgba(255,224,0,.35),0 7px 0 #8d7400,0 14px 25px #010b2338}
.wizard .recipe.selected::after{content:"\2713";position:absolute;top:8px;inset-inline-end:8px;width:26px;height:26px;border-radius:50%;background:#ffe000;color:#062353;font-weight:900;font-size:16px;line-height:26px;text-align:center;pointer-events:none}
.text-button.beta-tag{position:relative;font-size:11px;font-weight:800;letter-spacing:.08em;padding:0 12px;min-height:44px;border:0;border-radius:0}
.text-button.beta-tag::after{content:"";position:absolute;inset:11px 0;border:1px solid currentColor;border-radius:999px;pointer-events:none}
@media(min-width:621px){.viewport-wizard #pricingBtn.beta-tag{display:inline-block}}

/* Visual upgrade v1 (UX spec 2026-09-25, Q1-Q10). Loaded last so it wins the cascade. */
:root{--font-ui:Rubik,system-ui,sans-serif;--font-display:Syne,Rubik,sans-serif;
--bg-0:#061631;--bg-1:#0a2148;--surface-1:#0d2a56;--surface-2:#123465;
--line-soft:rgba(140,180,240,.18);--line-strong:rgba(140,180,240,.36);
--text-hi:#f2f7ff;--text-md:#cfe0fb;--text-lo:#a9c2e8;
--accent:#ffd400;--accent-ink:#062353;--focus:#ffd400;
--r-sm:12px;--r-md:18px;--r-lg:24px;--r-xl:32px;
--e-1:0 1px 0 rgba(255,255,255,.06) inset,0 6px 18px rgba(2,11,36,.28);
--e-2:0 1px 0 rgba(255,255,255,.09) inset,0 14px 34px rgba(2,11,36,.42);
--ease:cubic-bezier(.2,.8,.2,1);--t-fast:.14s;--t-med:.24s;--t-slow:.42s}
html[lang="he"] *{letter-spacing:0!important}
/* Q10 focus */
:focus-visible{outline:3px solid var(--focus)!important;outline-offset:3px!important}
.topbar :focus-visible{outline-color:#062353!important}
.wizard .primary-action:focus-visible,.wizard .cover-generate:focus-visible,.wizard .cover-use:focus-visible{outline-color:#fff!important}
/* Q3 hierarchy */
.wizard-heading h1{color:var(--text-hi);font-size:clamp(26px,4vw,40px);line-height:1.12;text-shadow:none;letter-spacing:-.01em;font-family:var(--font-display);font-weight:700}
html[lang="he"] .wizard-heading h1{font-family:Rubik,sans-serif;font-weight:800;letter-spacing:-.02em!important}
.wizard .meta-row label,.wizard .credit-fields label{font-size:14px;font-weight:600;color:var(--text-md)}
.wizard .meta-row input,.wizard .credit-fields input{font-weight:500;color:var(--text-hi);border-color:var(--line-strong)}
.wizard .recipe b,.wizard .dropzone b,.wizard .visual-choice b,.wizard .source-card b{font-size:18px;font-weight:700;color:var(--text-hi)}
.wizard .recipe p,.wizard .dropzone small,.wizard .visual-choice small,.wizard .source-card small{font-size:14px;color:var(--text-lo);line-height:1.5}
/* Q9 fields */
.wizard input:focus,.wizard textarea:focus,.wizard select:focus{border-color:var(--accent)!important;box-shadow:0 0 0 3px rgba(255,212,0,.22)}
.field-error::before{content:"! ";font-weight:900}
/* Q4 cards: original 3D slab look is kept (owner decision 2026-09-25); only selection cue added */
.wizard .visual-choice:active,.wizard .source-card:active,.wizard .recipe:active{transform:scale(.99)}
.wizard .visual-choice[aria-pressed="true"],.wizard .visual-choice.selected,.wizard .source-card.selected,.wizard .recipe.selected{border-color:#ffe000!important;box-shadow:inset 0 2px 3px #ffe00033,inset 0 -4px 7px #00143780,0 6px 0 #8d7400,0 12px 26px #010b2338!important}
.wizard .visual-choice{position:relative}
.wizard .visual-choice[aria-pressed="true"]::after,.wizard .visual-choice.selected::after{content:"\2713";position:absolute;top:8px;inset-inline-end:8px;width:26px;height:26px;border-radius:50%;background:var(--accent);color:var(--accent-ink);font-weight:900;font-size:16px;line-height:26px;text-align:center}
/* Q5 buttons */
.wizard .primary-action,.wizard .cover-generate,.wizard .cover-use{transition:transform var(--t-fast) var(--ease),filter var(--t-fast)}
@media(hover:hover){.wizard .primary-action:not(:disabled):hover{transform:translateY(-2px);filter:brightness(1.05)}}
.wizard .primary-action:disabled,.wizard .cover-generate:disabled{opacity:.45;filter:saturate(.6);box-shadow:none;cursor:not-allowed}
.wizard-actions .back,.wizard-link{min-height:44px;border:1px solid var(--line-soft);border-radius:var(--r-md);padding:0 18px;color:var(--text-md);text-decoration:none}
.wizard-actions .back:hover:not(:disabled),.wizard-link:hover:not(:disabled){background:rgba(255,255,255,.08)}
.cover-generate.loading{opacity:.6}
.wizard-menu-button{min-width:44px;min-height:44px}
/* Q8 progress */
.progress-track i{transition:width var(--t-slow) var(--ease);box-shadow:0 0 12px rgba(255,212,0,.5)}
.progress-copy b{color:var(--text-hi);font-size:14px;font-weight:700}.progress-copy small{color:var(--text-lo);font-size:13px;font-variant-numeric:tabular-nums}
.stage.active{animation-duration:.24s}
@keyframes stageIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
/* Q7 header */
.viewport-wizard .topbar{background:linear-gradient(120deg,#cfe3ff,#9cc4f7);border-bottom:1px solid rgba(255,255,255,.5);box-shadow:0 6px 24px #020d253d}
.viewport-wizard .brand,.brand{filter:none}
.viewport-wizard .language-switcher button{min-width:44px;min-height:44px}
@media(max-width:420px){
 .viewport-wizard .brand{width:96px;flex-basis:96px}
 .viewport-wizard .language-switcher button{min-width:44px;min-height:44px;padding:0;font-size:13px}
 .viewport-wizard .language-switcher{padding:0;gap:0}
 .viewport-wizard .topbar{padding-inline:6px;gap:2px}
 .hdr-btn.projects-toggle{width:44px;min-width:44px;min-height:44px;padding:0;justify-content:center}
 .hdr-btn.projects-toggle .hdr-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
}
.moment>div button{min-height:44px;min-width:44px}
/* Q6 live title card in wizard step 1 */
.wizard .live-canvas{display:block;position:relative;isolation:isolate;overflow:hidden;min-height:0;height:min(28dvh,220px);transform:none;border-radius:var(--r-lg);flex:none;
 background:radial-gradient(circle at 80% 15%,rgba(255,212,0,.35) 0 6%,transparent 24%),linear-gradient(145deg,rgba(10,33,72,.95) 0%,rgba(75,40,198,.85) 58%,rgba(12,95,240,.85) 100%);box-shadow:var(--e-2);border:1px solid var(--line-soft)}
.wizard .live-canvas::before{content:"";position:absolute;inset:0;z-index:-1;opacity:.06;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E")}
.wizard .live-canvas::after{display:none}
.wizard .live-canvas>b,.wizard .live-canvas .canvas-grid,.wizard .live-canvas .sound-rings,.wizard .live-canvas .beat-line,.wizard .live-canvas .canvas-copy small{display:none}
.wizard .live-canvas .canvas-copy{position:absolute;inset:0 clamp(20px,5%,40px);top:0;transform:none;justify-content:center;gap:10px}
.wizard .live-canvas .canvas-copy strong{max-width:100%;font-family:var(--font-display);font-weight:800;font-size:clamp(28px,6vw,44px);line-height:1.1;letter-spacing:-.01em;color:#fff;text-shadow:none;animation:none;padding-bottom:6px}
html[lang="he"] .wizard .live-canvas .canvas-copy strong{font-family:Rubik,sans-serif}
.wizard .live-canvas .canvas-copy span{margin:0;font-size:clamp(16px,3.4vw,20px);font-weight:400;color:var(--text-md)}
.wizard .live-canvas .canvas-copy span::after{content:"";display:block;margin-top:14px;width:42%;height:4px;border-radius:2px;background:var(--accent)}
.wizard-screen[data-screen="song"]:has(#titleInput:placeholder-shown) .canvas-copy strong,.wizard-screen[data-screen="song"]:has(#artistInput:placeholder-shown) .canvas-copy span{opacity:.72}
@media(max-height:700px){.wizard .live-canvas{display:none}}
.skip-link{min-height:44px}
.g-header,.g-btn.g-header{min-width:44px;min-height:44px}
@media(max-width:620px){.g-header{width:44px}.viewport-wizard .brand{height:44px;display:flex;align-items:center}}
.wizard .rights-notice .text-button{display:inline-flex;align-items:center;min-height:44px;padding:0 6px;color:#cfe3ff;text-decoration:underline;text-underline-offset:3px;font-size:15px}
.wizard .live-canvas{height:min(24dvh,200px)}
.wizard .live-canvas .canvas-copy strong{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:clamp(26px,5.4vw,42px)}
@media(max-height:760px){.wizard .live-canvas{display:none}}
.wizard .live-canvas .canvas-copy span{color:var(--text-hi)}
.wizard-screen[data-screen="song"]:has(#titleInput:placeholder-shown) .canvas-copy strong,.wizard-screen[data-screen="song"]:has(#artistInput:placeholder-shown) .canvas-copy span{opacity:.82}

/* QA round fixes: D1-D3 and single language control */
.hdr-btn.projects-toggle{min-height:44px}
.wizard .live-canvas .canvas-copy strong{padding-bottom:0;line-height:1.2;max-height:2.4em}
.review-head>span{color:#7ee8bd}.review-head>span i{background:#7ee8bd}
.confidence.amber{color:#ffd58a}
.cover-mini{color:#ffe680}
/* language control */
.viewport-wizard .language-switcher,.language-switcher{position:relative;display:block;padding:0;border:0;background:none;box-shadow:none;border-radius:0}
.lang-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px;padding:0 10px;border:1px solid rgba(8,40,95,.25);border-radius:14px;background:rgba(8,40,95,.08);color:#062353;font:700 14px/1 var(--font-ui);cursor:pointer}
.lang-trigger:hover{background:rgba(8,40,95,.16)}
.lang-trigger svg{flex:none;transition:transform var(--t-fast)}
.lang-trigger[aria-expanded="true"] svg{transform:rotate(180deg)}
.lang-menu{position:absolute;top:calc(100% + 6px);right:0;left:auto;z-index:60;min-width:160px;max-width:calc(100vw - 24px);max-height:min(60vh,320px);overflow-y:auto;margin:0;padding:6px;list-style:none;background:#0a2148;border:1px solid var(--line-strong);border-radius:14px;box-shadow:var(--e-2)}
.lang-menu[hidden]{display:none}
.lang-option{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:0 14px;border-radius:10px;color:var(--text-hi);font:500 16px/1 var(--font-ui);cursor:pointer}
.lang-option b{visibility:hidden;color:var(--accent)}
.lang-option[aria-selected="true"]{background:rgba(255,212,0,.14);font-weight:700}
.lang-option[aria-selected="true"] b{visibility:visible}
.lang-option:hover,.lang-option:focus{background:rgba(255,255,255,.12)}
.lang-menu :focus-visible{outline-color:#ffd400!important;outline-offset:-3px!important}
@media(max-width:420px){.viewport-wizard .language-switcher{padding:0;gap:0}.lang-trigger{padding:0 6px;gap:3px}}
[dir="rtl"] .lang-menu{left:0;right:auto}

/* Guest account button: visible "Sign in" label on desktop, icon-only on mobile */
.g-hdr-text{display:none}
@media(min-width:900px){.g-btn.g-header{width:auto;padding:0 14px;gap:8px;white-space:nowrap}.g-header .g-hdr-text{display:inline;font-size:14px;font-weight:700}}

/* Font chooser (look step). Same 3D slab treatment as .recipe / .source-card. */
.fonts-root{display:flex;flex-direction:column;gap:14px;min-width:0}
.font-targets{display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:#c9dcf8;font-size:14px}
.font-targets>span{flex:1 0 100%;font-weight:700}
.font-target{flex:1 1 150px;min-height:44px;padding:8px 14px;border:1px solid #84aff542;border-radius:14px;background:#103062;color:#d6e8ff;font:inherit;font-weight:700;cursor:pointer}
.font-target[aria-pressed="true"]{border:2px solid #ffe000;box-shadow:0 5px 0 #8d7400,0 10px 20px #010b2338;color:#fff}
.font-summary{margin:0;color:#ffe680;font-size:14px;font-weight:700}
.font-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:4px 6px 10px}
.font-opt{position:relative;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;min-width:0;min-height:64px;padding:10px 12px;text-align:start;border:1px solid #84aff542;border-radius:16px;background:#103062;color:#d6e8ff;cursor:pointer;font:inherit}
.font-opt.selected{border:2px solid #ffe000;box-shadow:inset 0 2px 3px #ffe00033,inset 0 -4px 7px #00143780,0 6px 0 #8d7400,0 12px 26px #010b2338}
.font-opt .font-name{font-size:20px;line-height:1.2;color:#fff;font-weight:600}
.font-opt .font-sample{flex:1 0 100%;font-size:17px;line-height:1.35;color:#c9dcf8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.font-tag{font-size:11px;font-weight:700;padding:2px 7px;border-radius:99px;background:#ffffff1f;color:#dce8ff}
.font-auto{grid-column:1/-1}.font-auto .font-name{font-family:inherit;font-size:17px}
.font-custom{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid #84aff542;border-radius:16px;background:#0a244d;color:#d6e8ff}
.font-upload{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border:1px solid #84aff56b;border-radius:14px;background:#103062;color:#fff;font-weight:700;cursor:pointer;align-self:flex-start}
.font-upload input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.font-upload:focus-within{outline:3px solid #ffe000;outline-offset:2px}
@media(max-width:620px){.font-list{grid-template-columns:1fr}}
/* cover result: keep the action buttons always visible inside the scrolling wizard body */
.cover-result-actions{position:sticky;bottom:0;z-index:3;padding:10px 0 6px;background:linear-gradient(180deg,rgba(11,31,72,0),#0b1f48 28%)}
.cover-result img{max-height:min(216px,26vh);width:100%;object-fit:cover}

/* Real-data sync screen: purpose line, rough-estimate note, song chip, 3-line pages */
.sync-intro{margin:0 0 14px}
.sync-purpose{margin:0 0 8px;font-size:17px;font-weight:700;line-height:1.5;color:#eaf1ff}
.sync-rough,.sync-note{margin:0 0 6px;font-size:13px;line-height:1.5;color:#b9c9e6}
.sync-note{color:#ffc36b;font-weight:600}
.song-chip{border-radius:20px;padding:12px 16px;margin:0 0 14px;background:var(--navy);color:#fff}
.song-chip{display:flex;align-items:center;gap:12px}
.song-chip>div{display:flex;flex-direction:column;min-width:0}
.song-chip b{overflow-wrap:anywhere}
.song-chip small{color:#aab8d0}
.moment-empty{margin:0;padding:18px 16px;color:#b9c9e6}
.waveform{min-height:44px;cursor:pointer}
.waveform i{flex:1 1 0;min-width:1px;max-width:4px}
.moment>div button,.moment .nudge{min-width:44px;min-height:44px;width:44px;height:44px}
.moment{grid-template-columns:44px 70px minmax(0,1fr) auto auto}
.moment .moment-play{min-width:44px;min-height:44px;width:44px;height:44px;font-size:13px}
.moment time{display:block}
.moment>div{display:flex}
.moment-play:disabled,#playBtn:disabled{opacity:.45}
.moment>b{overflow-wrap:anywhere}
@media(max-width:900px){
 .moment{grid-template-columns:44px 1fr;grid-template-areas:"p t" "p b" "g n";row-gap:6px}
 .moment>.moment-play{grid-area:p;align-self:start}
 .moment>time{display:block;grid-area:t}
 .moment>b{grid-area:b}
 .moment>time,.moment>div{display:flex}
 .moment>.confidence{grid-area:g;grid-column:auto}
 .moment>div{display:flex;grid-area:n;grid-column:auto;justify-self:end}
}
:root[dir=rtl] .moment-play{direction:ltr}
.wave-time{direction:ltr}
.track #playBtn{width:44px;height:44px;min-width:44px}

/* touch targets >=44px (QA L2) */
#titlesBtn,.save-project-btn,#momentPrevious,#momentNext{min-height:44px;min-width:44px}
.save-project-btn{padding-block:10px}
.manual-panel .field-head label,label.consent,.face-consent,.rights-notice .consent{min-height:44px;display:flex;align-items:center;gap:10px}
.manual-panel .field-head label{cursor:pointer}
.manual-panel .field-head label>span{display:inline-flex;align-items:center;min-height:44px}
label.consent input[type=checkbox],.face-consent input[type=checkbox]{min-width:24px;min-height:24px;flex:none}
/* Quick tweaks are now applied by the render engine (setIntent) to the preview canvas AND the export; no CSS canvas filters. */

/* ===== FIT-TO-VIEWPORT PASS (2026-09-25) =====
   Goal: no wizard screen scrolls inside #wizardBody at 1280x720, 1440x800, 1512x776, 1920x1080, 390x844, 375x667.
   1) short viewports get a compact chrome; 2) heavy screens (result, sync, preview) re-layout into two columns;
   3) app.js fitWizard() adds data-fit=1..3 on .wizard only while the body still overflows (progressive collapse).
   scripts/fit-check.mjs measures all of it in headless Chrome. */
.wizard-body{container-type:size;container-name:wb}
@media(max-height:820px){
 .viewport-wizard .topbar{height:56px}.viewport-wizard .brand{height:40px;width:150px}
 .viewport-wizard main{padding-block:8px;gap:6px}
 .wizard{padding:14px 24px 12px;gap:10px}
 .wizard .wizard-spark{width:44px!important;height:44px!important}
 .wizard-heading{gap:12px}.wizard-heading h1{font-size:clamp(22px,2.6vw,28px)}
 .wizard-actions{padding-top:10px;min-height:56px}
 .wizard-screen{gap:10px}
}
@media(max-width:620px){.wizard{padding:12px 14px 10px}.viewport-wizard .brand{width:120px}}
/* tier 1: drop decoration and secondary copy */
.wizard:is([data-fit="1"],[data-fit="2"],[data-fit="3"]) :is(.live-canvas,.wizard-note,.cover-privacy,.film-why,.sync-rough,.export-note,.intent-note,.no-text-note small,.song-chip){display:none!important}
.wizard:is([data-fit="1"],[data-fit="2"],[data-fit="3"]) .wizard-sub{display:none}
/* tier 2: compact spacing and controls */
.wizard:is([data-fit="2"],[data-fit="3"]) .wizard-screen{gap:8px}
.wizard:is([data-fit="2"],[data-fit="3"]) .wizard-heading h1{font-size:22px}
.wizard:is([data-fit="2"],[data-fit="3"]) .wizard-spark{width:36px!important;height:36px!important}
.wizard:is([data-fit="2"],[data-fit="3"]) :is(.dropzone,.visual-choice,.source-card){min-height:0!important;padding:12px 16px!important}
.wizard:is([data-fit="2"],[data-fit="3"]) .rights-notice{padding:10px 14px}
.wizard:is([data-fit="2"],[data-fit="3"]) .cover-prompt{padding:12px}
.wizard:is([data-fit="2"],[data-fit="3"]) .cover-prompt textarea{min-height:64px}
/* tier 3: last resort */
.wizard[data-fit="3"] :is(.sync-purpose,.audio-missing-note){display:none}
.wizard[data-fit="3"] .wizard-heading{gap:8px}.wizard[data-fit="3"] .wizard-spark{display:none}

/* --- lyrics text area fills the space instead of forcing a scroll --- */
.wizard .manual-panel{display:flex;flex-direction:column;gap:8px}
.wizard .manual-panel textarea{height:clamp(110px,calc(100cqh - 120px),340px);min-height:0;resize:none}

/* --- result: image left, choices right on wide; compact single column on narrow --- */
.wizard-screen[data-screen="result"] .cover-result{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);grid-template-areas:"img gal" "img txt" "img act" "img extra";align-content:start;column-gap:16px;row-gap:8px;padding:14px}
.wizard-screen[data-screen="result"] .cover-result>img{grid-area:img;max-height:none;height:auto;aspect-ratio:16/9;width:100%;object-fit:cover;border-radius:14px;align-self:start}
.wizard-screen[data-screen="result"] .cover-result>.gal{grid-area:gal}
.wizard-screen[data-screen="result"] .cover-result>div:not(.gal):not(.cover-result-actions):not(.result-extra){grid-area:txt}
.wizard-screen[data-screen="result"] .cover-result-actions{grid-area:act;position:static;background:none;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.wizard-screen[data-screen="result"] .cover-result-actions button{flex:1 1 40%;min-height:44px}
.wizard-screen[data-screen="result"] .cover-result-actions .cover-use{flex-basis:100%}
.wizard-screen[data-screen="result"] .result-extra{grid-area:extra;display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.wizard-screen[data-screen="result"] .result-extra .save-project-row{margin:0;align-items:flex-start;flex-direction:row;flex-wrap:wrap}
.wizard-screen[data-screen="result"] .gal-list{padding:10px 12px 4px}.wizard-screen[data-screen="result"] .gal-cell{width:72px}
.wizard-screen[data-screen="result"] .cover-result b{font-size:16px}.wizard-screen[data-screen="result"] .cover-result small{font-size:13px}
@media(max-width:719px){
 .wizard-screen[data-screen="result"] .cover-result{grid-template-columns:1fr;grid-template-areas:"img" "gal" "act" "extra";padding:10px}
 .wizard-screen[data-screen="result"] .cover-result>img{width:min(100%,calc((100cqh - 215px)*1.7778));justify-self:center}
 .wizard-screen[data-screen="result"] .cover-result>div:not(.gal):not(.cover-result-actions):not(.result-extra){display:none}
 .wizard-screen[data-screen="result"] .cover-result-actions .cover-use{flex-basis:100%}
 .wizard-screen[data-screen="result"] .gal-head{display:none}
}

/* --- sync: player + intro left, lines right on wide; compact rows on narrow --- */
.wizard-screen[data-screen="sync"]{max-width:900px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);grid-template-areas:"intro list" "player list" "player pager";column-gap:20px;row-gap:10px;align-content:start}
.wizard-screen[data-screen="sync"]>.sync-intro{grid-area:intro;margin:0}
.wizard-screen[data-screen="sync"]>.sync-player{grid-area:player;padding:14px 16px;align-self:start}
.wizard-screen[data-screen="sync"]>.review-head{grid-area:list;display:flex;align-self:start;margin:0 0 0}
.wizard-screen[data-screen="sync"]>.moment-list{grid-area:list;margin-top:52px}
.wizard-screen[data-screen="sync"]>.wizard-pager{grid-area:pager;margin:0}
.wizard-screen[data-screen="sync"] .sync-purpose{font-size:15px;margin:0 0 6px}
.wizard-screen[data-screen="sync"] .waveform{height:44px;min-height:44px}
.wizard-screen[data-screen="sync"] .moment{padding:8px 10px;gap:6px 10px}
@media(max-width:719px){
 .wizard-screen[data-screen="sync"]{display:flex;flex-direction:column}
 .wizard-screen[data-screen="sync"]>.moment-list{margin-top:0}
 .wizard-screen[data-screen="sync"]>.sync-intro{display:none}
 .wizard-screen[data-screen="sync"]>.sync-player{padding:10px 12px}
 .wizard-screen[data-screen="sync"]>.sync-player .waveform{height:36px;min-height:36px}
 .wizard-screen[data-screen="sync"]>.review-head{display:flex;align-items:baseline;justify-content:space-between;padding:0 4px}
 .wizard-screen[data-screen="sync"] .review-head small{display:none}
 .wizard-screen[data-screen="sync"] .moment{grid-template-columns:44px minmax(0,1fr) auto;grid-template-areas:"p b n" "p t n";row-gap:2px;padding:6px 8px}
 .wizard-screen[data-screen="sync"] .moment>.confidence{display:none}
}
.wizard-screen[data-screen="sync"] .review-head{align-items:center;justify-content:space-between;gap:10px}

/* --- preview: film left, choices right; more options collapsed --- */
.wizard-screen[data-screen="preview"]{max-width:940px;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);grid-template-areas:"film side";column-gap:18px;row-gap:10px;align-items:start;align-content:start}
.wizard-screen[data-screen="preview"]>.film-col{grid-area:film}
.wizard-screen[data-screen="preview"]>.export-result{grid-area:film;margin:0}
.wizard-screen[data-screen="preview"]>.preview-side{grid-area:side;display:flex;flex-direction:column;gap:10px;min-width:0}
.wizard-screen[data-screen="preview"]>.song-chip{display:none}
.wizard-screen[data-screen="preview"] .film-col .film-frame{width:100%}
.wizard-screen[data-screen="preview"] .film-col .film-controls,.wizard-screen[data-screen="preview"] .film-col .film-why{width:100%}
.wizard-screen[data-screen="preview"] .preview-side .export-actions,.wizard-screen[data-screen="preview"] .preview-side .export-progress{margin:0}
.wizard-screen[data-screen="preview"] .export-actions{gap:8px}
.wizard-screen[data-screen="preview"] .export-actions .primary-action{min-height:48px}
.wizard-screen[data-screen="preview"] .intent-panel{margin:0}
.wizard-screen[data-screen="preview"] .preview-options .intent-head{padding:8px 12px 2px}
.wizard-screen[data-screen="preview"] .preview-options .intent-head p{display:none}
.wizard-screen[data-screen="preview"] .preview-options .intent-choices{padding:6px 10px 10px;gap:6px}
.wizard-screen[data-screen="preview"] .intent-choices>button{padding:6px 10px;min-height:44px}
.wizard-screen[data-screen="preview"] .intent-choices>button small{display:none}
.wizard-screen[data-screen="preview"] .preview-more{border:1px solid rgba(145,179,235,.22);border-radius:14px;background:#0c2a57}
.wizard-screen[data-screen="preview"] .preview-more>summary{min-height:44px;display:flex;align-items:center;padding:0 14px;cursor:pointer;color:#dbe8ff;font-weight:700;list-style:none}
.wizard-screen[data-screen="preview"] .preview-more>summary::-webkit-details-marker{display:none}
.wizard-screen[data-screen="preview"] .preview-more>summary::after{content:"＋";margin-inline-start:auto}
.wizard-screen[data-screen="preview"] .preview-more[open]>summary::after{content:"－"}
.wizard-screen[data-screen="preview"] .preview-more-body{padding:0 12px 12px;display:grid;gap:10px}
.wizard-screen[data-screen="preview"]:has(#exportProgress:not([hidden])) :is(.intent-panel,.export-actions){display:none}
.wizard-screen[data-screen="preview"].exported>.film-col{display:none}
.wizard-screen[data-screen="preview"].exported :is(.intent-panel){display:none}
.wizard-screen[data-screen="preview"] .export-result{padding:10px}
.wizard-screen[data-screen="preview"] .export-result video{max-height:calc(100cqh - 130px);width:100%;justify-self:center}
.wizard-screen[data-screen="preview"] .export-result .primary-action{min-height:48px}
@media(max-width:719px){
 .wizard-screen[data-screen="preview"]{display:flex;flex-direction:column}
 .wizard-screen[data-screen="preview"] .film-col .film-frame{width:min(100%,calc((100cqh - 282px)*1.7778));margin-inline:auto}
 .wizard-screen[data-screen="preview"] .film-col .film-controls{width:100%}
 .wizard-screen[data-screen="preview"] .export-result video{max-height:calc(100cqh - 190px)}
}
@media(min-width:720px){
 .wizard-screen[data-screen="preview"] .film-col .film-frame{width:min(100%,calc((100cqh - 112px)*1.7778))}
}
.wizard :is(.save-project-btn,#sampleBtn,#titlesBtn){min-height:44px;border-radius:12px;padding:0 16px;font-weight:800;font-family:inherit;font-size:14px;cursor:pointer}
.wizard .export-row .back{border:1px solid var(--line-soft);border-radius:12px;color:#cbdfff;background:none;min-height:44px}
@media(min-width:720px){.wizard-screen[data-screen="result"] .cover-result>div:not(.gal):not(.cover-result-actions):not(.result-extra){display:grid;gap:2px;align-content:start}}
.wizard-screen[data-screen="sync"]>*{min-width:0}.wizard-screen[data-screen="sync"] .sync-player{max-width:100%;overflow:hidden}.wizard-screen[data-screen="sync"] .waveform{overflow:hidden;max-width:100%}

/* ===== READY-GRAPHIC CHECK panel ===== */
.wizard-screen[data-screen="ready"].has-check{max-width:900px}
.wizard-screen[data-screen="ready"].has-check #readyGraphicZone{min-height:0!important;padding:8px 14px!important;flex-wrap:nowrap;gap:12px}
.wizard-screen[data-screen="ready"].has-check #readyGraphicZone .drop-icon{width:36px!important;height:36px!important;font-size:20px}
.wizard-screen[data-screen="ready"].has-check #readyGraphicZone em{margin:0}
.ready-check:empty{display:none}
.ready-check{display:grid;gap:10px;border:1px solid rgba(145,179,235,.22);border-radius:16px;background:#0c2a57;padding:12px;--rg-h:150px}
.ready-check.busy{display:flex;align-items:center;gap:12px;padding:14px}
.rg-spin{width:22px;height:22px;border-radius:50%;border:3px solid rgba(255,255,255,.25);border-top-color:#ffe000;animation:rgspin .9s linear infinite;flex:none}
@keyframes rgspin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.rg-spin{animation:none}}
.rg-status,.rg-msg{margin:0;color:#dbe8ff;font-size:14px;line-height:1.45}.rg-msg.small{font-size:13px;color:#b5c7e8}.rg-msg.ok{color:#9be8b4;font-weight:700}.rg-msg.error{color:#ffb4a8;font-weight:700}
.rg-top{display:grid;grid-template-columns:auto minmax(0,1fr);gap:14px;align-items:start}
.rg-fig{margin:0;display:grid;gap:4px;min-width:0}.rg-fig figcaption{font-size:12px;color:#b5c7e8;text-align:center}
.rg-thumb{position:relative;aspect-ratio:var(--ar,1.7778);height:var(--rg-h);max-width:100%;border-radius:10px;overflow:hidden;background:#06152f;margin-inline:auto}
.rg-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.rg-box{position:absolute;box-sizing:border-box;pointer-events:none}.rg-box.busy{background:rgba(255,72,72,.30);outline:1px solid rgba(255,120,120,.55)}.rg-box.text{border:2px solid #ffe000;background:rgba(255,224,0,.18)}
.rg-info{display:grid;gap:6px;min-width:0}.rg-title{color:#fff;font-size:16px;line-height:1.3}
.rg-list{margin:0;padding-inline-start:18px;color:#dbe8ff;font-size:14px;line-height:1.4;display:grid;gap:3px}
.rg-legend{margin:0;display:flex;gap:12px;font-size:12px;color:#c9d9f5}.rg-legend span::before{content:"";display:inline-block;width:12px;height:12px;border-radius:3px;margin-inline-end:6px;vertical-align:-2px}.rg-legend .busy::before{background:rgba(255,72,72,.5)}.rg-legend .text::before{border:2px solid #ffe000}
.rg-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.rg-opt{display:grid;gap:2px;align-content:start;text-align:start;min-height:44px;padding:8px 12px;border:1px solid rgba(145,179,235,.28);border-radius:12px;background:#113362;color:#e6efff;font:inherit;cursor:pointer}
.rg-opt b{font-size:14px}.rg-opt small{font-size:12px;line-height:1.35;color:#b5c7e8}
.rg-opt-local{background:#163e77;border-color:#4b8dff}
.rg-opt:hover{background:#163e77}
.rg-compare{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rg-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.rg-actions .back,.rg-actions .primary-action{min-height:44px;width:auto;min-width:0;padding:0 16px;font-size:14px}
.rg-consent{align-items:flex-start;color:#dbe8ff;font-size:14px;line-height:1.4}.rg-consent input{margin-top:12px}
.rg-done{display:grid;gap:6px}
@media(max-width:719px){
 .ready-check{--rg-h:96px;padding:10px}
 .rg-top{grid-template-columns:1fr}.rg-options{grid-template-columns:1fr}.rg-opt small{display:none}
 .rg-thumb{height:auto;width:calc(var(--rg-h)*var(--ar,1.7778));max-width:100%}
 .rg-top{grid-template-columns:auto minmax(0,1fr)}.rg-list{font-size:13px}.rg-info .rg-msg.small,.rg-legend{display:none}
 .wizard-screen[data-screen="ready"].has-check #readyGraphicZone small{display:none}
}
.wizard:is([data-fit="1"],[data-fit="2"],[data-fit="3"]) .rg-opt small{display:none}
@media(max-width:719px){.ready-check{--rg-h:84px;gap:8px}.rg-options{gap:6px}.rg-opt{padding:4px 12px}.rg-title{font-size:15px}}
.wizard:is([data-fit="2"],[data-fit="3"]) .rg-opt b{font-size:13px;line-height:1.25}
.wizard[data-fit="3"] .rg-title{display:none}

/* ===== DOWNLOADS ===== */
.dl-pair{display:inline-flex;align-items:center;gap:6px;flex-wrap:nowrap}
.dl-label{font-size:13px;color:#c9d9f5;font-weight:700}
.dl-btn{min-width:44px;min-height:44px;padding:0 12px;border:1px solid rgba(145,179,235,.3);border-radius:12px;background:#12376b;color:#e6efff;font:800 13px/1 Rubik,sans-serif;cursor:pointer}
.dl-btn:hover{background:#163e77}.dl-btn.wide{padding:0 14px}
.dl-row{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center}
.dl-files{display:grid;gap:8px}.dl-files>b{color:#e6efff;font-size:14px}
.dl-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.dl-grid .dl-pair.wide{grid-column:1/-1;justify-content:space-between}
.export-row .dl-pack{grid-column:1/-1;min-height:44px;border-radius:12px;font-weight:800}
.wizard-screen[data-screen="result"] .cover-result-actions .cover-retry{flex:1 1 30%}
.wizard-screen[data-screen="result"] .cover-result-actions .cover-use{flex-basis:100%}
.gal-list{padding-bottom:18px}
.gal-dl{position:absolute;bottom:-12px;inset-inline-start:-12px;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;background:radial-gradient(circle,#0a1f45 0 12px,rgba(255,255,255,.45) 12.5px 13.5px,transparent 14px);color:#fff;font-size:15px;line-height:1;cursor:pointer;z-index:2}
.gal-dl:focus-visible{outline:2px solid #fff;outline-offset:-4px}
.dl-row .dl-btn{min-height:44px}
@media(max-width:719px){.dl-row{gap:4px 10px}.dl-label{font-size:12px}.dl-btn{padding:0 8px}}
.wizard:is([data-fit="2"],[data-fit="3"]) .rg-compare~.dl-row{display:none}

/* ===== MY FILES ===== */
.wizard-menu.myfiles{width:min(880px,calc(100vw - 24px));max-height:88dvh;padding:18px 20px}
.myfiles::backdrop,.mf-consent::backdrop{background:rgba(3,10,28,.7)}
.mf-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.mf-head h2{margin:0;color:#fff;font-size:24px}.mf-sub{margin:4px 0 0;color:#b5c7e8;font-size:14px}
.myfiles .wizard-menu-close{position:static;min-width:44px;min-height:44px;flex:none}
.mf-consent-box{display:grid;gap:8px;margin:10px 0;padding:12px 14px;border:1px solid rgba(255,224,0,.4);border-radius:14px;background:#0c2a57}.mf-consent-box[hidden]{display:none}.mf-consent-box p{margin:0;color:#dbe8ff;font-size:14px;line-height:1.5}.mf-consent-box .primary-action{justify-self:start;min-height:44px}
.mf-tools{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 8px;align-items:center}
.mf-search{flex:1 1 200px;min-height:44px;border-radius:12px!important;padding:0 14px!important}
.mf-file{display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.mf-tagbar{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.mf-tagbar:empty{display:none}
.mf-chip{min-height:44px;padding:0 14px;border:1px solid rgba(145,179,235,.3);border-radius:22px;background:#12376b;color:#e6efff;font:700 13px Rubik,sans-serif;cursor:pointer}.mf-chip.on{background:#ffe000;color:#062353;border-color:#ffe000}
.mf-status{margin:6px 0;color:#dbe8ff;font-size:14px;min-height:0}.mf-status:empty{display:none}
.mf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
.mf-card{display:grid;gap:6px;padding:8px;border:1px solid rgba(145,179,235,.25);border-radius:14px;background:#0c2a57;min-width:0}
.mf-thumb{position:relative;aspect-ratio:16/9;border-radius:9px;overflow:hidden;background:#06152f}.mf-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.mf-kind{position:absolute;inset-block-start:6px;inset-inline-start:6px;padding:2px 8px;border-radius:9px;background:rgba(6,21,47,.8);color:#fff;font-size:11px;font-weight:700}
.mf-name,.mf-tags{width:100%;min-height:44px;border-radius:10px!important;padding:0 10px!important;font-size:14px}.mf-name{font-weight:700}.mf-tags{font-size:13px}
.mf-actions{display:flex;flex-wrap:wrap;gap:6px}.mf-actions .dl-btn{flex:1 1 auto}.mf-use{width:100%;min-height:44px;padding:0 12px!important;font-size:14px!important}
.mf-usage{margin:10px 0 0;color:#9fb4d9;font-size:12px}.mf-usage:empty{display:none}
.mf-consent{width:min(480px,calc(100vw - 28px))}.mf-consent .mf-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.mf-consent h2{margin:0 0 8px;color:#fff;font-size:20px}.mf-consent p{color:#dbe8ff;line-height:1.5;margin:0}
.mf-pick,.mf-save{align-self:flex-start}
.wizard-screen[data-screen="result"] .result-extra .mf-save{min-height:44px}
@media(max-width:620px){.wizard-menu.myfiles{padding:14px 12px}.mf-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}}

.wizard:is([data-fit="2"],[data-fit="3"]) .result-extra .save-project-row{display:none}
.wizard[data-fit="3"] .ready-check>.rg-fig{display:none}
.wizard-screen[data-screen="result"] .result-extra .save-consent{font-size:11px;line-height:1.35;text-align:start;flex-basis:100%;margin:0}
.myfiles :is(.mf-search,.mf-name,.mf-tags){background:#081b3a!important;color:#d5e8ff;border:1px solid #5e8bcc66!important;font-family:inherit}
.myfiles :is(.mf-search,.mf-name,.mf-tags)::placeholder{color:#90aed7}
.myfiles :is(.mf-search,.mf-name,.mf-tags):focus{outline:2px solid #6caaff66;outline-offset:1px}
@media(max-width:719px){
 .wizard-screen[data-screen="result"] .cover-result-actions .cover-retry{flex:1 1 0;min-width:0;padding:0 4px;font-size:13px}
 .wizard-screen[data-screen="result"] .result-extra{flex-wrap:nowrap;gap:6px}
 .wizard-screen[data-screen="result"] .result-extra .wizard-link{flex:1 1 0;min-width:0;padding:4px 6px;font-size:13px;text-align:center;line-height:1.2}
 .wizard-screen[data-screen="result"] .cover-result>img{width:min(100%,calc((100cqh - 200px)*1.7778))}
}
.wizard:is([data-fit="2"],[data-fit="3"]) .ready-check{padding:8px;gap:6px}
.wizard:is([data-fit="2"],[data-fit="3"]) .rg-consent{font-size:13px;line-height:1.3}
.wizard[data-fit="3"] .rg-opt{padding-block:2px}
/* 44px targets on desktop too: projects panel collapse and Google sign-in */
.pp-collapse{width:44px;height:44px}.projects-panel .g-btn,.g-btn.g-panel{min-height:44px}

/* ===== ENGINE V2 UI: scene strip + fix panel + line chips (slab look kept: raised face, darker bottom edge, pressed = 2px down) ===== */
.scene-bar{display:grid;gap:6px;margin-top:8px;width:100%}
.scene-bar[hidden]{display:none}
.scene-strip{display:flex;gap:2px;height:12px;position:relative;border-radius:8px;overflow:hidden;background:#061a3d;cursor:pointer}
.scene-seg{flex-basis:0;min-width:6px;background:#2a5fb8;border-radius:2px}
.scene-seg.cur{background:#ffd400}.scene-seg.ov{box-shadow:inset 0 -3px 0 #8fe3a8}
.scene-mark{position:absolute;top:0;height:3px;background:#fff;opacity:.85;pointer-events:none;border-radius:2px}
.scene-row{display:flex;align-items:center;gap:6px;min-width:0}
.scene-label{flex:1 1 auto;min-width:0;font-size:13px;font-weight:700;color:var(--text-md);text-align:center;line-height:1.25;overflow-wrap:anywhere}
.scene-label,.scene-scope p{unicode-bidi:plaintext}
.scene-nav,.scene-x,.scene-fix,.scene-choice{min-height:44px;min-width:44px;border:1px solid var(--line-strong);border-radius:12px;background:#123465;color:var(--text-hi);font:800 14px/1.2 Rubik,system-ui,sans-serif;cursor:pointer;box-shadow:0 1px 0 rgba(255,255,255,.12) inset,0 4px 0 #061a3d;transition:transform var(--t-fast) var(--ease),box-shadow var(--t-fast)}
.scene-nav{font-size:22px;padding:0 4px}
.scene-fix{padding:0 14px;white-space:nowrap}
.scene-nav:active,.scene-x:active,.scene-fix:active,.scene-choice:active{transform:translateY(2px);box-shadow:0 1px 0 rgba(255,255,255,.12) inset,0 2px 0 #061a3d}
.scene-choice{padding:6px 12px}
.scene-choice.on,.scene-choice[aria-pressed="true"],.scene-choice[aria-checked="true"]{border-color:#ffe000;box-shadow:inset 0 2px 3px #ffe00033,0 4px 0 #8d7400}
.scene-choice:disabled{opacity:.45;cursor:not-allowed}
:root[dir=rtl] .scene-nav{transform:scaleX(-1)}
:root[dir=rtl] .scene-nav:active{transform:scaleX(-1) translateY(2px)}
.scene-dialog{position:fixed;inset:auto;inset-block-end:12px;inset-inline-end:12px;margin:0;width:min(380px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:visible;padding:14px;border:1px solid var(--line-strong);border-radius:20px;background:#0a2148;color:var(--text-hi);box-shadow:0 6px 0 #061a3d,0 24px 60px rgba(2,11,36,.6);z-index:80;display:none;gap:10px}
.scene-dialog[open]{display:grid}
.scene-dlg-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.scene-dlg-head h2{margin:0;font-size:18px;font-family:var(--font-ui);color:var(--text-hi)}
.scene-x{font-size:22px;padding:0}
.scene-mini{display:none;width:100%;max-width:220px;aspect-ratio:16/9;border-radius:10px;justify-self:center;background:#000}
.scene-scope{display:flex;align-items:center;gap:6px}.scene-scope p{flex:1;margin:0;font-size:13px;font-weight:700;color:var(--text-md);text-align:center;line-height:1.3}
.scene-group{display:grid;gap:6px}.scene-group>b{font-size:13px;color:var(--text-lo);font-weight:700}
.scene-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.scene-all{display:flex;align-items:center;gap:10px;min-height:44px;font-size:14px;font-weight:600;color:var(--text-md)}
.scene-all input{width:24px;height:24px;flex:none}
.scene-note{margin:0;font-size:12.5px;line-height:1.4;color:var(--text-lo)}
.scene-status{margin:0;min-height:0;font-size:13px;font-weight:700;color:#9be8b4}.scene-status:empty{display:none}.scene-status.error{color:#ffb4a8}
.scene-lines{display:grid;gap:4px}.scene-lines>b{font-size:13px;color:var(--text-lo);font-weight:700}
.scene-line{display:flex;align-items:center;gap:8px;min-height:32px;font-size:13px}
.scene-line-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scene-line time{font-variant-numeric:tabular-nums;color:var(--text-lo);font-size:12px}
.scene-actions{display:flex;flex-wrap:wrap;gap:8px}.scene-actions .scene-choice{flex:1 1 auto}
/* line chips: icon + text, never colour only */
.chip{display:inline-flex;align-items:center;gap:4px;min-height:24px;padding:0 8px;border-radius:999px;border:1px solid var(--line-strong);font-size:12px;font-weight:800;white-space:nowrap;color:var(--text-md);background:#0d2a56}
.chip-ico{font-style:normal;font-size:12px;line-height:1}
.chip-set{color:#9be8b4;border-color:#3e8f5a}.chip-check{color:#ffd27a;border-color:#c99223}
.chip-guess{color:#ffd27a;border:1px dashed #c99223}.chip-none{color:#a9b6cf;border-color:#5b6b88}.chip-you{color:#9cc5ff;border-color:#4d86d8}
@media(max-width:719px){
 .scene-dialog{inset-inline:8px;inset-block-end:8px;width:auto;max-height:calc(100vh - 16px);padding:10px;gap:6px}
 .scene-mini{display:block;max-width:160px}
 .scene-note{display:none}.scene-lines .scene-line:nth-of-type(n+3){display:none}
}
@media(prefers-reduced-motion:reduce){.scene-nav,.scene-x,.scene-fix,.scene-choice{transition:none}}
.scene-fix .short{display:none}
@media(max-width:719px){.scene-fix .long{display:none}.scene-fix .short{display:inline}.scene-fix{padding:0 8px;font-size:13px;min-width:44px;flex:0 0 auto;white-space:nowrap}.scene-label{font-size:12px}}
.wizard-screen[data-screen="preview"]:has(#exportProgress:not([hidden])) .scene-bar{display:none}
.scene-dialog{grid-template-columns:minmax(0,1fr);box-sizing:border-box}
.scene-dialog>*{min-width:0}
.scene-choice{min-width:0;overflow-wrap:anywhere;hyphens:auto}
@media(max-width:719px){.scene-choice{font-size:13px;padding:4px 6px}.scene-scope p{font-size:12px}}
.scene-lines,.scene-group,.scene-scope{grid-template-columns:minmax(0,1fr)}.scene-scope{display:flex}
.scene-line{min-width:0;max-width:100%}
@media(max-width:719px){.scene-mini{max-width:112px}.scene-dialog{gap:5px}.scene-lines .scene-line{min-height:28px}}

/* ===== TIMING UX (spec 2026-09-25-timing-editor-ux.md). Original 3D slab look: raised face, darker bottom edge, pressed = 2px down. ===== */
.wizard-screen[data-screen="sync"]{display:block;max-width:960px}
.tm-root{display:grid;gap:12px;align-content:start;min-width:0}
.tm-root>*{min-width:0}
.tm-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.tm-card{display:flex;flex-direction:column;align-items:flex-start;gap:10px;text-align:start;min-height:150px;padding:16px;border-radius:24px;border:1px solid #608de366;background:linear-gradient(145deg,#174487,#0b2855 80%);box-shadow:inset 0 2px 3px #b7d8ff25,inset 0 -4px 7px #00143780,0 7px 0 #04142e,0 14px 25px #010b2338;color:var(--text-hi);font-family:inherit;cursor:pointer;transition:transform .14s ease,border-color .14s ease}
.tm-card b{font-size:17px;font-weight:700;color:#d6e8ff}
.tm-card small{display:block;margin-top:4px;font-size:13.5px;line-height:1.45;color:#a9c7ef}
.tm-card[aria-checked="true"]{border-color:#ffe000;box-shadow:inset 0 2px 3px #ffe00033,inset 0 -4px 7px #00143780,0 6px 0 #8d7400,0 12px 26px #010b2338}
.tm-card:active{transform:translateY(2px)}
@media(hover:hover){.tm-card:hover{transform:translateY(-3px);border-color:#a6cbff}}
.tm-ico{display:inline-grid;place-items:center;width:44px;height:44px;flex:none;border-radius:14px;background:rgba(43,109,230,.24);color:#b7ceff}
.tm-consent{display:flex;align-items:flex-start;gap:10px;margin:0;padding:10px 14px;border-radius:14px;border:1px solid var(--line-soft);background:#0c2a57;color:var(--text-md);font-size:14px;line-height:1.45}
.tm-consent .tm-ico{width:28px;height:28px;border-radius:9px;background:none}
.tm-warn{margin:0;color:#ffd27a;font-weight:700;font-size:14px;line-height:1.45}
.tm-note{margin:0;color:var(--text-lo);font-size:13px;line-height:1.5}
.tm-what{border:1px solid var(--line-soft);border-radius:14px;background:#0c2a57}.tm-what>summary{min-height:44px;display:flex;align-items:center;padding:0 14px;cursor:pointer;color:var(--text-md);font-weight:700;font-size:14px}.tm-what>p{margin:0;padding:0 14px 12px;color:var(--text-lo);font-size:13.5px;line-height:1.5}
.tm-empty{display:grid;gap:10px;justify-items:start;padding:14px;border:1px solid var(--line-soft);border-radius:16px;background:#0c2a57;color:var(--text-md)}
/* buttons in the timing UI share the slab treatment */
.tm-root :is(.cover-retry,.tm-step,.tm-segbtn,.tm-scope,.tm-rowplay,.tm-play){min-height:44px;min-width:44px;border:1px solid var(--line-strong);border-radius:12px;background:#123465;color:var(--text-hi);font:800 14px/1.2 Rubik,system-ui,sans-serif;padding:0 12px;cursor:pointer;box-shadow:0 1px 0 rgba(255,255,255,.12) inset,0 4px 0 #061a3d;transition:transform .14s ease,box-shadow .14s}
.tm-root :is(.cover-retry,.tm-step,.tm-segbtn,.tm-scope,.tm-rowplay,.tm-play):active{transform:translateY(2px);box-shadow:0 1px 0 rgba(255,255,255,.12) inset,0 2px 0 #061a3d}
.tm-root :is(.cover-retry,.tm-step,.tm-segbtn,.tm-scope):disabled{opacity:.45;cursor:not-allowed}
.tm-step{font-size:18px!important}
.tm-progress{height:14px;border-radius:9px;background:#03142d;box-shadow:inset 0 2px 5px #000a;border:1px solid #49699966;overflow:hidden;direction:ltr}
.tm-progress i{display:block;height:100%;width:0;border-radius:9px;background:linear-gradient(#fff377,#ffe000 55%,#d7a900);transition:width .4s ease}
.tm-progress.indet i{width:35%;animation:tmind 1.4s ease-in-out infinite alternate}
@keyframes tmind{from{margin-inline-start:0}to{margin-inline-start:65%}}
.tm-phases{display:flex;gap:10px;flex-wrap:wrap;list-style:none;margin:0;padding:0;counter-reset:ph}
.tm-phases li{counter-increment:ph;display:flex;align-items:center;gap:8px;color:var(--text-lo);font-size:14px;font-weight:600}
.tm-phases li::before{content:counter(ph);display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1px solid var(--line-strong);font-size:12px;font-weight:800}
.tm-phases li.cur{color:#fff;font-weight:800}.tm-phases li.cur::before{background:#ffe000;color:#062353;border-color:#ffe000}
.tm-phases li.done::before{content:"✓";color:#9be8b4;border-color:#3e8f5a}
.tm-elapsed{margin:0;color:var(--text-lo);font-size:13px}
.tm-summary{display:grid;gap:8px;padding:16px;border-radius:20px;border:1px solid #608de366;background:linear-gradient(145deg,#174487,#0b2855 80%);box-shadow:inset 0 2px 3px #b7d8ff25,inset 0 -4px 7px #00143780,0 7px 0 #04142e,0 14px 25px #010b2338}
.tm-summary>b{font-size:18px;color:#eaf1ff}.tm-summary>p{margin:0;color:var(--text-md);font-size:14.5px;line-height:1.5}
.tm-summary.tm-partial{border-color:#c99223}.tm-summary.tm-none{border-color:#7a879e}
.tm-details{color:var(--text-lo);font-size:12.5px}.tm-details summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.tm-details code{direction:ltr;unicode-bidi:embed}
.tm-acts{display:flex;flex-wrap:wrap;gap:10px}
.tm-wave{position:relative;flex:1;height:56px;border-radius:12px;background:#061a3d;border:1px solid var(--line-soft);overflow:hidden;cursor:pointer;min-width:0}
.tm-wave.tm-wave-sm{height:44px}
.tm-bars{position:absolute;inset:0;display:flex;align-items:center;gap:1px;padding:0 4px}.tm-bars i{flex:1 1 0;min-width:1px;max-width:5px;background:#3d72d1;border-radius:1px;align-self:center}
.tm-mark{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background:#9be8b4;opacity:.9}
.tm-mark.m-check,.tm-mark.m-guess{background:#ffc36b}.tm-mark.m-guess{background:repeating-linear-gradient(#ffc36b 0 3px,transparent 3px 6px)}.tm-mark.m-none{background:#7a879e}.tm-mark.m-you{background:#7fb2ff}.tm-mark.m-tap{background:#7fb2ff}.tm-mark.m-likely{background:#cfe0fb}.tm-mark.sel{width:4px;margin-left:-2px;background:#ffe000}
.tm-head{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background:#fff;left:0;pointer-events:none}
.tm-time{font-variant-numeric:tabular-nums;color:var(--text-md);font-size:13px;white-space:nowrap}
/* tap-to-sync */
.tm-ready{display:grid;gap:12px;justify-items:start}.tm-hint{margin:0;font-size:18px;font-weight:700;color:#eaf1ff}
.tm-delay{display:flex;align-items:center;gap:10px}.tm-delay-v{min-width:130px;text-align:center;font-weight:700;color:var(--text-md);font-size:14px}
.tm-start{min-width:200px}
.tm-taptop{display:flex;align-items:center;justify-content:space-between;gap:10px}.tm-lineof{font-weight:800;color:var(--text-md);font-size:14px}
.tm-lines{display:grid;gap:6px;padding:10px 12px;border-radius:16px;background:#0c2a57;border:1px solid var(--line-soft)}
.tm-prev,.tm-next{margin:0;font-size:14px;color:var(--text-lo);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:1.4em}.tm-next{font-size:16px;color:var(--text-md)}
.tm-now{margin:0;font-size:clamp(22px,3.4vw,34px);font-weight:800;line-height:1.25;color:#fff;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.tm-tag{display:inline-block;margin-inline-end:8px;padding:1px 8px;border-radius:999px;background:#ffe000;color:#062353;font-size:12px;font-weight:800;vertical-align:middle}
.tm-ctl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.tm-tapbtn{display:grid;place-items:center;align-content:center;gap:2px;min-height:110px;width:100%;border-radius:24px;border:1px solid #ffe000;background:linear-gradient(#fff377,#ffe000 55%,#d7a900);color:#062353;font-family:inherit;cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none;box-shadow:inset 0 2px 3px #fff8,inset 0 -4px 7px #8d740080,0 7px 0 #8d7400,0 14px 25px #010b2338;transition:transform .08s ease,box-shadow .08s}
.tm-tapbtn b{font-size:28px;letter-spacing:.04em}.tm-tapbtn small{font-size:13px;font-weight:700;opacity:.8}
.tm-tapbtn:active,.tm-tapbtn.hit{transform:translateY(4px);box-shadow:inset 0 2px 3px #fff8,inset 0 -4px 7px #8d740080,0 3px 0 #8d7400}
/* editor */
.tm-head-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.tm-seg{display:flex;gap:6px;margin-inline-start:auto}.tm-segbtn[aria-pressed="true"]{border-color:#ffe000!important;box-shadow:inset 0 2px 3px #ffe00033,0 4px 0 #8d7400!important}
.tm-scene{margin:0;padding:6px 12px;border-radius:12px;background:#0c2a57;border:1px solid var(--line-soft);color:var(--text-md);font-size:13.5px;font-weight:700}
.tm-transport{display:flex;align-items:center;gap:10px}.tm-play{font-size:16px!important;flex:none;width:44px;padding:0!important}
.tm-body{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:14px;align-items:start}
.tm-list{display:grid;gap:6px}
.tm-row{display:flex;gap:6px;align-items:stretch;min-height:44px}
.tm-rowplay{flex:none;width:44px;padding:0!important;font-size:13px!important}
.tm-rowsel{flex:1;min-width:0;display:flex;align-items:center;gap:8px;min-height:44px;padding:0 10px;border-radius:12px;border:1px solid var(--line-soft);background:#0c2a57;color:var(--text-hi);font-family:inherit;font-size:14px;text-align:start;cursor:pointer}
.tm-row.sel .tm-rowsel{border-color:#ffe000;border-inline-start:5px solid #ffe000;background:#10366f}
.tm-row.now .tm-rowsel{outline:2px solid #7fb2ff}
.tm-num{flex:none;min-width:22px;color:var(--text-lo);font-variant-numeric:tabular-nums;font-size:12.5px}
.tm-t{flex:none;min-width:52px;font-variant-numeric:tabular-nums;color:var(--text-md);font-size:13px}
.tm-tx{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tm-panel{display:grid;gap:8px;padding:12px;border-radius:18px;border:1px solid #608de366;background:linear-gradient(145deg,#174487,#0b2855 80%);box-shadow:inset 0 2px 3px #b7d8ff25,inset 0 -4px 7px #00143780,0 6px 0 #04142e}
.tm-panel[hidden]{display:none}
.tm-sel-top{display:flex;align-items:center;gap:8px}.tm-sel-n{color:var(--text-md);font-size:13px}
.tm-sel-tx{margin:0;font-size:16px;font-weight:700;color:#fff;line-height:1.35;max-height:2.7em;overflow:hidden}
.tm-nudge{display:flex;align-items:center;justify-content:center;gap:10px}.tm-sel-time{min-width:84px;text-align:center;font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;color:#fff}
.tm-pacts{display:flex;flex-wrap:wrap;gap:8px}.tm-pacts .cover-retry{flex:1 1 auto}
.tm-hear{display:flex;align-items:center;gap:8px;min-height:44px;font-size:13px;color:var(--text-md)}.tm-hear input{width:22px;height:22px}
.tm-pager{display:flex;align-items:center;justify-content:center;gap:10px}.tm-pager[hidden]{display:none}.tm-pageof{font-variant-numeric:tabular-nums;color:var(--text-md);font-size:14px}
.tm-nosum{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 12px;border-radius:14px;border:1px dashed #c99223;color:#ffd27a;font-size:13.5px;font-weight:700}.tm-nosum span{flex:1 1 220px}
.tm-empty-list{margin:0;padding:12px;color:var(--text-md);border:1px dashed var(--line-strong);border-radius:12px}
.tm-dialog{width:min(420px,calc(100vw - 24px));padding:16px;border:1px solid var(--line-strong);border-radius:20px;background:#0a2148;color:var(--text-hi);box-shadow:0 6px 0 #061a3d,0 24px 60px rgba(2,11,36,.6)}
.tm-dialog::backdrop{background:rgba(3,12,32,.6)}
.tm-dialog h2{margin:0 0 10px;font-size:18px;color:var(--text-hi)}
.tm-shift-row{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:10px}.tm-shift-row input{width:110px;min-height:44px;text-align:center;font-size:18px;font-weight:800;border-radius:12px;border:1px solid var(--line-strong);background:#061a3d;color:#fff}
.tm-scopes{display:grid;gap:6px;margin-bottom:10px}.tm-scopes .tm-scope{text-align:start}.tm-scopes .tm-scope.on,.tm-scopes .tm-scope[aria-checked="true"]{border-color:#ffe000;box-shadow:inset 0 2px 3px #ffe00033,0 4px 0 #8d7400}
.tm-dlg-acts{display:flex;gap:10px;justify-content:flex-end;margin-top:8px}.tm-dlg-acts .primary-action,.tm-dlg-acts .back{min-height:44px;min-width:110px;width:auto;padding:0 16px}
:root[dir=rtl] .tm-wave,:root[dir=rtl] .tm-time,:root[dir=rtl] .tm-progress{direction:ltr}
/* tier collapse for the timing screens */
.wizard:is([data-fit="1"],[data-fit="2"],[data-fit="3"]) .tm-note{display:none!important}
.wizard:is([data-fit="2"],[data-fit="3"]) :is(.tm-card){min-height:0;padding:10px 14px}
.wizard:is([data-fit="2"],[data-fit="3"]) .tm-card[aria-checked="false"] small{display:none}.wizard:is([data-fit="2"],[data-fit="3"]) .tm-card{min-height:56px}
@media(max-width:719px){
 .tm-cards{grid-template-columns:1fr;gap:10px}
 .tm-card{flex-direction:row;align-items:center;min-height:72px;padding:10px 12px;gap:10px;border-radius:18px}.tm-card b{font-size:15.5px}.tm-card small{font-size:12.5px;line-height:1.35;margin-top:2px}
 .tm-body{grid-template-columns:minmax(0,1fr)}
 .tm-panel{padding:8px 10px;gap:6px}.tm-sel-tx{display:none}.tm-sel-time{font-size:17px}
 .tm-pacts .cover-retry{padding:0 8px;font-size:13px}
 .tm-head-row{gap:6px}.tm-head-row .cover-retry{padding:0 8px;font-size:13px}
 .tm-tapbtn{min-height:96px}.tm-now{font-size:22px}
 .tm-wave{height:44px}
 .tm-hint{font-size:16px}
}
@media(prefers-reduced-motion:reduce){.tm-tapbtn,.tm-card,.tm-progress i{transition:none}.tm-progress.indet i{animation:none;width:100%}}
.tm-left{display:grid;gap:8px;align-content:start;min-width:0}
.tm-pacts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.tm-pacts .cover-retry{padding:0 8px;font-size:13px}.tm-hear{grid-column:span 1}
.tm-sel-tx{font-size:15px}
@media(max-width:719px){.tm-pacts{grid-template-columns:repeat(2,minmax(0,1fr))}}
.tm-list{grid-template-columns:minmax(0,1fr)}
.tm-head-row .ico{display:none;font-size:20px}.tm-more-list{display:grid;gap:8px}
#tmMore{display:none}
@media(max-width:719px){
 .tm-head-row .lbl{display:none}.tm-head-row .ico{display:inline}.tm-head-row .cover-retry:is(#tmUndoBtn,#tmRedoBtn){min-width:44px;padding:0}
 #tmFilterAll{display:none}.tm-seg{flex:1 1 auto;justify-content:flex-end;margin-inline-start:0}#tmFilterFlag{flex:1 1 auto;max-width:190px;padding:0 6px;font-size:13px}
 #tmNextFlag,#tmMarkNone,#tmResetAuto,.tm-hear{display:none}#tmMore{display:inline-block}.tm-pacts{grid-template-columns:1fr 1fr 44px}
 .tm-sel-top{display:none}.tm-nudge{gap:8px}.tm-list{gap:4px}.tm-body{gap:8px}.tm-root{gap:8px}
}
@media(max-height:720px){.tm-tapbtn{min-height:78px}.tm-lines{padding:6px 10px;gap:3px}.tm-now{font-size:20px}.tm-ctl .cover-retry{min-height:44px}}
@media(max-height:720px){.tm-summary{padding:10px 12px;gap:4px}.tm-summary>p{font-size:13.5px;line-height:1.4}.tm-acts{gap:8px}}
.wizard[data-fit="3"] .tm-card small{display:none}.wizard[data-fit="3"] .tm-consent{font-size:13px;line-height:1.35;padding:8px 12px}
.wizard[data-fit="3"] .tm-card{min-height:48px;padding:5px 12px}.wizard:is([data-fit="2"],[data-fit="3"]) .tm-root,.wizard:is([data-fit="2"],[data-fit="3"]) .tm-cards{gap:8px}.wizard[data-fit="3"] .tm-what>summary{min-height:44px}

/* ===== CONSENT MERGE: two calm consents (audio at song upload, image at the graphic step). Lock icon, normal colours, no warning styling. ===== */
.consent-block{display:grid;gap:6px;min-width:0}.consent-block[hidden],.consent-panel[hidden]{display:none}
.wizard .consent-panel,.consent-panel{display:grid;gap:4px;margin:0;padding:10px 14px;border-radius:16px;border:1px solid var(--line-soft);background:#0c2a57;color:var(--text-md);font-size:14px}
.consent-panel .consent{display:flex;align-items:center;gap:10px;min-height:44px;font-size:14.5px;line-height:1.5;color:var(--text-hi);cursor:pointer}
.consent-panel .consent input{min-width:24px;min-height:24px;width:24px;height:24px;flex:none;accent-color:#ffd400}
.consent-lock{display:inline-grid;place-items:center;width:28px;height:28px;flex:none;color:#b7ceff}
.consent-more>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:700;font-size:14px;color:var(--text-md);list-style:revert}
.consent-more>p{margin:0 0 6px;font-size:13.5px;line-height:1.5;color:var(--text-lo)}
.consent-links{display:flex;flex-wrap:wrap;align-items:center;gap:0 4px}.consent-links .text-button{min-height:44px;display:inline-flex;align-items:center;padding:0 6px;text-decoration:underline;text-underline-offset:3px;color:#cfe3ff;font-size:14px}
.wizard .rights-review:not([hidden]){display:flex;align-items:center;gap:8px;min-height:44px;margin:0;padding:0 12px;border-radius:12px;border:1px solid var(--line-soft);background:#0c2a57;color:var(--text-md);font-size:13.5px;text-align:start}
.rights-review:not([hidden])::before{content:"";width:16px;height:16px;flex:none;background:currentColor;opacity:.8;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='5' y='11' width='14' height='9' rx='2' fill='none' stroke='black' stroke-width='2'/><path d='M8 11V8a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='5' y='11' width='14' height='9' rx='2' fill='none' stroke='black' stroke-width='2'/><path d='M8 11V8a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>") center/contain no-repeat}
.dropzone.needs-consent{opacity:.65}
.wizard:is([data-fit="2"],[data-fit="3"]) .consent-panel{padding:6px 12px}.wizard:is([data-fit="2"],[data-fit="3"]) .consent-panel .consent{font-size:13.5px;line-height:1.35}
.wizard-screen.has-check #reviewFaceConsent:not([hidden]){display:none}
.wizard[data-fit="3"] .cover-prompt label>b{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.wizard[data-fit="3"] .cover-prompt textarea{height:56px;min-height:56px}
.wizard[data-fit="3"] .consent-more>summary{min-height:44px}
.wizard .face-consent.consent-panel{padding:10px 14px;font-size:14px;line-height:1.5}
.wizard:is([data-fit="2"],[data-fit="3"]) .face-consent.consent-panel{padding:6px 12px}
.wizard[data-fit="3"] .cover-prompt textarea{height:52px!important;min-height:52px!important;font-size:14px!important;padding:8px 12px!important}
.wizard[data-fit="3"] .dropzone .drop-icon{width:44px!important;height:44px!important}.wizard[data-fit="3"] .dropzone{gap:10px;padding:8px 14px!important}.wizard[data-fit="3"] .dropzone b{font-size:15px}.wizard[data-fit="3"] .dropzone small{font-size:12px;line-height:1.3}
.wizard[data-fit="3"] .no-text-note{padding:6px 12px!important;min-height:0!important}.wizard[data-fit="3"] .wizard-screen{gap:6px}
.wizard[data-fit="3"] .consent-panel{padding:4px 10px;gap:0}.wizard[data-fit="3"] .consent-panel .consent{font-size:13px;line-height:1.3;gap:8px}.wizard[data-fit="3"] .face-consent.consent-panel{padding:4px 10px}
.wizard[data-fit="3"] .consent-lock{display:none}

/* ===== FLOW_V2 (flag, default off): chapter bar ===== */
.chapter-bar{flex:1;display:flex;gap:6px;list-style:none;margin:0;padding:0;min-width:0;direction:inherit}
.chapter-bar li{flex:1 1 0;min-width:0;text-align:center;font-size:12.5px;font-weight:700;line-height:1.35;color:var(--text-lo);padding-bottom:2px;border-bottom:5px solid #03142d;border-radius:0 0 4px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chapter-bar li.done{border-bottom-color:#c9a800;color:var(--text-md)}.chapter-bar li.cur{border-bottom-color:#ffe000;color:#fff}
.chapter-bar .short{display:none}
.flow-v2 .flow-progress .progress-copy{display:none}
.prefill-note{margin:0;color:var(--text-lo);font-size:13px}
@media(max-width:520px){.chapter-bar .long{display:none}.chapter-bar .short{display:inline}.chapter-bar li{font-size:12px}}
.flow-v2 .wizard:is([data-fit="2"],[data-fit="3"]) .meta-row{grid-template-columns:1fr 1fr;gap:8px;margin-top:0}
.flow-v2 .wizard:is([data-fit="2"],[data-fit="3"]) .meta-row label{gap:2px}.flow-v2 .wizard:is([data-fit="2"],[data-fit="3"]) .meta-row input{min-height:44px;padding:8px 12px!important}
.flow-v2 .wizard[data-fit="3"] .meta-row label>span{font-size:12px}

/* ===== Look gallery ("Choose the look"): 7 live cards, no inner scroll =====
   Desktop: 2 columns x 4 rows filling the wizard body (compact horizontal cards). Narrow: one horizontal snap row of vertical cards.
   Cards keep the 3D slab look of .recipe (selected = yellow border + check + aria-pressed). Canvas = the real engine; sprite = fallback. */
.wizard-screen[data-screen="mood"]{max-width:920px;height:100cqh;min-height:0;gap:8px}
.look-note{margin:0;padding:8px 12px;border-radius:14px;background:#0a244d;color:#dbe8ff;font-size:14px;line-height:1.4}
.look-note .wizard-link{min-height:44px;padding:0 10px}
.look-grid{flex:1 1 0;min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:12px;padding-bottom:7px;align-content:stretch}
.wizard .look-card{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;height:100%;min-height:44px;padding:8px;text-align:start;cursor:pointer}
.look-thumb{position:relative;display:block;height:100%;max-height:150px;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#071a3d}
.look-thumb canvas{display:block;width:100%;height:100%;object-fit:cover}
.look-card:not([data-ready]) canvas,.look-card[data-fallback] canvas{visibility:hidden}
.look-sprite,.look-line,.look-skel{position:absolute;inset:0;display:none}
.look-card[data-fallback] .look-sprite{display:block;background-repeat:no-repeat}
.look-card[data-fallback] .look-line{display:flex;align-items:center;justify-content:center;padding:8px 10px;text-align:center;color:#fff;font:700 15px/1.25 Rubik,sans-serif;text-shadow:0 1px 6px #000c,0 0 2px #000;background:linear-gradient(#0003,#0006);overflow:hidden}
.look-card:not([data-ready]) .look-skel{display:block;background:linear-gradient(100deg,#0d2a5c 30%,#1d4488 50%,#0d2a5c 70%) 0 0/220% 100%;animation:lookShim 1.3s linear infinite}
@keyframes lookShim{to{background-position:-220% 0}}
.look-card[data-style="royal-gold"] .look-sprite{background-image:url('assets/style-moods-sprite.webp');background-size:200% 200%;background-position:0 100%}
.look-card[data-style="collage-pop"] .look-sprite{background-image:url('assets/style-moods-sprite.webp');background-size:200% 200%;background-position:100% 0}
.look-card[data-style="living-prayer"] .look-sprite{background-image:url('assets/style-moods-sprite.webp');background-size:200% 200%;background-position:100% 100%}
.look-card[data-style="sepia-prayer"] .look-sprite{background-image:url('assets/style-extras-sprite.webp');background-size:200% 400%;background-position:0 33.333%}
.look-card[data-style="noir-story"] .look-sprite{background-image:url('assets/style-extras-sprite.webp');background-size:200% 400%;background-position:0 66.666%}
.look-card[data-style="letters-of-light"] .look-sprite{background-image:url('assets/style-extras-sprite.webp');background-size:200% 400%;background-position:0 100%}
.look-card[data-style="candle-in-the-dark"] .look-sprite{background-image:url('assets/style-extras-sprite.webp');background-size:200% 400%;background-position:100% 0}
.look-text{display:flex;flex-direction:column;gap:3px;min-width:0;overflow:hidden;padding-inline-end:22px}
.wizard .look-card .look-name{font-size:16px;line-height:1.2}
.look-tags{display:flex;flex-wrap:wrap;gap:4px}
.look-tags i{font-style:normal;font-size:11.5px;line-height:1;padding:3px 7px;border-radius:99px;background:#2b6de63d;color:#cfe0ff}
.look-fit{font-size:12px;line-height:1.25;color:#ffe97a}
.look-desc{font-size:12px;line-height:1.3;color:#a9c7ef;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:0}
.look-card:focus-visible{outline:3px solid #fff;outline-offset:2px}
@container wb (min-width:620px) and (max-height:470px){.look-tags{display:none}.wizard .look-card{gap:10px;padding:6px}}
@container wb (max-width:619px){
 .wizard-screen[data-screen="mood"]{height:auto;max-height:100cqh}
 .look-grid{display:flex;flex:0 1 auto;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-padding-inline:2px;gap:10px;padding:2px 2px 8px;-webkit-overflow-scrolling:touch}
 .wizard .look-card{flex:0 0 min(76cqw,300px);display:flex;flex-direction:column;align-items:stretch;gap:8px;height:auto;scroll-snap-align:center}
 .look-thumb{width:100%;height:auto;max-height:none}
 .look-text{padding-inline-end:0}
}
@container wb (max-width:619px) and (max-height:350px){.look-tags{display:none}.wizard .look-card{flex-basis:min(62cqw,240px)}}
@media(prefers-reduced-motion:reduce){.look-card:not([data-ready]) .look-skel{animation:none}.look-grid{scroll-behavior:auto}}

/* Extras, video format and thumbnail maker (preview screen). 44px targets, logical properties so HE/AR RTL and FR are safe. */
.wizard-screen[data-screen="preview"] .pro-box{border:1px solid rgba(145,179,235,.22);border-radius:14px;background:#0c2a57;padding:0}
.wizard-screen[data-screen="preview"] .pro-format{display:grid;gap:4px;padding:10px 12px}
.pro-format>b,.pro-row>b,.pro-sw-tx>b{color:#e6efff;font-size:14px}
.pro-format>small,.pro-row>small,.pro-sw-tx>small,.pro-sub,.pro-na{color:#b5c7e8;font-size:12.5px;line-height:1.4;margin:0}
.pro-seg{display:flex;gap:6px;flex-wrap:wrap}
.pro-seg-b{flex:1 1 0;min-width:44px;min-height:44px;padding:0 10px;border:1px solid rgba(145,179,235,.3);border-radius:12px;background:#12376b;color:#e6efff;font:700 13px/1.15 Rubik,sans-serif;cursor:pointer}
.pro-seg-b.on{background:#ffc83d;border-color:#ffc83d;color:#0b2247}
.pro-seg-b:focus-visible,.pro-sw:focus-visible,.pro-extras>summary:focus-visible,.thumb-maker>summary:focus-visible{outline:3px solid #fff;outline-offset:2px}
.pro-seg-b:disabled,.pro-sw:disabled{opacity:.5;cursor:default}
.pro-extras>summary,.thumb-maker>summary{min-height:44px;display:flex;align-items:center;padding:0 14px;cursor:pointer;color:#dbe8ff;font-weight:700;list-style:none}
.pro-extras>summary::-webkit-details-marker,.thumb-maker>summary::-webkit-details-marker{display:none}
.pro-extras>summary::after,.thumb-maker>summary::after{content:"＋";margin-inline-start:auto}
.pro-extras[open]>summary::after,.thumb-maker[open]>summary::after{content:"－"}
.pro-body{padding:0 12px 12px;display:grid;gap:10px}
.pro-row{display:grid;gap:4px}
.pro-sw{display:flex;align-items:center;gap:12px;min-height:44px;padding:6px 8px;border:1px solid rgba(145,179,235,.22);border-radius:12px;background:#113362;color:#e6efff;text-align:start;cursor:pointer;font:inherit;width:100%}
.pro-sw>i{flex:none;position:relative;width:40px;height:24px;border-radius:12px;background:#3a5a8f;transition:background .15s}
.pro-sw>i::after{content:"";position:absolute;inset-block-start:3px;inset-inline-start:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:inset-inline-start .15s}
.pro-sw[aria-checked="true"]>i{background:#ffc83d}.pro-sw[aria-checked="true"]>i::after{inset-inline-start:19px}
.pro-sw-tx{display:grid;gap:2px;min-width:0}
.pro-sw.is-na{opacity:.55}
.thumb-maker{grid-column:1/-1;border:1px solid rgba(145,179,235,.22);border-radius:14px;background:#0c2a57;margin-top:8px}
.thumb-maker canvas{display:block;max-width:100%;max-height:200px;width:auto;height:auto;margin-inline:auto;border-radius:10px;background:#06152f}
.dl-files{display:grid;gap:8px}
/* other output formats: the frame keeps the height the 16:9 frame would use, so the column height does not change */
.wizard-screen[data-screen="preview"] .film-col .film-frame[data-aspect="9:16"]{aspect-ratio:9/16}
.wizard-screen[data-screen="preview"] .film-col .film-frame[data-aspect="1:1"]{aspect-ratio:1/1}
@media(min-width:720px){
 .wizard-screen[data-screen="preview"] .film-col .film-frame[data-aspect="9:16"]{width:min(100%,calc((100cqh - 112px)*.5625))}
 .wizard-screen[data-screen="preview"] .film-col .film-frame[data-aspect="1:1"]{width:min(100%,calc(100cqh - 112px))}
}
@media(max-width:719px){
 .wizard-screen[data-screen="preview"] .film-col .film-frame[data-aspect="9:16"]{width:min(100%,max(132px,calc((100cqh - 282px)*.5625)))}
 .wizard-screen[data-screen="preview"] .film-col .film-frame[data-aspect="1:1"]{width:min(100%,max(132px,calc(100cqh - 282px)))}
}
@media(prefers-reduced-motion:reduce){.pro-sw>i,.pro-sw>i::after{transition:none}}
/* preview screen: room for the "Format and extras" row on short viewports (title of the quick tweaks goes first; the buttons stay labelled) */
.wizard:is([data-fit="2"],[data-fit="3"]) .wizard-screen[data-screen="preview"] .intent-head{display:none}
.wizard[data-fit="3"] .wizard-screen[data-screen="preview"] .preview-side{gap:6px}

/* per-word chips (read only) under the nudge row; hidden when space is tight so fit never breaks */
.tm-words{display:flex;flex-wrap:nowrap;gap:4px;overflow-x:auto;overflow-y:hidden;justify-content:flex-start;scrollbar-width:thin}.tm-wchip{flex:none;white-space:nowrap}
.tm-wchip{display:inline-flex;align-items:baseline;gap:5px;padding:2px 8px;border-radius:10px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);font-size:12.5px;color:#fff;line-height:1.4}
.tm-wchip b{font-weight:700}.tm-wchip i{font-style:normal;font-variant-numeric:tabular-nums;opacity:.8;direction:ltr}.tm-wchip u{text-decoration:none;font-size:11px}
.tm-wchip.q-low{border-style:dashed;border-color:#ffb454}.tm-wchip.q-mid{border-color:rgba(255,255,255,.35)}.tm-wchip.q-hi{border-color:#6ee7a8}
