:root{color-scheme:dark;--bg:#151321;--ink:#f5f0ff;--muted:#c0b5ce;--accent:#dcc4fc;--line:#44394f;--paper:#f1ebf5;--dark:#31273f}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 15% 0,#352740,transparent 55%),var(--bg);color:var(--ink);font:15px/1.8 system-ui,-apple-system,"Yu Gothic",sans-serif}button,textarea,select{font:inherit}button,a,select,textarea{touch-action:manipulation}button{cursor:pointer}button:focus-visible,a:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #b381f0;outline-offset:4px}a{color:inherit}button{border:1px solid var(--line);border-radius:8px;background:transparent;color:inherit;padding:9px 15px}button:hover{border-color:#aa8bc2}button:disabled{opacity:.5;cursor:default}[hidden]{display:none!important}.site-header{padding:20px max(24px,calc((100vw - 1200px)/2));display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid var(--line)}.home{text-decoration:none;font-size:15px;font-weight:700}.home span{display:block;font-size:10px;font-weight:400;letter-spacing:.08em;color:var(--muted)}main{max-width:1200px;margin:auto;padding:0 32px}.intro{padding:56px 0 36px}.eyebrow{font-size:10px;letter-spacing:.16em;color:var(--accent);font-weight:700}h1{font-size:clamp(29px,4vw,45px);letter-spacing:.02em;line-height:1.5;margin:16px 0}h1 span{display:block;color:#dbc4ed;font-size:18px;font-weight:400;margin-top:6px}.intro>p:last-child{color:var(--muted);font-size:14px}.workspace{display:grid;grid-template-columns:280px minmax(0,1fr);gap:28px;align-items:start}.settings{padding:8px 0}.mode-buttons{display:grid;gap:10px;margin:18px 0 28px}.mode-buttons button{text-align:left;padding:16px}.mode-buttons b{display:block;font-size:13px}.mode-buttons span{display:block;color:var(--muted);font-size:11px;margin-top:4px}.mode-buttons button[aria-pressed=true]{background:#392b49;border-color:#c4a1e4}.settings label{display:block;margin:22px 0 8px;font-size:12px;font-weight:700;color:#dfd1ec}.settings select,.settings textarea{width:100%;min-height:44px;background:#211b2d;color:var(--ink);border:1px solid #675571;border-radius:6px;padding:10px}.settings textarea{resize:vertical;line-height:1.6}.sub-button{margin-top:8px;width:100%;font-size:12px}.setting-note{font-size:11px;color:var(--muted);line-height:1.8}.solo-note{border-top:1px solid var(--line);margin-top:26px;padding-top:20px;color:var(--muted);font-size:12px}.practice{color-scheme:light;background:var(--paper);color:var(--dark);padding:32px 36px;border-radius:14px;box-shadow:0 20px 70px #0003;border-top:5px solid #c5a3df}.sheet-top{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #cfc2d9;padding-bottom:14px;margin-bottom:24px;color:#766584;font-size:10px;letter-spacing:.12em}.sheet-top p{margin:0}.sheet-top>span{white-space:nowrap}#emotion-picks{display:flex;flex-wrap:wrap;gap:7px}#emotion-picks button{padding:6px 13px;border:1px solid #c6b8d1;background:#f9f5fc;color:#685475;font-size:12px;border-radius:30px}#emotion-picks button[aria-pressed=true]{background:#674780;border-color:#674780;color:#fff}.direction-heading{display:flex;align-items:center;flex-wrap:wrap;gap:16px;margin-top:26px}.direction-heading h2{font-size:30px;line-height:1.3;margin:0}.direction-heading span{font-size:11px;border-left:1px solid #c9b6d5;padding-left:16px;color:#786580}.cue{font-size:14px;color:#66546f;line-height:1.9;margin:16px 0 22px}.script{padding:28px 0 30px;border-top:1px solid #cfc2d9;border-bottom:1px solid #cfc2d9;margin:26px 0}.script-label{font-size:10px;letter-spacing:.18em;color:#846990}.script blockquote{font-size:clamp(24px,3.1vw,39px);font-weight:650;line-height:1.8;letter-spacing:.025em;margin:18px 0 0;overflow-wrap:anywhere;white-space:pre-wrap}.focus{display:flex;gap:14px;align-items:baseline;font-size:12px;color:#71587e}.focus>span{font-size:10px;white-space:nowrap;font-weight:700}.focus p{margin:0}.practice-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:30px}.practice-actions .primary{background:#624179;color:white;border-color:#624179;font-weight:700;flex:1;min-width:160px}.secondary{color:#624b72;border:1px solid #c5b3d1;font-size:12px;background:#faf7fc}.primary:hover{background:#4d315f}.progress{font-size:11px;color:#83718e;margin-bottom:0}.reflection{font-size:12px;border-top:1px dashed #c8b9d2;margin-top:24px;padding-top:18px;color:#776182}.reflection summary{cursor:pointer;font-weight:700}.reflection ul{padding-left:20px}.reflection p{font-size:11px}.scene-genre{font-size:11px;letter-spacing:.08em;color:#825b99}.roles{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:0}.roles dt{font-size:10px;color:#8c7397}.roles dd{font-size:16px;font-weight:700;line-height:1.65;margin:5px 0 0}.goal{padding:15px 18px;background:#e8deee;border-radius:7px}.goal>span,.scene-direction>span{font-size:10px;color:#80608f;font-weight:700}.goal p,.scene-direction p{font-size:13px;margin:4px 0}.scene-direction{margin-top:18px}.text-button{font-size:11px;border:none;text-decoration:underline;text-underline-offset:4px;color:#76548c;padding:4px 0}footer{padding:34px 0;color:#a799b5;font-size:11px}footer>div{display:flex;gap:24px;flex-wrap:wrap}footer a{text-decoration:none}footer a:hover{text-decoration:underline}footer>p{font-size:10px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#e7d4fb;color:#35223e;border-radius:8px;padding:12px 20px;box-shadow:0 4px 25px #0003;font-size:13px;max-width:90vw;display:none}#toast.show{display:block}body.stage .intro,body.stage .settings,body.stage footer,body.stage .reflection{display:none}body.stage main{max-width:1400px;padding-top:30px}body.stage .workspace{display:block}body.stage .script blockquote{font-size:clamp(30px,4.5vw,62px)}body.stage .practice{max-width:1100px;margin:auto}@media(max-width:850px){main{padding:0 20px}.workspace{grid-template-columns:230px minmax(0,1fr);gap:20px}.practice{padding:25px}.practice-actions{gap:8px}.focus{display:block}.focus p{margin-top:5px}}@media(max-width:650px){.site-header{padding:14px 20px}.home{font-size:13px}.site-header button{font-size:12px}.intro{padding:30px 0 14px}.intro br{display:none}.workspace{grid-template-columns:minmax(0,1fr)}.mode-buttons{grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 18px}.mode-buttons button{padding:12px 10px}.mode-buttons b{font-size:12px}.mode-buttons span{font-size:10px}.settings label{margin-top:14px}.solo-note{margin-top:18px;padding-top:12px}.practice{padding:24px 20px}.roles{grid-template-columns:minmax(0,1fr);gap:12px}.script blockquote{font-size:27px}.practice-actions .primary{flex-basis:100%}.secondary{flex:1}.sheet-top{letter-spacing:.04em}footer{padding-bottom:24px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.actor-card{padding:16px 18px;background:#e8deee;border-radius:8px;margin-bottom:22px}.actor-card>span{font-size:10px;color:#80608f}.actor-card h2{font-size:20px;margin:4px 0;line-height:1.6}.actor-card p{font-size:12px;line-height:1.8;margin:4px 0;color:#71587e}.settings .lock-label{font-weight:400;font-size:11px;display:flex;align-items:center;gap:8px;margin-top:8px}.lock-label input{accent-color:#c5a3df}#emotion-picks button:disabled{opacity:.8;cursor:default}#emotion-picks button[data-done=true]::after{content:" ✓"}select:disabled,textarea:disabled{opacity:.6}

.emotion-partner{font-size:13px;color:#71587e;margin:0 0 20px;overflow-wrap:anywhere}

/* Separate practice selection from optional settings. */
.mode-picker{padding:24px;background:#292034;border:1px solid #766087;border-radius:14px;margin:0 0 28px}
.mode-picker h2{font-size:21px;margin:0;color:var(--ink)}.mode-intro{font-size:13px;color:var(--muted);margin:5px 0 18px}
.mode-picker .mode-buttons{grid-template-columns:repeat(2,minmax(0,1fr));margin:0;gap:16px}
.mode-picker .mode-buttons button{position:relative;padding:20px 20px 42px;background:#1e1928;border:2px solid #554560;min-height:120px}
.mode-picker .mode-buttons b{font-size:17px}.mode-picker .mode-buttons span{font-size:12px}
.mode-picker .mode-buttons button[aria-pressed=true]{background:#eadcf5;color:#382343;border-color:#eadcf5}
.mode-picker .mode-buttons button[aria-pressed=true] span{color:#654d75}
.mode-picker .mode-buttons button[aria-pressed=true]::after{content:'✓ 選択中';position:absolute;bottom:12px;left:20px;font-size:12px;font-weight:700;color:#604075}
.settings{background:#1d1827;border:1px solid var(--line);border-radius:12px;padding:20px}
.settings h2{font-size:17px;margin:0 0 8px}.settings>p.setting-note{margin-top:0}
body.stage .mode-picker{display:none}
@media(max-width:650px){.mode-picker{padding:18px;margin-bottom:20px}.mode-picker h2{font-size:19px}.mode-picker .mode-buttons{grid-template-columns:minmax(0,1fr);gap:10px}.mode-picker .mode-buttons button{padding:15px 16px 38px;min-height:104px}.mode-picker .mode-buttons b{font-size:16px}.mode-picker .mode-buttons button[aria-pressed=true]::after{left:16px}.settings{padding:18px}}

/* Dialogue paragraphs share a left edge and wrap at readable sizes. */
.practice,.script{min-width:0}
.script blockquote,body.stage .script blockquote{white-space:normal;overflow:visible;overflow-wrap:anywhere;line-break:strict;word-break:normal;text-align:left;text-indent:0;max-width:100%;font-size:clamp(22px,2.5vw,32px);line-height:1.85;letter-spacing:.015em;padding:0}
.dialogue-paragraph{display:block}.dialogue-paragraph+.dialogue-paragraph{margin-top:.55em}
body.stage main{max-width:1600px}body.stage .practice{max-width:none}
body.stage .script blockquote{font-size:clamp(26px,3vw,42px)}
.random-note{font-size:12px;line-height:1.8;color:#654d75;margin:12px 0 0}
@media(max-width:650px){body.stage main{padding-left:16px;padding-right:16px}body.stage .practice{padding:22px 18px}}

.practice .setting-note{color:#654d75}
.settings-fold>summary{cursor:pointer;font-size:17px;font-weight:700;color:var(--ink)}.settings-fold>summary span{display:block;font-size:11px;font-weight:400;color:var(--muted);margin-top:4px}
.nuance-display{color:#574064;background:#e8deee;border-left:3px solid #9171a5;padding:10px 14px;font-size:14px;line-height:1.8;margin:18px 0}
@media(max-width:650px){.workspace>.practice{order:1}.workspace>.settings{order:2}}

/* Continuous reading lines, with a restrained streaming layout. */
.dialogue-paragraph+.dialogue-paragraph{margin-top:0}
body.stage main{max-width:1120px;padding-top:24px}
body.stage .practice{max-width:1056px;padding:28px 32px;margin-inline:auto}
body.stage .script{margin:24px 0;padding:22px 0}
body.stage .script blockquote{font-size:clamp(26px,2.6vw,36px);line-height:1.65;letter-spacing:.01em;margin-top:14px}
@media(max-width:650px){body.stage main{padding:16px 12px 0}body.stage .practice{padding:22px 18px}body.stage .script blockquote{font-size:26px;line-height:1.7}}

/* Compact normal mode without removing context or controls. */
body:not(.stage) .intro{padding:22px 0 14px}
body:not(.stage) .intro .eyebrow{margin:0}
body:not(.stage) h1{font-size:clamp(28px,3vw,36px);margin:8px 0;line-height:1.35}
body:not(.stage) h1 span{font-size:16px;margin-top:3px}
body:not(.stage) .intro>p:last-child{margin:8px 0 0;line-height:1.6}
body:not(.stage) .mode-picker{padding:16px 20px;margin-bottom:18px}
body:not(.stage) .mode-picker h2{font-size:19px}
body:not(.stage) .mode-intro{margin:2px 0 10px}
body:not(.stage) .mode-picker .mode-buttons button{min-height:90px;padding:12px 16px 32px}
body:not(.stage) .mode-picker .mode-buttons button[aria-pressed=true]::after{bottom:8px;left:16px}
body:not(.stage) .practice{padding:22px 28px}
body:not(.stage) .sheet-top{padding-bottom:10px;margin-bottom:14px}
body:not(.stage) .actor-card{padding:10px 14px;margin-bottom:12px}
body:not(.stage) .actor-card h2{font-size:19px;margin:2px 0}
body:not(.stage) .actor-card p{margin:2px 0;line-height:1.6}
body:not(.stage) .emotion-partner{margin-bottom:12px}
body:not(.stage) .direction-heading{margin-top:10px;gap:12px}
body:not(.stage) .direction-heading h2{font-size:26px}
body:not(.stage) .cue{margin:10px 0 14px;line-height:1.7}
body:not(.stage) .nuance-display{margin:10px 0;padding:8px 12px}
body:not(.stage) .script{margin:16px 0;padding:14px 0 18px}
body:not(.stage) .script blockquote{font-size:clamp(22px,2.3vw,28px);line-height:1.65;margin-top:8px}
body:not(.stage) .practice-actions{margin-top:18px}
body:not(.stage) .random-note{margin-top:8px}
body:not(.stage) .reflection{margin-top:14px;padding-top:12px}
body:not(.stage) .scene-direction{margin-top:12px}
body:not(.stage) .goal{padding:10px 14px}
@media(max-width:650px){body:not(.stage) .intro{padding-top:18px}body:not(.stage) .mode-picker{padding:14px}body:not(.stage) .practice{padding:20px 18px}}

/* Compact stream view while keeping the spoken text prominent. */
body.stage main{padding-top:16px}
body.stage .practice{padding:20px 28px}
body.stage .sheet-top{padding-bottom:8px;margin-bottom:12px}
body.stage .actor-card{padding:8px 14px;margin-bottom:10px}
body.stage .actor-card h2{font-size:20px;margin:2px 0;line-height:1.4}
body.stage .actor-card p{margin:2px 0;line-height:1.5}
body.stage .emotion-partner{margin:0 0 10px}
body.stage .practice .setting-note{margin:8px 0 4px}
body.stage .direction-heading{margin-top:6px;gap:12px}
body.stage .direction-heading h2{font-size:28px}
body.stage .cue{margin:8px 0 12px;line-height:1.6}
body.stage .nuance-display{margin:8px 0;padding:7px 12px;line-height:1.6}
body.stage .script{margin:14px 0;padding:12px 0 16px}
body.stage .script blockquote{font-size:clamp(26px,2.5vw,34px);line-height:1.5;margin-top:8px}
body.stage .practice-actions{margin-top:14px}
body.stage .random-note{margin-top:8px;line-height:1.6}
body.stage .progress{margin-top:8px}
body.stage .goal{padding:8px 14px}
body.stage .scene-direction{margin-top:10px}
body.stage .roles{gap:12px}body.stage .roles dd{margin-top:2px;line-height:1.5}
@media(max-width:650px){body.stage main{padding-top:12px}body.stage .practice{padding:18px 16px}body.stage .script blockquote{font-size:26px;line-height:1.6}}

/* Settings above the full-width practice sheet. */
body:not(.stage) .workspace{grid-template-columns:minmax(0,1fr);gap:16px}
body:not(.stage) .workspace>.settings{order:0}body:not(.stage) .workspace>.practice{order:1}
.settings-fold>summary span{display:inline;margin-left:12px}
@media(min-width:651px){body.stage #emotion-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:24px;align-items:start}body.stage #scene-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px;align-items:start}body.stage #scene-genre{grid-column:1/-1;margin:0}body.stage #scene-panel>.roles{grid-column:1;grid-row:2}body.stage #scene-panel>#situation{grid-column:2;grid-row:2;margin:0}body.stage #scene-panel>.goal{grid-column:1;grid-row:3}body.stage #scene-panel>.scene-direction{grid-column:2;grid-row:3;margin-top:0}}
.emotion-profile,.emotion-details{min-width:0}
@media(max-width:650px){body.stage #emotion-panel,body.stage #scene-panel{display:block}}

/* Keep repeat actions above variable-height content. */
body:not(.stage) .practice-toolbar .practice-actions,body.stage .practice-toolbar .practice-actions{margin-top:0}
.practice-toolbar{margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid #cfc2d9}
body:not(.stage) .script blockquote{min-height:4.95em}
body.stage .script blockquote{min-height:4.5em}
@media(max-width:650px){body.stage .script blockquote{min-height:4.8em}}

/* Distinguish the performed role from the listener without relying on color alone. */
.actor-card,.roles .your-role-card{background:#e4d7ee;border-left:4px solid #74518d}
.partner-card,.roles .partner-role-card{background:#e0e9ec;border-left:4px solid #496d7c;border-radius:8px;padding:10px 14px}
.actor-card>.role-label,.partner-card>.role-label,.roles dt{font-size:13px;font-weight:750;letter-spacing:.025em;color:#453150}
.partner-card>.role-label,.roles .partner-role-card dt{color:#304e5b}
.partner-card p{font-size:17px;line-height:1.6;font-weight:650;color:#304e5b;margin:4px 0 0}
.roles .your-role-card{border-radius:8px;padding:10px 14px}.roles dd{font-size:18px;color:#31273f}
.emotion-profile .partner-card{margin-bottom:12px}

/* Stable role and emotion controls in both viewing modes. */
#emotion-panel,body.stage #emotion-panel{display:block}
.emotion-profile{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch;margin-bottom:12px}
body:not(.stage) .emotion-profile .actor-card,body.stage .emotion-profile .actor-card,.emotion-profile .partner-card{margin:0;padding:12px 16px;min-height:156px}
.emotion-profile .actor-card h2,.emotion-profile .partner-card p{font-size:20px;line-height:1.6;margin:6px 0 0}
.emotion-profile .actor-card #character-note{font-size:12px;line-height:1.6;margin-top:6px}
.emotion-details>.setting-note{margin:8px 0 4px}
body:not(.stage) .emotion-details .direction-heading,body.stage .emotion-details .direction-heading{margin:4px 0 10px;min-height:36px}
.emotion-controls-row{display:grid;grid-template-columns:170px minmax(0,1fr);gap:16px;align-items:center}
#strength-name{font-size:15px;font-weight:700;color:#574064;white-space:nowrap}
.emotion-choices-label{display:block;font-size:11px;color:#654d75;margin-bottom:5px}
#emotion-picks{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px}
#emotion-picks button{padding:6px 4px;min-height:36px;white-space:nowrap}
#emotion-picks button:disabled{opacity:.4}
#emotion-picks button[aria-pressed=true]:disabled{opacity:1}
body:not(.stage) #emotion-cue,body.stage #emotion-cue{min-height:3.4em;line-height:1.7}
#nuance-display[hidden]{display:block!important;visibility:hidden}
@media(max-width:900px){#emotion-picks{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:650px){.emotion-profile{gap:10px}body:not(.stage) .emotion-profile .actor-card,body.stage .emotion-profile .actor-card,.emotion-profile .partner-card{padding:10px;min-height:214px}.emotion-profile .actor-card h2,.emotion-profile .partner-card p{font-size:17px}.emotion-controls-row{grid-template-columns:130px minmax(0,1fr);gap:8px}#strength-name{font-size:13px}#emotion-picks{grid-template-columns:repeat(2,minmax(0,1fr))}body:not(.stage) #emotion-cue,body.stage #emotion-cue{min-height:5.1em}}

/* Completion marks occupy a reserved slot, even before completion. */
#emotion-picks button{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) 1em;align-items:center;column-gap:2px;text-align:center}
#emotion-picks button::after{content:'✓';display:block;width:1em;visibility:hidden;text-align:center}
#emotion-picks button[data-done=true]::after{content:'✓';visibility:visible}

/* Role cards use the same compact sizing as scene practice. */
body:not(.stage) .emotion-profile .actor-card,body.stage .emotion-profile .actor-card,.emotion-profile .partner-card{min-height:0;padding:10px 14px}
body:not(.stage) .emotion-profile .actor-card h2,body.stage .emotion-profile .actor-card h2,.emotion-profile .partner-card p{font-size:18px;line-height:1.5;margin:2px 0 0;font-weight:700}
.character-guidance{font-size:12px;line-height:1.6;color:#654d75;margin:0 0 10px}.character-guidance>span:first-child{font-weight:700}

/* Keep the nuance control beside its always-visible explanation. */
.nuance-box{margin:12px 0;border:1px solid #b6a1c5;background:#e8deee;border-radius:8px;padding:10px 14px;color:#453150}
.nuance-toggle{display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:14px;font-weight:700;cursor:pointer}
.nuance-switch{display:flex;align-items:center;gap:8px;min-width:76px}
.nuance-switch input{width:20px;height:20px;accent-color:#674780;cursor:pointer;margin:0}
#nuance-state{display:inline-block;min-width:3ch;font-size:12px}
body:not(.stage) .nuance-box #nuance-display,body.stage .nuance-box #nuance-display{margin:8px 0 0;padding:0;border:0;background:transparent;font-size:14px;line-height:1.7}
.nuance-help{font-size:11px;line-height:1.6;min-height:3.2em;color:#654d75;margin:5px 0 0}

/* OFF remains legible and interactive, with neutral colors. */
.nuance-box[data-enabled=false]{background:#ececee;border-color:#b5b5ba;color:#57575e}
body:not(.stage) .nuance-box[data-enabled=false] #nuance-display,body.stage .nuance-box[data-enabled=false] #nuance-display,.nuance-box[data-enabled=false] .nuance-help{color:#57575e}

/* Short guidance and tighter spacing in both modes. */
.nuance-box{padding:8px 12px;margin:8px 0}
body:not(.stage) .nuance-box #nuance-display,body.stage .nuance-box #nuance-display{margin-top:5px;line-height:1.6;}
.nuance-help{min-height:1.6em;margin-top:3px}
body:not(.stage) #emotion-cue,body.stage #emotion-cue{min-height:0;margin:6px 0;line-height:1.6}
body:not(.stage) .script,body.stage .script{margin-top:8px;padding-top:10px}
.direction-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin-top:8px}
.direction-button{background:#faf7fc;border:1px solid #9275a7;color:#543767;font-size:12px;font-weight:700;padding:8px 12px;min-height:40px}
.direction-button:hover{background:#e5d7ee;border-color:#674780}
#direction-help{font-size:11px;color:#654d75}
#direction-label{font-size:12px;font-weight:700;color:#654d75}


/* Shared reading order and compact page chrome; retain readable dialogue sizing. */
.site-header{padding-top:10px;padding-bottom:10px}
body:not(.stage) .intro{padding:12px 0 10px}
body:not(.stage) h1{margin:4px 0}
body:not(.stage) h1 span{display:inline-block;margin:0 0 0 16px}
body:not(.stage) .intro>p:last-child{margin-top:4px}
body:not(.stage) .mode-picker{padding:10px 16px;margin-bottom:10px}
body:not(.stage) .mode-intro{margin:0 0 6px}
body:not(.stage) .mode-picker .mode-buttons{gap:10px}
body:not(.stage) .mode-picker .mode-buttons button{min-height:74px;padding:8px 14px 26px}
body:not(.stage) .mode-picker .mode-buttons button[aria-pressed=true]::after{bottom:5px;left:14px}
body:not(.stage) .workspace{gap:10px}
body:not(.stage) .settings{padding:10px 16px}
body:not(.stage) .practice,body.stage .practice{padding:16px 24px}
body.stage main{padding-top:10px}
body:not(.stage) .sheet-top,body.stage .sheet-top{padding-bottom:6px;margin-bottom:8px}
.practice-toolbar{margin-bottom:10px;padding-bottom:8px}
body:not(.stage) .random-note,body.stage .random-note{margin:4px 0 0;line-height:1.6}
.emotion-profile,body.stage .roles,.roles{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 6px}
.roles dd,body.stage .roles dd{font-size:18px;line-height:1.5;margin:2px 0 0}
.character-guidance{margin-bottom:6px}
#scene-panel,body.stage #scene-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px;align-items:start}
#scene-panel>.roles,body.stage #scene-panel>.roles{grid-column:1/-1;grid-row:1}
#scene-panel>#scene-genre,body.stage #scene-panel>#scene-genre{grid-column:1/-1;grid-row:2;margin:0}
#scene-panel>#situation,body.stage #scene-panel>#situation{grid-column:1/-1;grid-row:3;margin:0 0 4px;line-height:1.6}
#scene-panel>.goal,body.stage #scene-panel>.goal{grid-column:1;grid-row:4;padding:8px 12px}
#scene-panel>.scene-direction,body.stage #scene-panel>.scene-direction{grid-column:2;grid-row:4;margin:0}
.direction-actions{margin-top:4px}
body:not(.stage) .script,body.stage .script{margin-bottom:10px;padding-bottom:10px}
body:not(.stage) .reflection{margin-top:8px;padding-top:8px}
footer{padding-top:18px;padding-bottom:18px}
@media(max-width:650px){
 body:not(.stage) h1 span{display:block;margin:2px 0 0}
 body:not(.stage) .practice,body.stage .practice{padding:14px 16px}
 .emotion-profile,body.stage .roles,.roles{gap:8px}
 #scene-panel,body.stage #scene-panel{grid-template-columns:minmax(0,1fr)}
 #scene-panel>.goal,body.stage #scene-panel>.goal{grid-column:1;grid-row:4}
 #scene-panel>.scene-direction,body.stage #scene-panel>.scene-direction{grid-column:1;grid-row:5}
}

/* Intrinsic height includes every alternative, without shrinking or clipping text. */
.stable-text{display:grid;grid-template-columns:minmax(0,1fr)}
.stable-text>span{grid-area:1 / 1;min-width:0;overflow-wrap:anywhere}
.stable-text>.height-reserve{visibility:hidden;pointer-events:none;user-select:none}

/* Footer brand credits */
footer .lab-brand-credits{display:flex;align-items:flex-start;gap:32px;flex-wrap:wrap}footer .lab-brand-credit{display:block;color:#c0b5ce;text-decoration:none;max-width:100%}footer .lab-brand-credit:hover{opacity:.8;text-decoration:none}footer .lab-brand-credit>span:first-child{display:block;font-size:10px;letter-spacing:.1em}footer .lab-brand-image{display:flex;align-items:center;position:relative;overflow:hidden;width:210px;height:66px;margin-top:8px}footer .lab-musik img{display:block;width:210px;height:auto}footer .lab-marchen img{position:absolute;left:0;top:-44px;width:210px;height:auto;max-width:none}@media(max-width:520px){footer .lab-brand-credits{gap:20px}footer .lab-brand-image{width:150px;height:48px}footer .lab-musik img,footer .lab-marchen img{width:150px}footer .lab-marchen img{top:-31px}}

/* Mobile: emotion choices use the full width below strength. */
@media(max-width:650px){.emotion-controls-row{grid-template-columns:minmax(0,1fr);gap:8px}.emotion-choices{min-width:0;width:100%}#emotion-picks{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Simplified prompt layout shared by both modes. */
.workspace,body.stage .workspace{display:block}.practice{width:100%}
.prompt-roles{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:10px}
.prompt-roles>div{padding:10px 14px;border-radius:8px;background:#e8deee;border-left:4px solid #77558b}.prompt-roles>.partner-role-card{background:#e0ebee;border-color:#4a7180}
.prompt-roles h2,.prompt-roles p{font-size:18px;line-height:1.5;margin:3px 0 0;font-weight:700}.role-label,.prompt-label{font-size:12px;font-weight:700;color:#66546f}
.prompt-situation{margin:10px 0}.prompt-situation p{font-size:14px;line-height:1.6;margin:4px 0}
.prompt-intent{display:flex;align-items:center;gap:14px;margin:8px 0}.prompt-intent h2{font-size:26px;line-height:1.3;margin:0}body.stage .prompt-intent h2{font-size:28px}
#scene-panel,body.stage #scene-panel{display:block}#scene-panel>.goal{margin:8px 0}
.script,body.stage .script{min-height:0!important;padding-top:14px;margin-top:14px}#spoken-line,body.stage #spoken-line{min-height:0!important}
#settings-dialog{color:var(--ink);background:#211b2d;border:1px solid #80688e;border-radius:14px;width:min(520px,calc(100vw - 24px));max-height:85dvh;padding:18px;overflow:auto}#settings-dialog::backdrop{background:#0009}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.dialog-heading h2{font-size:20px;margin:0}#settings-dialog .settings{display:block!important;padding:0;background:none;border:0}#settings-dialog #copy{margin-top:20px;width:100%}
@media(max-width:650px){
 body{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}.site-header{padding:8px 12px}main,body.stage main{padding-left:10px;padding-right:10px}
 .intro{padding:8px 0!important}.intro .eyebrow,.intro>p:last-child,h1 span{display:none!important}h1{margin:4px 0!important}
 .mode-picker,body:not(.stage) .mode-picker{padding:8px;margin-bottom:8px}.mode-picker h2{display:none}.mode-picker .mode-buttons{display:grid;grid-template-columns:1fr 1fr;margin:0!important;gap:6px!important}.mode-picker .mode-buttons button,body:not(.stage) .mode-picker .mode-buttons button{min-height:64px;padding:8px 10px 22px}
 .practice,body:not(.stage) .practice,body.stage .practice{padding:12px}.sheet-top{margin-bottom:8px!important}
 .practice-toolbar{position:fixed;bottom:0;left:0;right:0;z-index:20;margin:0;padding:10px 10px calc(10px + env(safe-area-inset-bottom,0px));background:#f1ebf5;border-top:1px solid #c8b6d3;box-shadow:0 -4px 16px #0002}
 .practice-actions{display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(0,1.3fr) 60px;gap:6px!important;margin:0!important}.practice-actions button,.practice-actions .primary{min-width:0!important;min-height:46px;padding:8px 4px;white-space:normal}
 .prompt-roles{grid-template-columns:minmax(0,1fr);gap:6px}.prompt-roles>div{padding:6px 10px}.prompt-roles h2,.prompt-roles p{font-size:17px;margin:2px 0}.prompt-situation{margin:8px 0}
 #emotion-picks{grid-template-columns:repeat(4,minmax(0,1fr))}.script,body.stage .script{margin-top:10px;padding:10px 0}
 footer{padding-bottom:12px}
}

/* Optional suggestions remain collapsed until opened. */
.optional-hints{margin-top:12px;border-top:1px solid #cfc2d9;padding-top:10px;color:#66546f;font-size:13px;line-height:1.7}.optional-hints summary{cursor:pointer;font-weight:700;min-height:44px;display:list-item;align-content:center}.optional-hints section{margin:12px 0}.optional-hints h3{font-size:13px;margin:0 0 4px}.optional-hints p{margin:4px 0 8px}.optional-hints button{color:#624b72;background:#faf7fc;border-color:#c5b3d1;min-height:44px;font-size:12px}.optional-hints .hint-intro{font-size:12px}
