:root{font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;color:#243e36;background:#f7f8f3;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}header{height:80px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dce3da;max-width:1440px;margin:auto;padding:0 5%}.brand{text-decoration:none;color:inherit;font-weight:750;letter-spacing:2px;font-size:21px;display:flex;align-items:center;gap:10px}.brand-mark{background:#315e4e;color:#eff4d9;border-radius:10px;font-size:25px;width:36px;height:36px;display:grid;place-items:center}.brand-en{font-size:10px;letter-spacing:2px;color:#819086;font-weight:500;margin-left:13px}.quiet{background:transparent;border:0;color:#667c70;font-size:13px;padding:12px}main{max-width:1440px;padding:30px 5% 22px;margin:auto}.topline{display:flex;justify-content:space-between;align-items:end;margin-bottom:26px}.eyebrow{font-size:11px;letter-spacing:4px;margin:0 0 10px;color:#829383}h1{font-size:32px;letter-spacing:2px;font-weight:600;margin:0}.modes{background:#e9eee6;padding:5px;border-radius:12px;display:flex;gap:3px}.modes button{border:0;background:none;padding:12px 20px;color:#7a8b7d;border-radius:8px;font-size:13px}.modes .selected{background:#fff;color:#345b49;box-shadow:0 2px 5px #304c3b0b;font-weight:650}.game{display:grid;grid-template-columns:minmax(0,1fr) 265px;background:#fff;border:1px solid #dce4d8;border-radius:18px;overflow:hidden;box-shadow:0 12px 38px #193b2310}.map-wrap{background:#e8f0e9;position:relative;min-height:570px;display:flex;align-items:center;overflow:hidden}#map{width:100%;height:100%;max-height:680px;touch-action:none;user-select:none}.map-caption{position:absolute;top:25px;left:28px;display:flex;flex-direction:column;gap:7px;pointer-events:none}.map-caption span:first-child{font-size:14px;letter-spacing:2px;font-weight:600}.map-caption span:last-child{font-size:10px;color:#90a192;letter-spacing:2px}.compass{position:absolute;right:22px;top:22px;display:flex;flex-direction:column;align-items:center;color:#698579;font-size:10px;gap:2px;pointer-events:none}.compass b{font-size:28px;font-weight:300}.compass small{font-size:8px}.map-note{position:absolute;bottom:20px;left:28px;color:#8ba090;font-size:10px;letter-spacing:2px;pointer-events:none}aside{padding:28px 24px;border-left:1px solid #dce4d8}.status{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#839283}.status strong{font-size:22px;color:#2d5341;font-weight:500}.status strong i{font-style:normal;font-size:14px;color:#bec9bf}.status strong span:last-child{font-size:14px;color:#839283}.progress{height:4px;background:#eef1e9;margin:15px 0 32px;border-radius:9px;overflow:hidden}.progress div{height:100%;background:#72916e;transition:width .5s}.piece-heading{display:flex;justify-content:space-between;font-size:12px;letter-spacing:1px}.piece-heading span:last-child{font-size:10px;color:#98a28d}#tray{height:225px;margin-top:15px;background:#f6f7ef;border:1px dashed #cbd3bb;border-radius:12px;position:relative;cursor:grab;touch-action:none;display:grid;place-items:center;transition:background .2s}#tray:focus-visible{outline:3px solid #8ca878}#preview{width:90%;height:170px;overflow:visible;filter:drop-shadow(0 5px 3px #68805120)}.drag-hint{position:absolute;bottom:14px;font-size:10px;color:#96a17f;letter-spacing:2px}#feedback{font-size:12px;line-height:1.8;min-height:45px;text-align:center;color:#68815d;margin:17px 0 19px}.help{border-top:1px solid #edf0e8;padding-top:20px;display:grid;grid-template-columns:24px 1fr;gap:12px 5px;font-size:11px;color:#9aa394}.help span{color:#b1baa8;font-size:10px}.help p{margin:0}.tiny-note{font-size:10px;line-height:1.8;color:#a2ab98;margin:20px 0 0}footer{display:flex;justify-content:space-between;gap:20px;margin-top:18px;color:#8a998b;font-size:10px;letter-spacing:1px}details{max-width:520px;text-align:right;line-height:1.9}summary{cursor:pointer}details p{letter-spacing:0}details a{color:#69816d}#ghost{position:fixed;left:0;top:0;overflow:visible;pointer-events:none;z-index:20;display:none;filter:drop-shadow(0 7px 5px #283f3435)}#ghost path{fill:#acc482;stroke:#728b51;stroke-width:1.5;vector-effect:non-scaling-stroke}.base{fill:#d5dfcf}.land{stroke:#f1f5e9;stroke-width:1.2;vector-effect:non-scaling-stroke}.label{fill:#345245;font-size:12px;paint-order:stroke;stroke:#edf4e8;stroke-width:3px;stroke-linejoin:round;text-anchor:middle;pointer-events:none}.micro{fill:none;stroke:#6e9364;stroke-width:1.2;stroke-dasharray:3 3;pointer-events:none}#win{position:absolute;inset:0;background:#edf3e9e8;backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center}#win[hidden]{display:none}#win>span{font-size:75px;color:#91a872}#win h2{font-size:32px;font-weight:500;letter-spacing:5px;margin:15px}#win p{font-size:13px;color:#809276}#win button{background:#365e49;color:#fff;border:0;border-radius:9px;padding:13px 28px;margin-top:18px;font-size:13px}button:focus-visible{outline:3px solid #9ab287;outline-offset:3px}@media(min-width:1500px){main{padding-top:42px}}@media(max-width:900px){header{height:66px}.brand-en{display:none}main{padding:23px 4%}.topline{align-items:start;gap:20px;flex-direction:column}h1{font-size:27px}.game{grid-template-columns:minmax(0,1fr) 215px}aside{padding:24px 17px}.map-wrap{min-height:490px}.help{font-size:10px}#tray{height:195px}}@media(max-width:650px){header{padding:0 5%}.brand{font-size:18px}.quiet{font-size:11px}.topline{margin-bottom:18px;gap:18px}.eyebrow{font-size:9px}h1{font-size:26px}.modes{width:100%}.modes button{flex:1;padding:11px 8px;font-size:12px}.game{display:flex;flex-direction:column}.map-wrap{height:49vh;min-height:310px;max-height:500px}.map-caption{top:15px;left:16px}.map-caption span:first-child{font-size:11px}.map-caption span:last-child{font-size:8px}.compass{top:13px;right:14px}.map-note{left:16px;bottom:12px;font-size:8px}aside{border-left:0;border-top:1px solid #dce4d8;display:grid;grid-template-columns:125px 1fr;grid-template-rows:auto auto 1fr;gap:0 19px;padding:17px}#tray{grid-column:1;grid-row:1/5;margin:0;height:130px}#preview{height:90px}.drag-hint{font-size:8px;bottom:10px}.piece-heading,.help,.tiny-note{display:none}.status{grid-column:2}.progress{grid-column:2;margin:10px 0}#feedback{grid-column:2;text-align:left;margin:5px 0;min-height:0;font-size:11px}.status strong{font-size:20px}footer{font-size:8px;gap:12px;line-height:1.7}details{max-width:200px}#win h2{font-size:27px}#win>span{font-size:45px}}
[hidden]{display:none!important}#play-panel{height:100%}.study-eyebrow{font-size:10px;letter-spacing:2px;color:#7b9278;margin:0 0 10px}#study-panel h2{font-size:21px;font-weight:550;margin:0 0 12px}.study-copy{font-size:12px;line-height:1.9;color:#7f9080;margin:0 0 19px}#start{display:flex;justify-content:space-between;align-items:center;width:100%;padding:14px 17px;border:0;border-radius:9px;background:#315e4e;color:white;font-size:14px}#start:hover{background:#244a3d}#study-selected{font-size:12px;min-height:20px;line-height:1.7;color:#416550;margin:19px 0 12px}#study-list{display:grid;grid-template-columns:1fr 1fr;gap:6px;max-height:310px;overflow:auto;padding:3px 4px 5px 2px}#study-list button{border:1px solid #e3e9dd;border-radius:6px;text-align:left;background:#fafbf7;color:#4d6858;font-size:11px;line-height:1.5;padding:8px 6px;min-height:38px;overflow-wrap:anywhere}#study-list button:before{content:'';display:inline-block;width:6px;height:6px;background:var(--piece-color);border-radius:50%;margin-right:5px}#study-list button[aria-pressed=true]{background:#e7eee0;border-color:#6f8c65;color:#244a3c}.study-land{cursor:pointer}.study-active{fill:#dfc379;stroke:#315e4e;stroke-width:2.5}.study-leader{stroke:#6f856d;stroke-width:.8;pointer-events:none}.study-label{font-size:13px}#magnifier{position:fixed;z-index:21;pointer-events:none;display:none;flex-direction:column;width:146px;height:124px;border:1px solid #b4c4a8;border-radius:12px;padding:10px;background:#fcfdf8f5;box-shadow:0 5px 18px #1d382129}#magnifier span{font-size:9px;white-space:nowrap;color:#57704c;text-align:center;margin-bottom:7px}#magnifier svg{width:100%;height:88px;min-height:0}#magnifier path{stroke:#678052;stroke-width:1.5;vector-effect:non-scaling-stroke}#drop-crosshair circle{fill:#ffffff80;stroke:#294f3a;stroke-width:1.5}#drop-crosshair path{fill:none;stroke:#254931;stroke-width:2.5}#drop-crosshair{filter:drop-shadow(0 0 2px white)}
@media(max-width:650px){aside{display:block}#play-panel{display:grid;grid-template-columns:125px 1fr;grid-template-rows:auto auto 1fr;gap:0 19px}#study-panel{display:grid;grid-template-columns:1fr 125px;gap:0 14px}.study-eyebrow{grid-column:1;margin-bottom:6px}#study-panel h2{grid-column:1;font-size:18px;margin-bottom:6px}.study-copy{grid-column:1;font-size:11px;margin:0}#start{grid-column:2;grid-row:1/4;align-self:center;font-size:12px;padding:15px 12px}#study-selected{grid-column:1/-1;margin:14px 0 7px}#study-list{grid-column:1/-1;grid-template-columns:repeat(3,1fr);max-height:185px}#study-list button{min-height:42px;font-size:11px}.study-label{font-size:14px}}

/* Study zoom stays in map coordinates; controls remain screen-sized. */
#study-back{position:absolute;z-index:2;top:83px;left:28px;border:1px solid #afc1ae;border-radius:8px;background:#fffffff0;color:#315e4e;padding:10px 13px;font-size:12px;min-height:40px;box-shadow:0 2px 8px #27462d0d}
/* Pointer selection has no SVG bounding-box ring; keyboard focus follows the silhouette. */
#map .study-land:focus:not(:focus-visible){outline:none}
#map .study-land:focus-visible{outline:none;stroke:#173e2e;stroke-width:3;stroke-dasharray:5 3;vector-effect:non-scaling-stroke}
.study-label-button{cursor:pointer;outline:none}.study-label-button .study-label{pointer-events:none}.study-label-button:hover rect,.study-label-button:focus-visible rect{fill:#fff8;stroke:#315e4e;stroke-width:1.5}.study-label-button:focus-visible .study-label{fill:#173e2e}.study-zoom .study-land:not(.study-active){opacity:.28}.study-zoom .base{opacity:.2}.study-zoom>rect{visibility:hidden}.study-zoom-label{font-weight:600}
@media(max-width:650px){#study-back{top:57px;left:16px;font-size:11px;padding:8px 10px;min-height:36px}}

.level-nav{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:0 0 16px;font-size:13px}.level-nav>span{color:#718173;font-size:11px;letter-spacing:.1em}#breadcrumbs{display:flex;gap:3px;align-items:center;flex-wrap:wrap}#breadcrumbs[hidden]{display:none}#breadcrumbs button{color:#405c42}#breadcrumbs button:hover{background:#fff}#enter-child{width:100%;border:1px solid #64855c;border-radius:8px;padding:12px;background:#f4f8ed;color:#365c36;text-align:left;font:inherit;font-size:13px;cursor:pointer}#enter-child:disabled{background:#edf0ec;border-color:#c8d2c6;color:#7c887a;cursor:not-allowed}#child-note{font-size:11px;line-height:1.6;color:#74816f;margin:9px 0 16px}#start:disabled{opacity:.5;cursor:wait}#win #review{display:block;margin:10px auto;background:transparent;color:#547249;padding:8px;font-size:12px}#study-list button{overflow-wrap:anywhere}#layer-source{color:#566a53}button:focus-visible{outline:2px solid #42683a;outline-offset:3px}@media(max-width:600px){.level-nav{gap:8px;margin-top:10px}#breadcrumbs{gap:6px}.level-nav #level-back{margin-left:auto}#child-note{margin-bottom:10px}}

#vintage{font-size:12px;line-height:1.7;color:#78826d;margin:-6px 0 16px;max-width:1100px}#study-list{max-height:300px;overflow:auto;scrollbar-width:thin}

#study-controls{position:absolute;right:18px;bottom:48px;z-index:4;display:flex;align-items:center;gap:2px;background:#fffffff0;border:1px solid #bbcdb8;border-radius:9px;padding:4px;box-shadow:0 3px 12px #254d3020}#study-controls button{border:0;background:transparent;color:#3e6348;padding:6px 9px;min-width:32px;font-size:16px;border-radius:5px}#study-controls button:hover{background:#e5eddf}#study-controls button:disabled{opacity:.3}#zoom-value{font-size:10px;color:#768573;min-width:34px;text-align:center}#study-controls #zoom-reset{font-size:11px}#map.study-zoom{cursor:grab}#map.panning{cursor:grabbing}#map:focus-visible{outline:2px solid #58764c;outline-offset:-3px}@media(max-width:600px){#study-controls{right:10px;bottom:36px}#study-controls button{padding:9px;min-width:38px}.map-note{letter-spacing:0;left:14px;font-size:9px}}

@media(min-width:651px){#breadcrumbs{margin-left:auto}}

/* Localized labels retain usable controls across Latin, CJK and Southeast Asian scripts. */
body,button,select{font-family:Inter,"Noto Sans","Noto Sans CJK SC","Noto Sans CJK TC","Noto Sans JP","Noto Sans KR","Noto Sans Thai","Noto Sans Khmer","Noto Sans Lao","Noto Sans Myanmar",system-ui,sans-serif}header{gap:16px;flex-wrap:wrap}.header-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.language-control{display:flex;align-items:center;gap:7px;color:#536c58;font-size:12px}.language-control select{max-width:180px;min-height:38px;border:1px solid #afc1ae;border-radius:7px;padding:6px;background:#fafbf7;color:#315e4e}.brand{flex-wrap:wrap}.brand-title{white-space:normal}h1{overflow-wrap:anywhere}.map-caption{gap:12px}.map-caption span{min-width:0;overflow-wrap:anywhere}#map-stage{max-width:48%;text-align:right}.map-note{right:160px;line-height:1.5;letter-spacing:0}#study-list button{line-height:1.6}#study-panel h2{line-height:1.4}#magnifier span{white-space:normal;line-height:1.3}#magnifier{height:auto;min-height:124px}.compass>span{font-size:9px;letter-spacing:0}#win p{max-width:90%;margin:10px auto;line-height:1.7}#win button{max-width:90%;white-space:normal;line-height:1.5}.label{textLength:none}#language-select:focus-visible{outline:2px solid #42683a;outline-offset:3px}html:lang(my) body,html:lang(km) body,html:lang(lo) body,html:lang(th) body{line-height:1.8}html:not(:lang(zh)) .eyebrow{letter-spacing:.08em}html:not(:lang(zh)) .study-eyebrow{letter-spacing:.06em}
@media(max-width:650px){header{gap:10px}.header-actions{width:100%;justify-content:space-between;gap:8px}.language-control{font-size:11px}.language-control select{max-width:155px}.brand-en{display:none}#study-panel{grid-template-columns:minmax(0,1fr) 125px}.map-caption{align-items:flex-start}.map-caption #map-stage{font-size:8px;line-height:1.4}.map-caption #map-title{font-size:12px;line-height:1.4;max-width:52%}.map-note{right:150px;font-size:8px;max-height:40px;overflow:hidden}#study-controls{bottom:12px}#zoom-reset{max-width:84px;white-space:normal;line-height:1.3}.compass{right:14px}footer{flex-wrap:wrap}footer details{max-width:100%;width:100%}#win h2{font-size:23px}.study-copy{line-height:1.8}#study-back{max-width:55%;white-space:normal;line-height:1.4}.level-nav{align-items:flex-start}}
header{height:auto;min-height:80px;padding-top:12px;padding-bottom:12px}.map-caption{right:74px}#map-stage{max-width:none;text-align:left}.map-caption #map-title{max-width:none}#magnifier{height:124px;min-height:0}#magnifier span{font-size:8px;max-height:26px;overflow:hidden}#magnifier svg{height:68px}.drag-hint{max-width:92%;text-align:center;line-height:1.5;letter-spacing:0}html:not(:lang(zh)) #win h2{letter-spacing:0}
@media(max-width:650px){header{min-height:96px}.map-caption #map-title{max-width:none}.map-caption #map-stage{max-width:none}.brand{letter-spacing:.04em}}

#hint-controls{border-top:1px solid #c5d3c1;padding-top:14px;margin-top:12px}#hint-title{font-size:13px;font-weight:600;margin:0 0 10px;color:#405e43}.hint-actions{display:flex;flex-wrap:wrap;gap:7px}#hint-controls button{min-height:40px;padding:9px 12px;border:1px solid #a8bca0;background:#f4f8ed;border-radius:7px;color:#365c36;font:inherit;font-size:12px;line-height:1.5;cursor:pointer;text-align:left;max-width:100%}#hint-controls button:disabled{opacity:.45;cursor:default}#study-review{width:100%;margin-top:6px}#hint-level{font-size:10px;color:#73806b;margin:8px 0}#hint-text{font-size:12px;line-height:1.7;color:#4c6649;overflow-wrap:anywhere;margin:0}#hint-text p{margin:7px 0}.hint-near{fill:#e4b956;fill-opacity:.22;stroke:#967019;stroke-width:2;stroke-dasharray:7 5}.hint-exact{fill:#f4cf66;fill-opacity:.25;stroke:#977019;stroke-width:2;stroke-dasharray:6 4;vector-effect:non-scaling-stroke}.hint-cross{fill:none;stroke:#765413;stroke-width:2;vector-effect:non-scaling-stroke}#review-notice{font-size:12px;line-height:1.7;color:#486345;background:#edf3df;padding:10px;border-radius:7px;grid-column:1/-1}[hidden]{display:none!important}

/* The final piece stays visible for three full seconds before the completion card arrives. */
/* Silhouettes land on the real board, fade into it, then give way to one star. */
#win>.completion-final-star{position:relative;display:block;flex:none;width:180px;height:96px;margin-bottom:8px;line-height:1;transform:none}
#win>.completion-final-star svg{display:block;width:100%;height:100%;fill:currentColor}
#win.star-forming>.completion-final-star{visibility:hidden}
#completion-flight,#completion-space{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;transform-origin:0 0}
#completion-space{visibility:hidden}
#completion-flight{overflow:visible;transform-style:preserve-3d;transform:var(--flight-flat)}
/* Never animate opacity on this preserve-3d root: active opacity animations
   flatten its children even during an opacity:1 plateau (Chromium grouping).
   Fade only the leaf SVGs, after projection, so child Z survives the whole ray. */
#win.star-forming #completion-flight{animation:completion-shared-land 3s ease-in-out both}
#win.star-forming .celebration-flight>svg{animation:completion-leaf-fade 3s ease-in-out both}
/* Static gray recesses share only the common plane; leaf effects cannot flatten arrivals. */
#completion-trays{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;transform-origin:0 0}
#completion-trays>g,.celebration-side{transform-origin:0 0;transform:var(--piece-final);stroke-linejoin:round}
#win.star-forming .celebration-side{animation:completion-piece-seat var(--piece-duration) cubic-bezier(.2,.6,.25,1) var(--piece-delay) both}
@keyframes completion-piece-seat{0%,68%{opacity:1}82%,100%{opacity:0}}
#win.star-forming #completion-trays{animation:completion-trays-fade 3s ease-in-out both}
@keyframes completion-trays-fade{0%,86%{opacity:1}94%,100%{opacity:0}}
#win.star-forming .completion-static #completion-trays{display:none;animation:none}
#win.star-forming .completion-static .celebration-side{display:none}
#completion-map{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;transform-style:preserve-3d}
#win.star-forming{background:transparent;backdrop-filter:none;pointer-events:none}
#win.star-forming>#completion-details{visibility:hidden;pointer-events:none}
.celebration-piece{transform-origin:0 0;transform:var(--piece-final);stroke-linejoin:round}
.celebration-flight,.celebration-flight>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;transform-origin:0 0}
@property --arrival{syntax:"<number>";inherits:false;initial-value:0}
.celebration-flight{transform:var(--piece-ray);opacity:1}
#win.star-forming .celebration-flight{animation:completion-camera-arrive var(--piece-duration) cubic-bezier(.2,.6,.25,1) var(--piece-delay) both}
#completion-details{display:flex;align-items:center;flex-direction:column;max-width:calc(100% - 56px);max-height:calc(100% - 112px);min-height:0;overflow:auto;transform-origin:50% 0}
#win.completion-ready>#completion-details{animation:completion-hang 1.2s ease-in-out both}
@keyframes completion-camera-arrive{0%,5%{--arrival:0;opacity:0}18%{opacity:.85}82%,100%{--arrival:1;opacity:1}}
@keyframes completion-shared-land{0%,60%{transform:var(--flight-near)}94%,100%{transform:var(--flight-flat)}}
@keyframes completion-leaf-fade{0%,94%{opacity:1}100%{opacity:0}}
@keyframes completion-hang{0%{opacity:0;transform:rotate(-7deg)}18%{opacity:1;transform:rotate(5deg)}40%{transform:rotate(-3.5deg)}62%{transform:rotate(2deg)}82%{transform:rotate(-1deg)}100%{opacity:1;transform:rotate(0)}}
@media(max-width:650px){#win>.completion-final-star{width:130px;height:64px}#completion-details{max-width:calc(100% - 32px);max-height:calc(100% - 80px)}#win h2{margin:10px;font-size:23px;letter-spacing:2px}#win p{margin:8px 0;line-height:1.5}#win button{margin-top:10px;padding:10px 20px}#win #review{margin:6px auto}}
@keyframes completion-still-fade{0%,70%{opacity:.3}100%{opacity:0}}
#win.star-forming #completion-flight.completion-static{animation:completion-still-fade 3s ease-in-out both;transform:none}
#win.star-forming .completion-static .celebration-flight{animation:none;transform:none;opacity:1}
#win.star-forming .completion-static .celebration-flight>svg{animation:none}
@media(prefers-reduced-motion:reduce){#win.star-forming .celebration-flight>svg{animation:none}#win.star-forming #completion-flight{animation:completion-still-fade 3s ease-in-out both;transform:none}#win.star-forming .celebration-flight{animation:none;transform:none;opacity:1}#win.completion-ready>#completion-details{animation:none}}

@media(prefers-reduced-motion:reduce){#win.star-forming #completion-trays{display:none;animation:none}.celebration-side{display:none}}

/* Regional entry point stays separate from the ancestor-only breadcrumb menu. */
.level-nav{flex-wrap:wrap;gap:12px}.region-control{display:flex;align-items:center;gap:10px;font-size:14px;margin-right:auto}.region-control select{font:inherit;color:#294638;border:1px solid #a8bda8;background:#f8fbf6;border-radius:8px;padding:9px 30px 9px 12px;max-width:100%;min-height:40px}.region-control span{white-space:nowrap}.region-control select:focus-visible{outline:3px solid #597d54;outline-offset:2px}
@media(max-width:650px){.region-control{width:100%;justify-content:space-between}.region-control select{max-width:72%;min-width:0}.level-nav{align-items:center}}

/* Region chooser: a real, hemisphere-clipped globe and an equal-access list. */
[hidden]{display:none!important}
body.choosing-region .game,body.choosing-region .level-nav,body.choosing-region #vintage,body.choosing-region #breadcrumbs,body.choosing-region #restart,body.choosing-region footer{display:none!important}
#open-globe{margin-right:auto;min-height:42px}
#region-chooser{margin:20px 0 36px;border:1px solid #c3d2c5;border-radius:20px;background:#f5f8f1;overflow:hidden}
.globe-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px 30px 0}.globe-heading h2{font-size:22px;margin:0 0 8px}.globe-heading p{margin:0;color:#687b70;font-size:14px}.globe-heading button{flex-shrink:0}
.globe-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(240px,1fr);gap:28px;align-items:center;padding:0 30px 28px}
.globe-panel{min-width:0;position:relative}#region-globe{width:100%;height:auto;display:block;aspect-ratio:1;touch-action:none;cursor:grab;user-select:none;filter:drop-shadow(0 14px 17px #254b3820)}#region-globe.is-dragging{cursor:grabbing}
#globe-grid{fill:none;stroke:#99b8b0;stroke-width:.65;opacity:.55;pointer-events:none}#globe-land{fill:#dde3ce;stroke:#a6b7a1;stroke-width:.6;pointer-events:none}#globe-borders{fill:none;stroke:#9fb299;stroke-width:.45;pointer-events:none}.globe-country{fill:#b4c99e;stroke:#829d78;stroke-width:.65}.globe-active{fill:#719c81;fill-opacity:.8;stroke:#244f3d;stroke-width:1.8;stroke-linejoin:round;vector-effect:non-scaling-stroke}
#globe-status{text-align:center;color:#355c47;font-size:15px;min-height:24px;margin:0 0 10px}:is(#globe-region-list,#globe-topic-list){display:flex;flex-direction:column;gap:7px;padding:18px 0}:is(#globe-region-list,#globe-topic-list) button{display:flex;gap:12px;align-items:center;width:100%;padding:13px 15px;border:1px solid #ccd8c7;background:#fffdf7;color:#314c3b;border-radius:9px;text-align:left;font:inherit;min-height:49px;cursor:pointer;box-shadow:none}:is(#globe-region-list,#globe-topic-list) button.is-highlighted,:is(#globe-region-list,#globe-topic-list) button:hover{background:#dce9d5;border-color:#64876c}.globe-region-number{font:11px ui-monospace,monospace;color:#87977e}.globe-region-name{flex:1;font-size:15px}#region-chooser button:focus-visible,#region-globe:focus-visible,#open-globe:focus-visible{outline:3px solid #3b7755;outline-offset:3px}#globe-overlap{text-align:center;padding:12px;border:1px solid #9db299;background:#e8efdf;border-radius:12px}#globe-overlap p{margin:0 0 10px;font-size:14px}#globe-overlap-options{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}#globe-overlap-options button{font:inherit;font-size:14px;border:1px solid #8fa688;border-radius:8px;background:#fffdf7;padding:10px 14px;color:#294c38;cursor:pointer}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){.globe-heading{padding:19px 18px 0;align-items:flex-start}.globe-heading h2{font-size:19px}.globe-heading p{font-size:13px}.globe-heading button{font-size:12px;padding:8px;max-width:95px}.globe-layout{grid-template-columns:1fr;gap:0;padding:0 14px 18px}:is(#globe-region-list,#globe-topic-list){display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:10px 0}:is(#globe-region-list,#globe-topic-list) button{padding:11px 9px;gap:7px;min-height:58px}.globe-region-name{font-size:13px}.globe-region-number{font-size:10px}:is(#globe-region-list,#globe-topic-list) button>span:last-child{display:none}#globe-status{font-size:13px}#region-chooser{margin-top:12px}}

.globe-choices{min-width:0;padding-top:18px}.globe-choices h3{font-size:12px;font-weight:600;color:#657960;letter-spacing:.06em;margin:0}#globe-topics{border-top:1px solid #ccd8c7;padding-top:14px;margin-top:3px}#globe-topics summary{font-size:14px;color:#536d50;cursor:pointer;padding:8px 0}#globe-topics summary:focus-visible{outline:3px solid #3b7755;outline-offset:3px}#globe-topics-note{font-size:13px;line-height:1.6;color:#657960;margin:8px 0 0}#globe-topic-list{padding-top:10px}@media(max-width:700px){.globe-choices{padding-top:10px}#globe-topic-list{grid-template-columns:1fr}}

/* Subregions remain subordinate to their geographic overview, never duplicate globe targets. */
body.choosing-region #subregion-chooser{display:none!important}
#subregion-chooser{margin:12px 0 20px;padding:16px 18px;border:1px solid #c8d6c6;border-radius:12px;background:#f0f5ed}
#subregion-title{font-size:14px;font-weight:600;margin:0 0 12px;color:#345842}#subregion-list{display:flex;gap:8px;flex-wrap:wrap}
#subregion-list button{display:flex;align-items:center;gap:12px;border:1px solid #b9cbb6;border-radius:8px;padding:10px 13px;background:#fff;color:#36543e;font-size:14px;min-height:44px;max-width:100%;text-align:left}
#subregion-list button[aria-pressed=true]{background:#315e4e;color:white;border-color:#315e4e}.subregion-count{font-size:12px;opacity:.75;font-variant-numeric:tabular-nums}
#subregion-note,#island-map-note,#globe-island-note{font-size:13px;line-height:1.6;color:#607763;margin:10px 0 0}#globe-island-note{text-align:center;margin:8px 5% 0}
.island-locator,.globe-island-locator{fill:transparent;stroke:#365e75;stroke-width:1.4;stroke-dasharray:2.4 3;vector-effect:non-scaling-stroke}.island-locator[role=button]{cursor:pointer;pointer-events:all}.island-locator[role=button]:focus-visible{outline:none;stroke:#102e47;stroke-width:3}.study-zoom .island-locator{display:none}
@media(max-width:650px){#subregion-chooser{padding:13px}#subregion-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#subregion-list button{justify-content:space-between;font-size:14px;padding:10px}#subregion-note,#island-map-note{font-size:13px}}

.globe-region-group{grid-column:1/-1}.globe-region-group h3{font-size:16px;margin:12px 0 9px;color:#314c3b}.globe-subregions{display:grid;gap:7px}@media(max-width:700px){.globe-subregions{grid-template-columns:1fr 1fr}.globe-region-name{font-size:14px}}

/* The skip action is a sibling of the grab target, not a nested button. */
#piece-card{margin-top:15px;background:#f6f7ef;border:1px dashed #cbd3bb;border-radius:12px;padding-bottom:12px;min-width:0}#piece-card #tray{margin:0;border:0;background:transparent;border-radius:12px 12px 0 0}#skip-piece{display:block;width:calc(100% - 24px);margin:0 12px;min-height:44px;border:1px solid #8da481;border-radius:8px;background:#edf3e5;color:#31553b;padding:10px 12px;font-size:14px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}#skip-piece:hover:not(:disabled){background:#dce9d1}#skip-piece:disabled{opacity:.55;cursor:default}#skip-help{font-size:14px;line-height:1.55;margin:9px 12px 0;color:#66765b;overflow-wrap:anywhere}
@media(max-width:650px){#piece-card{grid-column:1;grid-row:1/5;margin:0;align-self:start}#piece-card #tray{height:130px}#skip-piece{width:calc(100% - 12px);margin:0 6px;padding:8px 5px}#skip-help{margin:8px 7px 0}}

/* A correct placement adds knowledge without covering the board or taking focus. */
#geography-card{margin:16px 0;padding:14px;border:1px solid #c5d5be;border-radius:12px;background:#f2f6eb;color:#294638;max-height:310px;overflow:auto;overflow-wrap:anywhere;font-size:14px;line-height:1.5;min-width:0}#geography-card[hidden]{display:none}.geography-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.geography-heading small{font-size:11px;letter-spacing:.08em;color:#66805c}.geography-heading h3{margin:3px 0 8px;font-size:18px}.geography-heading button{min-width:36px;min-height:36px;font-size:23px;line-height:1;padding:3px}#geography-card dl{margin:0}#geography-card dl>div{padding:5px 0;border-bottom:1px solid #dce5d6}#geography-card dt{font-size:12px;color:#607455}#geography-card dd{margin:0;font-weight:600}#geography-card p{margin:8px 0}.geography-note,#geography-card details{font-size:12px;color:#65765c}#geography-card summary{cursor:pointer;padding:6px 0}#geography-card a{color:#32624a;text-decoration:underline;text-underline-offset:2px}#geography-card a:focus-visible,#geography-card button:focus-visible{outline:3px solid #597d54;outline-offset:2px}@media(max-width:650px){#geography-card{grid-column:1/-1;max-height:250px;margin:8px 0}}

/* Keep the global exit outside map overlays, available during loading and errors. */
body.initializing .game,body.initializing .level-nav,body.initializing #vintage,body.initializing #breadcrumbs,body.initializing footer,body.initializing #subregion-chooser{display:none!important}
body:not(.initializing) #startup-status{display:none}
#open-globe{min-height:44px;min-width:44px;white-space:normal}#globe-resume{min-height:44px}.globe-heading{flex-wrap:wrap}
@media(max-width:650px){.header-actions{flex-wrap:wrap}#open-globe{flex-shrink:0}}
header{position:sticky;top:0;z-index:100;background:#f7f8f3}

/* This globe return is independent of the ancestor menu, including at Level 0. */
#return-globe{display:inline-flex;align-items:center;justify-content:center;flex:0 1 auto;min-height:44px;max-width:100%;padding:10px 15px;border:1px solid #8da58e;border-radius:9px;background:#edf3e7;color:#315e4e;font:inherit;font-size:14px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;cursor:pointer;touch-action:manipulation}
#return-globe:hover{background:#dce9d5;border-color:#64876c}#return-globe:focus-visible{outline:3px solid #3b7755;outline-offset:3px}
@media(max-width:650px){#return-globe{min-width:132px}.level-nav{gap:10px}}

/* Optional map views share the route model; no country-specific UI branches. */
#map-variants{margin:12px 0;padding:12px 16px;background:#edf2e7;border:1px solid #d4deca;border-radius:16px}#map-variants[hidden]{display:none}#map-variants h2{font-size:14px;margin:0 0 8px}#map-variant-options{display:flex;gap:8px;flex-wrap:wrap}#map-variant-options button{font:inherit;font-size:13px;padding:8px 12px;border:1px solid #b8c8ab;border-radius:12px;color:#354b37;background:#fff;cursor:pointer}#map-variant-options button[aria-pressed="true"]{background:#516f4a;color:#fff;border-color:#516f4a}

body.choosing-region #map-variants,body.initializing #map-variants{display:none}

/* Non-modal facts popover: viewport-clamped by geography.js, never part of layout. */
#geography-card{position:fixed;z-index:15;box-sizing:border-box;margin:0;max-width:calc(100vw - 24px);max-height:min(360px,calc(100dvh - 24px));box-shadow:0 12px 34px #203c3430;background:#f8fbf2f7;backdrop-filter:blur(8px);opacity:1;transition:opacity .4s ease;overscroll-behavior:contain}
#geography-card.geography-fading{opacity:0}
#geography-card details{text-align:left}
body.choosing-region #geography-card{display:none}
@media(max-width:650px){#geography-card{margin:0;max-height:min(280px,calc(100dvh - 24px));font-size:13px}}
@media(prefers-reduced-motion:reduce){#geography-card{transition:none}}

#touch-help{display:none}

/* Phone layout: keep the board and pickup close, with normal page scrolling
   outside the gesture surfaces. Do not rotate the interface or lock body scroll. */
@media (max-width:650px), (max-width:950px) and (max-height:500px) and (pointer:coarse){
 header{position:relative;min-height:0;padding:10px max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left));padding-top:max(10px,env(safe-area-inset-top));gap:8px}
 .brand{font-size:17px;gap:8px;min-width:0}.brand-mark{width:30px;height:30px;font-size:22px;flex:none}.brand-en{display:none}
 .header-actions{width:100%;gap:6px;justify-content:space-between;min-width:0}.header-actions>*{min-width:0;max-width:100%}
 .language-control{gap:5px;flex:0 1 auto}.language-control select{min-width:0;max-width:130px;min-height:44px;font-size:14px}
 .quiet{min-height:44px;padding:8px;font-size:12px;overflow-wrap:anywhere}.header-actions .quiet{flex:0 1 auto}
 main{padding:16px max(16px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
 .topline{gap:10px;margin-bottom:12px}.eyebrow{margin-bottom:5px}h1{font-size:24px;line-height:1.35}
 #breadcrumbs{width:100%;min-width:0;gap:4px}.modes button{flex:1 1 auto;min-height:44px;min-width:0;overflow-wrap:anywhere}
 .level-nav{gap:8px;margin:0 0 12px}#vintage{font-size:11px;margin:0 0 12px;line-height:1.6}
 .game{display:flex;flex-direction:column;border-radius:13px;min-width:0}
 .map-wrap{height:clamp(250px,43vh,350px);height:clamp(250px,43svh,350px);min-height:0;max-height:none;flex:none}
 #map{display:block;min-height:0;max-height:none}
 aside{display:block;padding:12px;min-width:0;border-left:0;border-top:1px solid #dce4d8}
 #play-panel{height:auto;display:grid;grid-template-columns:minmax(110px,42%) minmax(0,1fr);grid-template-rows:auto auto 1fr;gap:0 12px;align-items:start}
 #piece-card{grid-column:1;grid-row:1/5;margin:0;align-self:start}#piece-card #tray{height:112px}#preview{height:78px}
 .status{grid-column:2;grid-row:1;gap:6px;flex-wrap:wrap}.status strong{white-space:nowrap}
 .progress{grid-column:2;grid-row:2;width:100%;margin:10px 0}#feedback{grid-column:2;grid-row:3;margin:0;font-size:12px;line-height:1.6}
 #touch-help{display:block;grid-column:2;grid-row:4;font-size:11px;line-height:1.6;color:#607455;margin:8px 0 0;overflow-wrap:anywhere}
 #skip-help{font-size:11px;line-height:1.5}#skip-piece{font-size:12px;min-height:44px}
 #hint-controls{grid-column:1/-1;margin-top:12px;padding-top:12px;min-width:0}#hint-controls button{min-height:44px}
 #study-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,35%);gap:0 10px}
 #start{min-height:48px;overflow-wrap:anywhere;gap:5px}#enter-child,#child-note,#study-selected,#review-notice,#study-list{grid-column:1/-1}
 #study-list{grid-template-columns:repeat(2,minmax(0,1fr));max-height:240px;touch-action:pan-y;overscroll-behavior:auto}#study-list button{min-height:44px;font-size:12px}
 #study-controls{right:8px;bottom:8px;max-width:calc(100% - 16px)}#study-controls button{min-width:44px;min-height:44px;padding:7px}#zoom-reset{max-width:90px}
 #study-back{min-height:44px;max-width:62%;left:12px}#map-variant-options button{min-height:44px;overflow-wrap:anywhere}
 .map-caption{top:12px;left:12px;gap:6px}.map-note{left:12px;right:185px;bottom:10px}
 #win>.completion-final-star{width:100px;height:52px;margin:0}#completion-details{max-width:calc(100% - 24px);max-height:calc(100% - 64px);overscroll-behavior:contain;touch-action:pan-y;padding:0 4px 8px}
 #completion-details>*{flex-shrink:0}#win h2{font-size:21px;margin:8px}#win button,#win #review{min-height:44px}
 #region-chooser{margin:10px 0 20px}.globe-heading{padding:16px 12px 0;gap:10px}.globe-heading>div{min-width:0;width:100%}.globe-heading button{max-width:100%;min-height:44px}
 .globe-layout{grid-template-columns:minmax(0,1fr);padding:0 12px 16px;gap:0}
 /* The SVG alone owns rotation. Side gutters and text remain page-scroll areas. */
 #region-globe{max-width:360px;max-height:52svh;margin:auto;width:100%;height:auto}.globe-region-name{min-width:0;overflow-wrap:anywhere}
 #globe-overlap-options button{min-height:44px;max-width:100%;overflow-wrap:anywhere}
 #globe-topics{max-width:100%;text-align:left}#globe-topics summary,footer summary,#geography-card summary{min-height:44px;display:list-item;padding-top:10px;padding-bottom:10px}
 footer{font-size:11px;line-height:1.7;gap:8px}footer details{width:100%;max-width:100%;text-align:left}footer p{overflow-wrap:anywhere}
 #geography-card{font-size:13px;touch-action:pan-y}#geography-card .geography-heading button{min-width:44px;min-height:44px;flex:none}
}
/* Short phones in landscape use the width for a board + tray, not a forced
   portrait stack. Long help/lists stay reachable through ordinary page scroll. */
@media (orientation:landscape) and (max-width:950px) and (max-height:500px) and (pointer:coarse){
 header{flex-wrap:nowrap}.brand{flex:none}.header-actions{width:auto;flex:1;justify-content:flex-end}.language-control select{max-width:120px}
 .game{display:grid;grid-template-columns:minmax(0,1fr) 200px;align-items:start}
 .map-wrap{height:calc(100vh - 32px);height:calc(100svh - 32px);min-height:240px}
 aside{border-top:0;border-left:1px solid #dce4d8}
 #play-panel,#study-panel{display:block}#piece-card{margin-top:10px}#piece-card #tray{height:100px}.status{display:flex}.progress{margin:10px 0}#feedback{margin-top:10px}
 #study-list{grid-template-columns:1fr}#start{margin:10px 0}#study-controls #zoom-reset{max-width:80px}
 .globe-layout{grid-template-columns:minmax(0,1fr) minmax(200px,1fr);gap:16px;align-items:start}#region-globe{max-height:75svh}.globe-heading>div{width:auto;flex:1}
}
