
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--ink);font-family:var(--font);line-height:1.5}button,input{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--cyan);outline-offset:3px}[hidden]{display:none!important}
.topbar{height:82px;background:#fff;border-bottom:1px solid #eee7db;display:flex;justify-content:space-between;align-items:center;padding:8px max(28px,calc((100vw - 1320px)/2));gap:16px}.brand{display:flex;align-items:center;gap:8px;color:var(--ink);text-decoration:none}.brand img{width:66px;height:66px;object-fit:contain}.brand strong,.brand small{display:block}.brand strong{font-size:17px}.brand small{font-size:12px;font-weight:700;color:var(--muted)}.top-actions{display:flex;align-items:center;gap:16px}.back-link{color:var(--orange);font-size:14px;font-weight:800;text-decoration:none}.back-link:hover{text-decoration:underline}
main{max-width:1320px;margin:auto;padding:28px 28px 80px}.eyebrow{font-size:12px;letter-spacing:.14em;text-transform:uppercase;font-weight:800;color:var(--orange)}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:15px;padding:13px 21px;font-size:15px;font-weight:800;text-decoration:none;transition:transform .18s,background .18s,box-shadow .18s}.button:hover{transform:translateY(-2px)}.primary{background:var(--orange);color:#fff;box-shadow:0 7px 0 #cc3d09,0 14px 22px #f2500d2b}.primary:hover{background:var(--orange-dark)}.secondary{background:#fff;color:var(--ink);border:1px solid #eadfd0;box-shadow:0 5px 0 #e7dccb}.mini{font-size:12px;padding:9px 13px;background:#fff1e8;color:var(--orange)}.text-button{background:none;border:0;color:var(--orange);font-size:12px;font-weight:800;padding:6px}.text-button:hover{text-decoration:underline}.text-button.danger{color:#c64242}
.hero{min-height:395px;border-radius:32px;background:linear-gradient(115deg,#fff2da 0%,#ffedc2 48%,#dff8f7 100%);position:relative;overflow:hidden;display:grid;grid-template-columns:1fr 1fr;align-items:center;padding:44px 56px;box-shadow:0 16px 36px #c8873d1a}.hero:before,.hero:after{content:'';position:absolute;border-radius:50%;background:#fff8e5a8}.hero:before{width:530px;height:530px;left:-170px;top:-270px}.hero:after{width:440px;height:440px;right:-180px;bottom:-290px}.hero-copy{position:relative;z-index:2}.hero h1{font-size:clamp(70px,8vw,116px);line-height:.88;letter-spacing:-.075em;margin:20px 0 24px;font-weight:800;transform:rotate(-3deg);text-shadow:0 7px 0 #ffffffad,0 12px 17px #d7621f21}.hero h1 span:first-child{color:var(--orange)}.hero h1 span:last-child{color:var(--cyan)}.hero p{font-size:18px;font-weight:700;max-width:460px;color:#51647a;margin:0 0 28px}.hero-actions{display:flex;gap:12px;flex-wrap:wrap}.hero-art{height:300px;position:relative;z-index:1}.art-sun{position:absolute;font-size:102px;color:var(--yellow);right:7%;top:-50px;line-height:1}.art-cloud{position:absolute;background:#fff;border-radius:99px;filter:drop-shadow(0 12px 12px #55a4ac20)}.art-cloud:before,.art-cloud:after{content:'';position:absolute;border-radius:50%;background:#fff}.cloud-one{width:200px;height:55px;left:6%;top:32px;transform:rotate(-6deg)}.cloud-one:before{width:90px;height:90px;left:27px;bottom:9px}.cloud-one:after{width:105px;height:105px;right:24px;bottom:5px}.cloud-two{width:120px;height:30px;right:2%;bottom:22px;opacity:.7}.cloud-two:before{width:55px;height:55px;left:12px;bottom:3px}.cloud-two:after{width:70px;height:70px;right:8px;bottom:1px}.art-pill{position:absolute;border-radius:28px;padding:12px 28px;font-size:32px;font-weight:800;letter-spacing:.03em;box-shadow:0 9px 0 #00000016,0 15px 22px #33333320;color:#fff}.pill-i{background:var(--orange);left:17%;top:90px;transform:rotate(-10deg)}.pill-like{background:var(--cyan);right:22%;top:60px;transform:rotate(8deg)}.pill-apples{background:var(--pink);left:32%;bottom:26px;transform:rotate(-4deg)}.art-star{position:absolute;color:var(--mint);font-size:52px;right:4%;bottom:72px}.art-trail{position:absolute;border-top:5px dashed #fff;border-radius:50%;width:240px;height:120px;right:17%;bottom:70px;transform:rotate(-11deg)}
.teacher{padding-top:64px}.section-heading{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:22px}.section-heading h2,.settings h2{font-size:35px;letter-spacing:-.04em;line-height:1.15;margin:7px 0}.section-heading p{margin:0;color:var(--muted)}.set-count{background:#fff1bd;border:1px solid #f6d66a;border-radius:99px;padding:9px 16px;color:#8c5a0f;font-size:13px;font-weight:800;white-space:nowrap}.teacher-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px}.lessons-panel,.editor-panel{background:#fff;border:1px solid #eee7db;border-radius:26px;padding:23px;box-shadow:0 10px 28px #5d3f1910}.panel-head,.editor-title-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.panel-head h3,.editor-panel h3{font-size:21px;margin:0;letter-spacing:-.025em}.lesson-list{display:grid;gap:9px}.lesson-item{width:100%;border:2px solid #efe8dd;background:#fffaf3;border-radius:16px;padding:14px;text-align:left;color:var(--ink)}.lesson-item[aria-current=true]{border-color:var(--orange);background:#fff1e8}.lesson-item strong{display:block;font-size:15px}.lesson-item small{display:block;color:var(--muted);margin-top:3px;font-size:11px}.storage-note{color:#9aa3af;font-size:11px;margin:17px 3px 0}.editor-badge{display:inline-block;background:#e1f7fa;color:#00859d;font-size:10px;font-weight:800;letter-spacing:.1em;border-radius:99px;padding:5px 9px;margin-bottom:10px}.editor-panel label{font-size:13px;font-weight:800;display:block;margin:15px 0 7px}.editor-panel input{border:2px solid #e6e9ed;border-radius:13px;padding:11px 13px;width:100%;color:var(--ink);font-weight:700}.sentence-heading{display:flex;align-items:center;justify-content:space-between;margin:22px 0 10px}.sentence-heading h4{margin:0;font-size:15px}.sentence-heading span{font-size:12px;color:var(--muted);font-weight:800}.sentence-list{display:grid;gap:9px}.sentence-item{display:flex;align-items:center;gap:10px;background:#fffaf3;border:1px solid #f1e5d5;border-radius:15px;padding:10px 12px}.sentence-number{width:28px;height:28px;border-radius:9px;background:var(--yellow);color:#8a5405;display:grid;place-items:center;font-size:12px;font-weight:800;flex:none}.sentence-item strong{flex:1;min-width:0;font-size:14px;overflow-wrap:anywhere}.sentence-item button{border:0;background:#fff;color:#8793a2;border-radius:9px;width:29px;height:29px;font-size:16px;flex:none}.sentence-item button:hover{color:var(--orange)}.empty-sentences{background:#fff8ef;color:var(--muted);padding:24px;text-align:center;border-radius:16px;font-size:13px}.add-sentence{margin-top:16px;border-top:1px solid #f0e9df;padding-top:4px}.sentence-form{display:flex;gap:9px}.sentence-form .button{white-space:nowrap}.editor-status{min-height:18px;margin:7px 0 0;color:#bf4a1a;font-size:12px;font-weight:700}.tip{color:#9aa3af;font-size:11px;margin:0}.settings{background:#fff;border:1px solid #eee7db;border-radius:26px;box-shadow:0 10px 28px #5d3f1910;display:flex;align-items:center;gap:20px;justify-content:space-between;margin-top:20px;padding:23px}.settings h2{font-size:26px}.start-bottom{white-space:nowrap}
.game{position:fixed;inset:0;z-index:30;background:#fdfaf2;overflow:auto}.game-shell{min-height:100vh;display:flex;flex-direction:column;max-width:1700px;margin:auto}.game-header{height:82px;flex:none;display:flex;align-items:center;gap:20px;justify-content:space-between;background:#fff;border-bottom:1px solid #eee7db;padding:5px 28px}.game-brand{display:flex;align-items:center;white-space:nowrap;gap:6px;font-size:20px;font-weight:800;letter-spacing:-.04em;color:var(--orange)}.game-brand b{color:var(--cyan)}.game-brand img{width:67px;height:67px;object-fit:contain}.game-progress{min-width:180px;width:min(30vw,390px);font-size:13px;font-weight:800;color:var(--muted)}.progress-track{height:9px;border-radius:99px;background:#f4efe6;margin-top:7px;overflow:hidden}.progress-track div{height:100%;width:0;background:linear-gradient(90deg,var(--orange),var(--yellow));border-radius:99px;transition:width .3s}.game-controls{display:flex;align-items:center;gap:8px}.score-pill{background:#fff1bd;color:#8c5a0f;border-radius:99px;padding:8px 13px;font-weight:800;font-size:13px;white-space:nowrap}.round-button{border:1px solid #ece6dc;background:#fff;color:#59687b;border-radius:12px;width:38px;height:38px;font-size:20px;font-weight:800}.round-button:hover{background:#fff2e6;color:var(--orange)}.round-button.exit{color:var(--orange)}.game-content{flex:1;min-height:0;display:flex;flex-direction:column;gap:15px;padding:18px 26px}.sentence-board{background:#fff;border:2px solid #f5ddb9;border-radius:25px;padding:18px 24px;box-shadow:0 10px 25px #b77a2b12}.sentence-board h2{font-size:18px;margin:3px 0 0}.built-sentence{min-height:75px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:11px 0}.built-sentence .slot{border:2px dashed #eadccd;background:#fffaf4;min-width:75px;min-height:52px;border-radius:14px;display:grid;place-items:center;color:#cbb8a3;font-weight:800;padding:8px 14px;font-size:clamp(17px,1.7vw,25px)}.built-sentence .slot.filled{border-style:solid;border-color:#b6e5d0;background:#edfff6;color:#198862}.sentence-board-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:12px;color:var(--muted);font-weight:700}.hear-button{border:0;border-radius:99px;background:#e3f8fa;color:#087e94;font-size:12px;font-weight:800;padding:9px 14px}.arena{position:relative;overflow:hidden;flex:1;border-radius:28px;background:linear-gradient(180deg,#d9f5fb 0%,#e8fbf8 68%,#fff8df 100%);border:2px solid #c9e9ed;min-height:300px;isolation:isolate}.arena-cloud{position:absolute;background:#fff9;border-radius:99px;width:160px;height:48px}.arena-cloud:before{content:'';position:absolute;background:#fff9;border-radius:50%;width:90px;height:90px;left:34px;bottom:5px}.arena-cloud.a{left:8%;top:15%}.arena-cloud.b{right:8%;top:36%;transform:scale(.72)}.arena-cloud.c{left:26%;bottom:18%;transform:scale(.55)}.arena-ground{position:absolute;bottom:-45px;left:-5%;width:115%;height:100px;background:#b4e9b9;border-radius:50% 50% 0 0}.word-layer{position:absolute;inset:0;z-index:2}.flying-word{position:absolute;left:0;top:0;border:3px solid #fff;border-radius:999px;background:var(--chip);color:#fff;padding:10px 24px;min-width:92px;min-height:55px;max-width:28%;box-shadow:0 8px 0 var(--shadow),0 14px 21px #365d682a;font-size:clamp(19px,2vw,31px);line-height:1.2;font-weight:800;overflow-wrap:anywhere;text-align:center;z-index:2}.flying-word:hover{filter:brightness(1.08);z-index:4}.flying-word.wrong{animation:shake .35s;background:#919eaa;box-shadow:0 8px 0 #6d7d8b}.feedback{position:absolute;z-index:10;left:50%;top:50%;transform:translate(-50%,-50%) scale(.8);pointer-events:none;font-size:clamp(28px,4vw,60px);font-weight:800;color:var(--orange);text-shadow:0 4px 0 #fff;opacity:0;white-space:nowrap}.feedback.show{animation:popFeedback 3s ease-out}.feedback.good{color:var(--mint)}.game-footer{padding:0 28px 16px;display:flex;justify-content:space-between;color:#8c99a7;font-size:12px;font-weight:700}.overlay{position:absolute;inset:0;z-index:15;background:#1e35438c;display:grid;place-items:center;padding:20px;backdrop-filter:blur(5px)}.overlay-card{background:#fff;border:6px solid #fff;border-radius:31px;box-shadow:0 20px 70px #17314544;padding:36px;text-align:center;width:min(480px,100%)}.overlay-icon{font-size:65px;color:var(--yellow);line-height:1}.overlay-card h2{font-size:38px;line-height:1.1;margin:12px 0;color:var(--orange)}.overlay-card p{color:var(--muted);font-weight:700}.overlay-card .button{margin:13px 4px}.overlay-card .text-button{display:block;margin:7px auto}.end-card{width:min(620px,100%)}.review-list{max-height:180px;overflow:auto;display:grid;gap:7px;margin:18px 0}.review-list:empty{display:none}.review-list span{background:#fff3e7;color:#9d4c1f;border-radius:12px;padding:7px 12px;font-size:13px;font-weight:800}
@keyframes popFeedback{0%{opacity:0;transform:translate(-50%,-50%) scale(.7)}10%,85%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.15)}}@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-8px)}75%{transform:translateX(8px)}}
@media(max-width:1050px){.settings{align-items:flex-start;flex-wrap:wrap}.hero{padding:40px}.hero h1{font-size:75px}.game-brand{font-size:16px}.game-brand img{width:52px;height:52px}}@media(max-width:760px){.topbar{padding:7px 16px}.brand img{width:52px;height:52px}.brand strong{font-size:13px}.brand small{font-size:10px}.back-link{font-size:11px}main{padding:18px 14px 50px}.hero{grid-template-columns:1fr;min-height:0;padding:33px 24px 20px}.hero h1{font-size:65px}.hero-art{height:220px;max-width:450px;width:100%;margin:auto}.art-pill{font-size:22px}.teacher{padding-top:40px}.teacher-layout{grid-template-columns:1fr}.section-heading h2{font-size:28px}.settings{display:block}.game-header{height:auto;min-height:65px;padding:6px 12px;gap:7px;flex-wrap:wrap}.game-progress{order:3;width:100%;padding-bottom:6px}.score-pill{padding:6px 9px}.round-button{width:32px;height:32px;font-size:17px}.game-content{padding:10px;gap:10px}.sentence-board{padding:12px}.built-sentence .slot{min-width:55px;min-height:42px;padding:6px 9px;font-size:16px}.arena{min-height:380px}.flying-word{min-width:65px;min-height:46px;padding:7px 11px;font-size:17px;max-width:31%}.game-footer{padding:0 12px 10px;font-size:10px}}@media(max-width:420px){.hero-actions .button{width:100%}.game-brand{font-size:13px}.game-brand img{width:42px;height:42px}.game-controls{gap:4px}.sentence-form{flex-wrap:wrap}.sentence-form .button{width:100%}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}.flying-word{animation:none!important}}

