/* A scene first; tools appear when requested. */
.save-state{font-size:10px;color:#b2c7b3}.save-state[data-state=error]{color:#ffc092}
.game-head{margin-bottom:10px;align-items:center}.game-head h1{font-size:25px}
.game-head .icon{width:44px;height:44px;min-height:44px}
.view-head{margin-bottom:10px}.view-head h2{font-size:23px}
#studio>.view-head .eyebrow{display:none}
#studio>.view-head{justify-content:flex-end}
.dub-demo-head{padding:0 0 10px}.dub-demo-title{font-size:17px}
#performance:not([data-screen-expanded]){padding:16px;background:linear-gradient(180deg,#0e0b0805,#100d09c7);border:1px solid #b68a4359;box-shadow:0 18px 50px #0006}
#performance:not([data-screen-expanded]) .dub-demo-scene{max-width:920px!important;border:4px solid #191510;border-radius:9px;box-shadow:0 0 0 1px #9c794b88,0 6px 18px #0008}
#performance:not([data-screen-expanded]) .dub-demo-script{max-width:650px;gap:8px;padding:12px 0 0}
.dub-demo-role-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:8px}
.capture-mode select{background:#201a12;border:1px solid #6a5234;color:#ead6b3;border-radius:8px;padding:8px;min-height:44px;font-size:12px;width:140px}
.sr-only{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}
#change-role{min-height:44px;font-size:12px;padding:7px 9px}
.dub-demo-status{font-size:10px;white-space:nowrap}
.record-duration{font-size:10px;color:#c9b895;margin:0;text-align:center}
#elapsed{font-size:11px;color:#dcc594;position:absolute;bottom:8px;left:10px;pointer-events:none}
#performance:not([data-screen-expanded]) .dub-demo-script{position:relative}
#performance .dub-demo-line{font-size:21px;line-height:1.5}
#current-line[data-yours=false]{color:#a99e8a}
#performance .studio-extra{gap:6px}
#performance .studio-extra button{min-height:44px}
#performance .dub-demo-hint{display:none}
#performance:not([data-dub-phase=recording]) .performance-waves{display:none}
#performance:not([data-dub-phase=recording]) #mic-level{display:none!important}
#performance .reference-note{font-size:10px;line-height:1.5;padding-inline:4px}
#performance .sound-options{border:0;width:auto;align-self:flex-end}
#performance .sound-options>summary{min-height:36px;padding:4px 8px;text-align:center}
#performance .sound-options[open] .sound-options-body{position:fixed;z-index:20;bottom:12px;left:12px;right:12px;margin:auto;max-width:520px;max-height:70dvh;overflow:auto;box-shadow:0 0 0 100vmax #0008;padding:18px}
#film-credit{font-size:9px;line-height:1.6;margin-top:12px}
.sample-frame img{display:block;width:100%;height:100%;object-fit:cover}
.library-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:1000px}
.scene-card{overflow:hidden}.scene-card strong{font-size:22px}.scene-card span{line-height:1.6}
.resume{margin-top:10px}.resume[hidden]{display:none}
#audio-editor:not([data-advanced=true]) .timeline-scroll,#audio-editor:not([data-advanced=true]) .timeline-help,#audio-editor:not([data-advanced=true]) .editor-header [data-command=properties],#audio-editor:not([data-advanced=true]) .editor-toolbar [data-clock],#audio-editor:not([data-advanced=true]) .editor-toolbar [data-command=undo]{display:none}
.edit-toggle{min-height:44px;display:block;width:100%;margin:8px 0;background:#201c16;border-color:#5e4a31;font-size:13px}
.audio-editor{background:linear-gradient(180deg,#0f0e0ae8,#151008ed);border-color:#a07a4166}
.editor-player:not([data-screen-expanded]){max-width:800px}
.editor-player:not([data-screen-expanded]) .dub-demo-scene{border:3px solid #15110c;box-shadow:0 0 0 1px #ae854555;border-radius:8px}
.editor-toolbar{justify-content:space-between}
.editor-footer{justify-content:center}
#result .view-head .editor-language{display:none}
#result .view-head{justify-content:flex-end}
body[data-view=studio] main,body[data-view=result] main{padding-top:12px}
body[data-view=studio] #film-credit{display:none}
#party-dialog{background:#17140f;border:1px solid #99703e;border-radius:18px;color:#f5e5c7;padding:22px;width:min(500px,calc(100% - 24px));max-height:90dvh;overflow:auto}
#party-dialog::backdrop{background:#0009;backdrop-filter:blur(3px)}
.party-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.party-heading h2{font-size:22px}
.party-field{display:flex;flex-direction:column;gap:7px;margin-bottom:12px;font-size:13px}.party-field input{min-height:44px;background:#0d0b09;border:1px solid #786043;border-radius:8px;padding:9px;color:#f5e5ca}
.party-entry,.party-invite{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.party-entry>.primary{width:100%}
#party-members{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}.party-member{padding:6px 9px;border-radius:8px;background:#35291a;font-size:12px}
#party-roles{display:flex;gap:7px;margin-bottom:14px}.party-role{min-height:44px;flex:1}
#party-ready,#party-start{display:block;width:100%;margin-top:9px}
#party-start[hidden],#party-lobby[hidden],#party-ready[hidden]{display:none}
#party-lobby p{font-size:11px;line-height:1.7;color:#c0b398}
#party-error{color:#ffc59e;font-size:12px;margin:10px 0}
#party-bar{position:fixed;top:10px;left:50%;transform:translateX(-50%);z-index:9;display:flex;align-items:center;gap:8px;background:#19150fe8;border:1px solid #8c6a3d;border-radius:10px;padding:4px 9px;max-width:65%;font-size:11px}
#party-bar[hidden]{display:none}#party-bar button{min-height:36px;padding:4px 8px;font-size:10px}
@media(max-width:700px){
 main{padding-inline:10px}.game-head{margin-bottom:7px}.game-head h1{font-size:21px}
 body[data-view=studio] #studio>.view-head{display:none}
 #performance:not([data-screen-expanded]){padding:10px;border-radius:14px}
 #performance .dub-demo-title{font-size:15px}.dub-demo-head{padding-bottom:7px}
 #performance .dub-demo-status{display:none}
 #performance .dub-demo-line{font-size:18px;min-height:48px}
 #performance .dub-demo-role-row{justify-content:center}
 .capture-mode select{width:140px}
 #performance .dub-demo-primary{min-height:52px;font-size:23px!important}
 #performance .studio-extra button{font-size:12px;padding:6px 8px}
 .library-grid{grid-template-columns:1fr;gap:15px}.scene-card strong{font-size:19px}
 .audio-editor{padding:10px}.editor-header h2{font-size:17px}
 .editor-header{margin-bottom:8px}
 .editor-player:not([data-screen-expanded]) .dub-demo-script{gap:5px}
 .editor-toolbar{margin:8px 0}
 .editor-footer .primary{min-height:48px}
 #result .view-head>button{min-height:36px;padding:5px 10px}
}
@media(max-height:700px) and (max-width:700px){
 body[data-view=studio] .game-head{display:none}
 #performance .reference-note{display:none}
 #performance:not([data-screen-expanded]) .dub-demo-scene{max-height:34dvh;aspect-ratio:16/9!important;width:auto;max-width:100%!important}
 #performance .dub-demo-line{font-size:16px;min-height:40px}
 #performance .dub-demo-primary{min-height:46px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

body[data-party=true] #party-bar{position:static;transform:none;margin:0 auto 8px;max-width:100%;width:max-content}
body[data-party=true] #change-role{border-color:#d6b46e}
.editor-language{font-size:12px}.party-entry[hidden]{display:none}
body:not([data-party=true]) #dialect:disabled{opacity:1}

.shade{background:linear-gradient(#0b080828,#0b08080a 45%,#0b080835)}
#performance:not([data-screen-expanded]) .dub-demo-script{margin-inline:auto;display:flex;flex-direction:column}
#performance:not([data-screen-expanded]) .dub-demo-primary{width:min(100%,440px);align-self:center;box-shadow:0 0 28px #ffd69028}
#performance .dub-demo-role-row{width:100%}
#performance .dub-demo-progress{width:100%}
.approved-art>div{aspect-ratio:16/9}.approved-art img{position:static;object-fit:cover;width:100%;height:100%;top:auto;left:auto}

#performance[data-dub-phase=recording] .record-duration,#performance[data-dub-phase=recording] .sound-options,#performance[data-dub-phase=recording] .reference-note{display:none}
@media(max-height:500px) and (min-width:701px){
 body[data-view=studio] main{padding:8px 14px}
 body[data-view=studio] .game-head,body[data-view=studio] #studio>.view-head{display:none}
 #performance:not([data-screen-expanded]){display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:8px 14px;padding:10px}
 #performance:not([data-screen-expanded]) .dub-demo-head{grid-column:1/-1;padding:0}
 #performance:not([data-screen-expanded]) .dub-demo-scene{grid-column:1;align-self:start;max-height:calc(100dvh - 65px);aspect-ratio:16/9}
 #performance:not([data-screen-expanded]) .dub-demo-script{grid-column:2;grid-row:2;padding:0;max-height:calc(100dvh - 65px);overflow:auto;gap:4px}
 #performance:not([data-screen-expanded]) .dub-demo-primary{width:100%;min-height:46px!important;font-size:21px!important}
 #performance .dub-demo-line{font-size:17px;line-height:1.35}
 #performance .reference-note,#performance .dub-demo-status{display:none}
 #performance .studio-extra{margin:0}#performance .studio-extra button{min-height:40px}
 #performance .dub-demo-role-row{justify-content:center}
 #performance .wave-row canvas{height:24px}
 #performance[data-dub-phase=recording] .dub-demo-role-row{display:none}
}

@media(min-width:701px) and (min-height:501px){
 body[data-view=studio] #studio>.view-head{display:none}
 #performance:not([data-screen-expanded]) .dub-demo-scene{width:min(100%,max(280px,calc((100dvh - 490px)*1.77777778)));max-width:920px!important;margin-inline:auto}
 #performance:not([data-screen-expanded]) .dub-demo-script{gap:5px;padding-top:8px}
 #performance:not([data-screen-expanded]) .dub-demo-primary{font-size:25px!important;min-height:52px}
 #performance .studio-extra{gap:8px}
}
#change-scene{font-size:10px;min-height:32px;padding:4px 10px;background:#17120b99}

.review-seek{display:flex;align-items:center;gap:10px;direction:ltr;margin:8px 0;font-size:11px;color:#d6c49e}
.review-seek input{flex:1;min-width:0;min-height:38px;accent-color:#d9b575}
.take-list{display:grid;gap:6px;margin:10px 0}.cue-choice{display:flex;gap:7px}
.cue-edit{text-align:right;flex:1;min-width:0;font-size:12px;line-height:1.5}.cue-retake{width:46px;flex-shrink:0}
#audio-editor:not([data-advanced=true]) .take-list{display:none}
.editor-overflow{font-size:11px;color:#f2bd8f}.timing-nudges{display:flex;gap:8px;margin:8px 0}.timing-nudges button{flex:1;font-size:12px}
.take-clip{touch-action:pan-x}.clip-title,.clip-edge{touch-action:none}.clip-edge{width:16px}
@media(max-width:700px){.track-label{width:64px;font-size:10px}.timeline-help{font-size:11px}}

.mix-settings{width:min(520px,calc(100% - 24px));max-height:88dvh;overflow:auto;background:#17130f;color:#f3e4c6;border:1px solid #997547;border-radius:18px;padding:18px;direction:rtl}
.mix-settings::backdrop{background:#0008;backdrop-filter:blur(3px)}
.mix-settings .sound-options-body{display:grid;gap:12px;background:none;padding:0}
.mix-settings select{color:#f3e4c6;background:#282016;border:1px solid #80623e;border-radius:9px;padding:7px;min-height:44px;width:100%}
.mix-settings .sound-check{font-size:13px;min-height:36px}.mix-settings p{font-size:11px;color:#c8b99e}


#reaction-toast{position:fixed;inset:auto 1rem 5.5rem;pointer-events:none;z-index:100}.party-reaction{display:block;margin:.3rem auto;padding:.6rem 1rem;width:max-content;border-radius:2rem;background:#241b17e8;color:#fff1d5;animation:reaction-in 2.8s ease both}.party-reactions{display:flex;gap:.25rem}.party-reactions button{padding:.2rem .35rem;min-width:32px;border:0;background:transparent;font-size:1.1rem}@keyframes reaction-in{0%{opacity:0;transform:translateY(12px)}15%,75%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-16px)}}
@media(max-width:600px){#party-bar{flex-wrap:wrap;justify-content:center;gap:.35rem;font-size:.8rem}.party-reactions{order:3}#party-bar button{font-size:.8rem}}

.library-filters{display:flex;gap:.6rem;margin-bottom:1rem}.library-filters input{min-width:0;flex:1;background:#171819;color:#fff0d0;border:1px solid #ffffff24;border-radius:.8rem;padding:.8rem}.scene-entry{position:relative}.scene-entry .scene-card{width:100%;height:100%}.scene-favorite{position:absolute;left:.7rem;top:.7rem;min-width:44px;min-height:44px;border-radius:50%;font-size:1.4rem;background:#151516ed;color:#efd59b}.library-filters button[aria-pressed=true]{border-color:#edcd8d;color:#edcd8d}

.mic-check{margin-top:1rem;padding-top:1rem;border-top:1px solid #ffffff20}.mic-check canvas{width:100%;height:56px;display:block;background:#0e1317;border-radius:.6rem;margin:.6rem 0}.mic-check p{font-size:.8rem;line-height:1.6;color:#dbc9a8}.mic-check button{min-height:44px;width:100%}

.mix-settings .editor-language{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin:.5rem 0;width:100%}.mix-settings .editor-language select{min-height:44px;max-width:55%;background:#171819;color:#fff0d0;border:1px solid #ffffff25;border-radius:.5rem;padding:.5rem}
