@font-face{font-family:Nunito;src:url('assets/nunito.ttf') format('truetype');font-weight:200 1000;font-display:swap}
:root{--ink:#212450;--blue:#2268f5;--blue-dark:#164dbe;--pink:#ff8daf;--sky:#ecf8ff;--green:#dff4b7;--teal:#159d9c;--line:#c9dcf2;--shadow:0 5px 0 #c5d7ef;font-family:Nunito,'Trebuchet MS',sans-serif;color:var(--ink);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:white}button,a,input{touch-action:manipulation}button{font:800 1.12rem/1.25 Nunito,sans-serif;cursor:pointer;min-height:56px;border:0;color:var(--ink)}a{color:inherit}button:disabled{cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:4px solid #eb6d12;outline-offset:4px}button:active:not(:disabled){transform:translateY(2px)}
.topbar{height:104px;padding:12px 30px;display:flex;justify-content:space-between;align-items:center;gap:20px;background:#fff;position:relative;z-index:2}.wordmark{font-size:clamp(2.25rem,5.3vw,4.7rem);font-weight:1000;letter-spacing:-.07em;text-decoration:none;line-height:1;display:inline-flex;align-items:center}.brand-flower{font-size:.75em;letter-spacing:0;color:var(--pink);margin-left:6px}.top-controls{display:flex;align-items:center;gap:14px}.sound-button{display:flex;align-items:center;gap:10px;padding:14px 25px;border-radius:40px;background:var(--blue);color:white;font-size:1.25rem}.sound-button svg{width:27px;height:27px}.icon-button{border-radius:50%;width:56px;height:56px;display:grid;place-items:center;background:#f0f5fb;color:var(--ink);flex-shrink:0}.icon-button svg{width:25px;height:25px}
.town{position:relative;background:#86cddd;isolation:isolate;overflow:hidden;min-height:calc(100svh - 104px);height:calc(100svh - 104px)}.town-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 43%;z-index:-1}.town-monster{position:absolute;bottom:21%;width:clamp(130px,19vw,290px);height:auto;filter:drop-shadow(0 12px 4px #354b3020)}.town-monster.pip{left:34%;transform:rotate(-4deg)}.town-monster.nori{right:24%;width:clamp(120px,17vw,260px);bottom:20%}.destinations{position:absolute;bottom:5.5%;left:3%;right:3%;display:grid;grid-template-columns:1fr 1fr;gap:8%;}.destination{display:flex;align-items:center;justify-content:center;gap:16px;background:var(--blue);color:white;min-height:112px;padding:22px 28px;border:4px solid white;border-radius:90px;font-size:clamp(1.5rem,3.1vw,3rem);box-shadow:0 7px 0 #21427328;line-height:1.15}.destination img{width:58px;height:58px;object-fit:contain}.destination:hover{background:#105ce6}.town-note{position:absolute;left:50%;top:14px;transform:translateX(-50%);background:#ffffffee;padding:8px 18px;border-radius:28px;font-size:1.12rem;font-weight:800;white-space:nowrap}.town-note:empty{display:none}
.activity{background:var(--sky);min-height:calc(100svh - 104px);padding:22px 30px 30px}.activity-header{max-width:1140px;margin:0 auto 20px;display:flex;gap:20px;align-items:center;justify-content:space-between}.activity-title{display:flex;align-items:center;gap:18px}.town-back{background:white;border:2px solid var(--line);border-radius:22px;padding:12px 20px;white-space:nowrap}.activity h1{font-size:2rem;line-height:1.1;margin:0;font-weight:950;letter-spacing:-.035em}.mode-tabs{display:flex;background:#dceafa;border-radius:22px;padding:5px;gap:3px}.mode-tabs button{background:transparent;border-radius:17px;padding:10px 20px;min-height:52px;font-size:1rem}.mode-tabs .selected{background:white;color:var(--blue-dark);box-shadow:0 2px 5px #304a7715}
.lesson-layout{max-width:1140px;margin:auto;display:grid;grid-template-columns:270px minmax(0,1fr);gap:28px;align-items:start}.teacher{display:flex;flex-direction:column;align-items:center;padding-top:15px;position:relative}.teacher-name{font-size:1.3rem;font-weight:950;margin:0 0 4px;align-self:center}.teacher-image{width:250px;height:250px;object-fit:contain;max-width:100%}.teacher-image.talking{animation:bob .9s ease-in-out infinite alternate}.speech{background:white;border:2px solid var(--line);border-radius:26px;padding:20px;position:relative;width:100%;min-height:145px}.speech::after{content:'';position:absolute;width:17px;height:17px;background:white;border-left:2px solid var(--line);border-top:2px solid var(--line);top:-10px;left:calc(50% - 9px);transform:rotate(45deg)}#caption{font-size:1.15rem;line-height:1.45;font-weight:750;margin:0;min-height:64px}.replay-line{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}.replay-caption{background:#f1f6fc;border-radius:15px;font-size:.95rem;min-height:45px;padding:9px 12px;display:flex;gap:7px;align-items:center}.replay-caption svg{width:19px;height:19px}.caption-note{font-size:.8rem;font-weight:700;color:#536184}.work-area{background:white;border:2px solid var(--line);border-radius:32px;box-shadow:var(--shadow);padding:26px;min-width:0}.work-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:18px}.work-heading h2{font-size:1.65rem;font-weight:950;letter-spacing:-.025em;margin:0;line-height:1.25}.round-note{font-weight:800;color:#506081;font-size:.94rem;white-space:nowrap}.garden-bed{background:#f0f9e5;border-radius:24px;padding:20px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;min-height:256px;align-content:center;align-items:center;justify-content:center}.berry-button{height:104px;background:transparent;border-radius:22px;position:relative;border:3px solid transparent;display:grid;place-items:center;padding:6px}.berry-button img{width:90px;height:90px;object-fit:contain;max-width:100%}.berry-button:hover:not(:disabled){background:#ffffff80}.berry-button.counted{border-color:#4a7c21;background:#ffffffa8}.count-label{position:absolute;right:0;top:-3px;background:#305d12;color:white;border:2px solid white;border-radius:50%;width:31px;height:31px;display:grid;place-items:center;font-size:1.1rem;font-weight:950}.just{animation:pop .45s ease-out}.empty-space{height:104px}
.answers-title{font-size:1.15rem;font-weight:900;margin:20px 0 10px}.answers{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.answer{background:#eff5ff;border:2px solid #c8dcff;min-height:60px;border-radius:18px;font-size:1.6rem;box-shadow:0 3px 0 #c8dcff}.answer:hover:not(:disabled){background:#dce9ff}.answer.wrong{border-color:#c76415;background:#fff0dd}.answer.correct{background:#d6f0b2;border-color:#4a7c21}.answer:disabled:not(.correct){opacity:.55}.helper-text{margin:13px 0 0;font-size:.96rem;color:#526080;font-weight:700}.lesson-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:22px}.primary,.secondary{border-radius:20px;padding:14px 23px;min-height:58px}.primary{background:var(--blue);color:white;box-shadow:0 4px 0 var(--blue-dark)}.primary:hover{background:#1459df}.secondary{background:#eef4fc;border:2px solid var(--line)}.secondary:hover{background:#e0edff}.primary:disabled,.secondary:disabled{opacity:.55;box-shadow:none}.lesson-actions .primary{min-width:165px}.demo-label{font-size:.98rem;font-weight:800;margin:14px 0 0;color:#516183;text-align:center}.progress-track{display:flex;gap:9px;align-items:center;justify-content:center;margin-top:16px}.progress-dot{width:12px;height:12px;border:2px solid #a5bddb;border-radius:50%;background:white}.progress-dot.done{background:var(--teal);border-color:var(--teal)}
.ten-frame{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;background:#f0ecff;border:3px solid #8b81c5;border-radius:23px;padding:12px}.frame-cell{aspect-ratio:1;background:white;border:2px dashed #aca3d3;border-radius:14px;min-width:0;min-height:0;padding:3px;display:grid;place-items:center}.frame-cell img{width:100%;height:100%;object-fit:contain;max-height:95px}.frame-cell.filled{border:2px solid #dabc5c;background:#fff9df}.frame-cell.added{border:2px solid #db6a9a;background:#fff0f6}.frame-cell.hint{outline:3px solid #b36306;outline-offset:0;background:#fff4cf}.frame-cell:disabled{opacity:1}.snack-counter{display:flex;justify-content:center;gap:12px;align-items:center;margin:20px 0 14px;font-size:1.18rem;font-weight:850}.snack-counter img{width:35px;height:35px}.equation{text-align:center;font-size:1.8rem;font-weight:950;margin:0 0 18px;letter-spacing:.05em}.tray-actions{display:flex;gap:10px;justify-content:center;margin:18px 0 0}.tray-actions button{font-size:1rem;padding:12px 15px}.feedback{margin:18px 0 0;padding:14px 18px;border-radius:18px;background:#eff5ff;font-weight:850;line-height:1.35;min-height:54px;font-size:1.1rem}.feedback:empty{display:none}.feedback.success{background:#e5f5ce;color:#305d12}.feedback.retry{background:#fff2df;color:#75400c}.finish{text-align:center;padding:18px 0}.finish img{width:160px;height:160px}.finish h2{font-size:2rem}.finish p{font-size:1.15rem}.finish-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:14px}
dialog{width:min(580px,calc(100% - 32px));max-height:85svh;padding:26px;border:2px solid var(--line);border-radius:30px;color:var(--ink);box-shadow:0 20px 80px #213b6340}dialog::backdrop{background:#17365c70}.dialog-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-top h2{margin:0;font-size:1.7rem}dialog p{font-size:1rem;line-height:1.55}dialog h3{font-size:1.1rem;margin-bottom:4px}.setting-line{display:flex;gap:13px;align-items:center;padding:16px;background:#f1f7fd;border-radius:18px;font-size:1.1rem;font-weight:800}.setting-line input{width:25px;height:25px;accent-color:var(--blue)}.voice-note{background:#f0f7e7;padding:14px;border-radius:15px}.voice-tests{display:flex;gap:12px}.voice-tests button{flex:1;font-size:1rem}.privacy-note{color:#536184}.no-script{padding:30px}
@keyframes pop{0%{transform:scale(.8)}65%{transform:scale(1.07)}100%{transform:scale(1)}}@keyframes bob{to{transform:translateY(-6px) rotate(1deg)}}
body.calm *,body.calm *::before,body.calm *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(min-width:1500px){.town-monster.pip{bottom:19%;left:36%}.town-monster.nori{bottom:18%;right:25%}}
@media(max-width:900px){.topbar{height:85px;padding:12px 22px}.town{height:calc(100svh - 85px);min-height:590px}.activity{padding:20px;min-height:calc(100svh - 85px)}.activity-header{flex-wrap:wrap}.lesson-layout{grid-template-columns:210px minmax(0,1fr);gap:18px}.teacher-image{width:205px;height:205px}.work-area{padding:20px}.garden-bed{padding:12px;gap:7px;min-height:200px}.berry-button{height:80px}.berry-button img{height:73px;width:73px}.empty-space{height:80px}.frame-cell img{max-height:75px}.town-monster.pip{left:30%}.town-monster.nori{right:20%}.destination{min-height:90px;padding:18px}.destination img{width:45px;height:45px}}
@media(max-width:650px){.topbar{height:77px;padding:10px 16px;gap:8px}.wordmark{font-size:2.6rem}.sound-button{padding:12px 16px;font-size:1rem;min-height:48px;gap:6px}.sound-button svg{width:21px;height:21px}.top-controls{gap:7px}.icon-button{width:46px;height:46px;min-height:46px}.icon-button svg{width:22px;height:22px}.town{height:calc(100svh - 77px);min-height:620px}.town-art{object-fit:cover;object-position:center top}.town-monster{bottom:34%!important;width:175px!important}.town-monster.pip{left:5%}.town-monster.nori{right:3%}.destinations{grid-template-columns:1fr;gap:12px;bottom:5%;left:5%;right:5%}.destination{min-height:86px;font-size:1.75rem;border-width:3px;gap:14px}.destination img{width:47px;height:47px}.town-note{font-size:.9rem;max-width:90%;white-space:normal;text-align:center;width:max-content}.activity{padding:15px 14px 30px}.activity-header{gap:14px;margin-bottom:15px}.activity-title{gap:12px;width:100%}.activity h1{font-size:1.5rem}.town-back{min-height:48px;border-radius:17px;padding:10px 14px;font-size:.98rem}.mode-tabs{width:100%;justify-content:center}.mode-tabs button{flex:1;font-size:1rem;min-height:48px}.lesson-layout{display:flex;flex-direction:column;gap:15px}.teacher{width:100%;padding:0;display:grid;grid-template-columns:98px minmax(0,1fr);gap:8px;align-items:center}.teacher-name{position:absolute;top:0;left:17px;font-size:.92rem}.teacher-image{width:98px;height:112px;margin-top:12px}.speech{padding:14px;min-height:130px;border-radius:22px}.speech::after{left:-9px;top:48px;transform:rotate(-45deg)}#caption{font-size:1rem;line-height:1.4;min-height:45px}.replay-line{margin-top:8px}.replay-caption{font-size:.85rem;padding:8px 10px;min-height:40px}.caption-note{font-size:.75rem}.work-area{width:100%;padding:19px 15px;border-radius:26px}.work-heading{margin-bottom:14px}.work-heading h2{font-size:1.35rem}.round-note{font-size:.82rem}.garden-bed{min-height:190px;gap:6px;padding:11px}.berry-button{height:76px;border-radius:16px;padding:3px}.berry-button img{width:65px;height:65px}.count-label{width:25px;height:25px;font-size:.9rem}.answers{gap:9px}.answer{min-height:55px;border-radius:15px;font-size:1.4rem}.answers-title{font-size:1.05rem;margin-top:17px}.lesson-actions{margin-top:19px;gap:10px}.primary,.secondary{font-size:1rem;padding:13px 17px;min-height:54px}.lesson-actions .primary{min-width:140px}.ten-frame{gap:6px;padding:9px;border-radius:18px}.frame-cell{min-height:53px;border-radius:10px}.frame-cell img{max-height:65px}.tray-actions{gap:8px;flex-wrap:wrap}.tray-actions button{font-size:.93rem;padding:10px 13px;min-height:50px}.snack-counter{font-size:1.05rem;margin:16px 0 12px}.equation{font-size:1.5rem;margin-bottom:15px}.feedback{font-size:1rem;padding:12px 14px}.helper-text{font-size:.88rem}.demo-label{font-size:.9rem}.finish img{width:130px;height:130px}dialog{padding:20px}.dialog-top h2{font-size:1.45rem}}
@media(max-width:360px){.wordmark{font-size:2.1rem}.sound-button{padding:10px}.sound-button svg{display:none}.frame-cell{min-height:48px}.destination{font-size:1.45rem}.activity h1{font-size:1.3rem}}
@media(max-width:650px){.wordmark{font-size:2.3rem}.sound-button{font-size:.95rem;padding:12px;white-space:nowrap}.top-controls{gap:7px}.sound-button svg{width:20px;height:20px}}
@media(max-width:360px){.wordmark{font-size:2.05rem}.work-area{padding:17px 10px}.garden-bed{padding:8px;gap:4px}.ten-frame{padding:8px;gap:4px}.sound-button{padding:10px}}
.activity-title,.work-heading,.dialog-top{flex-wrap:wrap}.voice-tests{flex-wrap:wrap}.voice-tests button{flex:1 1 130px;min-width:0}
@media(max-width:650px){.topbar{height:auto;min-height:77px;flex-wrap:wrap}.wordmark{font-size:min(2.3rem,10vw)}.top-controls{margin-left:auto}.sound-button{max-width:100%}}
.expanded-town{height:auto;min-height:calc(100svh - 104px);padding:20px 28px 34px;display:flex;flex-direction:column;justify-content:center;background:#bfe5d6}
.expanded-town .town-art{object-position:center 47%;opacity:.9}
.town-scene{max-width:1060px;margin:0 auto 18px;width:100%;text-align:center}
.town-scene h1{display:inline-block;background:#fffffff0;border:2px solid #ffffff;padding:10px 24px;border-radius:32px;margin:0 0 12px;font-size:1.35rem;font-weight:950;box-shadow:0 3px 15px #48634715}
.town-crew{display:flex;align-items:end;justify-content:center;gap:10px}
.town-crew figure{margin:0;min-width:0;flex:0 1 150px}
.town-crew img{width:100%;height:160px;object-fit:contain;filter:drop-shadow(0 6px 3px #25431d25)}
.town-crew figcaption{display:inline-block;background:#ffffffe8;border-radius:20px;padding:3px 13px;font-weight:950;font-size:1rem}
.expanded-town .destinations{position:relative;inset:auto;max-width:1300px;width:100%;margin:0 auto;gap:15px;grid-template-columns:repeat(5,minmax(0,1fr))}
.expanded-town .destination{flex-direction:column;gap:9px;min-height:210px;padding:16px 12px;border-radius:30px;border:3px solid white;background:#fffffff5;color:var(--ink);font-size:1.3rem;box-shadow:0 6px 0 #68858935}
.expanded-town .destination:hover{background:#eff7ff;border-color:#3973dc}
.destination-art{display:flex;justify-content:center;align-items:end;height:80px;width:100%}
.expanded-town .destination-art img{width:80px;height:80px}
.destination-title{font-weight:950;line-height:1.1;min-height:2.2em;display:grid;place-items:center}
.destination-skill{font-size:.92rem;color:#456081;font-weight:850;background:#eaf3ff;border-radius:18px;padding:6px 12px}
.teachers-art{position:relative;max-width:100%}.teacher-buddy{position:absolute;width:90px;height:95px;object-fit:contain;right:-18px;bottom:8px;filter:drop-shadow(0 4px 2px #30497525)}
.pond-board{display:grid;grid-template-columns:minmax(0,1fr) 35px minmax(0,1fr);gap:8px;align-items:center;margin-bottom:16px}
.pond-group{background:#e6f8f2;border:2px solid #a7d9c9;border-radius:22px;padding:12px;min-width:0;align-self:stretch}
.group-name{font-size:.98rem;font-weight:900;margin:0 0 10px;text-align:center}
.pond-berries{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;min-height:56px;align-content:center}
.pond-berry{min-height:48px;height:52px;min-width:0;position:relative;padding:3px;background:transparent;border:2px solid transparent;border-radius:15px;display:grid;place-items:center}
.pond-berry img{width:100%;height:43px;object-fit:contain}.pond-berry.counted{border-color:#447b30;background:#ffffffe0}.pond-berry .count-label{width:23px;height:23px;font-size:.82rem;right:-3px;top:-4px}
.empty-group{grid-column:1/-1;align-self:center;text-align:center;font-weight:900;color:#536681;padding:12px 0}
.join-symbol{text-align:center;font-size:2rem;font-weight:950;color:#297562}
.addition-answers{grid-template-columns:repeat(6,minmax(0,1fr))}
.compare-baskets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.basket{background:#fff4de;border:2px solid #dfcfa8;border-radius:22px;padding:14px;min-width:0;text-align:center}.basket h3{font-size:1rem;margin:0 0 10px}
.basket-berries{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;min-height:115px;align-content:center}
.basket-berry{position:relative;border:2px solid transparent;border-radius:12px;padding:4px;min-width:0}.basket-berry img{width:100%;height:43px;object-fit:contain}.basket-berry>span{position:absolute;right:-2px;top:-4px;border-radius:20px;background:#fff;color:#4d482e;border:1px solid #c6b689;font-weight:950;min-width:20px;font-size:.8rem;padding:2px}
.basket-berry.leftover{border-color:#35769c;background:#e9f7ff}.count-basket{font-size:.95rem;padding:10px;width:100%;margin-top:12px}.compare-choices{display:flex;gap:9px;margin-top:18px}.compare-choices button{flex:1;min-width:0;padding:14px 10px;font-size:1rem}.compare-hint{text-align:center}
.shape-target{background:#fff5dd;border:2px solid #e6d7ac;border-radius:24px;padding:12px;text-align:center}.shape-target>p:first-child{font-weight:950;font-size:1.25rem;margin:0 0 4px}.shape-target>svg{display:block;width:min(220px,100%);height:165px;margin:auto}.shape-clue{font-weight:850;max-width:420px;margin:8px auto;line-height:1.4;font-size:.95rem}
.shape-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:16px}.shape-choice{background:#edf3ff;border:2px solid #c6d8f5;border-radius:20px;padding:7px 5px;font-size:.95rem;display:flex;align-items:center;flex-direction:column;gap:2px;min-width:0;min-height:112px}.shape-choice svg{width:100%;height:65px}.shape-choice.correct{border-color:#467923;background:#e4f4cb}.shape-choice.wrong,.compare-choices .wrong{border-color:#be7326;background:#fff0dd}.shape-choice:disabled{opacity:1}
@media(max-width:1100px){.expanded-town .destinations{grid-template-columns:repeat(3,minmax(0,1fr));max-width:920px}.expanded-town .destination{min-height:170px}.town-crew img{height:130px}.town-crew figure{flex-basis:120px}}
@media(max-width:900px){.pond-board{grid-template-columns:1fr;gap:5px}.join-symbol{font-size:1.6rem;line-height:1}.pond-group{padding:10px}.addition-answers{grid-template-columns:repeat(4,minmax(0,1fr))}.shape-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.compare-baskets{gap:9px}.basket{padding:10px}.basket-berries{min-height:100px}.basket-berry{padding:2px}.basket-berry img{height:35px}.compare-choices{flex-wrap:wrap}.compare-choices button{flex:1 1 110px}}
@media(max-width:650px){.expanded-town{min-height:calc(100svh - 77px);padding:18px 14px 26px;justify-content:start}.town-scene{margin-bottom:18px}.town-scene h1{font-size:1.1rem;padding:9px 19px;margin-bottom:10px}.town-crew{gap:2px}.town-crew figure{flex:1 1 0}.town-crew img{height:77px}.town-crew figcaption{font-size:.72rem;padding:2px 5px}.expanded-town .destinations{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.expanded-town .destination{min-height:162px;padding:12px 8px;gap:7px;border-radius:25px;font-size:1.12rem}.destination-art{height:65px}.expanded-town .destination-art img{width:65px;height:65px}.destination-skill{font-size:.78rem;padding:5px 9px}.destination-title{min-height:2.2em}.teachers-art{width:98px}.teacher-buddy{width:48px;height:53px;right:-12px;bottom:5px}.addition-answers .answer{font-size:1.35rem;min-height:52px}.basket-berries{min-height:102px}.basket-berry img{height:30px}.count-basket{font-size:.85rem;min-height:48px;padding:9px}.compare-choices button{font-size:.92rem;flex:1 1 80px;padding:12px 7px;min-height:58px}.shape-target>svg{height:135px}.shape-choice{min-height:112px}.pond-berry{min-height:50px}.pond-berries{gap:7px}}
@media(max-width:360px){.expanded-town .destination-art img{width:55px;height:60px}.expanded-town .destination{min-height:157px;font-size:1rem}.destination-skill{font-size:.7rem;padding:5px 7px}.town-crew img{height:64px}}
.town-crew{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:7px}.town-crew img{height:115px}.town-crew figure{min-width:0}.town-crew figcaption{font-size:.88rem;padding:3px 10px}.expanded-town .destination{min-height:175px}.expanded-town .destination-art,.expanded-town .destination-art img{height:64px}.expanded-town .destination-art img{width:64px}
.puzzle-instruction{text-align:center;font-weight:850;font-size:1.15rem;line-height:1.4}.take-board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;background:#eef4e1;border:2px solid #ccdcae;border-radius:24px;padding:16px;min-height:130px;margin-bottom:18px}.take-berry{border:2px solid transparent;background:white;border-radius:18px;position:relative;min-width:0;height:82px;padding:5px}.take-berry img{width:100%;height:70px;object-fit:contain}.take-berry.taken img{opacity:.3}.take-berry.taken{background:#f4eedc;border-color:#bb947a}.take-berry>span{position:absolute;right:2px;top:0;font-size:1.25rem;font-weight:950;color:#3c6429}.take-berry.taken>span{inset:0;display:grid;place-items:center;font-size:3rem;color:#875536}
.number-trail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:center;padding:25px 15px;background:#e8f8eb;border-radius:28px;margin-bottom:18px}.stepping-stone{display:grid;place-items:center;aspect-ratio:1;min-width:0;font-size:2.2rem;font-weight:950;background:#fff4d5;border:3px solid #bca275;border-radius:48% 42% 45% 46%;box-shadow:0 5px 0 #bca275}.missing{background:#eef3ff;border:3px dashed #7192bd;border-radius:20px;color:#435f91}.trail-answers{grid-template-columns:repeat(4,minmax(0,1fr))}
.pattern-strip{display:flex;flex-wrap:wrap;gap:7px;justify-content:center;background:#fff5df;border-radius:24px;padding:20px 12px;margin:16px 0}.pattern-token{width:76px;height:76px;display:grid;place-items:center;flex-shrink:0;border:3px solid transparent;font-size:2rem;font-weight:950}.pattern-token svg{width:100%;height:100%}.pattern-token.pattern-group{border-bottom-color:#547bad}.pattern-token.group-start.pattern-group{border-left-color:#547bad;border-radius:14px 0 0 14px}.pattern-token.group-end.pattern-group{border-right-color:#547bad;border-radius:0 14px 14px 0}.pattern-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.pattern-choices button{display:flex;flex-direction:column;align-items:center;gap:3px;padding:10px 6px;min-width:0}.pattern-choices svg{width:100%;height:66px}.pattern-choices .wrong{border-color:#be7326;background:#fff0dd}
.sorting-rule{text-align:center;background:#e9f3ff;border:2px solid #bfd4f0;border-radius:18px;padding:12px;font-size:1.2rem;font-weight:950}.sort-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.sort-object{background:#f4f7ff;border:3px solid #d6e0f0;border-radius:23px;display:grid;place-items:center;position:relative;min-height:112px;min-width:0;padding:8px}.sort-object.selected{border-color:#39631f;background:#edf7da}.sort-object.rule-match{outline:3px dashed #8c611c;outline-offset:-7px}.treasure{display:grid;place-items:center;width:100%;height:85px}.treasure svg{width:100%;height:100%}.treasure.small svg{width:55%;height:55%}.selection-mark{position:absolute;bottom:3px;right:8px;background:#fff;border-radius:50%;width:25px;height:25px;font-size:1.15rem;line-height:25px;color:#365b26}
.ribbon-board{background:#f2f9ed;border:2px solid #ccdcbf;border-radius:24px;padding:24px 18px;margin:20px 0}.ribbon-row{display:grid;grid-template-columns:70px minmax(0,1fr);align-items:center;gap:14px;margin:25px 0}.ribbon-row>span{font-weight:950}.ribbon-track{height:54px;border-left:3px dashed #57715b;padding:0;position:relative}.ribbon{height:100%;display:flex;border:2px solid #4670a9;border-radius:0 12px 12px 0;box-shadow:0 4px 0 #aebdb147;background:#93b9f1}.bottom-ribbon{background:#f9bbcf;border-color:#b46885}.ribbon i{flex:1;border-right:1px dashed #43537580}.ribbon i:last-child{border:0}
@media(max-width:900px){.town-crew img{height:95px}.town-crew figcaption{padding:3px 7px;font-size:.8rem}.pattern-token{width:65px;height:65px}}
@media(max-width:650px){.town-crew{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;max-width:460px;margin:auto}.town-crew img{height:72px}.town-crew figure:nth-last-child(-n+4){transform:translateX(50%)}.town-crew figcaption{font-size:.72rem}.expanded-town .destination{min-height:155px}.take-board{padding:10px;gap:6px;min-height:96px}.take-berry{height:59px;min-height:50px}.take-berry img{height:47px}.number-trail{gap:8px;padding:22px 12px}.stepping-stone{font-size:1.65rem}.pattern-token{width:54px;height:54px}.pattern-strip{padding:15px 8px;gap:5px}.pattern-choices button{font-size:.92rem}.pattern-choices svg{height:54px}.sort-grid{gap:8px}.sort-object{min-height:91px;padding:5px}.treasure{height:66px}.sorting-rule{font-size:1.1rem}.ribbon-board{padding:13px 10px}.ribbon-row{grid-template-columns:54px minmax(0,1fr);gap:8px}.ribbon-track{height:48px}.puzzle-instruction{font-size:1.05rem}}
@media(max-width:360px){.pond-berries{grid-template-columns:repeat(4,minmax(0,1fr))}.take-board{grid-template-columns:repeat(4,minmax(0,1fr))}.town-crew img{height:62px}.pattern-token{width:48px;height:48px}}
.replay-caption{min-height:44px}

/* Nine friends live in the town; game buttons contain labels only. */
.expanded-town{padding:0 0 26px;background:#92c973;justify-content:start}
.town-scene{position:relative;width:100%;max-width:1536px;margin:0 auto;isolation:isolate}
.town-world{position:relative;width:100%;isolation:isolate}
.town-window{overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-color:#287259 #c8e3ae;scrollbar-width:thin}
.town-swipe-note{display:none}
.expanded-town .town-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 46%;opacity:1;z-index:-1}
.town-intro{position:absolute;top:8px;left:0;right:0;z-index:2;pointer-events:none}
.town-scene h1{background:transparent;border:0;box-shadow:none;color:#fff;text-shadow:0 2px 3px #183967,1px 0 #183967,-1px 0 #183967;font-size:1.6rem;margin:0;padding:7px 20px}
.town-play-note{margin:0;font-weight:900;font-size:1rem;color:white;text-shadow:0 2px 3px #173d6e}
.town-play-status{height:26px;width:100%;margin:3px 0 7px;text-align:center;font-weight:950;font-size:1.04rem;color:#203f25}
.town-crew{display:block;position:relative;height:clamp(620px,46vw,730px);width:100%;max-width:none;margin:0}
.town-crew figure{position:absolute;left:var(--friend-x);top:var(--friend-y);width:clamp(165px,14vw,215px);margin:0;transform:translate(-50%,-100%)!important}
.town-crew figure:nth-child(1){--friend-x:18%;--friend-y:54%}
.town-crew figure:nth-child(2){--friend-x:82%;--friend-y:54%}
.town-crew figure:nth-child(3){--friend-x:43%;--friend-y:60%}
.town-crew figure:nth-child(4){--friend-x:30%;--friend-y:96%}
.town-crew figure:nth-child(5){--friend-x:54%;--friend-y:98%}
.town-crew figure:nth-child(6){--friend-x:78%;--friend-y:95%}
.town-crew figure:nth-child(7){--friend-x:11%;--friend-y:90%}
.town-crew figure:nth-child(8){--friend-x:91%;--friend-y:76%}
.town-crew figure:nth-child(9){--friend-x:63%;--friend-y:63%}
.town-crew figcaption{background:transparent;color:white;font-size:1rem;text-shadow:0 2px 3px #173d6e,1px 0 #173d6e,-1px 0 #173d6e;padding:2px 8px}
.monster-friend{display:block;width:100%;background:transparent;border-radius:30px;padding:0;min-width:44px;min-height:44px;position:relative;-webkit-tap-highlight-color:transparent}
.friend-sprite{display:block;height:clamp(180px,14.5vw,220px);width:100%;position:relative;transform-origin:center 80%;transition:transform .2s ease;filter:drop-shadow(0 8px 4px #17371b35)}
.town-crew .friend-sprite img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:none;transition:opacity .1s}
.friend-pose{opacity:0}
.pose-ready:is(.friend-preview,.friend-playing) .friend-idle{opacity:0}
.pose-ready:is(.friend-preview,.friend-playing) .friend-pose{opacity:1}
.friend-preview .friend-sprite{transform:translateY(-5px) rotate(var(--friend-lean,0deg)) scale(1.06)}
.monster-friend:hover{background:transparent}.monster-friend:active{transform:none}
.friend-playing .friend-sprite{animation:friend-greeting .55s ease-in-out 4}
.friend-playing[data-gesture="dance"] .friend-sprite{animation:friend-dance .45s ease-in-out 4}
.friend-playing[data-gesture="wink"] .friend-sprite{animation:friend-wink .6s ease-in-out 3}
.friend-playing[data-gesture="kiss"] .friend-sprite{animation:friend-kiss .7s ease-in-out 3}
.friend-playing[data-gesture="point"] .friend-sprite{animation:friend-point .7s ease-in-out 3}
.friend-playing[data-gesture="fist"] .friend-sprite{animation:friend-cheer .5s ease-in-out 4}
.expanded-town .destinations{position:static;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:calc(100% - 40px);max-width:1300px;margin:0 auto;gap:10px}
.expanded-town .destination{background:transparent;border:2px solid transparent;box-shadow:none;min-height:92px;padding:6px;flex-direction:column;border-radius:20px;gap:5px;-webkit-tap-highlight-color:transparent}
.expanded-town .destination:hover{background:#16458a18;border-color:#c7e9ff88}
.destination-title{background:#173e86ed;color:#fff;padding:7px 12px;border-radius:15px;min-height:2.7em;line-height:1.15;font-size:1.12rem;width:100%;max-width:none}
.destination-skill{background:#173e78e6;color:#fff;font-size:.86rem;padding:5px 10px}
@keyframes friend-greeting{0%,100%{transform:rotate(-4deg) translateY(0)}50%{transform:rotate(5deg) translateY(-7px)}}
@keyframes friend-dance{0%,100%{transform:translate(-5px,0) rotate(-7deg)}50%{transform:translate(5px,-10px) rotate(7deg)}}
@keyframes friend-wink{0%,100%{transform:rotate(0)}50%{transform:rotate(-6deg) scale(1.06)}}
@keyframes friend-kiss{0%,100%{transform:scale(1)}50%{transform:translateY(-5px) scale(1.07)}}
@keyframes friend-point{0%,100%{transform:translateX(0)}50%{transform:translateX(7px) rotate(3deg)}}
@keyframes friend-cheer{0%,100%{transform:translateY(0)}50%{transform:translateY(-11px) rotate(-3deg)}}
@media(max-width:1100px){.town-crew figure{width:155px}.friend-sprite{height:170px}.expanded-town .destinations{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){
  .town-world{width:1000px}
  .town-crew{height:620px}
  .town-crew figure{width:180px}
  .friend-sprite{height:185px}
  .town-swipe-note{display:inline}
}
@media(max-width:650px){
  .town-scene h1{font-size:1.35rem}.town-play-note{font-size:.94rem}
  .town-crew figcaption{font-size:.94rem}
  .town-play-status{font-size:.93rem;height:25px}
  .expanded-town .destinations{grid-template-columns:repeat(2,minmax(0,1fr));width:calc(100% - 24px);gap:8px}
  .expanded-town .destination{min-height:90px;padding:5px 2px}
  .destination-title{font-size:1.02rem;padding:7px 9px}
  .destination-skill{font-size:.83rem}
}
@media(max-width:360px){.destination-title{font-size:.94rem}.destination-skill{font-size:.78rem}}
.calm .friend-sprite{animation:none!important;transition:none!important;transform:none!important}.calm .friend-sprite img{transition:none!important}
@media(prefers-reduced-motion:reduce){.friend-sprite{animation:none!important;transition:none!important;transform:none!important}.friend-sprite img{transition:none!important}}
