/* Editing appears after performance; advanced properties open on demand. */
#performance-wave{display:block;width:100%;height:38px;background:#0c0b0a;border:1px solid #40372b;border-radius:7px;margin:8px 0}
.reference-note{font-size:11px;color:#bcae98;text-align:center;margin:8px 0}
.record-cue{position:absolute;inset:0;display:grid;place-items:center;background:#0007;font-size:68px;color:#f3ddad;font-weight:700;z-index:2}
#performance:not([data-screen-expanded]) .dub-demo-scene{max-width:min(100%,max(350px,calc((100dvh - 480px)*1.91)))}
#performance:not([data-screen-expanded]) #performance-wave{grid-column:1/-1;margin:0}
#performance[data-screen-expanded=true] #performance-wave{grid-column:1/-1;height:26px;margin:0}
#performance[data-screen-expanded=true] .reference-note{display:none}
#performance:not([data-screen-expanded]) .reference-note{grid-column:1/-1;margin:0}
.editor-language{display:flex;align-items:center;gap:12px;max-width:440px;margin-bottom:18px;color:#d6c4a7;font-size:13px}
.editor-language select,.editor-toolbar select,.voice-properties select,.voice-properties input{min-height:44px;background:#1a1713;border:1px solid #64513a;border-radius:8px;color:#f4ebdd;padding:7px 10px;max-width:100%;min-width:0}
.audio-editor{background:#12110fee;border:1px solid #755738;border-radius:18px;padding:23px;max-width:1200px;margin:auto}
.editor-header{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:16px}
.editor-header h2{font-size:26px;line-height:1.4}
.editor-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:15px}
.editor-toolbar button,.editor-toolbar select{font-size:12px;padding:7px 11px}
.editor-toolbar [data-clock]{margin:0 10px;font:14px Consolas,monospace;color:#e5c991}
.timeline-scroll{overflow:auto;border:1px solid #453a2d;border-radius:10px;direction:ltr;overscroll-behavior-x:contain;max-width:100%;touch-action:pan-x pan-y}
.timeline-inner{position:relative;direction:ltr;min-height:248px;background:#0c0d0c}
.timeline-ruler{height:32px;position:relative;border-bottom:1px solid #3f3526;background:#1a1712}
.timeline-tick{position:absolute;top:7px;font:11px Consolas,monospace;color:#bba67e;transform:translateX(-50%)}
.timeline-row{height:72px;position:relative;border-bottom:1px solid #252924}
.track-label{position:sticky;left:0;z-index:4;display:grid;place-items:center;width:105px;height:100%;background:#191814f2;border-right:1px solid #5a4931;direction:rtl;font-size:13px;color:#e4d1b0}
.reference-clip,.take-clip{position:absolute;top:7px;height:58px;border:1px solid #766443;border-radius:7px;overflow:visible;box-sizing:border-box}
.reference-clip{background:#78623535;overflow:hidden}
.take-clip{background:#15362fa0;border-color:#4b8e81;touch-action:none;cursor:grab}
.timeline-row[data-track=friend] .take-clip{background:#452b3ba0;border-color:#9d6789}
.take-clip[data-selected=true]{box-shadow:0 0 0 2px #f2d08f}
.take-clip[data-muted=true]{opacity:.4}
.clip-title{position:absolute;top:0;left:0;right:0;height:22px;padding:1px 5px;color:#e9e1d3;background:#090f0dcc;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:6px 6px 0 0}
.clip-wave{display:block;position:absolute;left:0;top:22px;width:100%;height:34px;pointer-events:none}
.reference-clip .clip-wave{top:0;height:100%}
.clip-edge{position:absolute;bottom:0;width:16px;height:35px;cursor:ew-resize;touch-action:none;z-index:2}
.clip-edge:after{content:"";position:absolute;top:7px;bottom:7px;width:3px;background:#ffe0a0cc;border-radius:2px}
.clip-edge-left{left:-6px}.clip-edge-right{right:-6px}.clip-edge-left:after{left:6px}.clip-edge-right:after{right:6px}
.timeline-cursor{position:absolute;top:0;bottom:0;z-index:3;width:1px;background:#fff0cb;pointer-events:none}
.timeline-cursor:before{content:"";position:absolute;top:0;left:-4px;width:9px;height:9px;background:#fff0cb;border-radius:0 0 4px 4px}
.timeline-empty{padding:20px 15px 20px 120px;color:#c5af8a;font-size:12px}
.timeline-help{font-size:12px;color:#beaf97;margin:11px 0 17px}
.voice-properties{background:#211b15;border:1px solid #74593b;border-radius:12px;padding:18px;margin:16px 0}
.voice-properties h3{font-size:17px;margin-bottom:12px}
.property-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:14px 0}
.property-field{display:flex;flex-direction:column;gap:5px;color:#d2c1a5;font-size:12px;max-width:100%}
.property-field input{direction:ltr;width:100%}
.property-actions{display:flex;gap:9px;flex-wrap:wrap}.property-actions button{font-size:12px}
.property-note{font-size:11px;color:#c3b19a;margin-top:10px}
.editor-footer{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.editor-footer .primary{font-size:13px;min-height:48px;padding:10px 20px}
.project-import{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 15px;border:1px solid #6f5743;border-radius:10px;background:#221a18;cursor:pointer;font-size:13px}
.editor-status{font-size:12px;color:#e4c892}
@media(max-width:700px){
 .audio-editor{padding:14px;border-radius:14px}.editor-header{align-items:flex-start}.editor-header h2{font-size:21px}.editor-header button{font-size:12px;padding:7px 10px}
 .editor-toolbar{gap:6px}.editor-toolbar button,.editor-toolbar select{font-size:11px;padding:6px 8px}.editor-toolbar [data-clock]{margin:0 4px}
 .property-grid{grid-template-columns:1fr 1fr}.voice-properties{padding:13px}.timeline-help{font-size:11px}
 .editor-footer{gap:8px}.editor-footer .primary{width:100%}.editor-language{flex-wrap:wrap}
 #performance:not([data-screen-expanded]) .dub-demo-scene{max-width:none}.studio-extra button{font-size:11px}
}
@media(max-width:350px){.property-grid{grid-template-columns:1fr}}

.editor-media-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);align-items:center;gap:25px;margin-bottom:18px}
.editor-player:not([data-screen-expanded]){max-width:540px;padding:10px;border:1px solid #665034;border-radius:12px;margin:0}
.editor-player:not([data-screen-expanded]) .dub-demo-script{padding:8px 0 0}
.editor-player:not([data-screen-expanded]) .dub-demo-line{font-size:15px;margin:0 0 7px;min-height:0;line-height:1.4}
.editor-player:not([data-screen-expanded]) .dub-demo-primary{margin:0;min-height:44px;padding:8px 15px;font-size:13px!important}
.editor-player[data-screen-expanded=true] .dub-demo-primary{grid-row:auto;grid-column:2}
.editor-guide strong{font-size:18px;color:#f0dfbf}.editor-guide p{font-size:13px;color:#c8b99d;margin:12px 0;line-height:1.8}
@media(max-width:700px){.editor-media-row{grid-template-columns:1fr;gap:12px}.editor-guide{display:none}.editor-player:not([data-screen-expanded]){max-width:none}.editor-player[data-screen-expanded=true] .dub-demo-primary{grid-column:1}}
body[data-view=result] .game-head{margin-bottom:8px}
body[data-view=result] .game-head h1{font-size:26px}
body[data-view=result] footer{display:none}
#result>.view-head{margin-bottom:12px}
#result>.view-head>div{display:none}
#result .editor-language{margin:0}
.audio-editor{padding:18px}
.editor-header{margin-bottom:12px}
.editor-header h2{font-size:22px}
.editor-player:not([data-screen-expanded]){max-width:360px}
.editor-player:not([data-screen-expanded]) .dub-demo-script{display:flex;align-items:center;gap:9px}
.editor-player:not([data-screen-expanded]) .dub-demo-line{flex:1;font-size:13px;margin:0}
.editor-player:not([data-screen-expanded]) .dub-demo-primary{width:145px;flex-shrink:0}
.editor-media-row{grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr);margin-bottom:12px}
.editor-guide .editor-toolbar{margin:0;gap:10px}
.editor-guide .editor-toolbar button{min-height:44px}
.editor-guide .editor-toolbar select{width:100%}
.timeline-row{height:62px}
.reference-clip,.take-clip{height:50px;top:6px}
.clip-wave{height:27px}
.clip-edge{height:28px}
.timeline-help{margin:8px 0 12px;font-size:11px}
@media(max-width:700px){
 .editor-media-row{grid-template-columns:1fr}
 .editor-guide{display:block}
 .editor-player:not([data-screen-expanded]){max-width:none}
 .editor-player:not([data-screen-expanded]) .dub-demo-primary{width:135px}
 #result>.view-head{flex-wrap:wrap}
 .editor-guide .editor-toolbar{gap:6px}
 .editor-guide .editor-toolbar select{width:auto;max-width:100%}
 .audio-editor{padding:13px}
}