@font-face{font-family:StudioAmiri;src:url('/assets/fonts/text/amiri.woff2') format('woff2');font-display:swap}
.studio-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 4vw;border-bottom:1px solid var(--border)}
.studio-shell{max-width:1120px;margin:auto;padding:1.5rem clamp(.8rem,4vw,2rem)}
.studio-shell h1,.studio-shell h2{line-height:1.3;margin:0 0 1rem}
.studio-tabs{display:flex;flex-wrap:wrap;gap:.6rem;margin:1rem 0 2rem}
.studio-tabs a,.studio-actions a{border:1px solid var(--border);border-radius:var(--radius);padding:.6rem .8rem;color:var(--text);text-decoration:none}
.studio-panel{padding:clamp(1rem,3vw,1.8rem);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:1.5rem;scroll-margin-top:1rem}
.studio-form{display:grid;gap:1rem}.studio-shell label{display:grid;gap:.4rem;font-size:.95rem;min-width:0}
.studio-shell input,.studio-shell textarea,.studio-shell select,.studio-header select{box-sizing:border-box;width:100%;max-width:100%;min-width:0;padding:.7rem;border-radius:var(--radius);border:1px solid var(--border);background:var(--bg);color:var(--text);font:inherit}
.studio-shell textarea{resize:vertical;min-height:5rem}.studio-shell button{border:1px solid var(--border);border-radius:var(--radius);padding:.7rem 1rem;background:var(--accent);color:var(--bg);font:inherit;cursor:pointer;min-height:44px}
.studio-shell button:disabled{opacity:.5;cursor:wait}.studio-shell :focus-visible,.studio-header :focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.studio-fields,.studio-previews{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:1rem}.studio-actions{display:flex;align-items:end;flex-wrap:wrap;gap:.7rem;margin:.8rem 0}
.studio-scene{position:relative;display:grid;place-items:center;aspect-ratio:9/16;border:1px solid var(--border);border-radius:var(--radius);min-width:0;isolation:isolate}
.studio-scene img{position:absolute;width:100%;height:100%;object-fit:contain;z-index:-1}.studio-scene p{width:70%;text-align:center;white-space:pre-wrap;overflow-wrap:anywhere;font-family:StudioAmiri,serif;font-size:clamp(16px,2vw,28px);line-height:1.35;color:white;margin:0}
.studio-segment{display:grid;grid-template-columns:6rem 6rem minmax(0,1fr);gap:.7rem;padding:.8rem 0;border-bottom:1px solid var(--border)}
.studio-job{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.8rem;padding:.8rem 0;border-bottom:1px solid var(--border)}
.studio-job span{overflow-wrap:anywhere}.studio-shell fieldset{min-width:0;border:1px solid var(--border);border-radius:var(--radius);padding:.8rem;display:grid;gap:.6rem}
.studio-shell progress{width:100%;accent-color:var(--accent)}#studio-notice{min-height:1.4em;color:var(--text-muted);overflow-wrap:anywhere}
@media(max-width:560px){.studio-segment{grid-template-columns:1fr 1fr}.studio-segment label:last-child{grid-column:1/-1}.studio-actions>*{flex:1 1 130px}.studio-header{align-items:start}.studio-header select{max-width:155px}.studio-tabs a{flex:1 1 120px;text-align:center}}

/* Illustrative local subtitle preview; no transcription or encode is requested. */
.studio-subtitle-preview{width:100%;min-height:7rem;display:grid;place-items:center;background:#0b0c0f;border:1px solid var(--border,#333);border-radius:12px;padding:1rem;box-sizing:border-box}
.studio-subtitle-preview p{font:1.7rem/1.5 serif;color:white;margin:0;text-align:center;overflow-wrap:anywhere}
.studio-subtitle-preview[data-style="background"] p{background:#333;padding:.2rem .6rem;border-radius:.3rem}
.studio-subtitle-preview .studio-active-word{color:#ffd200}
.studio-subtitle-preview[data-style="highlight"] .studio-active-word{background:#6b5400;border-radius:.2rem;padding:.1rem}
@media(prefers-reduced-motion:no-preference){.studio-subtitle-preview[data-style="animated"] p{animation:studio-subtitle-enter .18s ease-out}}
@keyframes studio-subtitle-enter{from{opacity:.3;transform:translateY(.2rem)}to{opacity:1;transform:none}}

/* Touch layouts: readable fields and usable targets, including phone landscape. */
@media(pointer:coarse),(max-width:560px){
  .studio-shell input,.studio-shell textarea,.studio-shell select,.studio-header select{font-size:16px;min-height:44px}
  .studio-tabs a,.studio-actions a,.studio-job a{display:inline-flex;align-items:center;box-sizing:border-box;min-height:44px}
}

.studio-login-notice{margin-bottom:1rem;padding:.8rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg)}
.studio-login-notice a{display:inline-flex;align-items:center;min-height:44px;color:var(--text);text-underline-offset:.2rem}

.studio-actions [data-template-login]{display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box}

#anonymous-video{max-width:100%;max-height:70vh;border-radius:var(--radius)}

.studio-inline-notice:not(:empty){padding:.8rem;border:1px solid var(--border);border-radius:var(--radius);overflow-wrap:anywhere}

.studio-inline-notice a{display:inline-flex;align-items:center;min-height:44px}
