/* Expedition: readable play space, local mastery and a compact world atlas. */
.tactical-panel{margin-top:18px;padding:13px 16px;background:#fffaf0;border:1.5px solid #c9bfae;border-radius:13px;box-shadow:0 3px 0 #d9ceba44}
.tactical-labels,.tactical-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;min-width:0;font-size:11px;line-height:1.5}.tactical-labels strong{font-weight:900}.tactical-labels>span{color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}.tactical-foot{font-size:10px;color:var(--muted);margin-top:8px}.route-map{position:relative;margin-top:15px;height:8px}.route-map>div{display:flex;gap:4px;height:8px}.route-step{position:relative;flex:1;min-width:0;border-radius:3px;background:#ded5c5;border:1px solid #c9bdab}.route-step.done{background:#87ad75;border-color:#6c9160}.route-step.current{background:#f5c766;border-color:#b98a33;box-shadow:0 0 0 2px #f5c76640}.checkpoint-step:before{content:'';position:absolute;width:5px;height:5px;background:#658f66;border:1px solid #fff7e5;rotate:45deg;left:50%;translate:-50% 0;top:-9px}.route-map>i{position:absolute;top:-5px;height:17px;width:2px;background:#72558d;pointer-events:none}.route-map .short-route{background:linear-gradient(90deg,#87ad75 var(--progress),#ded5c5 var(--progress));border-radius:4px}.short-route .route-step{display:none}.tactical-panel~.course-progress{display:none}
.ability-bar{position:absolute;z-index:2;bottom:18px;left:50%;translate:-50% 0;display:none;gap:6px;pointer-events:none;white-space:nowrap}.running .ability-bar{display:flex}.ability-bar>span{padding:7px 10px;border:1.5px solid #27243880;border-radius:8px;background:#faf0dded;color:#746879;box-shadow:0 2px 0 #27243820;font-size:10px;font-weight:900;font-variant-numeric:tabular-nums;backdrop-filter:blur(5px)}.ability-bar>.ready{background:#d8ebc8ed;color:#36563a}.game-frame:has(.rule-notice:not(.hidden)) .ability-bar{visibility:hidden}.touch-dash.cooling{background:#c4b6d0!important}.touch-dash.cooling:after{content:attr(data-status);position:absolute;right:-4px;bottom:-5px;background:#272438;color:#fff6df;border:1px solid #fff6df;padding:1px 4px;border-radius:5px;font:900 9px/1.4 var(--font)}
.chapter-atlas{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:0 0 22px}.chapter-card{position:relative;min-width:0;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:9px;overflow:hidden;border:1.5px solid #27243870;border-radius:13px;padding:15px 13px;background:var(--chapter-color);box-shadow:0 3px 0 #27243820;transition:transform .18s,box-shadow .18s}.chapter-card:before{content:'';position:absolute;width:110px;height:110px;border:18px solid #fff5dd45;border-radius:50%;right:-38px;top:-32px;pointer-events:none}.chapter-card[aria-pressed=true]{border:2px solid var(--ink);box-shadow:0 4px 0 var(--ink)}.chapter-number{font:900 10px var(--font);letter-spacing:1px}.chapter-card strong{font-size:13px;position:relative}.chapter-card small{font-size:10px;color:#534b56}.chapter-card>i{display:block;width:100%;height:4px;border-radius:4px;background:linear-gradient(90deg,#425e4d var(--chapter-progress),#fff5dd70 var(--chapter-progress))}.chapter-card:hover{transform:translateY(-3px);box-shadow:0 6px 0 #27243830}.world-preview{transition:filter .2s}.world-card:hover .world-preview{filter:saturate(1.12)}.world-journey{display:flex;align-items:center;gap:8px;padding:0 15px 12px;font-size:10px;font-weight:900;color:#726282}.world-journey i{flex:1;height:4px;min-width:20px;border-radius:3px;background:linear-gradient(90deg,#a38bc2 var(--world-reach),#e4dcce var(--world-reach))}.result-mastery{font-size:10px;font-weight:900;color:#5b7653;line-height:1.45;margin:0 0 10px}.result-mastery:empty{display:none}#pref-touch-size{font:800 12px var(--font);padding:8px;border:1.5px solid #bdb0c5;border-radius:8px;background:#fff9ee;max-width:130px}.preference-row>span{min-width:0}#focus-btn{font-size:10px;white-space:nowrap}
.focus-mode{overflow:hidden}.focus-mode .game-section{position:fixed;inset:0;z-index:30;display:flex;flex-direction:column;gap:0;background:#ede8da;padding:12px;max-width:none}.focus-mode .game-heading{flex-shrink:0;margin-bottom:10px}.focus-mode .game-frame{flex:1;min-height:140px;box-shadow:0 3px 0 var(--ink);border-radius:14px}.focus-mode .game-frame>canvas{height:100%;width:100%;aspect-ratio:auto}.focus-mode .game-section>.difficulty-picker,.focus-mode #difficulty-status,.focus-mode .game-footer,.focus-mode .precision-instructions,.focus-mode #course-progress,.focus-mode #checkpoint-status{display:none!important}.focus-mode .tactical-panel{flex-shrink:0;margin-top:10px;padding:8px 12px}.focus-mode .site-header,.focus-mode .intro,.focus-mode .arcade-hub,.focus-mode .worlds-section,.focus-mode .friend-strip,.focus-mode .site-footer,.focus-mode .workshop-panel{display:none!important}.focus-mode .level-number{height:34px}.focus-mode .game-heading-actions{flex-shrink:0}.focus-mode dialog{z-index:50}
.large-touch .touch-controls button{width:58px;height:58px}.large-touch .touch-controls .touch-jump{width:68px;height:68px}.large-touch .touch-controls .touch-dash{width:48px;height:48px}.large-touch .touch-controls{bottom:15px}.large-touch .touch-direction,.large-touch .touch-abilities{gap:7px}
@media(max-width:1000px){.chapter-atlas{grid-template-columns:repeat(3,minmax(0,1fr))}.chapter-card{padding:12px}.chapter-card strong{font-size:12px}}
@media(max-width:700px){.chapter-atlas{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:17px}.chapter-card:last-child{grid-column:1/-1}.chapter-card{padding:11px 12px;gap:6px}.chapter-card:last-child>i{max-width:50%}.chapter-number{font-size:8px}.chapter-card small{font-size:9px}.tactical-panel{margin-top:13px;padding:10px 11px}.tactical-labels,.tactical-foot{font-size:9px;gap:6px}.tactical-labels{flex-wrap:wrap}.tactical-foot>span:last-child{text-align:right;max-width:45%}.route-map>div{gap:2px}.route-map,.route-map>div{height:6px}.checkpoint-step:before{width:4px;height:4px;top:-8px}.ability-bar{top:47px;bottom:auto;gap:5px}.ability-bar>span{font-size:8px;padding:5px 7px;border-radius:6px}.world-journey{padding:0 10px 10px;font-size:8px}.result-mastery{font-size:8px;margin-bottom:5px}.focus-mode .game-section{padding:8px}.focus-mode .game-heading{margin-bottom:7px}.focus-mode .game-heading h2{font-size:11px}.focus-mode .character-button{display:none}.focus-mode .tactical-panel{margin-top:8px;padding:7px 10px}.focus-mode .game-frame{border-radius:12px}.focus-mode .tactical-foot{margin-top:5px}#focus-btn{font-size:8px;padding:6px;max-width:77px;white-space:normal}#pref-touch-size{font-size:11px;max-width:112px}.large-touch .touch-controls button{width:54px;height:54px}.large-touch .touch-controls .touch-jump{width:63px;height:63px}.large-touch .touch-controls .touch-dash{width:43px;height:43px}}
@media(max-width:360px){.game-heading-actions{gap:4px}.game-heading-actions #ghost-btn{font-size:8px;padding:5px}.game-heading-actions .character-button{padding:4px}.game-heading-actions #fullscreen-btn{padding:5px;min-width:30px}.level-heading h2{font-size:11px}.tactical-labels>span{font-size:8px}#focus-btn{max-width:57px;font-size:7px}.large-touch .touch-direction,.large-touch .touch-abilities{gap:5px}}
@media(max-height:500px) and (orientation:landscape){.focus-mode .tactical-panel{padding:4px 10px;margin-top:6px}.focus-mode .tactical-foot{display:none}.focus-mode .tactical-labels{font-size:9px}.focus-mode .route-map{margin-top:8px}.focus-mode .game-heading{margin-bottom:5px}.focus-mode .game-heading h2{font-size:11px}.focus-mode .game-heading .overline{display:none}.focus-mode .game-heading .level-number{height:28px}.focus-mode .ability-bar{top:49px;bottom:auto}}
@media(prefers-reduced-motion:reduce){.chapter-card,.world-preview{transition:none}.chapter-card:hover{transform:none}}.calm-motion .chapter-card,.calm-motion .world-preview{transition:none}.calm-motion .chapter-card:hover{transform:none}

@media(max-width:700px) and (orientation:portrait){.focus-mode .game-heading-actions #ghost-btn{display:none}.touch-device .focus-mode .game-stage:after{content:attr(data-portrait-hint);position:absolute;pointer-events:none;bottom:95px;left:50%;translate:-50% 0;text-align:center;width:85%;font:800 9px/1.5 var(--font);color:#fff6e0;text-shadow:0 1px 3px #272438}}

#game-frame:fullscreen #exit-fullscreen-btn{display:grid!important}#game-frame:not(:fullscreen) #exit-fullscreen-btn{display:none!important}

#dismiss-notice-btn{pointer-events:auto;position:absolute;right:3px;top:3px;width:28px;height:28px;border:0;border-radius:6px;background:transparent;color:var(--ink);font-size:21px;line-height:1}.rule-notice{padding-right:28px}.route-map>#route-death-marker{top:9px;width:6px;height:6px;border-radius:50%;background:#b56478;border:1px solid #fff4df;translate:-50% 0}.tactical-foot>span{min-width:0;overflow-wrap:anywhere}

/* Avoid filtering a continuously changing Canvas. */
body:has(.game-frame.running)>.page-grain{display:none}
.ability-bar>span{backdrop-filter:none;background:#e5efd6}.game-active .page-grain{display:none}.chapter-atlas{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:700px){.chapter-atlas{grid-template-columns:repeat(2,minmax(0,1fr))}.chapter-card:last-child{grid-column:auto}}

@media(max-width:700px){.result-buttons #next-btn{font-size:10px;font-weight:900;line-height:1.35}}

/* Feedback has its own space below the Canvas, including focus and fullscreen. */
.game-stage{position:relative;min-width:0;isolation:isolate}
.game-feedback{flex:none;position:relative;display:flex;align-items:center;justify-content:center;height:44px;padding:5px 12px;border-top:1px solid #27243825;background:#fff5dc;color:#55475d;pointer-events:none;overflow:hidden}
.game-feedback .floating-message{position:static;inset:auto;transform:none;translate:none;rotate:none;max-width:100%;max-height:100%;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:none;color:inherit;white-space:normal;text-align:center;font-size:11px;line-height:1.5;animation:none;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
.focus-mode .game-frame,.game-frame:fullscreen{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}
.focus-mode .game-stage,.game-frame:fullscreen .game-stage{flex:1;min-height:0;width:100%}
.focus-mode .game-stage>canvas,.game-frame:fullscreen .game-stage>canvas{width:100%;height:100%;aspect-ratio:auto;max-height:none}
@media(max-width:700px){.game-feedback{height:50px;padding:5px 9px}.game-feedback .floating-message{font-size:10px;line-height:1.5}}
@media(max-height:500px) and (orientation:landscape){.game-feedback{height:36px}.game-feedback .floating-message{font-size:9px;line-height:1.35}}
