:root{--bg:#10201e;--ink:#f1f6ee;--mint:#98e8d2;--muted:#b4c5ba;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
body.world-game{background:#0c1715;font-size:16px}
[hidden]{display:none!important}
#world-viewport{position:fixed;inset:68px 0 64px;overflow:hidden;touch-action:none;outline-offset:-3px;background:#101c19;cursor:grab}
#world-viewport:active{cursor:grabbing}
#world-surface{position:absolute;z-index:2;width:1200px;height:1200px;transform-origin:0 0;will-change:transform}
#world-art{position:absolute;left:0;top:0;width:10032px;height:10032px;max-width:none;transform-origin:0 0;user-select:none;pointer-events:none;filter:none}
#world-map-detail{position:absolute;left:0;top:0;width:10032px;height:10032px;transform-origin:0 0;pointer-events:none;user-select:none}
#world-map-detail img{position:absolute;display:block;width:1254px;height:1254px;max-width:none}
#world-local-fighters{position:absolute;left:0;top:0;width:10032px;height:10032px;transform-origin:0 0;pointer-events:none;user-select:none}
.world-local-scene{position:absolute;display:block;background-size:100% 100%;background-position:0 0;background-repeat:no-repeat;pointer-events:none}
#world-viewport:not([data-art-ready=true]) #world-local-fighters{visibility:hidden}
#map-loading a{display:inline-block;margin:12px 8px 0;padding:8px 12px;min-height:44px;color:var(--mint);text-underline-offset:3px}
#map-loading button{min-height:44px}
#world-cells{position:absolute;inset:0}
#world-roads{position:absolute;inset:0;width:1200px;height:1200px;pointer-events:none;overflow:visible}
#world-roads line{stroke:#ffdb81;stroke-width:4;stroke-dasharray:8 5;stroke-linecap:round;filter:drop-shadow(0 1px 2px #10201e)}
#coin-canvas{position:absolute;z-index:1;inset:0;width:100%;height:100%;pointer-events:none}
#world-coins{position:absolute;z-index:3;inset:0;pointer-events:none}
#world-viewport:not([data-art-ready=true]) #world-coins{visibility:hidden}
.map-coin-target{position:absolute;width:94px;height:94px;min-width:0;min-height:0;padding:0;border:0;border-radius:50%;background:transparent;pointer-events:auto;cursor:pointer;color:#fff6d9;touch-action:none;opacity:1!important}
.map-coin-target:hover:not(:disabled),.map-coin-target:focus-visible,.map-coin-target[aria-pressed=true]{outline:2px solid #fff1a9;outline-offset:3px;background:transparent}
.map-coin-target:disabled{cursor:grab}
#world-viewport .map-coin-target[data-peek=true]{opacity:0!important;pointer-events:none}
.map-coin-target[data-special=true]::before{content:"";position:absolute;inset:-5px;border:2px solid #ffdf75;border-radius:50%;box-shadow:0 0 12px #f7b84488,inset 0 0 9px #fff5b17d;pointer-events:none}
.map-coin-target[data-special=true][data-locked=true]::before{border-style:dashed;border-color:#c7b68d;box-shadow:none}
.coin-fallback{position:absolute;inset:8px;display:grid;place-items:center;border-radius:50%;background:var(--coin-color);border:2px solid #ffdf87;color:#15251f}
.coin-fallback .icon{width:38px;height:38px}
#world-viewport[data-coins-ready=true] .coin-fallback{visibility:hidden}
.coin-status{position:absolute;right:2px;bottom:0;min-width:19px;padding:2px 4px;border:1px solid #fff0a2;border-radius:5px;background:#172820;color:#fff0a2;font-size:12px;font-weight:700;line-height:16px;text-align:center;pointer-events:none}
.coin-boss-status{left:50%;right:auto;bottom:-5px;transform:translateX(-50%);font-size:10px;letter-spacing:.6px;white-space:nowrap;background:#462818}
.map-coin-target[data-locked=true] .coin-boss-status{background:#29312c;color:#d6cba8;border-color:#b9aa83}
.coin-contents{display:grid;gap:12px}
.coin-contents .coin-entry{padding:14px;border:1px solid #accbbb44;border-radius:10px;background:#0a1d1873}
.coin-entry h3{display:flex;align-items:center;gap:8px;margin:0 0 8px}
.coin-entry h3 .icon{width:22px;height:22px;flex:none}
.coin-entry p{margin:8px 0}
.coin-entry-status{display:flex;align-items:center;gap:6px;color:#a9d8ff;font-size:14px;margin-bottom:8px}
.coin-entry-status .icon{width:18px;height:18px}
.world-cell{position:absolute;width:150px;height:150px;padding:0;border:0;background:transparent;border-radius:0;color:white;touch-action:none;opacity:1!important;cursor:inherit}
.world-cell::before{content:"";position:absolute;inset:7px;border:1px solid transparent;border-radius:12px;pointer-events:none}
.world-cell.is-adjacent::before{border-color:#a5ffe359;background:#b7ffe60b;box-shadow:inset 0 0 18px #b3ffdc12}
.world-cell.is-current::before{border-color:#a4fce7a6;box-shadow:inset 0 0 20px #79fddd15}
.world-cell.is-selected::before,.world-cell:hover:not(:disabled)::before{border:2px solid #fff1bc;background:#fff2b711}
.world-cell:focus-visible{outline:3px solid #ffffff;outline-offset:-5px}
.cell-coordinate{position:absolute;top:11px;left:12px;opacity:0;padding:2px 5px;border-radius:4px;background:#101c1ccc;color:#eef8e9;font-size:13px}
.world-cell:is(:hover,:focus-visible,.is-current,.is-selected) .cell-coordinate{opacity:1}
.step-target{position:absolute;left:18px;bottom:11px;font-size:22px;line-height:24px;width:24px;color:#c7fff1;text-shadow:0 1px 4px #000;opacity:.8}
#world-spirit{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;z-index:5;will-change:transform}
#spirit-canvas{position:absolute;width:88px;height:108.3px;left:-44px;bottom:-10px;filter:drop-shadow(0 0 3px #85ffe684)}
#spirit-shadow{position:absolute;left:-25px;top:-8px;width:50px;height:18px;border-radius:50%;background:#001c1d;filter:blur(5px);pointer-events:none;z-index:2}
.spirit-loading{position:absolute;width:20px;height:20px;left:-10px;bottom:10px;border-radius:50%;background:#5deacb;box-shadow:0 0 24px #5deacb}
#world-spirit[data-ready=true] .spirit-loading{display:none}
.world-game .app.immersive{background:transparent;pointer-events:none}
.world-game .app.immersive :is(.game-bar,.game-dock,.map-actions,.event-sheet){pointer-events:auto}
.world-game .app.immersive .game-bar{background:#11241fef;min-height:68px;border-bottom:1px solid #a5e1c126}
.world-game .app.immersive .game-brand>span{font-size:18px;font-weight:600}
.world-game .app.immersive .game-brand small{font-size:12px;color:#a3d5c4}
.world-game .app.immersive .map-position{font-size:14px;max-width:230px}
.world-game .app.immersive .map-actions{left:18px;bottom:80px;transform:none;max-width:calc(100vw - 40px)}
.world-game .app.immersive .event-sheet{left:auto;right:18px;transform:none;bottom:85px;width:365px;max-height:calc(100dvh - 176px);background:#14271ff5;border-color:#aecdaa66}
.world-game .app.immersive .event-sheet :is(p,.context,.card-text,.notice,.intent,.decision-meta,.encounter-option span,.encounter-option strong,.site-offer p,.site-preview p,.place-card p){font-size:14px;line-height:1.5}
.world-game .app.immersive .event-sheet :is(h2,h3){font-size:18px}
.world-game :is(.button,.tab){font-size:14px;min-height:44px}
.world-game .app.immersive .event-sheet .button{font-size:14px;min-height:44px}
.world-game dialog{font-size:16px}
.world-game dialog :is(p,.context,.quest p,.quest-top strong,.quest .progress-line,.help-list,.help-note,.shop-item p,.form-note){font-size:14px;line-height:1.55}
#map-loading{position:fixed;z-index:24;left:50%;top:45%;transform:translate(-50%,-50%);padding:18px 24px;max-width:90vw;background:#10251ff2;border:1px solid #9dcaba65;border-radius:12px;color:#e4f6ee;text-align:center}
#map-loading button{margin-top:12px;padding:8px 16px;color:#132923;background:#a4ebd6;border:0;border-radius:6px;font-size:14px}
#camera-controls{position:fixed;z-index:21;left:50%;transform:translateX(-50%);bottom:10px;display:flex;align-items:center;max-width:calc(100vw - 16px);background:#10241fee;border:1px solid #9cc7b442;border-radius:12px;padding:3px;gap:3px}
#camera-controls button{padding:7px 12px;min-width:44px;min-height:40px;border:0;border-radius:8px;background:transparent;color:#e2f3e9;font-size:14px}
#camera-controls button:hover{background:#99e7cb20}
#camera-controls button:nth-child(-n+2){font-size:24px}
#camera-controls button:disabled{opacity:.4;cursor:default}
#camera-controls button[aria-pressed=true]{background:#99e7cb20;color:#a6f4db}
#camera-zoom{min-width:44px;padding:0 5px;text-align:center;font-size:13px;font-variant-numeric:tabular-nums;color:#b4c5ba}
#map-instructions{position:fixed;z-index:12;top:82px;left:18px;padding:8px 12px;background:#10231de8;border:1px solid #b6d4be25;border-radius:8px;font-size:14px;color:#d6e7dc;max-width:calc(100vw - 36px);pointer-events:none}
#map-chip-legend{position:fixed;z-index:12;left:18px;top:130px;display:flex;flex-wrap:wrap;gap:8px 14px;padding:8px 12px;border-radius:8px;background:#10231de8;font-size:14px;pointer-events:none}
#map-chip-legend span{display:flex;align-items:center;gap:6px}
#map-chip-legend span::before{content:"";width:11px;height:8px;border-radius:50%;background:var(--legend);box-shadow:0 2px 0 color-mix(in srgb,var(--legend),black 55%)}
@media(max-width:700px){
 #world-viewport{inset:94px 0 112px}
 .world-game .app.immersive .game-bar{min-height:94px}
 .world-game .app.immersive .game-brand>span{font-size:16px}
 #map-instructions{top:104px;left:10px;font-size:12px;max-width:calc(100vw - 20px);padding:6px 9px}
 #map-chip-legend{top:162px;left:10px;font-size:12px;gap:7px 10px;padding:6px 9px}
 #camera-controls{bottom:61px;width:max-content;gap:2px}
 #camera-controls button{padding:7px 8px;white-space:nowrap}
 .world-game .app.immersive .map-position{font-size:13px;max-width:calc(100vw - 165px)}
 .world-game .app.immersive .map-actions{bottom:117px;left:12px;transform:none}
 .world-game .app.immersive .event-sheet,.world-game .app.immersive:has(.map-actions:not(:empty)) .event-sheet{left:10px;right:10px;width:auto;bottom:115px;transform:none;max-height:calc(100dvh - 220px)}
 .world-game .app.immersive .compact-hud .stat-value{font-size:16px}
}
@media(max-width:370px){#camera-zoom{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);padding:3px 8px;border-radius:6px;background:#10241fee}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
