.living-world { position:relative; isolation:isolate; min-height:1050px; width:100%; overflow:hidden; background:transparent; }
#pokemonWorldCanvas { position:absolute; inset:0; width:100%; height:100%; z-index:-2; pointer-events:none; opacity:0; transition:opacity .8s; }
.pokemon-world-ready #pokemonWorldCanvas { opacity:1; }
.living-world__copy { position:relative; width:min(700px,55%); margin:0 auto; padding-top:210px; text-align:center; pointer-events:none; }
.living-world__eyebrow { display:flex; align-items:center; justify-content:center; gap:.65rem; font-size:.7rem; color:var(--bs-secondary-color); letter-spacing:.15em; text-transform:uppercase; font-weight:700; margin-bottom:2rem; }
.living-world__copy h1 { font-size:clamp(1.7rem,2.3vw,2.6rem); line-height:1.5; margin-bottom:2rem; }
.living-world__copy .lead { font-size:1.1rem; line-height:1.9; max-width:500px; margin:0 auto 2.25rem; color:var(--bs-secondary-color); }
.living-world__copy a { pointer-events:auto; display:inline-flex; align-items:center; gap:.7rem; }
.living-world__invitation { font-size:.8rem; max-width:350px; margin:1.5rem auto 0; color:var(--bs-secondary-color); line-height:1.8; }
.living-world { --world-lavender:#bca4e8; --world-gold:#dfbd79; }
.living-world__eyebrow svg { flex-shrink:0; color:var(--world-gold); }
.living-world__copy h1 > span { display:block; }
.living-world__title-accent { color:var(--world-lavender); }
.living-world__copy a.btn { color:var(--world-lavender); border:1px solid color-mix(in srgb,var(--world-lavender) 45%,transparent); background:color-mix(in srgb,var(--world-lavender) 12%,var(--bs-body-bg)); border-radius:10px; padding:.9rem 1.25rem; }
.living-world__copy a.btn svg { color:inherit; }
.living-world__copy a.btn:is(:hover,:focus-visible) { color:var(--bs-body-color); border-color:var(--world-lavender); background:color-mix(in srgb,var(--world-lavender) 22%,var(--bs-body-bg)); }
.world-actor--featured_0 .actor-indicator { background:var(--world-lavender); color:#261b38; }
.world-actor--featured_0 .actor-indicator::after { border-top-color:var(--world-lavender); }
.world-actor--featured_1 .actor-indicator { background:var(--world-gold); color:#2c2415; }
.world-actor--featured_1 .actor-indicator::after { border-top-color:var(--world-gold); }
:is(.world-actor--featured_0,.world-actor--featured_1) { padding:5px; }
:is(.world-actor--featured_0,.world-actor--featured_1) .actor-sprite { width:41.6px; height:41.6px; }
[data-bs-theme=light] .living-world { --world-lavender:#735099; --world-gold:#936923; }
[data-bs-theme=light] .world-actor--featured_0 .actor-indicator,[data-bs-theme=light] .world-actor--featured_1 .actor-indicator { color:#fff; }
.world-actor,.world-found-item { position:absolute; background:none; padding:0; border:0; color:var(--bs-body-color); cursor:pointer; z-index:2; touch-action:manipulation; }
.world-actor:focus-visible,.world-found-item:focus-visible { outline:2px solid #b49ade; outline-offset:12px; border-radius:8px; }
.actor-sprite { position:relative; display:block; width:64px; height:64px; overflow:hidden; image-rendering:pixelated; }
.actor-sprite > img { position:absolute; top:0; left:0; width:400%; height:400%; max-width:none; }
.actor-building { width:100%; height:100%; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 12px 4px #0003); }
.world-actor--building_0 { right:3%; top:200px; width:clamp(90px,9vw,155px); height:clamp(85px,8.5vw,146px); }
.world-actor--building_1 { left:3%; top:580px; width:clamp(90px,8.5vw,145px); height:clamp(85px,8.2vw,140px); }
.world-actor--chen { left:13%; top:355px; }
.world-actor--dawn { right:13%; top:610px; }
.world-actor--featured_0 { left:33%; top:760px; }
.world-actor--featured_1 { right:31%; top:100px; }
.actor-indicator { position:absolute; top:-20px; left:50%; transform:translateX(-50%); display:grid; place-items:center; width:23px; height:26px; border-radius:5px; background:var(--bs-body-color); color:var(--bs-body-bg); font-weight:800; font-size:.75rem; box-shadow:0 5px 12px #0002; }
.actor-indicator::after { content:''; position:absolute; top:100%; border:4px solid transparent; border-top-color:var(--bs-body-color); }
.actor-label { position:absolute; top:100%; left:50%; transform:translate(-50%,6px); white-space:nowrap; font-size:.65rem; font-weight:600; padding:.3rem .6rem; border-radius:6px; color:var(--bs-body-color); background:var(--bs-body-bg); border:1px solid var(--bs-border-color); opacity:0; pointer-events:none; transition:opacity .2s; }
:is(.world-actor,.world-found-item):is(:hover,:focus-visible) .actor-label { opacity:1; }
.world-found-item { width:44px; height:44px; padding:6px; }
.world-found-item > img { width:100%; height:100%; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 5px 3px #0004); }
.world-found-item--1 { left:18%; top:170px; }
.world-found-item--2 { right:12%; top:755px; }
.world-found-item--3 { left:45%; top:880px; }
.item-glint { position:absolute; inset:-10px; color:#e6c477; pointer-events:none; }
.item-glint > span { position:absolute; font-size:.75rem; filter:drop-shadow(0 0 4px #edcb78aa); }
.item-glint > span:nth-child(1) { right:0; top:3px; }
.item-glint > span:nth-child(2) { left:0; top:14px; font-size:.55rem; }
.item-glint > span:nth-child(3) { right:10px; bottom:0; font-size:.5rem; }
.item-check { display:none; position:absolute; top:-8px; right:-5px; color:var(--bs-success); font-size:.8rem; }
.world-found-item::before { content:''; position:absolute; inset:0; border-radius:50%; background:radial-gradient(circle,#f2ce7045,transparent 65%); opacity:.4; pointer-events:none; }
.world-found-item.is-found .item-glint,.world-found-item.is-found::before { display:none; }
.world-found-item.is-found .item-check { display:block; }
.actor-indicator__symbol { display:block; transform-origin:center 70%; }
.world-actor--chen { --actor-delay:-.6s; }
.world-actor--dawn { --actor-delay:-2.2s; }
.world-actor.is-talking .actor-indicator { opacity:.35; }
.world-found-item.is-found { opacity:.35; }
.world-found-item.is-found .item-glint { color:var(--bs-success); }
.world-conversation { position:absolute; z-index:5; left:0; top:0; width:min(390px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow-y:auto; display:flex; align-items:start; gap:.75rem; padding:1.25rem 2.25rem 1.25rem 1rem; }
.world-conversation[hidden] { display:none; }
.world-conversation__close { position:absolute; top:1rem; right:1rem; }
.conversation-portrait { flex-shrink:0; width:48px; height:48px; background:color-mix(in srgb,#b49ade 10%,transparent); border-radius:10px; }
.conversation-portrait.is-item img { width:100%; height:100%; object-fit:contain; padding:.5rem; }
.world-conversation__body { min-width:0; flex:1; }
.world-conversation__name { font-weight:700; font-size:.8rem; margin-bottom:.6rem; color:var(--bs-body-color); }
[data-conversation-text] { font-size:.9rem; line-height:1.7; min-height:65px; margin-bottom:1rem; }
.world-conversation__actions { display:flex; align-items:center; justify-content:end; gap:.75rem; flex-wrap:wrap; }
[data-conversation-step] { margin-right:auto; font-size:.65rem; color:var(--bs-secondary-color); }
.living-world__footer { position:absolute; bottom:1.5rem; left:3%; right:3%; display:flex; justify-content:space-between; gap:1rem; color:var(--bs-secondary-color); font-size:.7rem; }
.living-world__footer > span:first-child { display:flex; align-items:center; gap:.6rem; }
@media(prefers-reduced-motion:no-preference) {
    .world-found-item:not(.is-found) .item-glint > span { animation:world-glint 3.6s ease-in-out infinite; }
    .world-found-item .item-glint > span:nth-child(2) { animation-delay:-1.4s; }
    .world-found-item .item-glint > span:nth-child(3) { animation-delay:-2.5s; }
    .world-found-item:not(.is-found)::before { animation:world-item-glow 4s ease-in-out infinite; }
    .world-found-item--2 { --item-delay:-1.2s; }
    .world-found-item--3 { --item-delay:-2.4s; }
    .world-found-item:not(.is-found) > img { animation:world-item-glow 4s var(--item-delay,0s) ease-in-out infinite; }
    :is(.world-actor--chen,.world-actor--dawn):not(.is-talking) .actor-indicator { animation:world-bubble 4.8s var(--actor-delay,0s) ease-in-out infinite; }
    :is(.world-actor--chen,.world-actor--dawn):not(.is-talking) .actor-indicator__symbol { animation:world-question 4.8s var(--actor-delay,0s) ease-in-out infinite; }
    .world-actor--featured_0 .actor-sprite img { animation:world-look 10s steps(1,end) infinite; }
    .world-actor--featured_1 .actor-sprite img { animation:world-look 13s steps(1,end) infinite; }
}
.living-world:not(.is-visible) :is(.item-glint > span,.world-found-item::before,.world-found-item > img,.actor-indicator,.actor-indicator__symbol,.actor-sprite img,.actor-building) { animation-play-state:paused; }
@keyframes world-glint { 0%,65%,100% { transform:scale(.4) rotate(-15deg); opacity:.15; } 30% { transform:scale(1.15) rotate(25deg); opacity:1; } }
@keyframes world-item-glow { 0%,100% { opacity:.65; } 50% { opacity:1; } }
@keyframes world-bubble { 0%,55%,100% { transform:translate(-50%,0); } 65%,85% { transform:translate(-50%,-4px); } 75% { transform:translate(-50%,-1px); } }
@keyframes world-question { 0%,55%,100% { transform:rotate(0); } 64% { transform:rotate(-12deg); } 73% { transform:rotate(10deg); } 82% { transform:rotate(-5deg); } }
@keyframes world-look { 0%,85%,100% { top:0; } 86%,92% { top:-200%; } 93%,99% { top:-100%; } }
/* Mobile keeps a light, decorative world and the main call to action. */
@media(max-width:991.98px), (pointer:coarse) {
    .living-world { min-height:720px; min-height:max(720px,85svh); }
    .living-world__copy { width:calc(100% - 3rem); max-width:600px; padding-top:160px; padding-bottom:180px; }
    .living-world__copy h1 { font-size:clamp(1.35rem,5vw,2.1rem); }
    .living-world__copy .lead { font-size:1rem; line-height:1.8; }
    .living-world__copy a { white-space:normal; justify-content:center; max-width:100%; }
    .living-world__inhabitants,.living-world__invitation,#world-conversation,[data-found-count] { display:none !important; }
    .living-world__footer { justify-content:center; text-align:center; font-size:.65rem; bottom:2rem; }
}
@media(prefers-reduced-motion:reduce) {
    #pokemonWorldCanvas,.actor-label { transition:none; }
}


.actor-building-window { display:block; width:100%; height:100%; overflow:hidden; }
.actor-building-window .actor-building { max-width:none; width:calc(var(--building-frames) * 100%); object-fit:fill; }
@media(prefers-reduced-motion:no-preference) {
    .actor-building.is-animated { animation:home-building-frames var(--building-duration) steps(var(--building-steps),end) infinite; }
    .actor-building.is-reversed { animation-direction:reverse; }
}
@keyframes home-building-frames { to { transform:translateX(calc(-100% + 100% / var(--building-frames))); } }