/* Teacher controls and per-word countdown. */
.settings-heading{min-width:190px}
.game-settings{display:grid;grid-template-columns:repeat(2,minmax(190px,1fr));gap:14px;flex:1}
.setting-control{min-width:0;background:#fffaf1;border:1px solid #f4e5cc;border-radius:17px;padding:12px 14px}
.setting-control label{display:block;color:var(--ink);font-size:13px;font-weight:800;margin-bottom:6px}
.setting-control small{display:block;color:var(--muted);font-size:10px;line-height:1.35;margin-top:6px}
.speed-row,.time-row{display:flex;align-items:center;gap:10px}
.speed-row input{width:100%;min-width:80px;accent-color:var(--orange)}
.speed-row output{min-width:40px;color:var(--orange);font-size:16px;font-weight:800;text-align:right}
.time-row input{width:74px;border:1px solid #e9d8c3;border-radius:10px;background:#fff;padding:5px 8px;font-weight:800;color:var(--ink)}
.time-row span{color:var(--muted);font-size:12px;font-weight:700}
.sentence-board-footer{flex-wrap:wrap}
.target-timer{display:flex;align-items:baseline;gap:4px;min-width:144px;position:relative;padding:5px 0 11px;color:var(--orange)}
.target-timer>span{font-size:11px;font-weight:800;margin-right:4px}
.target-timer strong{font-size:26px;line-height:1;font-variant-numeric:tabular-nums}
.target-timer small{font-size:12px}
.target-timer.urgent{color:var(--pink)}
.timer-track{position:absolute;left:0;right:0;bottom:0;height:5px;background:#f5e9d9;border-radius:99px;overflow:hidden}
.timer-track div{height:100%;width:100%;background:currentColor;border-radius:99px}
.built-sentence .slot.missed{border-style:solid;border-color:#f3b8c8;background:#fff0f4;color:#bc4569;text-decoration:line-through}
@media(max-width:1050px){.game-settings{width:100%;flex-basis:100%}}
@media(max-width:650px){.settings{padding:18px}.settings-heading{min-width:0}.game-settings{grid-template-columns:1fr}.settings .start-bottom{width:100%}.target-timer{min-width:124px}}
