/* Scoped to the opt-in optional map games. No modal, timer or moving targets. */
.journey-puzzles{position:absolute;inset:0;pointer-events:none;z-index:39}
.journey-puzzles[hidden],.journey-puzzles [hidden],.journey-puzzle-hud[hidden]{display:none!important}
.journey-puzzle-marker{position:absolute;transform:translate(-50%,-50%);width:calc(54px * var(--world-ui-scale,1));height:calc(54px * var(--world-ui-scale,1));font-size:calc(26px * var(--world-ui-scale,1));padding:0;border:2px solid #e8d3a4;border-radius:50%;color:#ffe5a7;background:#214a52;box-shadow:0 0 0 3px #17363f66;pointer-events:auto;touch-action:manipulation;cursor:pointer}
.journey-puzzle-marker[data-puzzle-phase=won]{background:#385f45;color:#f8edca}
.journey-puzzle-stage{position:absolute;transform:translate(-50%,-50%);width:calc(var(--puzzle-size,280px) * var(--world-ui-scale,1));height:calc(var(--puzzle-size,280px) * var(--world-ui-scale,1));pointer-events:auto;touch-action:manipulation}
.journey-puzzle-stage>svg{width:100%;height:100%;overflow:visible;display:block;pointer-events:none}
.journey-puzzle-stage button{position:absolute;transform:translate(-50%,-50%);width:calc(48px * var(--world-ui-scale,1));height:calc(48px * var(--world-ui-scale,1));min-width:0;min-height:0;padding:0;border:2px solid #eee1bf;border-radius:12px;background:#b5d9dd;color:#123f4c;font-size:calc(25px * var(--world-ui-scale,1));line-height:1;box-shadow:0 2px 8px #091e28;touch-action:manipulation;cursor:pointer}
.journey-puzzle-stage .puzzle-mirror{font-weight:900}
.journey-puzzle-stage button:focus-visible,.journey-puzzle-marker:focus-visible{outline:4px solid #ffe2a0;outline-offset:3px}
.journey-puzzle-stage button[aria-pressed=true]{background:#ffe4a8;border-color:#945d25}
.journey-puzzle-stage button:disabled{cursor:default;opacity:.8}
.journey-puzzle-stage .puzzle-load-slot{font-size:calc(16px * var(--world-ui-scale,1));border-style:dashed;background:#ffedc4;color:#4f381e}
.journey-puzzle-stage .puzzle-load-slot small{display:block;font-size:calc(11px * var(--world-ui-scale,1));line-height:1.1}
.puzzle-load-ledger{position:absolute;left:5%;right:5%;top:80%;text-align:center;color:#fff0c7;font:600 calc(15px * var(--world-ui-scale,1))/1.2 system-ui}
.puzzle-light-ray{filter:drop-shadow(0 0 5px #ffe6a480)}
.journey-puzzle-hud{position:absolute;left:8px;right:8px;bottom:8px;z-index:66;padding:10px 12px;border:1px solid #c2d1c4;border-radius:18px;background:#163e47f5;color:#fff7e1;pointer-events:auto;box-sizing:border-box;max-height:48%;overflow:auto;touch-action:pan-y;font:inherit}
.journey-puzzle-hud .puzzle-hud-title{display:block;font-size:1rem;line-height:1.2}
.journey-puzzle-hud .puzzle-hud-status{margin:4px 0 7px;font-size:.9rem;line-height:1.25}
.puzzle-hud-actions,.puzzle-package-bank{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.journey-puzzle-hud button{min-height:44px;min-width:44px;border:1px solid #d2d9b8;border-radius:10px;background:#f1efcf;color:#173c42;font:600 .85rem/1.15 system-ui;padding:7px 10px;touch-action:manipulation}
.journey-puzzle-hud button:disabled{opacity:.55}
.journey-puzzle-hud button[aria-pressed=true]{background:#f6d88d;outline:2px solid #bf863b;outline-offset:1px}
.puzzle-package-bank{margin:5px 0 7px}
.puzzle-hud-actions>span{font-size:.85rem;flex-basis:100%}
.journey-puzzle-hud[data-network=error]{border-color:#efc48a}
.journey-puzzles[data-calm=true] .puzzle-light-ray{filter:none}
@media(max-height:560px){.journey-puzzle-hud{padding:6px 9px;max-height:42%}.journey-puzzle-hud .puzzle-hud-status{font-size:.8rem;margin:3px 0}.journey-puzzle-hud button{padding:5px 8px}}
@media(prefers-reduced-motion:reduce){.journey-puzzles *,.journey-puzzle-hud *{animation:none!important;transition:none!important}}
@media(orientation:landscape) and (max-height:600px){
 .journey-puzzle-hud{left:auto;right:8px;top:8px;bottom:8px;width:220px;max-height:none}
 body.map-journey:has(.journey-puzzles[data-active=true]) #gameView :is(.journey-pois,.journey-test-tools){display:none!important}
}
