body.scene-event #character-layer,body.scene-event #dialogue{visibility:hidden!important}body.scene-event #art-closed-window{transform:translateY(-100%)!important}body.scene-event #shutter-opening{overflow:hidden}#scene-window{position:absolute;inset:0;z-index:14;pointer-events:none}#scene-window[hidden]{display:none}#scene-person{position:absolute;left:17.47%;top:2.24%;width:60.74%;height:29.85%;overflow:hidden;border:0;padding:0;background:none;pointer-events:auto}#scene-person img{position:absolute;height:120%;max-width:none;width:auto;left:50%;top:0;transform:translateX(-50%);object-fit:contain;filter:drop-shadow(3px 5px 4px #0006)}#scene-bubble{position:absolute;left:19%;top:19.5%;width:57%;max-height:12%;overflow:auto;padding:1.8%;background:#1c302ceb;border:1px solid #a4b6a1;border-radius:3px;color:#eee1b6;font-size:2.6cqw;line-height:1.5;pointer-events:auto;white-space:pre-wrap}#scene-options{position:absolute;left:3%;top:43.5%;width:94%;max-height:53%;overflow:auto;background:#1c302cf5;border:1px solid #8da492;padding:2.2%;color:#e9e1c7;pointer-events:auto;overscroll-behavior:contain;box-shadow:0 4px 12px #0006}#scene-options button{font-size:2.7cqw;min-height:7cqw;padding:1.2cqw 2cqw;background:#465c4b;color:#f2e7c3;border:1px solid #9caf97;margin:1cqw .5cqw;cursor:pointer}#scene-options button:disabled{opacity:.45}#scene-options .scene-option-heading{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #778e7c;font-size:3.3cqw}#scene-topics{display:flex}#scene-topics button{flex:1}#scene-action-content{font-size:2.7cqw;line-height:1.5}#scene-options #npc-dialog{position:static;width:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;box-shadow:none;background:none}#scene-options .npc-frame{display:block;min-height:0;max-height:none}#scene-options .npc-portrait,#scene-options .npc-speech{display:none}#scene-options .npc-conversation{padding:0;max-height:none}#scene-options .npc-conversation header{font-size:2.7cqw;padding:1cqw 0}#scene-options .npc-offers{max-height:29cqw;overflow:auto}#scene-options .npc-item{padding:1cqw;gap:2cqw;margin-bottom:1cqw}#scene-options .npc-item img{width:12cqw;height:12cqw}#scene-options .npc-item strong{font-size:2.8cqw}#scene-options .npc-feedback{font-size:2.6cqw;min-height:0;margin:0}#scene-options footer{position:sticky;bottom:0;background:#1c302c;padding-top:1cqw}#scene-options .faction-portrait{display:none}#scene-options .faction-body{padding:0}#scene-options .faction-body h2,#scene-options .faction-body>p:first-of-type{display:none}#scene-options .faction-goods{max-height:25cqw;overflow:auto}#scene-options .faction-envelope{max-height:16cqw}#scene-options .eviction-portrait{display:none}#scene-options .eviction-story{padding:1cqw;font-size:2.7cqw}#scene-options .eviction-story h2{font-size:4cqw}#scene-options .eviction-story blockquote{display:none}body.scene-event #customer-talk{pointer-events:none!important}#scene-window[data-owner=chat] #scene-person img{visibility:hidden}body.scene-event:has(#scene-window[data-owner=chat]) #character-layer{visibility:visible!important}

body:not(.debug-unlocked) #scene-window .eviction-story [data-action=restart]{display:block!important}

/* Choices live on the counter; the shop remains visible throughout dialogue. */
#scene-bubble{font-size:3.2cqw;line-height:1.55;top:18%;max-height:14%;padding:1.5%;width:62%;left:17.5%}
#scene-window.npc-compact #scene-options{left:20%;top:34%;width:60%;max-height:10%;padding:0;background:none;border:0;box-shadow:none}
#scene-window.npc-compact.npc-has-items #scene-options{top:39%;max-height:5%}
#scene-window.npc-compact .scene-option-heading,#scene-window.npc-compact #scene-topics,#scene-window.npc-compact .npc-conversation header{display:none}
#scene-window.npc-compact #scene-options footer{display:flex;flex-wrap:wrap;gap:.7cqw;background:none;padding:0;position:static}
#scene-window.npc-compact #scene-options button{flex:1 1 42%;font-size:3cqw;min-height:5.7cqw;margin:0;padding:.7cqw;background:#344c42ef}
#scene-window.npc-compact #scene-options .npc-offers{max-height:8cqw}
#scene-window.npc-compact #scene-options .npc-item img{width:6cqw;height:6cqw}
#scene-window.npc-compact #scene-options .npc-item{display:flex;padding:0;margin:0}
#scene-window.npc-compact .npc-item>div{display:flex;gap:1cqw;align-items:center;width:100%}
#scene-window.npc-compact #scene-options .npc-feedback{background:#1c302c;font-size:2.8cqw}
#npc-table{position:absolute;inset:0;z-index:20;pointer-events:none}
#npc-table button{position:absolute;pointer-events:auto;background:transparent;border:0;padding:0;min-height:0;cursor:pointer}
#npc-table img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(2px 3px 2px #0008)}
#npc-table span{position:absolute;bottom:0;left:50%;transform:translateX(-50%);font-size:2.3cqw;background:#23372ee0;color:#fff0c8;white-space:nowrap}

