@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');
:root{font-family:Nunito,"Arial Rounded MT Bold",system-ui,sans-serif;color:#35452f;background:#f5f3e9;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0}
button,a,canvas{-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer}
button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #dc9b43;outline-offset:4px}
button[hidden]{display:none}
.shell{max-width:1160px;margin:auto;padding:24px 30px 18px}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:#35452f;font-size:25px;font-weight:900;letter-spacing:-1px}
.brand-icon{display:grid;place-items:center;background:#728b55;color:#fff9e7;border-radius:12px;width:37px;height:37px;font-size:30px}
.chapter{display:flex;align-items:center;gap:9px;font-size:10px;letter-spacing:1.8px;font-weight:800;color:#8b917d}
.chapter>span{background:#a6b782;width:6px;height:6px;border-radius:50%}
.top-actions{display:flex;gap:8px}
.icon-button{height:36px;border:1px solid #e0e2d2;background:#faf9f2;color:#69755c;border-radius:10px;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 12px;font-weight:800;font-size:18px}
.icon-button span{font-size:11px}
.heading{display:flex;justify-content:space-between;align-items:center;padding:28px 0 22px}
.eyebrow{font-size:10px;font-weight:900;letter-spacing:2px;color:#8e967f;margin:0 0 8px}
h1{font-size:37px;font-weight:900;letter-spacing:-1.2px;margin:0;line-height:1.2}
h1 span{color:#ba8546}
.heading-note{font-size:12px;color:#8a927e;line-height:1.6;margin:0;text-align:right}
.game-card{position:relative;overflow:hidden;border-radius:18px;background:#d6e6cb;box-shadow:0 8px 30px #64734f12;border:1px solid #cbd8bf}
.scene-top{position:absolute;left:22px;right:22px;top:17px;z-index:2;display:flex;justify-content:space-between;align-items:center;pointer-events:none}
.place{font-size:12px;font-weight:800;background:#fffdf0bf;padding:7px 12px;border-radius:20px;color:#60764b;backdrop-filter:blur(6px)}
.place>span{color:#b6a049;margin-right:5px;font-size:16px}
.level-label{font-size:9px;letter-spacing:2px;color:#668054;font-weight:900}
canvas{display:block;width:100%;height:auto;outline:none;aspect-ratio:1100 / 560}
.scene-tip{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);padding:10px 18px;display:flex;align-items:center;gap:10px;border:1px solid #fffdf580;border-radius:30px;background:#fcf9e7e8;color:#64714f;font-size:14px;font-weight:800;white-space:nowrap;max-width:95%;box-shadow:0 2px 8px #54663712;pointer-events:none}
.scene-tip #tip-icon{color:#bf9455}
.overlay{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#f6f5e9bc;backdrop-filter:blur(5px);text-align:center;padding:35px 20px}
.overlay[hidden]{display:none}
.welcome-art{position:relative;width:88px;height:80px;font-size:78px;line-height:1;color:#789359;margin-bottom:18px}
.welcome-art img{width:88px;height:96px;object-fit:contain;transform:translateY(-8px)}
.welcome-art span{position:absolute;top:0;right:-5px;font-size:30px;color:#d4aa55}
.overlay h2{font-size:30px;line-height:1.2;letter-spacing:-.7px;margin:4px 0 9px;font-weight:900}
.overlay p:not(.eyebrow){font-size:17px;line-height:1.6;margin:0 0 20px;color:#728062}
.primary{border:0;border-bottom:4px solid #597343;background:#7b965b;color:#fffdef;font-weight:900;font-size:19px;padding:13px 26px;min-width:200px;border-radius:14px;box-shadow:0 5px 15px #59734322;transition:transform .15s,background .15s}
.primary:hover{background:#6b874e;transform:translateY(-2px)}
.primary span{margin-left:18px}
.text-button{border:0;background:none;color:#758362;text-decoration:underline;text-underline-offset:4px;font-size:12px;margin-top:15px}
.adventure-bar{border-bottom:1px solid #e1e3d4;display:flex;align-items:center;justify-content:space-between;padding:21px 8px;gap:20px}
.backpack{display:flex;align-items:center;gap:15px}
.bag-icon{font-size:27px;display:grid;place-items:center;background:#e8eadb;color:#889566;width:45px;height:45px;border-radius:12px}
.small-label{font-size:9px;letter-spacing:1.6px;font-weight:900;color:#939b83;margin:0 0 8px}
.resources{display:flex;gap:24px;font-size:13px;font-weight:700}
.resources>span{display:flex;align-items:center;gap:8px}
.resources b{background:#e8eadc;padding:2px 8px;border-radius:6px;color:#738353;font-size:12px}
.wood-icon{width:15px;height:10px;background:#b88350;border-radius:3px;transform:rotate(-20deg);border-right:4px solid #e0b680}
.stone-icon{width:14px;height:13px;background:#9ca8a1;clip-path:polygon(25% 0,80% 10%,100% 70%,60% 100%,0 80%,0 35%)}
.steps{display:flex;gap:20px;font-size:12px;font-weight:800;color:#a2a78f}
.steps>span{display:flex;align-items:center;gap:7px}
.steps i{font-style:normal;display:grid;place-items:center;font-size:10px;border:1px solid #d8ddc8;width:22px;height:22px;border-radius:50%;background:#eeefe3}
.steps .done{color:#69864f}
.steps .done i{background:#78965b;color:white;border-color:#78965b}
.steps .current{color:#9b834f}
.steps .current i{border-color:#c7ae77;background:#eee5cf}
.controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:13px;padding:19px 0}
.control-card{position:relative;display:flex;align-items:center;gap:17px;border:1px solid #e0e3d3;border-radius:12px;background:#faf9f2;padding:14px 18px;min-height:72px;transition:border-color .3s,background .3s}
.control-card.active{border-color:#aabc85;background:#f3f6e8}
.control-card strong{font-size:15px;font-weight:900}
.control-card p{font-size:11px;color:#969e89;margin:3px 0 0}
.key-group{display:flex;gap:5px}
kbd{font:800 16px Nunito,system-ui,sans-serif;border:1px solid #d5dbca;border-bottom:3px solid #d5dbca;border-radius:7px;background:#fffef8;width:33px;height:35px;display:inline-flex;align-items:center;justify-content:center;color:#768564}
.space-key{width:83px;font-size:10px;letter-spacing:.7px}
.control-check{display:none;position:absolute;right:12px;top:10px;color:#79965d;font-size:12px}
.control-card.learned .control-check{display:block}
footer{display:flex;justify-content:space-between;align-items:center;color:#9aa18c;font-size:10px;padding:0 3px}
footer kbd{font-size:8px;width:29px;height:19px;border-radius:4px;margin-right:5px;border-bottom-width:2px}
.heart{color:#bd9b7f;font-size:13px;margin-left:5px}
.footer-dot{padding:0 10px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.touch-controls{display:none;position:absolute;bottom:65px;left:14px;right:14px;justify-content:space-between;pointer-events:none}
.touch-controls>div{display:flex;gap:7px}
.touch-controls button{pointer-events:auto;width:43px;height:43px;border-radius:11px;border:1px solid #fff8;background:#fff9e8c9;color:#64784f;font-size:22px;font-weight:900;touch-action:none;user-select:none}
@media(pointer:coarse){.touch-controls{display:flex}
}
@media(max-width:740px){.shell{padding:18px 14px}
.chapter,.heading-note{display:none}
.brand{font-size:22px}
.heading{padding:23px 0 18px}
h1{font-size:29px}
.heading .eyebrow{font-size:8px;letter-spacing:1.5px}
.game-card{border-radius:13px}
canvas{aspect-ratio:1100 / 670}
.scene-top{top:12px;left:12px;right:12px}
.level-label{font-size:8px}
.place{font-size:10px;padding:4px 10px}
.scene-tip{font-size:11px;padding:7px 12px;bottom:10px}
.adventure-bar{align-items:flex-start;padding:17px 4px;flex-wrap:wrap;gap:17px}
.resources{gap:13px;font-size:11px}
.resources b{font-size:11px;padding:2px 5px}
.bag-icon{width:36px;height:36px;font-size:23px}
.backpack{gap:10px}
.build-progress{margin-left:auto}
.steps{gap:12px;font-size:10px}
.steps i{width:18px;height:18px;font-size:9px}
.controls{gap:7px;padding:14px 0}
.control-card{flex-direction:column;align-items:center;text-align:center;gap:8px;padding:10px 5px}
.control-card strong{font-size:13px}
.control-card p{font-size:9px}
.control-card kbd{height:28px;width:27px;font-size:12px}
.control-card .space-key{width:67px;font-size:8px}
.overlay h2{font-size:25px}
.overlay p:not(.eyebrow){font-size:14px;margin-bottom:14px}
.welcome-art{font-size:58px;height:58px;margin-bottom:12px}
.primary{padding:10px 20px;font-size:16px}
.overlay .eyebrow{font-size:8px}
footer{font-size:9px;gap:15px}
footer>span:last-child{text-align:right}
.footer-dot{padding:0 3px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}
.primary:hover{transform:none}
}

.level-picker{display:flex;gap:10px;margin:0 0 15px}
.level-picker button{display:flex;align-items:center;gap:9px;flex:1;padding:10px 15px;border-radius:12px;background:#faf9f2;border:1px solid #dfe3d1;color:#899579;font-weight:900;font-size:14px}
.level-picker button.selected{background:#e8efda;border-color:#a7ba84;color:#536e3c}
.level-picker button span{font-size:21px}.level-picker small{font-size:9px;background:#e9eadd;border-radius:5px;padding:3px 5px;margin-left:auto;letter-spacing:1px}.level-picker i{font-style:normal;color:#779453}
.listen-button{pointer-events:auto;border:1px solid #dfdfc7;background:#fffbeced;color:#7b885e;border-radius:18px;font-weight:900;font-size:13px;padding:7px 14px;white-space:nowrap}
.lesson-count{font-size:17px;font-weight:900;margin:0;color:#7b8b60}.lesson-count[hidden],.resources[hidden]{display:none}.steps b{font-weight:800}
.word-task{position:absolute;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;background:#fbf8edef;backdrop-filter:blur(5px);padding:20px}
.word-task[hidden]{display:none}.task-close{position:absolute;left:20px;top:17px;background:#f2efdf;border:1px solid #dedfc6;border-radius:12px;color:#80905f;font-size:24px;width:38px;height:36px}.task-language{color:#929878;font-size:10px;font-weight:900;letter-spacing:2px;margin:0 0 5px}.task-picture{font-size:54px;line-height:1.2;margin:0 0 8px}.word-task h2{font-size:22px;font-weight:900;margin:0 0 4px}.task-syllables{font-size:15px;font-weight:800;letter-spacing:3px;color:#8e946f;margin:0 0 10px}.word-tiles{display:flex;gap:8px;margin:0 0 7px}.word-tiles span{display:grid;place-items:center;font-size:31px;font-weight:900;background:#fffef9;border:2px solid #dedfc7;border-bottom-width:5px;border-radius:12px;width:51px;height:58px;color:#a5aa90}.word-tiles span.correct{color:#fffef0;background:#91a869;border-color:#789353}.word-tiles span.next{color:#667d43;border-color:#bcb366;background:#f7f1d6}.task-translation{color:#8b9476;font-size:13px;font-weight:900;margin:2px 0 9px}.task-translation[hidden]{display:none}#typing-area{text-align:center;width:min(500px,100%)}#word-input{width:220px;max-width:100%;margin-top:6px;padding:7px 15px;border:1px solid #cfd9b5;border-radius:10px;background:#fffef9;color:#667d43;text-align:center;font:900 21px Nunito,system-ui,sans-serif;letter-spacing:5px}#word-input::placeholder{font-size:12px;letter-spacing:1px;color:#a0a689}#word-input:focus{outline:2px solid #bccd96;outline-offset:2px}.task-hint{font-size:12px;color:#9b916a;margin:9px 0;min-height:17px;font-weight:800}.letter-keyboard{display:flex;flex-direction:column;gap:4px}.letter-keyboard>div{display:flex;gap:4px;justify-content:center}.letter-keyboard kbd{font-size:12px;width:27px;height:28px;background:#f8f7eb}.letter-keyboard kbd.next{border-color:#a1b270;background:#dbe7ba;color:#536d35;box-shadow:0 0 0 2px #dbe7ba}.task-actions{display:flex;gap:10px;align-items:center;margin-top:13px}.task-actions .primary{min-width:150px;font-size:15px;padding:9px 18px}.overlay{z-index:7}.scene-top .listen-button{font-size:11px}.word-task.saying .task-picture{font-size:70px}.word-task.saying h2{margin-bottom:12px}.word-task.saying .word-tiles span{background:#e3edce;border-color:#a9bc85;color:#5f7b40}
@media(max-width:740px){.level-picker{gap:6px}.level-picker button{font-size:11px;padding:8px 6px;gap:5px}.level-picker button span{font-size:16px}.level-picker small{font-size:7px;padding:2px 3px}.word-task{padding:12px;justify-content:flex-start;overflow:auto}.task-picture{font-size:35px;margin:0 0 3px}.word-task h2{font-size:16px}.task-language{font-size:8px;margin-bottom:2px}.task-syllables{font-size:10px;margin-bottom:5px}.word-tiles span{font-size:23px;width:35px;height:40px;border-radius:8px}.word-tiles{gap:6px;margin-bottom:3px}#word-input{font-size:16px;padding:5px;width:180px;margin-top:3px}.task-hint{font-size:10px;margin:5px 0}.letter-keyboard{gap:3px}.letter-keyboard>div{gap:3px}.letter-keyboard kbd{width:19px;height:21px;font-size:9px}.task-actions{margin-top:9px}.task-actions .primary{font-size:12px;padding:7px 12px;min-width:115px}.task-actions .listen-button{font-size:11px;padding:6px 10px}.task-close{left:10px;top:10px;width:30px;height:30px;font-size:19px}.task-translation{font-size:10px;margin:0 0 4px}.word-task.saying .task-picture{font-size:50px}.word-task.saying{justify-content:center}.scene-top .listen-button{padding:5px 10px;font-size:9px}}
.task-picture img{display:block;width:64px;height:64px}.word-task.saying .task-picture img{width:80px;height:80px}
@media(max-width:740px){.task-picture img{width:40px;height:40px}.word-task.saying .task-picture img{width:55px;height:55px}}
.steps{flex-wrap:wrap;gap:10px 15px}.task-picture img{object-fit:contain}
@media(max-width:740px){.level-picker{display:grid;grid-template-columns:1fr 1fr}.build-progress{max-width:100%}.steps{gap:8px 12px}.word-tiles{gap:4px}.word-tiles span{width:32px}}

/* Twelve destinations remain readable on a keyboard-sized screen. */
.level-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.level-picker button{min-width:0;font-size:12px;padding:8px 10px;gap:7px}
.task-picture.counting{font-size:34px;max-width:360px;line-height:1.5}
.task-actions{flex-wrap:wrap;justify-content:center}
@media(max-width:740px){.level-picker{grid-template-columns:repeat(3,minmax(0,1fr))}.level-picker button{font-size:10px;padding:7px 5px;gap:4px}.level-picker small{letter-spacing:0}.task-picture.counting{font-size:24px;max-width:220px}.task-actions{gap:6px}.task-actions .listen-button{font-size:10px;padding:6px 8px}.letter-keyboard kbd{height:18px}}
@media(max-width:420px){.level-picker{grid-template-columns:repeat(2,minmax(0,1fr))}}

.word-task.saying .task-picture.counting{font-size:34px}
@media(max-width:740px){.word-task.saying .task-picture.counting{font-size:24px}}

@media(max-width:740px){.game-card:has(.word-task:not([hidden])){min-height:430px}.word-task{justify-content:center}}
