.actor-expression-layers{position:absolute;inset:0;overflow:hidden}.actor-expression-layers>svg.actor-layer{position:absolute;inset:0;width:100%;height:100%;opacity:0;transition:opacity 160ms cubic-bezier(.22,1,.36,1);transform:none!important}.actor-expression-layers>svg.is-active{opacity:1}.actor-stage[data-actor-ready=true] .portrait>svg{visibility:hidden}.actor-stage .portrait{position:absolute;inset:0}.actor-stage #dialogue{cursor:pointer;min-height:2em}.actor-stage #dialogue:focus-visible{outline:1px solid #ad7779;outline-offset:3px}.actor-dialogue-hint{font-size:9px;color:#a18a7b;margin-top:9px;margin-bottom:6px;text-align:right}.actor-stage[data-typing=true] .actor-dialogue-hint{color:#9b5e68}.actor-choices{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.actor-choices[hidden]{display:none}.actor-choices button{border:1px solid #c8aaa4;background:#f6e7e0;border-radius:18px;padding:8px 12px;font-size:10px;color:#8b505a}.actor-chat{margin:7px 0 13px}.actor-chat-open{border:0;background:none;padding:3px 0;font:11px var(--serif);color:#8b505a}.actor-chat form{display:flex;gap:7px;margin-top:10px}.actor-chat form[hidden]{display:none}.actor-chat input{min-width:0;flex:1;background:#fffaf5;border:1px solid #d3bfb3;border-radius:5px;padding:10px;font-size:12px}.actor-chat button[type=submit]{border:0;background:#945b63;color:#fff9f0;border-radius:5px;padding:8px 13px;font-size:11px}.actor-chat-status{font:10px/1.8 var(--serif);color:#967369;margin:7px 0 0}.actor-stage .dialogue-actions[hidden]{display:none}.actor-stage .dialogue-scroll{max-height:150px}.actor-stage[data-dialogue-mode=reaction] .source-chip,.actor-stage[data-dialogue-mode=chat] .source-chip{opacity:1;color:#97616a}.actor-stage .companion-response{display:none!important}.actor-stage .dialogue-card{background:#fcf2e7f5}.actor-stage[data-actor-state=thinking] .live-badge{background:#eae8e2ee}.actor-stage[data-actor-state=shy] .live-badge{background:#f7ddd9ed}
@media(max-width:550px){.actor-stage .dialogue-scroll{max-height:125px}.actor-stage .dialogue-scroll>p{font-size:15px}.actor-dialogue-hint{font-size:8px}.actor-chat{margin:5px 0 9px}.actor-choices{margin:8px 0}.actor-choices button{font-size:9px;padding:7px 9px}.actor-stage .dialogue-card{padding-top:15px}.actor-stage .dialogue-heading{margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){.actor-expression-layers>svg.actor-layer{transition:none}}

/* Give portrait and dialogue separate layout rows: the card can never cover the face. */
.actor-stage{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(150px,1fr) auto 38px;isolation:isolate}
.actor-stage::before{content:'';position:absolute;inset:-30px;background:url('/assets/characters-evening-v3.webp') 0 0/300% 100% no-repeat;filter:blur(28px) brightness(.72);z-index:-1;pointer-events:none}
.actor-stage[data-character=lu]::before{background-position:50% 0}.actor-stage[data-character=zhou]::before{background-position:100% 0}
.companion-pane.actor-stage>.portrait{grid-row:1;position:relative;inset:auto;width:100%;height:100%;min-height:0;z-index:0}
.actor-stage .actor-expression-layers{inset:12px 0 0;transform:none}
.actor-stage .dialogue-card{grid-row:2;position:relative;inset:auto;align-self:end;width:auto;min-height:0;max-height:44dvh;overflow:auto;margin:0 16px 4px;padding:17px 20px 13px;border-radius:14px;z-index:5}
.actor-stage .dialogue-scroll{max-height:110px}.actor-stage .dialogue-heading{margin-bottom:10px}.actor-stage .dialogue-controls{padding-top:10px}.actor-stage .dialogue-actions{margin:8px 0 10px}.actor-stage .actor-chat{margin:6px 0 9px}
.actor-stage .sound-dock{grid-row:3;position:relative;inset:auto;align-self:center;margin:0 16px;min-width:0;z-index:10}
.actor-stage .romance-touch{bottom:calc(var(--dialogue-height,300px) + 42px)}
.actor-stage .romance-glow,.actor-stage .romance-veil{bottom:calc(var(--dialogue-height,300px) + 42px);max-height:100%;overflow:hidden}
@media(max-width:550px){.actor-stage .dialogue-card{margin:0 10px 3px;padding:13px 14px 10px;max-height:43dvh}.actor-stage .dialogue-scroll{max-height:85px}.actor-stage .actor-dialogue-hint{margin:5px 0}.actor-stage .actor-choices{margin:6px 0;gap:5px}.actor-stage .actor-choices button{padding:6px 9px}.actor-stage .sound-dock{margin:0 11px}.actor-stage .dialogue-heading strong{font-size:17px}.actor-stage .source-chip{font-size:8px}.actor-stage .companion-top{top:10px}.actor-stage .interaction-rail{top:49px}.actor-stage .companion-connection{gap:5px}.actor-stage .romance-toggle,.actor-stage .whisper-button{font-size:7px;padding:6px 8px}.actor-stage .interaction-button{width:43px;min-height:45px}.actor-stage .interaction-button>span{font-size:22px}}

.companion-pane.actor-stage>.portrait{background:transparent}.actor-stage[data-actor-ready=true] .portrait>svg{display:none}

/* Scene controls recede; the face and the current exchange lead. */
.actor-stage .companion-connection .affection-badge,.actor-stage .romance-toggle,.actor-stage .companion-caption{display:none}
.actor-stage .companion-connection{position:absolute;left:18px;top:52px}
.actor-stage .live-badge{background:#251c19d9;color:#fff3e9;font:14px var(--serif);padding:9px 14px}
.actor-stage .whisper-button{font-size:12px;padding:9px 14px;color:#643d43}
.actor-stage .interaction-button{width:64px;min-height:56px;font-size:11px}
.actor-stage .interaction-button small{font-size:10px;color:#75464e}
.actor-stage .actor-expression-layers{inset:0}
.actor-stage .actor-layer{transition:opacity 120ms ease-out}
.actor-stage .dialogue-card{background:#fbf4eaf5;border:0;padding:20px 24px 16px;box-shadow:0 10px 28px #130d0b24}
.actor-stage .dialogue-scroll>p{font-size:18px;line-height:1.8;color:#3c302b}
.actor-stage .actor-choices button{background:transparent;border-color:#b58d87;font-size:13px;padding:9px 14px;color:#673c44;border-radius:6px}
.actor-stage .actor-choices button:hover{background:#e8d6cc}
.actor-stage .actor-chat-open{font-size:12px;color:#70444b}
.actor-stage .actor-dialogue-hint{color:#766258}
.actor-stage .source-chip{color:#714b4d}
.scene-menu{position:relative;color:#f9f1e8;font-size:12px;pointer-events:auto}
.scene-menu summary{list-style:none;cursor:pointer;padding:9px 14px;border:1px solid #f7efe366;border-radius:6px;background:#251c19d9}
.scene-menu>div{position:absolute;right:0;top:42px;width:190px;background:#fbf4ea;color:#42312c;padding:12px;display:grid;gap:5px;border-radius:8px;box-shadow:0 10px 25px #160e0d44;z-index:15}
.scene-menu button{background:none;border:0;text-align:left;padding:9px;font-size:12px;color:#67434a}
.scene-menu label{padding:9px;font-size:11px}.scene-menu select{margin-top:7px;max-width:100%;padding:7px;background:#fffaf5;border:1px solid #bea398;color:#49342c}
.selection-response{display:flex;align-items:center;gap:18px;margin:16px 0 0;padding:18px 0;border-bottom:1px solid var(--line)}
.selection-response>span{color:#74464e;font-size:12px}.selection-response p{margin:0;font:22px var(--serif);flex:1}
.expression-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.expression-gallery figure{margin:0}.expression-gallery figure>div{aspect-ratio:2/3;background-size:600% 300%;background-repeat:no-repeat;border-radius:6px}.expression-gallery figcaption{padding:7px 0;color:#65434a;font-size:11px}
.story-log{max-height:52vh;overflow:auto}.story-log p{margin:14px 0}.story-log small{display:block;color:#8a5b62}
.gift-intent{border:0;padding:12px 0;display:grid;gap:12px;color:#65434a;font-size:13px}.gift-intent legend{padding:0 0 10px}.gift-note{display:grid;gap:8px;color:#65434a}.gift-note textarea{min-height:80px;padding:12px;background:#fffbf6;border:1px solid #bea398;border-radius:5px;resize:vertical;font:14px var(--serif)}
.gift-drawer{align-items:flex-end;background:#24171426;backdrop-filter:none;padding:12px}.gift-drawer .modal{max-height:49dvh;padding:22px 26px;width:min(620px,100%)}.gift-drawer .gift-options{margin:12px 0}.gift-drawer .gift-heading p{margin:8px 0}.gift-drawer .gift-heading .eyebrow{display:none}
.actor-chat-status button{margin-left:10px;background:none;border:1px solid #b58d87;border-radius:5px;padding:5px 10px;color:#673c44}
@media(min-width:1100px){.reader-body{grid-template-columns:minmax(350px,.75fr) minmax(0,1fr)}}
@media(max-width:550px){.actor-stage .dialogue-card{padding:14px 16px 12px;max-height:44dvh}.actor-stage .dialogue-scroll>p{font-size:16px}.actor-stage .actor-choices button{font-size:12px;padding:8px 10px}.actor-stage .companion-connection{left:12px;top:47px}.actor-stage .whisper-button{font-size:10px;padding:7px 10px}.actor-stage .interaction-button{width:45px;min-height:44px}.actor-stage .interaction-button small{font-size:8px}.scene-menu summary{padding:7px 10px}.selection-response{flex-wrap:wrap;gap:10px}.selection-response p{font-size:18px}.selection-response .text-button{width:100%;text-align:right}.gift-drawer .modal{padding:20px;max-height:48dvh}.expression-gallery{gap:8px}}
@media(prefers-reduced-motion:reduce){.actor-stage .actor-layer{transition:none}}

.actor-pose{position:absolute;inset:0;background:#211915}.actor-pose>svg{width:100%;height:100%}.pose-gallery figure>div{aspect-ratio:1;background-size:300% 200%}.actor-pose{animation:pose-arrival 160ms ease-out}@keyframes pose-arrival{from{opacity:.5}to{opacity:1}}@media(prefers-reduced-motion:reduce){.actor-pose{animation:none}}

.actor-stage .companion-connection{left:0;top:0}.actor-stage .interaction-buttons{margin-left:auto}.actor-stage .interaction-rail{top:77px}@media(max-width:550px){.actor-stage .interaction-rail{top:55px}}

.actor-pose{animation:none}.actor-stage .interaction-button small{font-size:11px}.actor-stage .interaction-button{width:52px}
