.creation-modes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:24px}.creation-modes button{display:grid;grid-template-columns:25px 1fr;gap:4px 7px;text-align:left;padding:14px 12px;background:#20231d;border:1px solid #3b4134;border-radius:9px;color:var(--text);cursor:pointer}.creation-modes button>span{grid-row:span 2;font-size:22px;color:var(--lime)}.creation-modes strong{font-size:12px}.creation-modes small{font-size:10px;color:var(--muted)}.creation-modes button[aria-pressed=true]{border-color:var(--lime);background:#d5ff3f0a}.creation-modes button:disabled{opacity:.5;cursor:wait}.story-composer{margin:0 0 24px;padding:19px 17px;background:linear-gradient(135deg,#252035,#1d201d);border:1px solid #514563;border-radius:12px}.story-heading,.scene-editor-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.story-heading h3,.scene-editor-top h3{font:600 19px var(--display);letter-spacing:-.5px;margin:6px 0 16px}.studio-eyebrow{font:9px var(--mono);letter-spacing:1px;color:#c5b9ee}.story-badge{border:1px solid #6c587f;color:#d9c8ff;padding:6px 7px;border-radius:4px;font:9px var(--mono)}.script-examples{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin:0 0 13px}.script-examples>span{font-size:10px;color:#b8b2c2;margin-right:3px}.script-examples button{border:1px solid #514660;background:#ffffff05;color:#d7cee4;padding:6px 7px;border-radius:5px;font-size:10px;cursor:pointer}.script-examples button:hover{border-color:#b7a1da}.studio-field{display:flex;flex-direction:column;gap:6px;color:#c9cebf;font-size:11px;min-width:0}.studio-field input,.studio-field select,.studio-field textarea,.overlay-row input,.overlay-row select{width:100%;border:1px solid #45493e;background:#151712;color:var(--text);border-radius:6px;padding:10px;font:12px var(--sans);min-width:0}.studio-field textarea{resize:vertical;line-height:1.7;min-height:150px}.studio-field input:focus,.studio-field select:focus,.studio-field textarea:focus{outline:2px solid #d5ff3f50;outline-offset:1px}.script-meter{display:flex;justify-content:space-between;gap:8px;font:10px var(--mono);color:#a7a18f;margin:8px 0 16px}.script-meter.over{color:#ff9292}.voice-controls{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:9px}.voice-sample{border:1px solid #6c587f;border-radius:6px;background:#ffffff08;color:#dccdff;padding:11px 8px;font-size:10px;cursor:pointer}.story-composer audio{width:100%;height:34px;margin-top:12px}.studio-hint{color:#969f8c;font-size:10px;line-height:1.65;margin:12px 0 0}.story-scene-preview{display:flex;gap:5px;overflow:auto;padding-top:13px}.story-scene-chip{min-width:105px;max-width:145px;padding:9px;border:1px solid #4c4259;border-radius:5px;color:#b9b2c5;font-size:9px;line-height:1.5}.story-scene-chip b{display:block;color:#e0d5ed;font:9px var(--mono);margin-bottom:4px}.support-upload{margin-top:14px;padding:13px;border:1px solid #394230;border-radius:8px}.support-upload summary{font-size:11px;color:#d5dec8;cursor:pointer}.support-upload summary span{color:#88947c;float:right}.support-upload>p{font-size:10px;color:var(--muted);line-height:1.5}.studio-upload{position:relative;display:flex;align-items:center;justify-content:center;padding:12px;border:1px dashed #536046;border-radius:7px;color:#dce8cf;font-size:11px;cursor:pointer;overflow:hidden}.studio-upload input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.support-file{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid #ffffff0d;font-size:10px;color:#acb69f;overflow-wrap:anywhere}.support-file button{border:0;background:transparent;color:#e0c4b8;font-size:18px;cursor:pointer}.scene-editor{margin:15px 19px;border:1px solid #48543b;border-radius:10px;overflow:hidden}.scene-editor>summary{display:flex;justify-content:space-between;align-items:center;padding:16px;background:#d5ff3f09;cursor:pointer;list-style:none}.scene-editor>summary>span:first-child{display:grid;grid-template-columns:20px 1fr;column-gap:7px;align-items:center}.scene-editor>summary strong{font-size:13px}.scene-editor>summary small{grid-column:2;font-size:9px;margin-top:4px;color:#9ca98d}.scene-editor>summary>span:last-child{font-size:21px;color:var(--lime)}.scene-editor-body{padding:17px}.scene-editor-top h3{font-size:17px;margin-bottom:2px}.scene-editor-top>span{font:11px var(--mono);color:var(--lime);white-space:nowrap}.scene-list{display:grid;gap:10px;margin:16px 0;max-height:580px;overflow:auto;padding-right:4px}.scene-row{border:1px solid #3c4333;border-radius:8px;padding:12px;background:#1d2119}.scene-row-head{display:flex;align-items:center;gap:6px;margin-bottom:10px}.scene-index{color:var(--lime);font:11px var(--mono);margin-right:auto}.scene-row button,.overlay-editor-head button,.overlay-row button{border:1px solid #48513e;background:#292f22;border-radius:5px;color:#d7e2ca;padding:5px 9px;font-size:11px;cursor:pointer}.scene-row button:disabled{opacity:.35;cursor:default}.scene-excerpt{margin:0 0 12px;line-height:1.55;font-size:11px;color:#c8d0bf;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.scene-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.scene-fields .studio-field{font-size:9px}.scene-fields input,.scene-fields select{font-size:11px;padding:8px}.scene-audio{display:flex;align-items:center;gap:8px;margin-top:10px;color:#9fad90;font-size:10px}.scene-audio input{accent-color:var(--lime)}.scene-fields input[type=range]{padding:5px 0;accent-color:var(--lime)}.edit-title-fields{display:grid;gap:9px;margin:15px 0}.studio-check{display:flex;gap:9px;align-items:center;font-size:11px;color:#c9d2be}.studio-check input{accent-color:var(--lime)}.overlay-editor-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:25px 0 12px}.overlay-editor-head h4{font-size:12px;margin:0 0 5px}.overlay-editor-head p{font-size:10px;line-height:1.5;color:#96a288;margin:0}.overlay-list{display:grid;gap:8px;margin-top:10px}.overlay-row{padding:12px;border:1px solid #4a4258;border-radius:8px;background:#211e29}.overlay-row-head{display:flex;gap:9px;margin-bottom:10px}.overlay-row-head select{flex:1}.overlay-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px}.overlay-fields label{display:flex;flex-direction:column;gap:5px;font-size:9px;color:#b9afc9}.overlay-row input,.overlay-row select{padding:8px;font-size:11px;background:#19171e;border-color:#4b4356}.overlay-empty{padding:15px;text-align:center;color:#87947a;font-size:10px;line-height:1.6}.scene-editor-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.scene-editor-actions .button{font-size:11px;flex:1;padding:12px}.scene-editor-actions .button-quiet{border:1px solid #46513b}.scene-editor [aria-invalid=true]{border-color:#ff8c8c}.studio-pending{color:#d5ff3f!important}button:focus-visible,summary:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
/* Keep intrinsic media/select widths from expanding the one-column phone layout. */
.studio-grid>.editor-card,.studio-grid>.preview-column{min-width:0}
.creation-modes{grid-template-columns:repeat(2,minmax(0,1fr))}
.creation-modes button{min-width:0;grid-template-columns:25px minmax(0,1fr)}
.creation-modes strong,.creation-modes small{overflow-wrap:anywhere}
.voice-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}
.story-heading>div,.overlay-row-head>.studio-field{min-width:0}
.story-badge{flex:none}
.story-scene-preview{min-width:0}
.story-scene-chip{overflow-wrap:anywhere}
.scene-fields,.overlay-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.overlay-row-head>.studio-field{flex:1}
.support-file>span{min-width:0;flex:1}
.support-file button{flex:none}
.studio-upload:focus-within{outline:2px solid var(--lime);outline-offset:3px}