#npc-selection{width:100%;font-size:3cqw;background:#233d33;color:#f2e7c3;padding:1cqw;border:1px solid #94a590}#scene-window.npc-compact #scene-options .npc-empty{font-size:2.8cqw;margin:0;background:#233d33}#scene-window.npc-compact #scene-options .npc-offers{max-height:7cqw}#scene-window[data-owner=chat] #scene-options{left:20%;top:33%;width:60%;max-height:10%;background:#233d33ee;padding:1cqw}#scene-window[data-owner=chat] .scene-option-heading,#scene-window[data-owner=chat] #scene-topics{display:none}
#scene-window.npc-compact #npc-dialog .npc-conversation header{display:none!important} #scene-window.npc-compact #scene-options footer{border:0} #dialogue{font-size:3.1cqw;line-height:1.5}

#scene-window.npc-compact #scene-options button small{display:block;font-size:2.3cqw;line-height:1.3;color:#c7d0bd}body:has(#scene-window.npc-compact:not([hidden])) #table-grid,body:has(#scene-window.npc-compact:not([hidden])) .table-hint{visibility:hidden}

#scene-window[data-owner=chat] #scene-action-content .tool-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:1cqw}#scene-window[data-owner=chat] #scene-action-content button{font-size:2.8cqw;min-height:5.8cqw;margin:0;padding:.8cqw}#scene-window[data-owner=chat] #scene-action-content p{display:none}#scene-window[data-owner=chat] [data-scene-chat-close]{width:100%;margin-top:1cqw!important}
#scene-window[data-owner=chat] #scene-action-content .tool-choices{grid-template-columns:repeat(3,minmax(0,1fr));width:100%;min-width:0}#scene-window[data-owner=chat] #scene-action-content .tool-choices button{width:100%;min-width:0;max-width:100%;box-sizing:border-box}

/* Dialogue uses the original compact bubble; story decisions stay below the counter. */
#scene-bubble{left:19%;top:19.5%;width:57%;max-height:12%;font-size:2.6cqw;line-height:1.5;padding:1.8%}
#scene-window.npc-compact #scene-options,#scene-window.npc-compact.npc-has-items #scene-options,#scene-window[data-owner=chat] #scene-options{left:7%;top:60%;width:86%;max-height:17%;padding:2%;box-sizing:border-box;background:#090b0cf5;border:1px solid #68736d;box-shadow:0 3px 8px #0008}
#scene-window.npc-compact #scene-options button{background:#222827;font-size:2.8cqw;min-height:6cqw}
#scene-window.npc-trading #scene-options{display:none}
#scene-person{z-index:2;clip-path:inset(0 2% 1% 7%)}#scene-person[hidden]{display:none}

/* N01–N50: lower the artwork inside the existing window crop, preserving the counter foreground. */
#scene-person img[src^="npc/N"],#character-layer img[src^="npc/N"]{translate:0 calc(4% / var(--npc-crop-ratio,1))}
/* Match legacy hand proportions: enlarged expanded NPCs, still clipped by the window. */
#scene-person img[src^="npc/N"]{height:calc(132% * var(--npc-crop-ratio,1))}

/* Legacy story visitors and landlord share the below-counter choice surface. */
#scene-window[data-owner=faction] #scene-options{left:7%;top:60%;width:86%;max-height:23%;padding:2%;box-sizing:border-box;background:#090b0cf5;border:1px solid #68736d}
#scene-window[data-owner=faction] #scene-options button{background:#222827;font-size:2.8cqw;min-height:6cqw}
body.scene-event #art-closed-window{transition:none!important}

#scene-options .rent-choices h2{display:none}#scene-options .rent-choices p{margin:4px 0}#scene-options .rent-choices button{display:block;width:100%;margin:3px 0;min-height:6cqw;padding:.7cqw 1cqw}

#scene-person img.scene-walk{animation:visitor-walk-in var(--visitor-duration,1393ms) linear both}#scene-window.scene-arriving #scene-options,#scene-window.scene-arriving #scene-bubble{visibility:hidden;pointer-events:none}#scene-person img[src^="factions/"],#scene-person img[src$="/K05.webp"]{height:132%;top:5%}
@media(prefers-reduced-motion:reduce){#scene-person img.scene-walk{animation:none}}
