:root{font-family:ui-rounded,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#fff5dc;background:#2b2560;font-synthesis:none;--mint:#5ed6b0;--gold:#ffc93c;--line:#ffffff25}*{box-sizing:border-box}body{margin:0;overflow:hidden;overscroll-behavior:none}button,select,input{font:inherit}button{min-width:44px;min-height:44px;border:1px solid #ffffff30;border-radius:13px;background:#4b4184;color:#fff5dc;font-weight:750;cursor:pointer;touch-action:manipulation;padding:7px 10px;line-height:1.1}button:hover{background:#6556a6}button:active{transform:scale(.96)}button:focus-visible,canvas:focus-visible{outline:3px solid var(--gold);outline-offset:2px}button:disabled{opacity:.38;cursor:default}button.selected,button[aria-pressed=true]{background:#5ed6b0;color:#25204f;border-color:#aff8df;box-shadow:0 0 0 2px #5ed6b030}.primary{background:#ffc93c;color:#30244a;border-color:#ffdc7d;box-shadow:0 4px 0 #bc8734}.primary:hover{background:#ffdb78}.symbols{position:absolute;width:0;height:0}#app{height:100vh;height:100dvh;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);display:flex;flex-direction:column;overflow:hidden}header{height:58px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:5px 12px;background:#292257;border-bottom:1px solid var(--line);z-index:2}.brand{display:flex;align-items:center;gap:8px;line-height:1;font-weight:900;font-size:21px;letter-spacing:-.7px}.brand svg{width:38px;height:44px}.brand small{display:block;font-size:7px;letter-spacing:1.3px;color:#bcb3e6;margin-top:5px}.headActions{display:flex;gap:5px}.headActions button{background:#ffffff0d}.headActions #helpBtn{font-size:21px}#play{flex:1;min-height:0;display:flex;flex-direction:column}#world{position:relative;min-height:0;flex:1;overflow:hidden;background:radial-gradient(ellipse at 48% 44%,#625a97 0,#443b76 46%,#2b2560 100%)}#scene{width:100%;height:100%;display:block;touch-action:none;user-select:none;-webkit-user-select:none}.forest{position:absolute;inset:0;pointer-events:none;filter:blur(5px);opacity:.23;overflow:hidden}.forest:after{content:"";position:absolute;bottom:-28%;left:-10%;width:130%;height:55%;border-radius:50%;background:#5ed6b0}.forest i{position:absolute;width:13%;height:49%;background:#151a45;border-radius:45% 45% 15% 15%;bottom:15%;left:5%;transform:rotate(-5deg)}.forest i:nth-child(2){left:21%;height:70%;bottom:7%}.forest i:nth-child(3){left:40%;bottom:25%;height:27%}.forest i:nth-child(4){left:70%;height:65%}.forest i:nth-child(5){left:91%;height:86%}.forest i:nth-child(6){left:58%;height:39%;bottom:0}#goal{position:absolute;top:10px;left:58px;right:12px;pointer-events:none;display:flex;flex-direction:column;gap:3px;max-width:600px;text-shadow:0 1px 4px #211a53}#levelTag{color:#a6eddb;font-size:10px;letter-spacing:1.6px;font-weight:900}#goal strong{font-size:clamp(15px,2.1vw,22px);line-height:1.2}#goal small{color:#e1daf6;font-size:11px;line-height:1.35}#notice{position:absolute;top:86px;left:58px;right:12px;background:#21184d8c;backdrop-filter:blur(5px);pointer-events:none;border:1px solid #ffffff30;border-radius:12px;padding:10px 13px;font-size:13px;font-weight:650;z-index:4;opacity:0;transition:opacity .18s}#notice.visible{opacity:1}#stats{position:absolute;bottom:62px;left:58px;right:10px;display:flex;flex-wrap:wrap;gap:4px;pointer-events:none}#stats span{background:#241e537d;border:1px solid #ffffff15;border-radius:8px;padding:4px 6px;font-size:10px;color:#d7d1ed}#stats b{color:#fff4ce;font-size:12px;margin-left:4px}.camera{position:absolute;bottom:10px;left:58px;display:flex;gap:5px}.camera button{background:#2a245cbb;font-size:22px;width:44px;padding:0}#layerBadge{position:absolute;bottom:18px;right:14px;font-size:9px;letter-spacing:1.2px;color:#d3c8f4}#layerBadge b{font-size:20px;color:var(--gold)}#controls{background:#2e275f;border-top:1px solid var(--line);padding:7px 10px 9px;display:grid;grid-template-columns:1fr;gap:6px;flex:none;z-index:3}.layerControls{display:flex;align-items:center;gap:5px}.layerControls button{padding:2px;font-size:22px}.layerControls span{font-size:12px;font-weight:800;width:58px;text-align:center}.layerControls #sliceBtn{margin-left:auto;display:flex;align-items:center;gap:5px;font-size:21px;padding:4px 10px}.layerControls small{font-size:10px}.tools{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.tools button{display:flex;gap:6px;align-items:center;justify-content:center;height:44px;padding:3px}.tools b{font-size:21px;font-weight:600}.tools small{font-size:11px}#palette{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}#palette button{min-width:0;min-height:44px;padding:3px 1px;font-size:9px;display:flex;flex-direction:column;align-items:center;gap:3px;background:#ffffff08}#palette button.selected{background:#62549e;color:#fff;box-shadow:inset 0 0 0 2px #ffc93c;border-color:#ffc93c}.swatch{width:22px;height:17px;border-radius:4px;background:var(--c);box-shadow:inset -5px -4px 0 #0003,inset 2px 2px 0 #fff5;display:block}#materialInfo{font-size:10px;color:#c9bee8;line-height:1.2;min-height:12px}.history{display:flex;gap:5px}.history button{display:flex;align-items:center;justify-content:center;gap:4px;padding:4px 8px}.history small{font-size:10px}.history #testBtn{margin-left:auto;min-width:100px}#measureInfo{position:absolute;top:80px;left:58px;right:12px;background:#393365d9;border:1px solid #ffc93c;border-radius:10px;padding:8px;font-size:11px;pointer-events:none}#targetPanel{position:absolute;right:10px;top:83px;width:124px;border-radius:14px;border:1px solid #ffffff35;background:#2d275fa8;pointer-events:none;overflow:hidden;text-align:center}#targetPanel b{display:block;font-size:9px;letter-spacing:1px;margin-top:7px;color:#ffc93c}#target{width:120px;height:95px;display:block}#views{display:flex;justify-content:center;gap:6px;padding:5px;font-size:8px}#views svg{width:40px;height:40px;display:block}.overlay{position:absolute;inset:0;background:#110b2e73;display:flex;align-items:center;justify-content:center;z-index:10;padding:10px 12px 10px 58px;backdrop-filter:blur(3px)}[hidden]{display:none!important}.panel{width:min(660px,100%);max-height:100%;border:1px solid #a99adb66;border-radius:26px;background:linear-gradient(145deg,#51428a,#30265f);box-shadow:0 20px 80px #100d424d;padding:22px;text-align:center;overflow:hidden}.panel h1,.panel h2{margin:0;font-weight:900;letter-spacing:-1px}.panel h1{font-size:clamp(29px,7vw,48px);color:#fff1ce}.panel h2{font-size:25px}.panel p{margin:9px 0;color:#e0d8f4;font-size:13px;line-height:1.45}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:900;color:#8fe6ca}.heroOwl{height:130px;width:130px;filter:drop-shadow(0 10px 12px #1d163c55);animation:bob 3s ease-in-out infinite}.startIntro{display:flex;align-items:center;flex-direction:column}.teach{max-width:400px;margin:8px auto!important}.ageChoices{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:15px 0 10px}.ageChoices button{min-height:64px;font-size:21px;background:#65549d}.ageChoices small{display:block;font-size:9px;margin-top:5px;color:#e6ddff}.row{display:flex;gap:7px;justify-content:center;margin-top:9px}.row button{flex:1;max-width:280px}.deviceTip{font-size:11px!important;color:#bdb2dd!important}.mapGrid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:15px 0}.levelTile{min-height:74px;padding:7px 3px;font-size:20px;position:relative}.levelTile small{display:block;font-size:9px;line-height:1.2;margin-top:5px}.levelTile .stars{display:block;color:#ffc93c;font-size:11px;margin-top:5px;letter-spacing:2px}.mapTitle{color:#b6a7e0;font-size:11px}.ruleList{text-align:left;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.ruleList p{margin:0;background:#ffffff08;padding:9px;border-radius:10px;font-size:11px}.ruleList b{color:#ffd96a}.keyline{font-size:11px!important;color:#c3b7e4!important}.resultOwl{width:90px;height:95px}.bigStars{font-size:36px;letter-spacing:7px;color:#ffc93c;margin:8px}.settings{display:grid;gap:8px;margin-top:12px}.settings button{min-height:44px}.slots{display:grid;gap:7px;margin:12px 0}.slots>div{display:flex;align-items:center;gap:5px;background:#ffffff0a;border-radius:12px;padding:5px}.slots span{flex:1;text-align:left;font-size:12px}.slots button{font-size:11px}.slotPreview{width:40px;height:32px;background:linear-gradient(30deg,#554d8a,#8070a8);border-radius:6px;font-weight:900;display:grid;place-items:center;color:#ffc93c}@keyframes bob{50%{transform:translateY(-7px) rotate(3deg)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}.reduced *{animation:none!important;transition:none!important}
@media(min-width:700px) and (min-height:521px){#play{flex-direction:row}#controls{width:190px;border-left:1px solid var(--line);border-top:0;padding:12px;display:flex;flex-direction:column;gap:14px}.layerControls{flex-wrap:wrap}.layerControls #sliceBtn{width:100%;justify-content:center}.tools{grid-template-columns:1fr 1fr}.tools button{height:58px;flex-direction:column;gap:2px}#palette{grid-template-columns:repeat(2,1fr);gap:7px}#palette button{height:52px;font-size:10px}#materialInfo{font-size:11px;min-height:40px}.history{margin-top:auto;flex-wrap:wrap}.history button{flex:1}.history #testBtn{width:100%;flex:auto;height:48px}#goal{top:20px;left:64px}#stats{bottom:74px;left:64px}#stats span{padding:7px 9px;font-size:12px}#targetPanel{width:165px;top:112px}#target{width:160px;height:125px}.camera{left:64px;bottom:18px}#notice{top:98px;left:64px;right:25px}}
@media(max-width:360px) and (orientation:portrait){header{height:52px;padding:4px 8px}.brand{font-size:18px}.brand small{font-size:6px;letter-spacing:1px}.brand svg{width:29px}.headActions{gap:3px}.headActions button{padding:4px}#controls{gap:4px;padding:5px 7px}.tools small{font-size:10px}.tools button{gap:3px}.panel{padding:13px;border-radius:19px}.heroOwl{height:95px;width:95px}.panel p{font-size:11px}.ageChoices{margin:10px 0 7px}.ageChoices button{min-height:58px}.panel h2{font-size:21px}.levelTile{min-height:67px}.mapGrid{gap:5px;margin:10px 0}#goal{left:55px;top:8px}#goal small{font-size:10px}#targetPanel{width:94px;top:93px}#target{width:90px;height:70px}#stats{bottom:58px;gap:3px}#stats span{font-size:9px;padding:3px 4px}}
@media(orientation:landscape) and (max-height:520px){header{height:40px;padding:0 9px}.brand{font-size:19px}.brand svg{height:34px;width:32px}.brand small{display:none}.headActions button{height:36px;min-height:36px;width:44px;padding:2px}#play{flex-direction:row}#controls{width:176px;padding:5px 6px;display:grid;grid-template-columns:1fr;gap:4px;align-content:start;border-left:1px solid var(--line);border-top:0}.layerControls{gap:3px}.layerControls span{font-size:10px;width:34px}.layerControls #sliceBtn{width:44px;margin-left:0;padding:0;justify-content:center}.layerControls small{display:none}.tools{grid-template-columns:repeat(4,1fr);gap:2px}.tools button{min-width:0;min-height:44px;flex-direction:column;gap:0}.tools b{font-size:18px}.tools small{font-size:8px}#palette{grid-template-columns:repeat(3,1fr);gap:3px}#palette button{height:44px;font-size:8px}.swatch{height:16px;width:21px}#materialInfo{font-size:9px;min-height:22px}.history{display:grid;grid-template-columns:1fr 1fr 1fr;gap:3px}.history button{min-width:0;padding:2px;min-height:44px}.history small{display:none}.history #testBtn{min-width:0;font-size:12px;margin:0}.history #saveBtn{grid-column:3;grid-row:1}.history:has(#saveBtn:not([hidden])) #testBtn{grid-column:1/4;min-height:44px}#goal{top:7px;left:58px;right:8px}#goal strong{font-size:15px}#goal small{font-size:10px}#levelTag{font-size:8px}#notice{top:68px;font-size:11px;padding:7px}#stats{bottom:57px}#stats span{font-size:9px}#stats b{font-size:11px}.camera{bottom:6px}.camera button{min-height:44px}#layerBadge{bottom:17px;font-size:8px}#targetPanel{width:100px;top:70px}#target{width:96px;height:76px}#measureInfo{top:68px;font-size:10px}.overlay{padding:7px 12px 7px 58px}.panel{padding:12px 17px;border-radius:20px;max-width:680px}.startLayout{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:center}.heroOwl{height:88px;width:88px}.panel h1{font-size:35px}.panel h2{font-size:23px}.panel p{font-size:11px;margin:6px 0}.teach{font-size:11px!important}.eyebrow{font-size:8px}.ageChoices{margin:7px 0}.ageChoices button{min-height:54px;font-size:19px}.ageChoices small{font-size:8px}.row{margin-top:7px}.row button{min-height:44px;font-size:12px}.deviceTip{font-size:10px!important}.mapGrid{margin:9px 0;gap:6px}.levelTile{min-height:64px;font-size:18px;padding:4px}.levelTile small{font-size:9px;margin-top:3px}.levelTile .stars{margin-top:2px}.ruleList{margin:8px 0;gap:6px}.ruleList p{font-size:10px;padding:6px}.keyline{font-size:10px!important}.resultLayout{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:15px}.resultOwl{height:80px}.bigStars{font-size:31px;margin:3px}.settings{grid-template-columns:1fr 1fr;gap:6px;margin:8px 0}.slots{margin:7px 0;gap:5px}.slots>div{padding:3px}.slotPreview{height:25px}.panel .row{flex-wrap:nowrap}}
/* Keep the site's Back and fullscreen tabs clear, including very small phones. */
@media(orientation:portrait) and (max-height:650px){#controls{padding-left:58px}.tools button{flex-direction:column;gap:0}.tools small{font-size:8px}#palette button{font-size:8px}.history button{padding:4px;min-width:44px}.history #testBtn{min-width:80px}.history small{display:none}.layerControls span{width:49px}#materialInfo{font-size:9px}#sliceBtn{min-width:44px!important;padding:2px!important}.layerControls #sliceBtn small{display:none}}
@media(orientation:portrait) and (max-width:520px){.ruleList{grid-template-columns:1fr;gap:5px;margin:9px 0}.ruleList p{padding:7px 9px;font-size:11px;line-height:1.35}.helpTabs{gap:4px}.helpTabs button{font-size:11px;padding:5px}.keyRules{grid-template-columns:1fr 1fr}.keyRules p{font-size:10px}.strengthRules p{font-size:10px}}
@media(orientation:landscape) and (max-height:520px){header{height:44px}.headActions button{height:44px;min-height:44px}.layerControls{gap:2px}.layerControls span{width:28px}.layerControls button{width:44px;min-width:44px}.tools{gap:2px}.tools button{min-width:0;width:auto}.helpTabs{max-width:400px;margin:7px auto}.helpTabs button{font-size:11px}.ruleList p{font-size:11px}.keyRules p{font-size:10px;line-height:1.35}}
@media(orientation:landscape) and (max-height:520px){#controls{width:194px;flex-shrink:0}.tools button{min-width:44px}.layerControls{justify-content:space-between}.layerControls span{width:28px}}
@media(orientation:portrait) and (max-height:650px){#controls{padding-left:7px}.layerControls{margin-left:51px}#palette button{min-width:44px}}
@media(orientation:landscape) and (max-height:520px){.strengthRules,.keyRules{grid-template-columns:repeat(4,1fr);gap:5px}.strengthRules p,.keyRules p{font-size:10px;padding:6px;line-height:1.35}}
#app{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
@media(orientation:portrait) and (max-height:650px){#notice{top:66px;padding:7px 10px;font-size:12px}}
/* v2: fit every orthographic target in its own column. */
#views{display:grid;grid-template-columns:repeat(var(--view-count,2),minmax(0,1fr));gap:2px;padding:4px}
#views .viewFigure{min-width:0;color:var(--view-color);font-weight:800}
#views .viewFigure span{display:block;font-size:8px;line-height:12px}
#views svg{width:100%;max-width:40px;height:auto;aspect-ratio:1;display:block;margin:auto}
#views .top svg{border-bottom:2px solid #5ed6b0}
#viewEdges{position:absolute;inset:0;pointer-events:none}
#viewEdges span{position:absolute;transform:translate(-50%,-50%);border-radius:5px;background:#2b2560dc;padding:2px 4px;font-size:9px;font-weight:900;letter-spacing:.4px;white-space:nowrap}
#frontEdge{color:#5ed6b0;border:1px solid #5ed6b0}
#sideEdge{color:#ff7a6b;border:1px solid #ff7a6b}
#stats .compactOnly{display:none}
@media(max-width:360px){
 #controls>#stats{position:static;flex-wrap:nowrap;margin-left:51px;gap:3px;min-height:20px;align-items:center;white-space:nowrap}
 #controls>#stats span{padding:3px 4px;font-size:9px}
 #controls>#stats b{font-size:11px}
 #stats span:not(.baseStat):not(.goalStat){display:none}
 #stats .compactOnly.goalStat{display:block}
 #controls>#measureInfo{position:static;padding:5px 7px;font-size:10px;line-height:1.2;white-space:nowrap}
 .resultOwl{display:block;margin:0 auto 4px}
 .resultLayout .eyebrow{display:block;text-align:center}
}
@media(orientation:landscape) and (max-height:520px){
 #controls{width:172px;padding:4px;gap:3px}
 .layerControls{gap:1px;justify-content:space-between}
 .tools{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}
 .tools button{height:44px;min-width:44px;flex-direction:row;gap:5px}
 #materialInfo{min-height:22px}
}
@media(orientation:landscape) and (max-height:520px){header{border-bottom:0;box-shadow:inset 0 -1px 0 #ffffff25}}
