@font-face{font-family:Baloo;src:url('assets/baloo.woff2') format('woff2');font-weight:400 800;font-display:swap}
@font-face{font-family:Nunito;src:url('assets/nunito.woff2') format('woff2');font-weight:200 1000;font-display:swap}
:root{--paper:#eee6d2;--ink:#234a40;--muted:#576c5d;--panel:#fff6df;--accent:#ae522b;--line:#c6ae7d;--scene:url('assets/garden.webp');--metal:#d7b773;--unit:#244b3f;font-family:Nunito,sans-serif}
body{background:radial-gradient(ellipse at 15% 0,#e2bc7650,transparent 60%),repeating-linear-gradient(20deg,#76562704 0 1px,transparent 1px 5px),#eee6d2}
body[data-theme=tidal]{--scene:url('assets/tidal.webp');--ink:#234959;--muted:#50646a;--metal:#d1b982;--unit:#224e5a;background:radial-gradient(ellipse at 70% 0,#b5dad96b,transparent 65%),#e8e7d8}
body[data-theme=star]{--scene:url('assets/star.webp');--ink:#323e5d;--muted:#586077;--metal:#d5ac6d;--unit:#2b3c59;background:radial-gradient(ellipse at 55% 0,#dbbfaa65,transparent 65%),#e9e2d5}
button{font:800 13px Nunito,sans-serif;border-color:#c7ad7d;background:linear-gradient(#fff9e9,#e9d8ad);box-shadow:inset 0 1px #fff9,0 2px 0 #8c704944,0 3px 7px #33250c12;border-radius:12px;transition:filter .15s,box-shadow .15s}
button:hover:enabled{filter:brightness(1.05);box-shadow:inset 0 1px #fff9,0 2px 0 #8c704955,0 4px 10px #33250c25}
button.primary{color:#fff3ce;background:linear-gradient(#43896e,#1c5444);border:1px solid #27654f;box-shadow:inset 0 1px #9ce3af90,0 4px 0 #193a31,0 7px 15px #112d2433;font-size:16px;padding:12px 24px}
button.quiet{box-shadow:none}
h1,h2,.brand strong,.chapter-heading h3,.level-button strong,.moves strong{font-family:Baloo,Nunito,sans-serif;font-weight:700;letter-spacing:-.6px}
h1{line-height:1.03}h2{line-height:1.1}header{padding-block:14px}.brand{box-shadow:none}.brand:hover:enabled{box-shadow:none}
.brand>span{color:#ffe4a2;background:linear-gradient(135deg,#316d59,#152f29);border:2px solid #ba9253;font:700 23px Baloo;border-radius:13px 13px 22px 22px;box-shadow:inset 0 0 0 2px #193c31,0 3px 0 #b7a077}
.brand strong{font-size:24px;line-height:.83}.brand strong br{line-height:1.1}
header nav button{background:linear-gradient(#fff8e5,#e9dfc8)}
header nav button[aria-pressed=true]{color:#fff4d7;background:linear-gradient(#3c7764,#234e43);border-color:#326c55}
main{padding-top:12px}.eyebrow{letter-spacing:1.45px}
.hero{position:relative;isolation:isolate;display:block;min-height:484px;padding:54px 44px;border:2px solid #b9955d;border-radius:28px;overflow:hidden;box-shadow:inset 0 0 0 5px #fff0bd33,0 8px 0 #b6a07855,0 24px 40px #4a391a25;color:#fff1d0}
.hero::after{content:'';position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,#142e2be8,#173a3299 48%,transparent 79%)}
.hero-art{position:absolute;z-index:-2;width:100%;height:100%;object-fit:cover;object-position:center 42%;inset:0}
.hero-copy{max-width:530px}.hero h1{font-size:clamp(45px,5.2vw,68px);text-shadow:0 3px 0 #15362b,0 5px 20px #071c22;margin-bottom:20px;letter-spacing:-1.8px}
.hero .eyebrow{color:#f3cb87;margin-bottom:16px}.hero p:not(.eyebrow){font-size:16px;color:#f6ecd5;line-height:1.6;margin-bottom:23px}
.hero-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.hero-actions button{margin:0 4px 12px 0}.hero button.primary{background:linear-gradient(#ffde91,#e6b45f);border-color:#ffdca4;color:#443522;box-shadow:inset 0 1px #fff8de,0 4px 0 #835827,0 6px 24px #ffd66b26}
.hero button.quiet{color:#fff4d8;background:#193b2e99;border:1px solid #e1c8954d;text-decoration:none}
.hero p.edition{font-size:10px;letter-spacing:1px;text-transform:uppercase;margin:12px 0 0;color:#e5ce99;font-weight:900}.edition span{padding-inline:8px}
.hero-seal{position:absolute;right:35px;bottom:26px;border:1px solid #e4c57e;border-radius:60px 60px 22px 22px;width:112px;height:138px;display:grid;place-content:center;gap:5px;text-align:center;background:linear-gradient(#254c41e6,#102f27ed);box-shadow:inset 0 0 0 5px #dab87933,0 5px 20px #11231b55;color:#f6d389}
.hero-seal span{font:700 42px/1 Baloo}.hero-seal small{font-size:8px;letter-spacing:1.5px;font-weight:900;line-height:1.5}
.section-title{margin:40px 0 22px}.section-title h2{font-size:32px}.section-title>p{background:#fff5db;padding:10px 15px;border:1px solid #c5ad7d;border-radius:25px;box-shadow:inset 0 2px #fff}
.chapter{border:2px solid #c3a874;background:linear-gradient(120deg,#fff3d5,#e9d9b4);border-radius:22px;margin-bottom:26px;box-shadow:0 5px 0 #c7b18c55,0 15px 30px #6f552b14}
.chapter-heading,.chapter:nth-child(2) .chapter-heading,.chapter:nth-child(3) .chapter-heading{min-height:220px;padding:28px;align-items:end;color:#fff3d7;text-shadow:0 2px 5px #061919;position:relative;border-bottom:3px solid #b69b63;background:linear-gradient(0deg,#15372ff2,transparent 85%),url('assets/garden.webp') center 44%/cover}
.chapter:nth-child(2) .chapter-heading{background-image:linear-gradient(0deg,#143d4af2,transparent 85%),url('assets/tidal.webp')}
.chapter:nth-child(3) .chapter-heading{background-image:linear-gradient(0deg,#1c2944f2,transparent 85%),url('assets/star.webp');background-position:center 34%}
.chapter-heading h3{font-size:36px;line-height:1.1;margin:5px 0}.chapter-heading .eyebrow{color:#f3cd8e}.chapter-heading p{max-width:590px;font-size:13px}.chapter-heading>strong{padding:8px 12px;border:1px solid #e7c88466;border-radius:22px;background:#172e37a1;font-size:10px}
.level-list{gap:10px;padding:18px}.level-button{border-radius:13px;background:linear-gradient(#fff9e7,#ebd9a9);border:1px solid #b79b63;position:relative;padding:12px;min-height:100px}
.level-button strong{font-size:30px;line-height:1;color:#346450}.level-button span{font-weight:800;font-size:11px}.level-button span:last-child{font-size:9px;color:#6e6b51}.level-button:disabled{background:linear-gradient(#e5dbc3,#d6c8a7);color:#746b57;border:1px solid #bcaf90;box-shadow:inset 0 1px #ffffff40}.level-button:disabled strong{color:#8f8267}.level-button:disabled span:last-child{color:#75694e}
.level-button[data-complete=true]{background:linear-gradient(#e0ecd0,#bcceb1);border-color:#8aab80}.level-button[data-current=true]{box-shadow:inset 0 0 0 2px #f9e4a2,0 0 0 2px #397760,0 4px 8px #224b3b30}
.play-title h1{font-size:32px;line-height:1.05}.play-title .eyebrow{color:var(--muted)}
#cabinet{border:2px solid #b0935e;border-radius:25px;background:linear-gradient(#142e2999,#132c2be8),var(--scene) center/cover;padding:20px;box-shadow:inset 0 0 0 4px #a9906245,inset 0 0 0 7px #172c2ac9,0 8px 0 #705639,0 12px 0 #a99268,0 25px 40px #3f311f33}
#cabinet::before,#cabinet::after{content:'';position:absolute;pointer-events:none;width:8px;height:8px;border-radius:50%;background:radial-gradient(circle at 35% 25%,#ffe8ac,#9e7538 65%,#523e25);box-shadow:0 1px 2px #0008;top:9px;left:10px}#cabinet::after{left:auto;right:10px}
.cabinet-top{background:var(--scene) center 37%/cover!important;border:1px solid #d8bb7966;border-radius:12px;box-shadow:inset 0 -35px 35px #091b1b8c;min-height:79px;align-items:end;margin-bottom:14px;padding:10px}
.cabinet-top>span{background:linear-gradient(#ffedbde8,#cfb17bdd);color:#374231;border:1px solid #fff4c299;box-shadow:0 2px 0 #51402c77;text-shadow:0 1px #fffa;letter-spacing:.75px;font-size:9px;border-radius:5px}
.cabinet-body{gap:20px}.board-side{filter:drop-shadow(0 9px 8px #051a2070)}
canvas{border-radius:19px}#board-wrap{filter:drop-shadow(0 3px 0 #09191f)}
#grid button{box-shadow:none!important;background:transparent!important;transition:none}
#grid button:focus-visible{outline:4px solid #fffbd4;outline-offset:-5px;box-shadow:inset 0 0 0 7px #956129!important}
#feedback{color:#fff0c6;text-shadow:0 2px #102724;font-size:12px}
aside{border:1px solid #d1b173;border-radius:18px;padding:17px;background:linear-gradient(130deg,#fff5dcf5,#e8d5aaf5);color:var(--ink);gap:13px;box-shadow:inset 0 0 0 4px #fff5dc55,0 5px 0 #6a563880,0 8px 25px #122a2980}
.moves{border-bottom:1px solid #bba07066;padding-bottom:13px;gap:14px}.moves strong{color:#fff0bb;background:linear-gradient(145deg,#36735d,#143f35);text-shadow:0 2px #113b2e;min-width:75px;height:75px;display:grid;place-items:center;font-size:47px;border-radius:50%;border:3px solid #caa65b;box-shadow:inset 0 0 0 3px #173f33,inset 0 0 15px #071e2977,0 3px 0 #ad955c55;line-height:1}.moves span{font-size:10px;color:#52604e}
.goal-title{font-size:24px;line-height:1.08;letter-spacing:-.5px}.goal{grid-template-columns:30px 1fr auto;gap:5px 7px;font-size:12px;background:#fff8e3;padding:9px;border:1px solid #bfa9796b;border-radius:11px;box-shadow:0 2px 0 #bca07430}
.goal .symbol{font:700 26px/1 Nunito;color:#85602d;text-align:center;text-shadow:0 1px #fff5ce}.goal strong{color:var(--ink);font-size:13px}.goal.done{opacity:1;background:#e6ecd0}.goal.done strong{color:#33603b}
.goal progress{grid-column:1/-1;appearance:none;border:0;height:5px;width:100%;border-radius:5px;overflow:hidden;background:#d3c4a0}.goal progress::-webkit-progress-bar{background:#d3c4a0}.goal progress::-webkit-progress-value{background:linear-gradient(90deg,#55855e,#91b067);border-radius:5px}.goal progress::-moz-progress-bar{background:#668f63}
#tools{gap:8px}#tools button{color:#fff2ce;background:linear-gradient(#447660,#234d3f);border:1px solid #62886b;box-shadow:inset 0 1px #a0b98b88,0 3px 0 #17382e;font-size:12px;display:flex;justify-content:center;align-items:center;gap:6px;min-height:47px;padding:8px 5px}
#tools button::before{font-size:15px;font-weight:900;color:#f7d993}#pause::before{content:'\2161'}#retry::before{content:'\21bb'}#undo::before{content:'\21b6'}#how::before{content:'?';font-size:13px!important;border:1px solid #dac594;width:17px;height:17px;border-radius:50%;line-height:15px}
#tools button:disabled{opacity:.52}.score-line{color:#58634f;gap:6px;font-weight:800;font-size:9px;flex-wrap:wrap}#lesson{color:#59614c;border-top:1px solid #b79b6766;font-size:11px;line-height:1.55;padding-top:10px}
.cabinet-foot{color:#ecdaaf;text-shadow:0 1px #132e29;font-size:10px}.cabinet-foot span{border-bottom:1px solid #bfa16f55;padding-bottom:4px}
dialog{border:2px solid #b6995f;background:radial-gradient(ellipse at top right,#fff9e7,#e9d9b7);box-shadow:inset 0 0 0 4px #fff2d866,0 20px 90px #0a2522a1;border-radius:22px}dialog h2{font-size:34px;line-height:1.04}#dialog-text{font-size:14px;color:#445c50}dialog::backdrop{background:#102d30b8;backdrop-filter:blur(8px)}.dialog-top .eyebrow{color:#805d31}
@media(min-width:1050px){.cabinet-body{grid-template-columns:minmax(0,1fr) 260px}#cabinet{padding:20px;aspect-ratio:4/3}.cabinet-top{min-height:82px}.cabinet-foot{padding-top:18px}}
@media(max-width:1049px) and (min-width:721px){aside{padding:12px;gap:11px}.cabinet-body{gap:16px}.moves strong{width:65px;min-width:65px;height:65px;font-size:40px}.goal{padding:7px}.goal-title{font-size:22px}}
@media(max-width:720px){
 header{padding:10px 14px}.brand strong{font-size:22px}.brand{min-width:80px}header nav button{font-size:11px;padding:8px}
 main{padding:10px 14px 24px}.hero{padding:28px 22px 34px;min-height:480px;border-radius:22px}.hero>div:first-child{padding:0}.hero h1{font-size:46px;letter-spacing:-1.4px}.hero-art{object-position:67% center}.hero::after{background:linear-gradient(90deg,#14382ce8,#173a3299 73%,#173a3222)}.hero p:not(.eyebrow){font-size:14px}.hero .eyebrow{font-size:9px;letter-spacing:1.1px}.hero-copy{max-width:340px}.hero-seal{right:15px;bottom:15px;width:62px;height:82px;border-radius:30px 30px 12px 12px}.hero-seal span{font-size:26px}.hero-seal small{font-size:5px;letter-spacing:.7px}.hero-actions{max-width:225px;gap:4px}.hero p.edition{font-size:8px;max-width:200px;line-height:1.8}
 .section-title{margin:32px 0 20px;gap:8px}.section-title h2{font-size:27px}.section-title .eyebrow{font-size:8px}.section-title>p{font-size:10px;padding:8px 10px}
 .chapter-heading,.chapter:nth-child(2) .chapter-heading,.chapter:nth-child(3) .chapter-heading{min-height:225px;padding:18px;display:block;background-position:62% center}.chapter-heading h3{font-size:29px;margin-top:8px}.chapter-heading p{font-size:12px}.chapter-heading .eyebrow{font-size:8px;margin-top:34px}.chapter-heading>strong{display:inline-block;margin-top:12px;font-size:9px}.level-list{padding:12px;gap:9px}.level-button{min-height:94px}
 .play-title h1{font-size:26px}.play-title{margin-bottom:10px}.play-title .eyebrow{font-size:8px}
 #cabinet{padding:9px 0 13px;border-radius:18px}.cabinet-top{min-height:61px;margin:0 9px 8px;padding:6px}.cabinet-top>span{font-size:7px;padding:4px;letter-spacing:.6px}.cabinet-body{gap:8px}
 aside{border:0;border-radius:0;padding:0;background:transparent;box-shadow:none}.moves{border:0;padding:0;gap:8px}.moves strong{min-width:0;width:auto;height:auto;font:700 32px/1 Baloo;background:none;border:0;box-shadow:none;color:#ffe3a5}.moves span{color:#efdfb9;font-size:9px}
 #goals{padding-inline:8px;gap:6px}.goal{display:grid;grid-template-columns:auto auto auto;padding:5px 8px;gap:3px 5px;font-size:10px;background:#ffefd3f0;border-color:#d2b476aa}.goal .symbol{font-size:20px}.goal strong{font-size:11px}.goal progress{height:3px}
 #feedback{font-size:11px;min-height:28px;padding-top:4px}#tools{padding-inline:8px;gap:6px}#tools button{font-size:11px;gap:4px;min-height:44px}#tools button::before{font-size:14px}.score-line{color:#e1d9b9;padding-inline:12px}#lesson{color:#e9dfc3;margin:0 10px;padding:9px 0 0}.cabinet-foot{font-size:9px;gap:6px 10px}
}
@media(max-width:360px){header{padding:7px 10px}.brand strong{font-size:20px}.brand{min-width:74px}header nav button{font-size:10px;padding:7px}main{padding:7px 10px 20px}.hero{padding:25px 18px 35px;min-height:473px}.hero h1{font-size:41px}.hero button.primary{font-size:15px;padding-inline:18px}.hero-seal{display:none}.section-title h2{font-size:24px}.section-title>p{font-size:9px;padding:7px}.play-title h1{font-size:23px}.play-title .eyebrow{font-size:7px}.chapter-heading h3{font-size:27px}#tools button{gap:3px;font-size:10px}#tools button::before{font-size:12px}#how::before{width:14px;height:14px;font-size:10px!important;line-height:12px}}
@media(orientation:landscape) and (max-height:530px){
 header{padding:6px 16px}.brand strong{font-size:20px}.brand strong br{display:none}.hero{min-height:400px}.hero h1{font-size:48px}main{padding:6px 16px 20px}
 #cabinet{padding:10px 12px}.cabinet-body{grid-template-columns:minmax(0,1fr) 250px;gap:18px;align-items:start}.cabinet-top{min-height:37px;margin:0 0 7px;padding:3px 6px}aside{border:1px solid #d1b173;border-radius:12px;padding:9px;background:linear-gradient(#fff1d1ed,#e8d5aaf5);box-shadow:inset 0 0 0 3px #fff5dc33;gap:7px}.moves{padding:0 0 4px;gap:8px}.moves strong{width:auto;height:auto;min-width:0;border:0;background:none;box-shadow:none;font-size:29px;color:var(--ink);text-shadow:none}.moves span{font-size:9px;color:#58634c;max-width:none}.goal{font-size:10px;padding:5px 6px}.goal .symbol{font-size:18px}.goal strong{font-size:11px}.goal progress{height:3px}#goals{display:grid;padding:0;gap:5px}#tools{padding:0;gap:6px}#tools button{min-height:44px;font-size:11px}#feedback{min-height:20px;font-size:10px;padding-top:3px}.score-line{color:#526048;padding:0}#lesson{font-size:10px;color:#53604c;padding:6px 0 0}.cabinet-foot{display:none}
}
@media(orientation:landscape) and (max-height:430px){
 header{padding:3px 16px}main{padding:0 16px 16px}.play-title{top:13px;right:29px;width:280px;padding:0 10px;align-items:start}.play-title h1{font-size:20px;color:#fff1ce}.play-title .eyebrow{font-size:7px;color:#f1dbac;max-width:176px}.play-title>button{font-size:10px;padding:7px}.cabinet-top{display:none}#cabinet{padding:6px 12px}.cabinet-body{grid-template-columns:minmax(0,1fr) 280px;gap:18px}.cabinet-body aside{padding:64px 10px 8px;background:linear-gradient(#17332df0 0 59px,#fff0d0 60px,#e4d2ab);gap:6px}.goal{padding:4px 6px}.moves{padding:0}.moves strong{font-size:28px}#lesson{display:none}#tools button{min-height:44px}.goal progress{height:3px}.score-line{font-size:9px}#feedback{font-size:9px}
}
@media(orientation:portrait) and (max-height:650px) and (max-width:480px){
 header{padding-block:5px}main{padding-top:3px}.play-title{margin-bottom:7px}.play-title h1{font-size:22px}#cabinet{padding-top:6px}.cabinet-top{min-height:31px;margin-bottom:6px;padding:3px 5px}.cabinet-top>span{font-size:7px;padding:3px}.cabinet-body{gap:6px 0}.moves{gap:0}.moves strong{font-size:25px}.moves span{font-size:7px}#goals{padding:0 6px 0 0;gap:4px}.goal{font-size:9px;padding:3px 4px;gap:2px 4px}.goal strong{font-size:10px}.goal .symbol{font-size:15px}.goal progress{height:2px}#feedback{min-height:22px;font-size:10px;padding-top:2px}#tools{gap:5px;padding-inline:7px}.score-line{font-size:9px}#lesson{margin-top:2px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
