@font-face{font-family:Bungee;src:url('assets/fonts/Bungee.ttf')}@font-face{font-family:Nunito;src:url('assets/fonts/Nunito.ttf')}
:root{font-family:Nunito,system-ui,sans-serif;color:#f9efd0;background:#102f28;font-synthesis:none;--gold:#f9cf63;--muted:#bfd1b9}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:radial-gradient(ellipse at 80% 0,#35654a,transparent 55%),#102f28}button,select,input{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:default;opacity:.48}button,a,select{ -webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,select:focus-visible,canvas:focus-visible,input:focus-visible{outline:3px solid #fff;outline-offset:3px}button{border:0}main{max-width:1120px;padding:22px 28px;margin:auto}header{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:0 0 19px;border-bottom:1px solid #a9bd8e33}.brand{font-family:Bungee,sans-serif;color:var(--gold);text-decoration:none;font-size:19px}.brand span{font:900 8px Nunito;letter-spacing:2px;display:block;color:var(--muted);margin-top:5px}.settings{display:flex;gap:8px}.settings button,.run-heading button{background:transparent;color:#ecedc6;border:1px solid #acbf8e66;border-radius:30px;padding:10px 14px;font-size:12px;font-weight:800}.settings button[aria-pressed=true]{background:var(--gold);color:#153e31}.eyebrow{font-size:10px;font-weight:1000;letter-spacing:1.6px;color:var(--gold);margin:0 0 10px}h1,h2,h3{font-family:Bungee,sans-serif;font-weight:400;line-height:1.17;margin:0}h1{font-size:clamp(32px,4.6vw,54px);letter-spacing:-1px}h1 em{font-style:normal;color:var(--gold)}h2{font-size:23px}p{line-height:1.55}.hero{position:relative;display:flex;align-items:center;min-height:350px;overflow:hidden;margin:20px 0 30px;border:1px solid #c4cf8d30;border-radius:24px;background:linear-gradient(95deg,#174535 35%,#174535c9 65%,#17453570),url('assets/backgrounds/bg1.jpg') center/cover}.hero-copy{position:relative;z-index:1;padding:33px;width:65%}.hero-copy>p:not(.eyebrow){color:#d2dfbc;font-size:15px}.hero-stats{display:flex;gap:22px;font-size:12px;color:#c5d3aa}.hero-stats strong{color:#ffe69c;font-size:22px;margin-right:4px}.hero-art{width:35%;position:relative;align-self:stretch;display:flex;align-items:center;justify-content:center}.hero-art img{width:110%;max-width:340px;filter:drop-shadow(0 18px 16px #0003);position:relative;z-index:1}.stamp{position:absolute;bottom:18px;right:15px;transform:rotate(9deg);border:2px solid #e3c77888;border-radius:50%;width:85px;height:85px;display:grid;place-content:center;text-align:center;font:11px Bungee;color:#e9d292;background:#153e31}.map-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 20px;gap:16px}.map-heading h2{font:900 22px Nunito}.difficulty{font-size:12px;color:#cfdfbc;display:flex;align-items:center;gap:8px}select{padding:10px;background:#244e3a;border:1px solid #77986b;color:#fff0be;border-radius:9px}.world{margin-bottom:16px;border-radius:18px;border:1px solid #baca8c40;background:#1b4435;overflow:hidden}.world-top{display:flex;align-items:center;gap:12px;padding:18px 22px 10px}.world-number{border:1px solid #e4cc7b70;color:var(--gold);border-radius:50%;width:38px;height:38px;display:grid;place-content:center;font-family:Bungee}.world h3{font-size:19px}.world-top small{display:block;color:#bfd1af;font-size:11px;margin-top:3px}.world-progress{margin-left:auto;font-weight:900;color:#f1d279}.world-1{background:linear-gradient(120deg,#184d49,#173d36)}.world-2{background:linear-gradient(120deg,#3f3650,#243831)}.route-path{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:10px 22px 18px;position:relative}.level{position:relative;text-align:left;min-height:114px;background:#e8dbaa;color:#163e31;border:2px solid transparent;border-radius:12px;padding:12px;transition:transform .15s,background .15s}.level:not(:disabled):hover{transform:translateY(-3px);background:#ffebb6}.level[aria-pressed=true]{border-color:#ffda70;box-shadow:0 0 0 3px #f5d36755;background:#fff0c3}.level:disabled{background:#a5bb9817;border:1px solid #b3c39b22;color:#b5c6a0;opacity:1}.level .number{font-family:Bungee;font-size:23px}.level .level-name{display:block;font-size:12px;font-weight:1000;line-height:1.2;margin:5px 0}.stars{letter-spacing:3px;font-size:15px;color:#83651f}.level:disabled .stars{color:#8fa080}.bonus-row{padding:0 22px 15px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:#d9d8ae}.bonus-row button{color:#ffdc86;border:1px solid #ddc27588;background:transparent;padding:9px 15px;border-radius:9px;font-weight:900}.endless-card{display:flex;align-items:center;justify-content:space-between;padding:23px;border-radius:18px;border:1px dashed #d2bd7566;margin:22px 0}.endless-card p:last-child{font-size:13px;color:var(--muted);margin-bottom:0}.selected-card{display:flex;align-items:center;justify-content:space-between;gap:25px;padding:25px;border-radius:18px;background:#eddfb2;color:#204435;box-shadow:0 8px 20px #0002}.selected-card .eyebrow{color:#716229}.selected-card p{margin:7px 0;font-size:13px}.selected-card .primary{width:220px;flex-shrink:0}.primary{background:var(--gold);color:#173e31;border-radius:12px;font:16px Bungee;padding:17px 22px;box-shadow:0 4px 0 #b68b2b;width:100%}.secondary{padding:12px 18px;border-radius:10px;background:#315841;color:#fff0b9;border:1px solid #97ac7588;font-weight:900}.best-line{font-weight:900;font-size:12px!important}.field-guide{display:grid;grid-template-columns:1fr 2.5fr;gap:24px;margin-top:38px;padding-top:25px;border-top:1px solid #a4be9433}.field-guide>div p:last-child{font-size:13px;color:var(--muted)}.field-guide ul{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;padding:0;list-style:none;margin:0}.field-guide li{display:flex;flex-direction:column;align-items:flex-start;font-size:11px;gap:5px}.field-guide strong{font-size:12px}.field-guide b{color:#ffdc80;font-size:18px}.field-guide small{color:var(--muted)}.item-icon{height:40px;font-size:30px}.gold-icon{color:#ffcf54}.save-note{text-align:center;color:var(--muted);font-size:12px;margin-top:25px}footer{display:flex;justify-content:space-between;color:#97b69b;font-size:9px;letter-spacing:1px;padding:20px 0;gap:16px}
/* The play view stays inside the viewport. Canvas and authored character keep their aspect ratio. */
body.playing{overflow:hidden;overscroll-behavior:none}body.playing header,body.playing footer{display:none}body.playing main{padding:8px 12px;max-width:1100px}.run-heading{height:40px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;font-weight:900;color:#ffe6a0}.run-heading button{padding:6px 12px;font-size:11px}.game-shell{border:1px solid #719270;border-radius:17px;overflow:hidden;background:#1c4032;max-width:min(100%,calc((100dvh - 240px)*1.53846));margin:auto;box-shadow:0 20px 60px #0004}.hud{display:flex;gap:20px;align-items:center;padding:12px 18px;background:#f6e8b9;color:#31503b;font-size:9px;letter-spacing:.5px;font-weight:900}.hud strong{display:block;font-size:20px;letter-spacing:0;color:#173c30;font-variant-numeric:tabular-nums;white-space:nowrap}.hud button{margin-left:auto;background:#1b4837;color:#fff0c9;border-radius:18px;padding:10px 15px;font-size:12px}.stage{position:relative;aspect-ratio:1000/650;overflow:hidden;background:#6f9d71}canvas{width:100%;height:100%;display:block;touch-action:none;object-fit:contain}#overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#112f25bb;padding:14px}.card{width:480px;max-width:100%;max-height:100%;overflow:auto;text-align:center;background:#123b31f5;border:1px solid #e5ce7d80;border-radius:18px;padding:24px}.card h2{font-size:30px;color:#fff3cb}.card>p:not(.eyebrow){font-size:14px;color:#d4dfc5}.card .secondary{margin-top:12px;width:100%}.card .primary{margin-top:14px}#resultStars{color:#ffda74;font-weight:900;font-size:14px;line-height:1.8}#resultStars span{display:block}#tutorial{position:absolute;top:8%;left:50%;transform:translateX(-50%);width:90%;max-width:500px;background:#153d32f5;border:1px solid #f2cf77;border-radius:16px;text-align:center;padding:16px}#tutorial strong{display:block;font-size:23px;color:#ffdc82}#tutorial button{background:none;color:#e3e1b9;text-decoration:underline;padding:10px;margin-top:5px}.controls{display:flex;gap:10px;align-items:center;padding:10px 14px}.controls button{min-width:72px;min-height:54px;background:#315b47;border:1px solid #8da676;border-radius:12px;color:#f4e8b8;font-size:25px}.controls button span{font:11px Bungee;vertical-align:middle}.controls .jump{margin-left:auto;background:#edcb69;color:#183f30;min-width:120px}.controls p{font-size:12px;color:#d0ddbc;margin:0 10px}.audio-controls{display:flex;align-items:center;justify-content:center;gap:10px;padding:4px 12px 10px;color:#ffedb7;font:800 11px Nunito}.audio-controls button{border:1px solid #a6ac70;background:#245340;color:#fff1b7;border-radius:7px;padding:7px 10px}.audio-controls input{width:85px;accent-color:#fbd061}.audio-controls output{min-width:30px}#timer{margin-left:auto;font-variant-numeric:tabular-nums}.progress{position:absolute;bottom:0;height:5px;left:0;right:0;background:#153f3050}#progress{height:100%;width:0;background:#ffdc6a}#toast{pointer-events:none;position:absolute;left:50%;top:3%;transform:translateX(-50%);background:#173d30ed;color:#ffe08b;font-size:14px;font-weight:900;border-radius:20px;padding:8px 18px;opacity:0;white-space:nowrap}
@media(max-width:700px){main{padding:14px}.brand{font-size:14px}.brand span{font-size:6px}.settings button{font-size:10px;padding:8px}.hero{min-height:280px;margin:16px 0 23px}.hero-copy{padding:21px;width:72%}.hero-copy>p:not(.eyebrow){font-size:12px}.hero-art{width:28%}.hero-art img{width:180%;max-width:none;margin-right:35px}.stamp{display:none}.hero-stats{gap:13px;font-size:10px;flex-wrap:wrap}.hero-stats strong{font-size:17px}h1{font-size:32px}.hero .eyebrow{font-size:8px}.map-heading{align-items:flex-start;flex-direction:column;gap:10px}.map-heading h2{font-size:18px}.difficulty{width:100%;justify-content:space-between}.world-top{padding:16px 13px 5px}.world h3{font-size:16px}.route-path{padding:10px 12px 14px;gap:6px}.level{padding:9px 5px;min-height:106px;text-align:center;border-radius:9px}.level .number{font-size:20px}.level .level-name{font-size:10px;min-height:25px}.stars{font-size:12px;letter-spacing:0}.world-progress{font-size:12px}.bonus-row{padding:0 12px 13px;font-size:10px}.bonus-row button{font-size:10px;padding:9px}.selected-card{padding:20px;flex-direction:column;align-items:stretch;gap:10px}.selected-card .primary{width:100%}h2{font-size:21px}.endless-card{padding:18px;gap:15px}.endless-card h2{font-size:18px}.endless-card p:last-child{font-size:11px}.field-guide{grid-template-columns:1fr;gap:12px}.field-guide ul{grid-template-columns:repeat(2,1fr);gap:20px}.field-guide li{background:#28513c66;padding:12px;border-radius:12px}.hud{gap:11px;padding:9px}.hud strong{font-size:15px}.hud{font-size:7px}.hud button{font-size:10px;padding:9px}.health strong{letter-spacing:-1px}.controls{padding:10px;gap:8px}.controls p{display:none}.controls button{min-width:68px;min-height:56px}.controls .jump{min-width:110px}.game-shell{max-width:100%}.card{padding:14px}.card h2{font-size:23px}.card>p:not(.eyebrow){font-size:11px;line-height:1.4}.card .primary{padding:12px;font-size:13px}.card .secondary{padding:9px;font-size:11px}.card .eyebrow{font-size:8px}#resultStars{font-size:10px;line-height:1.5}#resultStars span{display:inline;margin:0 4px}#tutorial{padding:10px;top:5%}#tutorial .eyebrow{font-size:7px}#tutorial strong{font-size:17px}#tutorial button{font-size:10px;padding:7px}#toast{font-size:10px;padding:7px 10px}footer{font-size:8px;line-height:1.6}}
@media(max-height:550px) and (min-width:601px){body.playing main{padding:4px}.run-heading{height:28px;font-size:11px}.game-shell{max-width:min(100%,calc((100dvh - 162px)*1.53846))}.hud{padding:5px 10px;gap:13px;font-size:7px}.hud strong{font-size:14px}.hud button{padding:7px}.controls{padding:5px 10px}.controls button{min-height:44px}.audio-controls{padding:2px 10px 4px;font-size:9px}.audio-controls button{padding:4px}.card{padding:12px}.card h2{font-size:20px}.card p{font-size:10px!important;margin:6px}.card .primary{padding:10px;font-size:11px;margin-top:5px}.card .secondary{padding:7px;margin-top:8px;font-size:10px}#resultStars{font-size:9px}#resultStars span{display:inline;margin:0 4px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.selected-card{margin-bottom:22px}
@media(max-height:550px) and (orientation:landscape){
 body.playing main{padding:3px 8px}.run-heading{height:28px;font-size:11px}.game-shell{position:relative;max-width:100%;width:min(100%,calc((100dvh - 105px)*1.53846 + 135px));border-radius:10px}.hud{height:42px;padding:4px 10px;gap:17px;font-size:7px}.hud strong{font-size:14px}.hud button{padding:7px}.stage{width:calc(100% - 125px);aspect-ratio:1000/650}.controls{position:absolute;right:0;top:42px;width:125px;height:calc(100% - 74px);display:grid;grid-template-columns:1fr 1fr;align-content:center;gap:8px;padding:8px}.controls button{min-width:0;min-height:48px;font-size:23px}.controls button span{display:block;font-size:8px}.controls .jump{grid-column:1/3;margin:0;min-width:0}.controls p{display:none}.audio-controls{height:30px;padding:3px 9px;font-size:9px;gap:8px}.audio-controls button{padding:3px 7px}.audio-controls input{width:70px}.card{padding:10px}.card h2{font-size:18px}.card p{font-size:10px!important;margin:6px}.card .primary{padding:8px;font-size:10px;margin-top:5px}.card .secondary{padding:6px;margin-top:8px;font-size:10px}#resultStars{font-size:8px}#resultStars span{display:inline;margin:0 3px}
}
.notebook{margin-top:28px;padding:20px;border:1px solid #b3c19a55;border-radius:16px;background:#214a38}.notebook summary{cursor:pointer;font:15px Bungee;color:#ffdc84}.notebook summary span{float:right;font:900 14px Nunito}.notebook>p{font-size:13px;color:#cddbb9}#notebookPages{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}#notebookPages article{padding:15px;border-radius:10px;background:#143a2e}#notebookPages h3{font:900 16px Nunito;color:#f8df91}#notebookPages p{font-size:13px;color:#d3dfc0}#notebookPages a{color:#d8cd94;font-size:10px}#learning h3{font:900 16px Nunito;margin:12px 0;color:#fff0bd}#learningOptions{display:flex;gap:8px;justify-content:center}.answer{background:#f1e2b7;color:#1e4936;padding:12px 10px;border:2px solid #f7ce65;border-radius:9px;font-size:13px;font-weight:900;min-height:44px;flex:1}.answer:disabled{opacity:.6}.answer:hover:not(:disabled){background:#ffdd7b}#learningStatus{color:#ffe39a;font-size:13px;font-weight:900;margin:10px 0}#learning small{font-size:10px;color:#bfcfac}
@media(max-width:700px){#notebookPages{grid-template-columns:1fr}.notebook summary{font-size:12px}#learning h3{font-size:13px;margin:8px 0}.answer{font-size:11px;padding:8px 6px}#learningStatus{font-size:11px}}
@media(max-height:550px) and (orientation:landscape){#learning h3{font-size:11px;margin:7px 0}.answer{min-height:36px;padding:6px;font-size:10px}#learning small{font-size:8px}}
@media(max-width:700px) and (orientation:portrait){
 #overlay{position:fixed;inset:0;z-index:20;background:#0e2c24ef;padding:20px}.card{width:100%;max-width:420px;max-height:calc(100dvh - 40px);padding:24px 20px}.card h2{font-size:26px}.card>p:not(.eyebrow){font-size:14px;line-height:1.6}.card .eyebrow{font-size:10px}.card .primary{padding:16px;font-size:14px}.card .secondary{padding:13px;font-size:12px}#resultStars{font-size:13px}#resultStars span{display:block}#learning h3{font-size:16px;margin:16px 0}.answer{font-size:13px;padding:12px 8px}#learningStatus{font-size:13px;line-height:1.5}
}
