/* V2 scoped overrides; no shared or original-demo stylesheet is changed. */
.world-route{display:grid!important;grid-template-columns:1fr 2fr!important;gap:24px!important}
.world-route .portal-track{display:grid!important;grid-template-columns:1fr!important;gap:16px!important}
.world-route .portal-track--life{grid-template-columns:1fr 1fr!important}
.world-route .location-portal{width:100%!important;min-width:0!important}
.portal-state{white-space:normal!important;line-height:1.5!important}
.portal-copy em{white-space:normal!important}
.interaction-panel{inset:80px 24px auto!important;transform:none!important;width:min(960px,calc(100% - 48px))!important;height:max-content!important;max-height:calc(100dvh - 104px)!important;margin:auto!important;padding:16px!important;border-radius:0!important;overflow:auto}
.world-life:has(#advWrap[hidden]) .story-tools{display:none!important}
.world-life:has(#interactionPanel:not([hidden])) .lead-sprite-layer{visibility:hidden}
[data-stage=scene] .story-tools{position:fixed!important;top:0!important;right:max(24px,env(safe-area-inset-right))!important}
[data-stage=scene] .hud{pointer-events:none!important}
[data-stage=scene] .story-tools{pointer-events:auto!important}
[data-stage=scene] .scene-return{position:fixed!important;top:0!important;left:16px!important;right:auto!important;min-height:44px!important;z-index:100!important}
[data-stage=scene] .hud-back{visibility:hidden}
.world-life:has(#interactionPanel:not([hidden])) .scene-meta{display:none}
.interaction-panel h2{font-size:20px!important;line-height:1.2!important;margin:0 0 8px!important}
.interaction-panel>p{font:400 14px/1.7 'Noto Serif SC',serif!important;margin:0 0 8px}
.interaction-heading:has(#interactionProgress:empty){display:none}
.life-play{display:flex;flex-direction:column;gap:8px}
.life-object{height:clamp(112px,28dvh,250px);position:relative;display:flex;justify-content:center;align-items:center;gap:16px;overflow:hidden;background:rgba(255,255,255,.025)}
.life-object svg{height:100%;max-width:100%;width:100%}
.life-controls{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px}
.life-play button{border:1px solid rgba(255,255,255,.28);border-radius:6px;min-width:44px;min-height:44px;padding:8px 12px;background:transparent;color:#f2f2f2;font:500 14px/1 'Noto Serif SC',serif;cursor:pointer;touch-action:none}
.life-play button[aria-pressed=true]{border-color:#ffd479;background:rgba(255,212,121,.08)}
.life-play button:focus-visible,.life-play input:focus-visible{outline:2px solid #ffd479;outline-offset:2px}
.life-play .life-submit{background:#ffd479;color:#15151c;border-color:#ffd479}
.life-play button:disabled{cursor:default;opacity:.6}
.life-range{display:flex;align-items:center;gap:8px;font-size:14px}
.life-range input{appearance:none;min-height:44px;width:150px;background:transparent;cursor:pointer}
.life-range input::-webkit-slider-runnable-track{height:8px;border-radius:4px;background:#7e7567}
.life-range input::-webkit-slider-thumb{appearance:none;width:26px;height:26px;border-radius:50%;background:#e2d1ad;margin-top:-9px}
.interaction-feedback{font:400 14px/1.7 'Noto Serif SC',serif!important;min-height:24px!important;margin-top:8px!important}
.toy-truck{display:flex;align-items:center;gap:4px;position:relative;padding-bottom:16px;transition:transform .6s}
.truck-cab{width:48px;height:70px;background:#638181;border:3px solid #a8b4aa;border-radius:8px 3px 3px 8px}
.truck-bed{display:flex;border:5px solid #9da896;background:#445550;padding:8px;gap:8px}
.truck-bed button{min-width:68px;min-height:70px;display:flex;flex-direction:column;align-items:center;gap:4px}
.toy-truck:after{content:'';position:absolute;bottom:0;left:36px;width:28px;height:16px;background:#17181c;box-shadow:180px 0 #17181c}
.toy-truck.running{transform:translateX(36px) rotate(-3deg)}
.sweets{display:flex;gap:8px;flex-direction:column}
.wrapped-sweet{font:500 10px/1 'DM Mono',monospace;border-radius:4px;padding:4px 12px;background:#e4ddbd;color:#333;font-style:normal}
.set-street{position:relative;width:440px;height:100%;perspective:600px}
.set-facade{position:absolute;inset:8px 80px 0 12px;display:flex;align-items:center;justify-content:space-around;background:#c1af94;transform-origin:left center;border-top:12px solid #574f47}
.set-door{width:72px;height:85%;align-self:end;background:#493f3a;border:6px solid #877765}
.set-window{display:block;width:60px;height:60px;background:#637471;border:6px solid #ded4bd}
.set-supports{position:absolute;z-index:-1;inset:15px 0 0 150px;background:repeating-linear-gradient(65deg,transparent 0 48px,#a0a5a2 48px 53px,transparent 53px 110px)}
.viewfinder{position:absolute;inset:16px 25%;border:1px solid #eee;pointer-events:none;transform:translateX(calc((var(--view,0%) - 50%) * .3))}
.film-strip{display:flex;gap:8px;align-items:center}
.film-strip button{width:100px;padding:4px;font-size:11px}
.film-frame{width:100%;aspect-ratio:1;background-size:300% 100%;background-repeat:no-repeat}
.film-screen{height:100%;aspect-ratio:1;max-width:40%}
.painting-view{height:100%;width:min(100%,420px);position:relative;overflow:hidden}
.painting-view img{width:100%;height:100%;object-fit:contain;transition:transform .3s}
.painting-view button{position:absolute;bottom:0;background:rgba(10,10,16,.9)}
.painting-view button:nth-of-type(1){left:0}.painting-view button:nth-of-type(2){left:38%}.painting-view button:nth-of-type(3){right:0}
@media(max-height:500px) and (orientation:landscape){
 .world-route{gap:16px!important}.world-route .portal-track{gap:8px!important}
 .interaction-panel{inset:56px 16px 8px!important;width:calc(100% - 32px)!important;max-height:calc(100dvh - 64px)!important;padding:8px 16px!important}
 .interaction-panel h2{font-size:17px!important}.interaction-panel>p{font-size:13px!important;line-height:1.4!important}
 .life-object{height:112px}.life-play button,.life-range{font-size:13px}.interaction-feedback{font-size:13px!important;line-height:1.4!important;margin-top:4px!important}
 .truck-bed{padding:4px}.truck-bed button{min-height:64px}.film-strip button{width:76px}
}
@media(prefers-reduced-motion:reduce){.life-play *{transition:none!important;animation:none!important}}
[data-reduced-motion=true] .life-play *{transition:none!important;animation:none!important}

/* V2 map home: spatial city canvas instead of a row of destination cards. */
[data-stage=map] .scene-wash{background:radial-gradient(circle at 62% 43%,rgba(38,55,51,.22),transparent 38%),linear-gradient(90deg,rgba(3,5,6,.92) 0%,rgba(3,5,6,.45) 36%,rgba(3,5,6,.16) 70%,rgba(3,5,6,.42) 100%)!important}
[data-stage=map] .map-stage{display:block!important;padding:calc(var(--safe-t) + 76px) calc(var(--safe-r) + 4vw) calc(var(--safe-b) + 20px) calc(var(--safe-l) + 4vw)!important}
[data-stage=map] .lead-status{position:absolute!important;z-index:5;top:24%;left:5vw;width:min(29vw,390px);padding:0!important;border:0!important}
[data-stage=map] .lead-status h1{margin:0 0 8px!important;font-size:clamp(24px,2.5vw,38px)!important;white-space:normal!important}
[data-stage=map] .lead-status .presence-source{margin:0!important;padding:6px 0!important;border:0!important}
[data-stage=map] .lead-status .presence-source small{display:block;max-width:330px;color:rgba(240,235,226,.54);line-height:1.55}
[data-stage=map] .primary-find{width:min(100%,320px)!important;min-height:44px!important;margin-top:8px!important;background:rgba(7,9,11,.44)!important;backdrop-filter:blur(10px)}
[data-stage=map] .location-browser{position:relative;width:100%!important;height:100%;max-width:none!important;margin:0!important}
[data-stage=map] .lead-switch>span{display:none!important}[data-stage=map] .lead-switch strong{white-space:nowrap}
[data-stage=map] .location-heading{position:absolute!important;z-index:8;top:0;left:38%;right:0;min-height:36px!important;padding:0 0 8px!important;border-bottom:1px solid rgba(255,212,121,.16)!important}
[data-stage=map] .location-heading{pointer-events:none}[data-stage=map] .location-heading button{pointer-events:auto}
[data-stage=map] .lead-status{pointer-events:none}[data-stage=map] .lead-status button{pointer-events:auto}
[data-stage=map] .location-heading span{color:rgba(240,235,226,.52);font:9px/1.2 "DM Mono",monospace;letter-spacing:.16em!important}
[data-stage=map] .location-heading div:before{display:none}
[data-stage=map] .location-groups{height:100%;margin:0!important}
.world-route{display:block!important}
.city-map{position:relative;width:100%;height:100%;min-height:430px;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 68% 43%,rgba(255,212,121,.045),transparent 42%),linear-gradient(145deg,transparent 0 51%,rgba(255,255,255,.018) 51% 53%,transparent 53%),repeating-linear-gradient(18deg,transparent 0 86px,rgba(240,235,226,.025) 87px 88px,transparent 89px 150px)}
.city-map:before{content:'';position:absolute;z-index:-3;inset:9% 4% 12% 34%;opacity:.72;background:linear-gradient(32deg,transparent 0 44%,rgba(240,235,226,.055) 44% 45%,transparent 45% 66%,rgba(240,235,226,.04) 66% 67%,transparent 67%),linear-gradient(102deg,transparent 0 22%,rgba(240,235,226,.045) 22% 23%,transparent 23% 71%,rgba(240,235,226,.04) 71% 72%,transparent 72%),repeating-linear-gradient(0deg,rgba(240,235,226,.025) 0 1px,transparent 1px 52px),repeating-linear-gradient(90deg,rgba(240,235,226,.022) 0 1px,transparent 1px 72px);clip-path:polygon(4% 7%,83% 0,100% 26%,94% 86%,63% 100%,0 82%)}
.city-map:after{content:'';position:absolute;z-index:-2;left:34%;right:3%;top:10%;bottom:8%;opacity:.5;background:radial-gradient(circle at 18% 22%,rgba(94,234,212,.13) 0 2px,transparent 3px),radial-gradient(circle at 83% 14%,rgba(255,212,121,.1) 0 2px,transparent 3px),radial-gradient(circle at 57% 78%,rgba(94,234,212,.09) 0 2px,transparent 3px);background-size:74px 61px,91px 83px,63px 72px}
.city-map__river{position:absolute;z-index:-1;left:31%;right:-5%;top:59%;height:23%;border-top:1px solid rgba(94,234,212,.18);border-bottom:1px solid rgba(94,234,212,.09);background:linear-gradient(171deg,transparent 0 15%,rgba(35,86,86,.1) 16% 74%,transparent 75%);transform:rotate(-5deg);clip-path:polygon(0 29%,16% 12%,38% 32%,57% 4%,78% 20%,100% 0,100% 68%,81% 88%,59% 71%,39% 100%,18% 70%,0 86%)}
.city-map__roads i{position:absolute;z-index:-1;display:block;height:1px;background:linear-gradient(90deg,transparent,rgba(255,212,121,.19),rgba(240,235,226,.06),transparent);transform-origin:left center}
.city-map__roads i:nth-child(1){left:35%;top:48%;width:60%;transform:rotate(-18deg)}
.city-map__roads i:nth-child(2){left:49%;top:20%;width:54%;transform:rotate(64deg)}
.city-map__roads i:nth-child(3){left:42%;top:72%;width:47%;transform:rotate(-39deg)}
.map-landmark{position:absolute;color:rgba(240,235,226,.2);font:8px/1 "DM Mono",monospace;letter-spacing:.18em;white-space:nowrap}.map-landmark--north{top:10%;left:39%}.map-landmark--river{right:5%;bottom:13%;color:rgba(94,234,212,.3)}.map-landmark--home{left:57%;bottom:12%}
.map-node{position:absolute;z-index:3;display:grid;justify-items:center;width:156px;min-height:116px;padding:0;border:0;background:transparent;color:#f0ebe2;text-align:center;cursor:pointer;transform:translate(-50%,-50%)}
.map-node--1{left:47%;top:33%}.map-node--2{left:65%;top:62%}.map-node--3{left:83%;top:31%}
.map-node--catalog-1{left:37%;top:18%}.map-node--catalog-2{left:46%;top:14%}.map-node--catalog-3{left:56%;top:19%}.map-node--catalog-4{left:37%;top:78%}.map-node--catalog-5{left:51%;top:84%}.map-node--catalog-6{left:71%;top:84%}.map-node--catalog-7{left:90%;top:62%}
.map-node__pin{position:absolute;z-index:4;top:21px;left:50%;width:9px;height:9px;border:1px solid rgba(255,212,121,.66);border-radius:50%;background:#0b0e10;transform:translateX(-50%)}
.map-node__pin:after{content:'';position:absolute;left:50%;top:50%;width:30px;height:30px;border:1px solid rgba(255,212,121,.18);border-radius:50%;transform:translate(-50%,-50%);transition:transform .2s,border-color .2s}
.map-node__pin i{position:absolute;inset:2px;border-radius:50%;background:#ffd479}
.map-node__building{position:relative;display:flex;align-items:end;justify-content:center;width:92px;height:55px;margin-top:8px;overflow:hidden;border-bottom:1px solid rgba(240,235,226,.34);filter:grayscale(.45)}
.map-node__building:before{content:'';position:absolute;inset:0;background:linear-gradient(rgba(7,9,11,.28),rgba(7,9,11,.78)),var(--place-image) center/cover;opacity:.55;clip-path:polygon(7% 37%,27% 37%,27% 17%,51% 17%,51% 31%,75% 31%,75% 8%,94% 8%,94% 100%,7% 100%)}
.map-node__building i{position:relative;width:2px;height:25px;margin:0 7px;background:rgba(255,212,121,.42);box-shadow:0 -13px rgba(240,235,226,.18)}
.map-node__label{display:grid;gap:3px;margin-top:7px;text-shadow:0 2px 9px #000}.map-node__label strong{font-size:14px;font-weight:500}.map-node__label em{max-width:150px;color:rgba(240,235,226,.55);font-size:9px;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.map-node__tags{display:flex;justify-content:center;flex-wrap:wrap;gap:3px;margin-top:5px}.map-node__tags span{padding:2px 4px;border:1px solid rgba(240,235,226,.15);background:rgba(7,9,11,.72);color:rgba(240,235,226,.58);font:7px/1.2 "DM Mono",monospace;white-space:nowrap}
.map-node.is-here .map-node__pin{border-color:#5eead4;box-shadow:0 0 14px rgba(94,234,212,.55)}.map-node.is-here .map-node__pin i{background:#5eead4}.map-node.is-here .map-node__pin:after{border-color:rgba(94,234,212,.34);animation:mapPulse 2.4s ease-out infinite}.map-node.is-wanted .map-node__tags span{border-color:rgba(255,212,121,.34);color:#ffd479}.map-node.is-random .map-node__pin{border-color:#ff6f9f}.map-node.is-random .map-node__pin i{background:#ff6f9f}.map-node.is-selected{z-index:5}.map-node.is-selected .map-node__building{border-bottom-color:#ffd479;filter:none}.map-node.is-selected .map-node__pin:after,.map-node:hover .map-node__pin:after,.map-node:focus-visible .map-node__pin:after{border-color:#ffd479;transform:translate(-50%,-50%) scale(1.18)}.map-node:focus-visible{outline:2px solid #ffd479;outline-offset:5px}.map-node.is-complete{opacity:.56}.map-node__trace{position:absolute;top:2px;right:8px;color:#5eead4;font:7px "DM Mono",monospace}
.map-node.is-muted{z-index:1;width:102px;min-height:76px;opacity:.28;filter:saturate(.45);transition:opacity .18s ease}.map-node.is-muted .map-node__building{width:54px;height:30px;margin-top:4px}.map-node.is-muted .map-node__pin{top:8px;width:6px;height:6px;border-color:rgba(240,235,226,.42)}.map-node.is-muted .map-node__pin i{inset:1px;background:rgba(240,235,226,.46)}.map-node.is-muted .map-node__pin:after{width:18px;height:18px;border-color:rgba(240,235,226,.12)}.map-node.is-muted .map-node__label{margin-top:3px}.map-node.is-muted .map-node__label strong{font-size:9px}.map-node.is-muted .map-node__label em{font-size:6px}.map-node.is-muted:hover,.map-node.is-muted:focus-visible,.map-node.is-muted.is-selected{z-index:4;opacity:.82;filter:none}.map-node.is-muted.is-work .map-node__label strong{color:rgba(240,235,226,.66)}
.map-place-detail{position:absolute;z-index:6;left:0;bottom:0;width:min(30vw,390px);min-height:154px;padding:14px 0 0;border-top:1px solid rgba(240,235,226,.2);background:linear-gradient(90deg,rgba(7,9,11,.8),rgba(7,9,11,.32) 82%,transparent);backdrop-filter:blur(6px)}
.map-place-detail__heading{display:flex;align-items:center;gap:8px}.map-place-detail__heading span{color:rgba(240,235,226,.4);font:8px "DM Mono",monospace;letter-spacing:.13em}.map-place-detail__heading b{color:#5eead4;font-size:9px;font-weight:400}.map-place-detail>strong{display:block;margin-top:6px;font-size:20px;font-weight:500}.map-place-detail p{margin:4px 0;color:#ffd479;font-size:11px}.map-place-detail small{display:block;max-width:320px;min-height:32px;color:rgba(240,235,226,.48);font-size:9px;line-height:1.55}.map-place-detail button{display:flex;align-items:center;justify-content:space-between;width:min(100%,320px);min-height:44px;margin-top:8px;padding:0 12px;border:1px solid rgba(255,212,121,.45);border-radius:6px;background:rgba(255,212,121,.07);color:#f0ebe2;cursor:pointer}.map-place-detail button i{color:#ffd479;font-style:normal}.map-place-detail button:hover,.map-place-detail button:focus-visible{border-color:#ffd479;outline:2px solid transparent}.map-place-detail button:disabled{border-color:rgba(240,235,226,.14);color:rgba(240,235,226,.36);background:transparent;cursor:default}
.map-place-detail__heading b.is-offday{color:rgba(240,235,226,.42)}.map-landmark--work{left:42%;top:7%;color:rgba(240,235,226,.17)}
@keyframes mapPulse{0%{opacity:.8;transform:translate(-50%,-50%) scale(.72)}75%,100%{opacity:0;transform:translate(-50%,-50%) scale(1.55)}}

@media(max-width:900px),(max-height:500px){
 [data-stage=map] .map-stage{padding:calc(var(--safe-t) + 54px) calc(var(--safe-r) + 14px) calc(var(--safe-b) + 8px) calc(var(--safe-l) + 14px)!important}
 [data-stage=map] .lead-status{top:23%;left:16px;width:28vw}
 [data-stage=map] .lead-status h1{font-size:clamp(18px,2.6vw,24px)!important}
 [data-stage=map] .lead-status .presence-source small{max-width:210px;font-size:8.5px;line-height:1.35}
 [data-stage=map] .primary-find{width:220px!important;min-height:44px!important;font-size:12px}
 [data-stage=map] .location-heading{left:34%;min-height:30px!important;padding-bottom:4px!important}
 .city-map{min-height:0}.city-map:before{inset:7% 0 9% 29%}.city-map__river{left:29%;top:61%}
 .map-node{width:126px;min-height:92px}.map-node--1{left:43%;top:35%}.map-node--2{left:66%;top:66%}.map-node--3{left:85%;top:34%}
 .map-node.is-muted{width:76px;min-height:52px}.map-node.is-muted .map-node__building{width:38px;height:20px}.map-node.is-muted .map-node__label strong{font-size:7px}.map-node.is-muted .map-node__label em{display:none}.map-node--catalog-1{left:35%;top:14%}.map-node--catalog-2{left:45%;top:11%}.map-node--catalog-3{left:56%;top:15%}.map-node--catalog-4{left:35%;top:82%}.map-node--catalog-5{left:51%;top:86%}.map-node--catalog-6{left:72%;top:87%}.map-node--catalog-7{left:92%;top:68%}
 .map-node__building{width:72px;height:39px;margin-top:3px}.map-node__pin{top:12px}.map-node__label{margin-top:4px}.map-node__label strong{font-size:12px}.map-node__label em{max-width:116px;font-size:7px}.map-node__tags{margin-top:3px}.map-node__tags span{font-size:6px}
 .map-place-detail{left:2px;width:29vw;min-height:118px;padding-top:8px}.map-place-detail>strong{font-size:15px}.map-place-detail p{margin:2px 0;font-size:9px}.map-place-detail small{min-height:22px;max-height:27px;overflow:hidden;font-size:7.5px;line-height:1.35}.map-place-detail button{min-height:44px;margin-top:5px;font-size:11px}
 .map-landmark{font-size:6px}.map-landmark--north{left:34%;top:7%}.map-landmark--home{bottom:7%}
}
@media(max-width:760px){
 [data-stage=map] .lead-status{width:26vw}.map-node--1{left:42%}.map-node--2{left:65%}.map-node--3{left:84%}
 .map-node__tags span:nth-child(n+3){display:none}.map-place-detail{width:28vw}
}
@media(max-height:400px) and (orientation:landscape){
 [data-stage=map] .lead-status{top:66px;left:16px;width:220px}
 [data-stage=map] .lead-status>:not(h1){display:none!important}
 [data-stage=map] .lead-status h1{margin:0!important;font-size:17px!important;line-height:1.3!important}
 [data-stage=map] .map-place-detail{left:16px;bottom:4px;width:220px;min-height:0;padding-top:7px}
 [data-stage=map] .map-place-detail>strong{margin-top:3px;font-size:13px}
 [data-stage=map] .map-place-detail p{font-size:8px}
 [data-stage=map] .map-place-detail small{display:none}
 [data-stage=map] .map-place-detail button{width:100%;min-height:44px;margin-top:5px}
 [data-stage=map] .lead-switch{min-width:92px;grid-template-columns:1fr auto!important}
 [data-stage=map] .lead-switch strong{font-size:12px}
}
@media(prefers-reduced-motion:reduce){.map-node.is-here .map-node__pin:after{animation:none}}
[data-reduced-motion=true] .map-node.is-here .map-node__pin:after{animation:none}
.demo-debug-tools{position:absolute;z-index:42;right:max(16px,calc(env(safe-area-inset-right) + 16px));bottom:max(14px,calc(env(safe-area-inset-bottom) + 14px));display:flex;align-items:center;gap:5px;padding:5px;border:1px solid rgba(94,234,212,.26);background:rgba(7,12,13,.86);box-shadow:0 8px 28px rgba(0,0,0,.28);backdrop-filter:blur(12px)}
.demo-debug-tools>span{padding:0 5px;color:rgba(94,234,212,.65);font:7px/1 "DM Mono",monospace;letter-spacing:.14em}.demo-debug-tools button{min-height:44px;padding:0 10px;border:1px solid rgba(240,235,226,.16);border-radius:6px;background:transparent;color:rgba(240,235,226,.72);font-size:10px;cursor:pointer}.demo-debug-tools button:first-of-type{border-color:rgba(94,234,212,.42);color:#5eead4}.demo-debug-tools button:last-of-type{border-color:rgba(255,142,156,.34);color:#ff9eaa}.demo-debug-tools button:hover,.demo-debug-tools button:focus-visible{border-color:currentColor;outline:2px solid transparent}
[data-stage=scene] .demo-debug-tools,.world-life:has(.overlay.is-visible) .demo-debug-tools{visibility:hidden;pointer-events:none}
@media(max-width:900px),(max-height:500px){.demo-debug-tools{right:max(8px,env(safe-area-inset-right));bottom:max(6px,env(safe-area-inset-bottom));padding:3px}.demo-debug-tools>span{display:none}.demo-debug-tools button{padding:0 7px;font-size:9px}}
@media(max-width:1000px),(max-height:560px){[data-stage=scene] .story-tools{right:max(14px,env(safe-area-inset-right))!important}}
