/* V7: keep the world visible while the story happens. */
.play-surface,.play-surface.panel-open{position:relative;grid-template-columns:minmax(0,1fr)}
.activity{position:absolute;z-index:35;left:50%;top:72px;bottom:auto;transform:translateX(-50%);width:min(540px,94%);max-height:calc(100% - 180px);border:2px solid #e5cb8d;border-radius:12px;box-shadow:0 16px 45px #07170cb3;display:flex;flex-direction:column;background:#142e26f7}
.activity[hidden]{display:none!important}.activity-top{flex:none;background:#244333}.activity-top button{color:#fff0c8}#activity-body{max-height:none;overflow:auto;min-height:0;padding:20px}.activity-top .eyebrow{color:#ffe5a7}
.play-surface.panel-open .world-viewport{min-height:350px;max-height:calc(100dvh - 245px)}
.explorer-layout{grid-template-columns:1fr}.scene-board{width:min(100%,72dvh)}.region-board{width:min(100%,108dvh);background-image:url('assets/crown-heights-money.png')}.home-board{background-image:url('assets/distinct-interiors.png');background-size:200% var(--room-size-y);background-position:var(--room-x) var(--room-y)}
.scene-info{position:absolute;z-index:30;left:50%;bottom:12px;transform:translateX(-50%);width:min(470px,94%);max-height:62%;padding:19px;border:2px solid #e5cb8d;border-radius:12px;background:#142e26fa;box-shadow:0 8px 28px #06190bc2;cursor:auto;box-sizing:border-box;scrollbar-width:thin}.scene-info[hidden]{display:none!important}.scene-info[data-position=top]{top:12px;bottom:auto}.scene-info h3{font-size:21px;margin:8px 28px 8px 0}.scene-info p{font-size:15px;line-height:1.45;margin:9px 0}.scene-info .eyebrow{color:#f7d891}.popup-close{position:absolute;right:8px;top:8px;width:32px;height:32px;border:1px solid #80946b;border-radius:5px;color:#fff0c8;background:#284737}.scene-more summary,.scene-directory-toggle summary{cursor:pointer;color:#ffe0a0;font-size:14px;padding:8px 0}.scene-more .scene-detail{margin-top:5px}.scene-choices{margin-top:10px;gap:7px}.scene-choices button{padding:10px}.scene-directory-toggle{margin-left:auto}.scene-directory-toggle[open]{width:100%}.scene-directory{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin-top:4px}.scene-controls{max-width:1100px;margin:auto}
.home-preview{background-image:url('assets/distinct-interiors.png');background-size:200% var(--home-size-y);background-position:var(--home-x) var(--home-y);background-repeat:no-repeat}.interior-entry.home-preview{position:relative;height:185px;padding:0!important;overflow:hidden;border:2px solid #e3c680;border-radius:7px}.interior-entry.home-preview span{position:absolute;bottom:0;left:0;right:0;background:#122e26ed;color:#ffe8ad;padding:13px;font-size:17px}.listing-image.home-preview{height:195px}.journey-step{min-width:132px}.journey-step.current{box-shadow:inset 0 3px #efd08a}.journey-step:last-child{border-style:dashed}
@media(max-width:760px){.play-surface.panel-open .world-viewport{min-height:380px;max-height:62dvh}.activity{top:85px;max-height:calc(100% - 205px);width:95%}.activity-top{padding:9px 12px}#activity-body{padding:15px}.scene-board{width:min(100%,66dvh)}.region-board{width:100%}.scene-info{padding:13px;max-height:70%;bottom:7px}.scene-info[data-position=top]{top:7px}.scene-info h3{font-size:18px}.scene-info p,.scene-choices button{font-size:14px}.scene-info .muted-note{display:none}.scene-directory-toggle{margin-left:0}.explorer-head h2{font-size:19px}}
/* Key-day celebration uses the game's existing original town and character art. */
.victory-dialog{width:min(720px,94vw);max-height:92dvh;padding:0;overflow:auto;border:3px solid #f5d27d;border-radius:16px;background:#142e26;color:#fff0ce;box-shadow:0 24px 90px #0009}.victory-dialog::backdrop{background:#061810c9}.victory-scene{height:clamp(210px,35vh,320px);position:relative;overflow:hidden;background:linear-gradient(#18332a22,#142e2699),url('assets/hearthvale-town.png') center 70%/cover}.victory-banner{position:absolute;bottom:12px;left:0;right:0;text-align:center;font-weight:800;letter-spacing:2px;color:#fff0b1;text-shadow:0 2px 3px #000}.victory-key{position:absolute;left:calc(50% - 36px);top:12px;font-size:80px;line-height:1;color:#ffdd73;text-shadow:0 0 24px #f5d27d;animation:key-arrival 1.2s ease-out both}.victory-party{position:absolute;bottom:44px;left:50%;transform:translateX(-50%);display:flex;align-items:end;gap:28px}.victory-hero{width:72px;height:96px;background:url('assets/walkers.png') 0 0/300% 400% no-repeat;image-rendering:pixelated;animation:party-hop .6s ease-in-out 8}.victory-landlord{width:110px;height:110px;animation:landlord-sob .7s ease-in-out 8}.victory-confetti{position:absolute;inset:0;pointer-events:none}.victory-confetti i{position:absolute;top:-20px;left:var(--x);width:9px;height:15px;background:var(--color);animation:key-confetti 3s var(--delay) ease-in 2 both}.victory-copy{padding:22px 28px}.victory-copy h2{font-size:clamp(28px,5vw,42px);margin:8px 0;color:#ffe1a1}.victory-copy p{font-size:16px;line-height:1.5}.victory-copy blockquote{margin:16px 0;padding:14px 18px;background:#244535;border-left:4px solid #f5d27d;border-radius:6px}.victory-copy blockquote p{margin:6px 0}.victory-copy .action-row{flex-wrap:wrap}
@keyframes key-arrival{from{opacity:0;transform:translateY(55px) rotate(-30deg) scale(.4)}to{opacity:1;transform:none}}@keyframes party-hop{50%{transform:translateY(-16px) rotate(-4deg)}}@keyframes landlord-sob{25%,75%{transform:translateY(3px) rotate(-4deg)}50%{transform:translateY(-2px) rotate(3deg)}}@keyframes key-confetti{from{transform:translateY(0) rotate(var(--turn));opacity:1}to{transform:translateY(350px) rotate(540deg);opacity:0}}
@media(prefers-reduced-motion:reduce){.victory-dialog *{animation:none!important}.victory-confetti{display:none}}

.victory-landlord-wrap{position:relative}.landlord-tears{position:absolute;right:2px;top:2px;font-size:36px;animation:landlord-sob .7s ease-in-out 8}.champion-cheers{border-radius:8px;background:#31553d;padding:10px 16px}.champion-cheers p{margin:6px 0}.victory-hero{filter:drop-shadow(0 0 12px #ffdc7a)}
