:root{font-family:'Trebuchet MS',Arial,sans-serif;color:#29464a;background:#dceee9;font-synthesis:none}
*{box-sizing:border-box}
html,body{width:100%;height:100%;min-height:0;margin:0;overflow:hidden;overscroll-behavior:none}
body{display:flex;justify-content:center;background:#dceee9}
button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
button:disabled{cursor:default}
button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round}
button:focus-visible{outline:3px solid #e49751;outline-offset:3px}
[hidden]{display:none!important}
.game{
 --clue-h:clamp(112px,22svh,186px);
 --board-size:min(calc(100vw - 32px),380px,calc(100svh - var(--clue-h) - 191px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
 --accent:#42765d;--accent-light:#e0efe0;--ink:#29464a;--scene:url('assets/world-farm.svg');
 width:min(100vw,480px);height:100svh;padding:calc(12px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-bottom));
 display:grid;grid-template-rows:48px var(--clue-h) var(--board-size) 31px 56px;align-content:space-between;gap:8px;
 position:relative;isolation:isolate;overflow:hidden;background:#e9f3e4 var(--scene) center/cover no-repeat;
 -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
.game[data-world=sea]{--accent:#326e88;--accent-light:#e1f1f5;--scene:url('assets/world-sea.svg');background-color:#deebf0}
.game[data-world=garden]{--accent:#617e50;--accent-light:#e9f3e1;--scene:url('assets/world-garden.svg');background-color:#e9f2e5}
.game[data-world=home]{--accent:#926c59;--accent-light:#f7ede2;--scene:url('assets/world-home.svg');background-color:#f2eadf}
.game[data-world=town]{--accent:#5c7481;--accent-light:#e7f0ef;--scene:url('assets/world-town.svg');background-color:#e9edf0}
.top{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:8px;z-index:2}
.brand{display:flex;align-items:center;gap:7px;min-height:44px;padding:0;border:0;background:none;color:var(--ink);font-weight:1000;font-size:clamp(21px,6vw,28px);letter-spacing:-1.2px;white-space:nowrap}
.brand span{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:var(--accent);color:white;font-size:16px;letter-spacing:0}
.modes{display:flex;align-items:center;gap:2px;padding:3px;border-radius:23px;background:#ffffffb9;box-shadow:0 1px 6px #25433f12}
.modes button{height:34px;min-width:55px;padding:0 10px;border:0;border-radius:19px;background:none;color:#647678;font-size:13px;font-weight:800}
.modes button[aria-pressed=true]{background:var(--accent);color:white}
.demo-mode .modes{display:none}
.demo-badge{min-height:34px;padding:0 12px;border:0;border-radius:18px;background:#ffffffb9;color:var(--accent);font-size:13px;font-weight:800}
.clue{position:relative;align-self:stretch;min-height:0;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;padding:30px 0 26px;overflow:hidden}
.round-meta{position:absolute;top:1px;left:0;right:0;display:flex;justify-content:space-between;align-items:center;gap:8px;color:#375453;font-size:13px;font-weight:900;letter-spacing:.1px}
.round-meta span:last-child{display:flex;align-items:center;justify-content:center;min-width:53px;height:28px;padding:0 10px;border-radius:15px;background:#ffffffbd;color:var(--accent)}
.clue-arrow{width:39px;height:39px;padding:0;border:0;border-radius:50%;display:grid;place-items:center;background:#ffffffb9;color:var(--accent);box-shadow:0 2px 5px #36544714}
.clue-arrow svg{width:18px;height:18px}
.clue-content{height:100%;min-height:0;min-width:0;display:grid;place-items:center}
.no-hint{width:100%;height:100%}
.clue-dots{position:absolute;left:50%;bottom:0;transform:translateX(-50%);height:27px;display:flex;align-items:center;gap:8px}
.clue-dot{width:28px;height:27px;padding:0;border:0;background:none;display:grid;place-items:center}
.clue-dot span{width:9px;height:9px;border-radius:50%;background:#ffffffc5;box-shadow:0 0 0 1px #57726324;display:grid;place-items:center;color:white;font-size:12px}
.clue-dot.current span{width:15px;height:15px;background:var(--accent);box-shadow:0 0 0 3px #ffffffaa}
.clue-dot.found span{width:19px;height:19px;background:#4f9d6e;box-shadow:none}
.lesson-again{position:absolute;right:48px;top:0;width:28px;height:28px;border:0;border-radius:50%;background:#ffffffba;color:var(--accent);display:grid;place-items:center}
.lesson-again svg{width:16px;height:16px}
.sound-cue,.phonics-help{width:100%;height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
.sound-boxes{display:flex;align-items:center;justify-content:center;gap:6px;max-width:100%}
.sound-box{height:clamp(42px,7svh,58px);min-width:clamp(42px,12vw,55px);padding:0 8px;border:2px solid #ffffffd9;border-radius:16px;background:#ffffffeb;color:var(--ink);font-size:clamp(22px,7vw,30px);font-weight:900;box-shadow:0 3px 8px #33544c1b}
.sound-box.focus-sound{background:var(--accent-light);border-color:var(--accent);color:var(--accent)}
.sound-box i,.tile i,.focus-cue i{display:none}
.sound-space{min-width:16px;text-align:center;color:var(--accent);font-size:24px}
.quiet-letter{opacity:.45}
.micro-label{color:#536969;font-size:12px;font-weight:800}
.small-speaker{min-height:30px;padding:3px 12px;border:0;border-radius:16px;background:#ffffffda;color:var(--accent);display:flex;align-items:center;gap:4px}
.small-speaker svg{width:15px;height:15px}
.sounding{background:#f8dc9c!important}
.picture{position:relative;margin:0;width:min(110px,100%);height:100%;max-height:112px;display:flex;align-items:center;justify-content:center;border-radius:24px;background:#fffffff0;box-shadow:0 4px 12px #33544c20}
.picture img{display:block;width:95%;height:95%;object-fit:contain;mix-blend-mode:multiply;-webkit-user-drag:none}
.picture-check{position:absolute;right:-9px;bottom:-5px;width:27px;height:27px;border-radius:50%;background:#4f9d6e;color:white;display:grid;place-items:center}
.picture-check svg{width:18px;height:18px}
.board{position:relative;align-self:center;justify-self:center;width:var(--board-size);height:var(--board-size);padding:0;touch-action:none}
.grid{width:100%;height:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:8px;touch-action:none}
.tile{position:relative;z-index:1;min-width:0;min-height:0;padding:0;border:2px solid #ffffff;border-radius:50%;background:#fffefa;color:var(--ink);font-size:clamp(24px,8.2vw,38px);font-weight:1000;box-shadow:0 4px 0 #748d7a3a,0 8px 13px #445c4e17;display:grid;place-items:center;touch-action:none}
.tile.joined{font-size:clamp(19px,6.7vw,31px)}
.tile span{position:relative;z-index:2}
.tile.selected{background:#ffe7a9;border-color:#ffda82;color:#644c2f;transform:translateY(-2px)}
.tile.solved{background:#dcf1e2;border-color:#c0e1c9;color:#356d57}
.trails{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;mix-blend-mode:multiply}
.trails polyline{fill:none;stroke-linecap:round;stroke-linejoin:round;opacity:.34}
.entry{width:var(--board-size);height:31px;min-height:0;justify-self:center;display:flex;align-items:center;justify-content:center;gap:5px;border-radius:17px;background:#ffffffac;color:var(--ink);font-size:22px;font-weight:900;letter-spacing:2px}
.entry.blank:empty{background:transparent}
.entry svg{width:21px;height:21px;fill:none;stroke:var(--accent);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.controls{width:var(--board-size);height:56px;justify-self:center;display:flex;gap:8px}
.controls button{height:100%;min-height:0;border:0;border-radius:18px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:19px;font-weight:900}
.controls .secondary{width:58px;flex:none;background:#ffffffd9;color:var(--accent);box-shadow:0 3px 9px #435c5020}
.controls .hint-button{width:90px}
.hint-button small{font-size:12px}
.hint-button.nudge{box-shadow:0 0 0 3px #e9b86b}
.controls .primary{flex:1;background:var(--accent);color:white;box-shadow:0 4px 0 #234b3e33}
.controls .primary:disabled{background:#9eb7aa;color:#e7eee9;box-shadow:none}
.secondary:disabled{opacity:.5}
.finish-art{grid-column:1/-1;width:100%;height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:3px 12px;border-radius:22px;background:#ffffffc9}
.finish-score{display:flex;align-items:center;gap:10px;color:var(--ink);font-size:14px;font-weight:800}
.finish-score strong{color:var(--accent);font-size:25px}
.finish-pictures{width:100%;height:68px;display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.finish-pictures figure{min-width:0;height:100%;margin:0;border-radius:14px;background:#fff;overflow:hidden}
.finish-pictures img{display:block;width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}
.complete .tile:not(.solved){opacity:.6}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.notice{position:fixed;z-index:8;bottom:8px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 20px);padding:8px 14px;border:0;border-radius:18px;background:white;color:var(--ink);font-size:12px}
.notice.update{bottom:auto;top:8px}
dialog{position:fixed;width:min(calc(100vw - 30px),400px);max-height:calc(100svh - 30px);padding:26px 18px 18px;overflow:auto;border:0;border-radius:24px;background:#f8faf5;color:#29464a;box-shadow:0 25px 60px #12342b55;text-align:center}
dialog::backdrop{background:#1d403a99;backdrop-filter:blur(4px)}
.dialog-close{position:absolute;right:8px;top:6px;width:35px;height:35px;border:0;border-radius:50%;background:none;color:#55736a}
.dialog-close svg{width:19px;height:19px}
dialog h2{margin:0 0 16px;font-size:24px}
.level-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.level{min-height:50px;padding:6px 11px;border:1px solid #d9e5dd;border-radius:14px;background:#fff;color:#336b5d;display:flex;align-items:center;justify-content:space-between;gap:6px;text-decoration:none}
.level.current{background:#dfefe2;border-color:#a2c6af}
.level strong{font-size:23px}.level small,.level span{font-size:12px}
.grownup-link{display:inline-block;margin:18px 8px 0;color:#5b7669;font-size:12px;text-decoration:underline}
.game,.game *{-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important;-webkit-user-drag:none!important}
@media(max-height:620px) and (orientation:portrait){
 .game{--clue-h:clamp(100px,21svh,130px);--board-size:min(calc(100vw - 32px),380px,calc(100svh - var(--clue-h) - 181px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));grid-template-rows:43px var(--clue-h) var(--board-size) 26px 52px;padding-top:calc(9px + env(safe-area-inset-top));padding-bottom:calc(9px + env(safe-area-inset-bottom));gap:7px}
 .brand{font-size:21px}.brand span{width:24px;height:24px}.modes button{min-width:50px;height:31px;padding:0 7px}
 .clue{padding:28px 0 23px}.picture{max-height:85px}.finish-pictures{height:50px}.finish-score strong{font-size:21px}
 .grid{gap:6px}.tile{font-size:clamp(23px,8vw,32px)}.tile.joined{font-size:clamp(18px,6.6vw,26px)}
 .entry{height:26px;font-size:18px}.controls{height:52px}.controls .secondary{width:50px}.controls .hint-button{width:77px}
}
@media(orientation:landscape) and (max-height:650px){
 .game{--board-size:min(calc(100svh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),calc(50vw - 26px),390px);width:min(100vw,980px);grid-template-columns:minmax(0,1fr) var(--board-size);grid-template-rows:43px minmax(0,1fr) 26px 52px;column-gap:12px;row-gap:6px;padding:12px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));align-content:stretch}
 .top{grid-column:1;grid-row:1}.clue{grid-column:1;grid-row:2;padding:30px 0 25px;isolation:isolate}.clue::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:var(--scene) center top/100% auto no-repeat;opacity:.72;-webkit-mask-image:radial-gradient(ellipse at center,#000 42%,transparent 78%);mask-image:radial-gradient(ellipse at center,#000 42%,transparent 78%)}.board{grid-column:2;grid-row:1/5}.entry{grid-column:1;grid-row:3;width:100%;height:26px}.controls{grid-column:1;grid-row:4;width:100%;height:52px}
 .picture{max-height:100px}.finish-pictures{height:70px}.controls .secondary{width:50px}.controls .hint-button{width:78px}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