@media(max-width:700px){
  .creation-modes{gap:8px}
  .creation-modes button{min-height:82px;padding:14px 10px;grid-template-columns:19px minmax(0,1fr)}
  .creation-modes strong{font-size:13px;line-height:1.4}
  .creation-modes small{font-size:11px;line-height:1.5}
  .story-composer{padding:18px 12px}
  .story-heading{align-items:flex-start}
  .story-heading h3{font-size:20px;line-height:1.2}
  .studio-eyebrow{font-size:10px}
  .story-badge{font-size:10px}
  .script-examples{gap:8px}
  .script-examples>span{flex-basis:100%;font-size:12px}
  .script-examples button{min-height:44px;min-width:44px;padding:10px;font-size:12px}
  .studio-field{font-size:13px;line-height:1.45}
  .studio-field input,.studio-field textarea,.studio-field select,.overlay-row input,.overlay-row select{
    min-height:44px;font-size:16px;scroll-margin-block:24px
  }
  .studio-field textarea{min-height:210px;line-height:1.6}
  .script-meter{font-size:11px;line-height:1.5;flex-wrap:wrap}
  .voice-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .voice-sample{grid-column:1/-1;min-height:44px;font-size:13px}
  .story-composer audio{height:44px}
  .story-scene-preview{display:grid;gap:8px;overflow:visible}
  .story-scene-chip{min-width:0;max-width:none;padding:12px;font-size:12px;line-height:1.6}
  .story-scene-chip b{font-size:10px}
  .studio-hint{font-size:12px;line-height:1.7}
  .support-upload{padding:12px}
  .support-upload summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;font-size:13px;line-height:1.5}
  .support-upload summary span{float:none;flex:none;font-size:11px}
  .support-upload>p{font-size:12px;line-height:1.65}
  .studio-upload{min-height:48px;padding:12px;font-size:13px;text-align:center;line-height:1.5}
  .support-file{font-size:12px;line-height:1.6}
  .support-file button{min-width:44px;min-height:44px;font-size:22px}
  .scene-editor{margin:14px 0 0}
  .scene-editor>summary{min-height:64px;padding:14px 12px}
  .scene-editor>summary>span:first-child{grid-template-columns:20px minmax(0,1fr);min-width:0}
  .scene-editor>summary strong{font-size:14px}
  .scene-editor>summary small{font-size:11px;line-height:1.5}
  .scene-editor-body{padding:14px 10px}
  .scene-editor-top{align-items:flex-start}
  .scene-editor-top h3{font-size:18px;line-height:1.3}
  .scene-editor-top>span{padding-top:18px;font-size:12px}
  .scene-list{max-height:none;overflow:visible;padding-right:0;gap:14px}
  .scene-row{padding:12px 10px}
  .scene-row-head{display:grid;grid-template-columns:minmax(0,1fr) repeat(3,44px);gap:8px}
  .scene-index{grid-column:1/-1;margin-bottom:2px;font-size:12px}
  .scene-row button,.overlay-editor-head button,.overlay-row button{min-width:44px;min-height:44px;padding:10px 8px;font-size:13px}
  .scene-excerpt{font-size:13px;line-height:1.65;-webkit-line-clamp:4}
  .scene-fields{gap:12px 10px}
  .scene-fields .studio-field{font-size:12px}
  .scene-fields .studio-field:nth-child(n+3){grid-column:1/-1}
  .scene-fields input,.scene-fields select{font-size:16px;padding:10px 8px}
  .scene-fields input[type=range]{min-height:44px;margin:0}
  .scene-audio,.studio-check{min-height:44px;font-size:13px;line-height:1.5;gap:10px}
  .scene-audio input,.studio-check input{width:22px;height:22px;margin:0;flex:none}
  .overlay-editor-head{flex-wrap:wrap;align-items:flex-start;margin-top:28px}
  .overlay-editor-head>div{flex:1;min-width:160px}
  .overlay-editor-head h4{font-size:14px;line-height:1.4}
  .overlay-editor-head p{font-size:12px;line-height:1.65}
  .overlay-row{padding:12px 10px}
  .overlay-row-head{align-items:flex-end}
  .overlay-row-head button{flex:none}
  .overlay-fields{gap:12px 10px}
  .overlay-fields label{font-size:12px;line-height:1.5}
  .overlay-fields .studio-field:nth-child(n+3){grid-column:1/-1}
  .overlay-empty{font-size:12px;line-height:1.7}
  .scene-editor-actions{gap:10px}
  .scene-editor-actions .button{min-height:48px;flex-basis:100%;font-size:13px;line-height:1.5}
  .creation-modes button,.script-examples button,.voice-sample,.scene-row button,.overlay-row button,.overlay-editor-head button,.scene-editor-actions .button{touch-action:manipulation}
}
@media(prefers-reduced-motion:reduce){
  .story-composer,.scene-editor,.scene-editor *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
