:root{font:400 16px/1.55 "Be Vietnam Pro",system-ui,sans-serif;color:#24372f;background:#172938;--pine:#215848;--border:#c8c8af;--gold:#ffd596;--paper:#fcf8e9}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}
button,select{font:inherit;font-weight:700;color:inherit;cursor:pointer;border:1px solid var(--border);border-radius:10px;background:#fffdf4;min-height:44px;padding:7px 12px;touch-action:manipulation}
button:hover:enabled,select:hover{border-color:var(--pine)}button:disabled{opacity:.48;cursor:default}button:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #c85b22;outline-offset:-3px}
header{display:flex;align-items:center;gap:11px;padding:8px max(18px,env(safe-area-inset-right)) 8px max(18px,env(safe-area-inset-left));height:55px;color:#fff6dd;background:#172938;border-bottom:1px solid #63766d}
.crest{display:grid;place-items:center;border:1px solid #d4b478;color:var(--gold);border-radius:9px;width:33px;height:33px;font-size:24px}header strong{font-size:17px}header ol{display:flex;margin:0 0 0 auto;padding:0;gap:15px;list-style:none}header li{font-size:13px;color:#b8c8c7}header li::before{content:'○';margin-right:5px}header li.active{color:#ffe1a4;font-weight:700}header li.active::before{content:'●'}header li.passed{color:#abebca}header li.passed::before{content:'✓'}
main{height:calc(100dvh - 55px);display:grid;grid-template-columns:minmax(0,1fr) clamp(315px,31vw,490px)}
#stage{position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 22% 95%,#907564,transparent 56%),linear-gradient(155deg,#182c43 4%,#34495a 63%,#78656d)}
.sky{position:absolute;inset:0;opacity:.55;background-image:radial-gradient(1.2px 1.2px at 20% 17%,#ffefbd 96%,transparent),radial-gradient(1px 1px at 77% 41%,#fff3cc 96%,transparent);background-size:149px 113px,103px 151px}
#world,#labels{position:absolute;inset:0;width:100%;height:100%}#world{touch-action:manipulation}#labels{pointer-events:none}
.pin{position:absolute;transform:translate(-50%,-100%);border-radius:6px;padding:2px 6px;color:#fff4cc;background:#193830e8;border:1px solid #b3c5a5;font-size:clamp(10px,1.1vw,13px);font-weight:700;white-space:nowrap;line-height:1.4}.pin.axis{padding:0 4px;background:#263a34d9;border:0}
.stage-foot{position:absolute;bottom:max(10px,env(safe-area-inset-bottom));left:12px;right:12px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}
.stage-foot span,.stage-foot button{background:#1c303ce8;color:#fff2d2;border:1px solid #779088;border-radius:10px;font-size:12px;padding:6px 10px}.stage-foot button{pointer-events:auto}
#panel{background:linear-gradient(135deg,#fffdf2,var(--paper) 65%,#eee7d2);padding:clamp(18px,2.8vw,43px);overflow:auto;display:flex;align-items:safe center;border-left:3px solid #c4a579}
#panel>div{width:100%;max-width:485px;margin:auto}.eyebrow,legend,.field{font-weight:800;letter-spacing:.075em;text-transform:uppercase;color:#7c441d;font-size:12px}
h1,h2{line-height:1.15;letter-spacing:-.055em;margin:10px 0 15px;font-weight:800}h1{font-size:clamp(44px,5.2vw,82px)}h1 em{color:var(--pine);font-style:normal}h2{font-size:clamp(27px,3vw,44px)}h2:focus{outline:0}
p{margin:6px 0 15px}#goal,.lead{color:#40534a}.guide{display:flex;gap:10px;align-items:center;background:#ecebd7;border-radius:14px;padding:10px 12px;margin:16px 0;font-size:14px}.guide img{width:46px;height:46px;flex:none}.guide p{margin:0}
.primary{display:flex;justify-content:space-between;align-items:center;background:var(--pine);color:white;border:0;box-shadow:0 3px 0 #123e32;width:100%;min-height:48px;font-size:16px}.primary b{color:var(--gold)}
.readout{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:5px 12px;padding:10px 12px;border-block:1px solid #c6cfb8;background:#e5eddb;color:#254a3b;font-size:14px;margin:12px 0}.row{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:7px 0}.row label,.row>span{font-size:14px;font-weight:700}.row select,.row .choice{min-width:115px}#lay,#try{margin:12px 0 8px}.quiet{font-size:13px;background:transparent}
.tools{display:grid;gap:6px}.tools button{text-align:left}.tools span{display:inline-grid;place-items:center;width:24px;color:var(--pine);font-size:18px}#new-sample{margin-top:9px}#fractions button{display:block;width:100%;margin:6px 0}fieldset{padding:0;margin:14px 0;border:0}legend{padding:0;margin-bottom:6px}#hooks{display:flex;gap:6px}#hooks button{flex:1}button[aria-pressed=true]{background:#ffdda2;border-color:#8a602e}.status{margin-bottom:0}.status img{width:35px;height:35px}.status[data-tone=warn]{background:#ffe8cf;color:#65371b}.status[data-tone=good]{background:#d3efdc}
@media(max-width:760px) and (orientation:portrait){header{height:45px;padding:4px 10px;gap:7px}header strong{font-size:14px}header ol{gap:7px}header li{font-size:11px}.crest{width:27px;height:27px;font-size:19px}main{height:auto;min-height:calc(100dvh - 45px);display:flex;flex-direction:column}#stage{height:clamp(240px,42dvh,405px);flex:none}#panel{padding:14px 16px max(18px,env(safe-area-inset-bottom));flex:1;overflow:visible;border:0;border-top:2px solid #c4a579}#panel>div{max-width:530px}.eyebrow,legend,.field{font-size:11px}h1{font-size:40px}h1 br{display:none}h1 em::before{content:' '}h2{font-size:26px;margin:4px 0 7px}p,.lead,#goal{font-size:14px}.guide{margin:10px 0}.stage-foot{bottom:5px}.readout{margin:8px 0;padding:7px 10px}#math .row{display:inline-flex;flex-direction:column;align-items:start;margin:2px 7px 2px 0;gap:2px}.row select,.row .choice{min-width:110px}.tools{grid-template-columns:repeat(3,1fr)}.tools button{font-size:12px;text-align:center;padding:5px}.tools span{display:block;margin:auto}.status p{font-size:13px}}
@media(max-height:520px) and (orientation:landscape){header{height:36px;padding-block:2px}.crest{width:26px;height:26px}main{height:calc(100dvh - 36px);grid-template-columns:minmax(0,1fr) minmax(248px,35%)}#panel{padding:10px 13px}h1{font-size:32px}h2{font-size:23px;margin:4px 0}.lead,#goal,.guide,.readout{font-size:12px}.guide,.readout{margin:6px 0}.stage-foot{bottom:4px}}
