/* v7: a few actions at rest; focused, touch-sized editing on demand. */
.dub-demo-scene{aspect-ratio:16/9!important;background:#000!important;position:relative;overflow:hidden}
.dub-scene-video{display:block;width:100%;height:100%;object-fit:contain;background:#000}
.sample-frame{aspect-ratio:16/9;overflow:hidden}.sample-frame .dub-demo-source{position:static!important;inset:auto!important;transform:none!important;width:100%!important;height:100%!important;object-fit:cover}
.mic-level{grid-column:1/-1;display:flex;align-items:center;gap:10px;font-size:11px;color:#c3dbc8;text-align:right}
.mic-level[hidden]{display:none!important}.level-track{height:8px;border-radius:5px;background:#292f28;flex:1;overflow:hidden}.level-track span{display:block;height:100%;width:0;background:linear-gradient(90deg,#67dab4 0%,#d8da7e 80%,#ed896c 95%);transition:width 70ms linear}.mic-level[data-clipping=true]{color:#ff987e}
#performance-wave{height:54px!important;background:#0b1310!important;border-color:#2d4d42!important}
#performance:not([data-screen-expanded]) .dub-demo-script{display:flex!important;flex-direction:column;gap:10px;max-width:650px;margin:auto}
#performance:not([data-screen-expanded]) .dub-demo-scene{max-width:780px!important;margin:auto}
#performance .dub-demo-primary{width:100%;max-width:none;margin:0}
#performance .studio-extra{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
#performance .studio-extra button{min-height:44px;flex:1;padding:9px 12px;font-size:13px}
#performance .dub-demo-role-row{width:100%}
#performance .dub-demo-line{margin:0;font-size:23px}
#performance .dub-demo-hint,#performance .reference-note{margin:0;font-size:10px}
.editor-media-row{display:block}.editor-player:not([data-screen-expanded]){max-width:700px;margin:auto;border:0;padding:0}
.editor-player:not([data-screen-expanded]) .dub-demo-script{display:flex;align-items:center;padding:10px 0}
.editor-header{align-items:center}.editor-header h2{font-size:20px}
.editor-header>button{font-size:12px;min-height:44px}
.editor-toolbar{margin:12px 0;flex-wrap:nowrap;justify-content:space-between}
.editor-toolbar select{flex:1;max-width:210px;min-width:90px}
.editor-toolbar [data-clock]{font-size:11px;margin:0}
.editor-toolbar button{min-width:44px}
.editor-more{position:relative;flex-shrink:0}
summary{cursor:pointer;min-height:44px;display:flex;align-items:center;color:#d9c49e;padding:8px;font-size:12px}
.more-content{position:absolute;z-index:7;left:0;top:48px;width:210px;display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid #745437;background:#211b14;border-radius:14px;box-shadow:0 20px 50px #0008}
.more-content button,.more-content .project-import{width:100%}
.timeline-inner{min-height:110px}.timeline-row{height:74px}.take-clip{height:60px}.clip-wave{height:36px}.clip-edge{height:44px;width:24px}
.voice-properties{position:fixed;inset:auto 0 0;margin:0 auto;width:min(620px,100%);max-width:100%;max-height:85dvh;overflow:auto;border-radius:22px 22px 0 0;padding:20px 20px max(20px,env(safe-area-inset-bottom));color:#f6e8d1;border:1px solid #826444;background:#191712}
.voice-properties::backdrop{background:#0009;backdrop-filter:blur(3px)}
.sheet-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.sheet-heading h3{font-size:17px;margin:0}.sheet-heading button{min-height:44px;min-width:60px}
.sheet-wave{width:100%;height:66px;background:#0c1713;border:1px solid #33574b;border-radius:10px;display:block;margin:12px 0}
.sheet-tabs,.effect-choices{display:flex;gap:8px;margin:12px 0}.sheet-tabs button,.effect-choices button{flex:1;min-height:44px}
.sheet-tabs button[aria-pressed=true],.effect-choices button[aria-pressed=true]{border-color:#dfbb74;background:#4c3c20;color:#fff0d4}
.slider-field{display:flex;flex-direction:column;margin:12px 0;gap:6px;font-size:13px}
.slider-field>span{display:flex;justify-content:space-between}.slider-field output{font:12px Consolas,monospace;direction:ltr}
.slider-field input[type=range]{width:100%;height:44px;accent-color:#9cdcc5;touch-action:pan-y;cursor:pointer}
.sheet-preview{width:100%;min-height:48px;margin:8px 0}
.sheet-tip{font-size:12px;color:#c7b897;line-height:1.6}
.sheet-more{border-top:1px solid #534532;margin-top:12px}.sheet-more .property-grid{grid-template-columns:1fr 1fr}
.scene-credit{font-size:9px;line-height:1.7;color:#a49d8c;text-align:center;margin:12px 0 0;direction:ltr}
.editor-footer{margin-top:10px}.editor-footer .primary{width:100%;max-width:700px}
@media(max-width:700px){
 main{padding-inline:14px}.game-head{margin-bottom:10px}.game-head h1{font-size:26px}
 .view-head{margin-bottom:10px}.view-head>div>h2{font-size:23px}
 .audio-editor{padding:12px}.editor-header h2{font-size:17px}.editor-header .eyebrow{font-size:10px}
 .editor-player:not([data-screen-expanded]) .dub-demo-script{flex-direction:column;align-items:stretch;gap:8px}
 .editor-player:not([data-screen-expanded]) .dub-demo-primary{width:100%;font-size:14px!important}
 .editor-player:not([data-screen-expanded]) .dub-demo-line{font-size:14px;text-align:center}
 .editor-toolbar{gap:5px}.editor-toolbar select{font-size:12px;padding:5px;max-width:135px}
 #result .editor-language{font-size:11px}#result .view-head button{font-size:12px}
 .timeline-help{font-size:11px;line-height:1.7}
 #performance:not([data-screen-expanded]) .dub-demo-line{font-size:19px}
 #performance .studio-extra button{font-size:12px}
 #performance .dub-demo-status{font-size:10px}
 #performance:not([data-screen-expanded]) .dub-demo-script{padding:12px}
 body[data-view=studio] footer{font-size:9px;line-height:1.6;margin-top:12px}
}
#performance[data-screen-expanded=true] .mic-level{display:none}
#performance[data-screen-expanded=true] .dub-demo-hint{display:none}
@media(prefers-reduced-motion:reduce){.level-track span{transition:none}}

/* Original and microphone share the same six-second recording ruler. */
.performance-waves{width:100%;grid-column:1/-1;display:flex;flex-direction:column;gap:5px}
.wave-row{display:flex;align-items:center;gap:8px;width:100%;min-width:0}
.wave-row>span{font-size:11px;color:#bba57d;width:38px;flex-shrink:0}
.wave-row:last-child>span{color:#9bdcca}
.wave-row canvas{display:block;flex:1;min-width:0;width:100%;border:1px solid #4c412f;border-radius:7px;background:#15120d}
#original-wave{height:30px}
#performance-wave{height:43px!important;margin:0!important}
.sound-options{width:100%;grid-column:1/-1;border-top:1px solid #453b2c}
.sound-options>summary{justify-content:center;min-height:44px;font-size:11px;padding:4px 8px}
.sound-options-body{padding:10px 12px;border:1px solid #54432e;border-radius:10px;background:#19150f;display:flex;flex-direction:column;gap:9px;text-align:right}
.sound-slider{display:flex;flex-direction:column;gap:4px;font-size:12px}
.sound-slider>span{display:flex;justify-content:space-between;gap:12px}
.sound-slider output{direction:ltr;color:#f0d5a1}
.sound-slider input[type=range]{height:44px;width:100%;accent-color:#d8b879;cursor:pointer}
.sound-check{display:flex;gap:9px;align-items:center;min-height:44px;font-size:12px}
.sound-check input{width:20px;height:20px;accent-color:#dfbf80}
.sound-options-body p{font-size:10px;line-height:1.7;color:#bdb29c;margin:0}
#performance .studio-extra{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
#performance .studio-extra button{width:100%;font-size:12px}
#performance .studio-extra button[hidden]{display:none}
#performance[data-screen-expanded=true] .performance-waves{grid-column:1/-1}
#performance[data-screen-expanded=true] #original-wave{height:18px}
#performance[data-screen-expanded=true] #performance-wave{height:24px!important}
#performance[data-screen-expanded=true] .sound-options{display:none}
#performance[data-screen-expanded=true] .studio-extra{display:flex}
@media(max-height:450px) and (orientation:landscape){#performance[data-screen-expanded=true] .performance-waves{display:none}}

.audio-editor[data-video-export=true] .timeline-scroll{pointer-events:none;opacity:.65}
.audio-editor[data-video-export=true] .editor-more{pointer-events:none;opacity:.6}
.editor-footer [data-command=cancel-video]{min-height:44px}
.editor-footer [data-command=cancel-video][hidden]{display:none}
