:root{--bg: #eef1f8;--surface: #ffffff;--ink: #1b1f3b;--muted: #6b7088;--line: #e2e6f0;--brand: #5350e8;--brand-ink: #3f3cc9;--ok: #14a06b;--ok-soft: #e2f4ec;--bad: #e23d4b;--bad-soft: #fbe6e8;--warn: #f2a33c;--tile: #ffe6a8;--tile-line: #ebcb86;--display: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;--body: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;--mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;--shadow: 0 1px 2px rgba(27, 31, 59, .06), 0 10px 30px rgba(27, 31, 59, .06)}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg);color:var(--ink);font-family:var(--body);line-height:1.5;-webkit-font-smoothing:antialiased;touch-action:manipulation}.wrap{max-width:980px;margin:0 auto;padding:20px 18px 80px}h1,h2,h3{font-family:var(--display);margin:0;line-height:1.1}button{font-family:inherit}.muted{color:var(--muted)}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.brand{display:flex;align-items:center;gap:8px;cursor:pointer;border:0;background:none;padding:0}.brand .tile{width:30px;height:30px;font-size:17px;border-radius:7px}.brand .name{font-family:var(--display);font-weight:700;font-size:20px;letter-spacing:-.01em}.cfg-chip{font-size:13px;color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:6px 12px;white-space:nowrap}.tile{display:inline-flex;align-items:center;justify-content:center;background:var(--tile);color:var(--ink);border:1px solid var(--tile-line);border-radius:10px;box-shadow:inset 0 -3px #78500024;font-family:var(--display);font-weight:700;text-transform:uppercase;user-select:none}.wordmark{display:flex;gap:7px;flex-wrap:wrap}.wordmark .tile{width:54px;height:60px;font-size:32px}.hero{margin:6px 0 26px}.hero p{margin:14px 0 0;color:var(--muted);max-width:46ch;font-size:16px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:20px;margin-bottom:22px}.panel h2{font-size:15px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:700}.panel .eyebrow{display:flex;align-items:center;gap:8px;margin-bottom:16px}.panel .eyebrow .num{font-family:var(--mono);font-size:13px;color:var(--brand);font-weight:700}.eyebrow.collapsible{width:100%;border:0;background:none;padding:0;cursor:pointer;text-align:left;font:inherit}.eyebrow.collapsible .chevron{margin-left:8px;color:var(--muted);font-size:14px;transition:transform .2s ease}.config-summary{margin-left:auto;font-family:var(--mono);font-size:12px;color:var(--muted);font-weight:400;text-transform:none;letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;max-width:0;transition:opacity .2s ease}.panel.is-collapsed .config-summary{opacity:1;max-width:60%}.panel.is-collapsed .eyebrow.collapsible{margin-bottom:0}.panel.is-collapsed .eyebrow.collapsible .chevron{transform:rotate(-90deg)}.collapsible-body{display:grid;grid-template-rows:1fr;transition:grid-template-rows .25s ease}.collapsible-inner{min-height:0;overflow:hidden}.panel.is-collapsed .collapsible-body{grid-template-rows:0fr}.field{margin-bottom:16px}.field:last-child{margin-bottom:0}label{display:block;font-weight:600;font-size:14px;margin-bottom:7px}textarea,input[type=number]{width:100%;border:1px solid var(--line);border-radius:12px;background:#fbfcfe;padding:11px 13px;font-family:var(--body);font-size:14px;color:var(--ink);resize:vertical}textarea{min-height:96px;font-family:var(--mono);font-size:13px;line-height:1.7}textarea:focus,input:focus{outline:2px solid var(--brand);outline-offset:1px;border-color:transparent}.config-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.list-preview{margin-top:10px;padding:11px 13px;border:1px solid var(--line);border-radius:12px;background:#fbfcfe;font-family:var(--mono);font-size:12px;line-height:1.7;color:var(--muted);max-height:72px;overflow:auto}.seg{display:flex;background:#f1f3f9;border:1px solid var(--line);border-radius:12px;padding:4px;gap:4px}.seg button{flex:1;border:0;background:none;padding:9px 8px;border-radius:9px;font-size:14px;font-weight:600;color:var(--muted);cursor:pointer}.seg button.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px #1b1f3b1f}.count-note{font-size:13px;color:var(--muted);margin-top:6px}.config-actions{display:flex;justify-content:flex-end;margin-top:18px}.games,.courses{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.game-card,.course-card{position:relative;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px;cursor:pointer;transition:transform .12s ease,box-shadow .12s ease;box-shadow:var(--shadow)}.game-card:hover,.course-card:hover{transform:translateY(-3px);box-shadow:0 10px 26px #1b1f3b1f}.game-card:focus-visible,.course-card:focus-visible{outline:2px solid var(--brand);outline-offset:2px}.game-card .gtile,.course-card .gtile{width:42px;height:46px;font-size:24px;margin-bottom:14px}.game-card h3,.course-card h3{font-size:18px;margin-bottom:5px;letter-spacing:-.01em}.game-card p,.course-card p{margin:0;font-size:13px;color:var(--muted)}.game-card .gnum{position:absolute;top:16px;right:18px;font-family:var(--mono);font-size:13px;color:var(--line);font-weight:700}.course-nav{margin-bottom:8px}.vocab-link-wrap{margin:0 0 20px}.vocab-link{border:0;background:none;padding:0;font-size:15px;font-weight:600;color:var(--brand);cursor:pointer;text-decoration:underline;text-underline-offset:3px}.vocab-link:hover{color:var(--ink)}#vocabulary-view{display:none}.vocab-toolbar{margin-bottom:18px;display:flex;flex-direction:column;gap:14px}.vocab-mode-field label{display:block;font-size:13px;font-weight:600;color:var(--muted);margin-bottom:6px}.vocab-list-panel{max-height:min(70vh,640px);overflow:auto}.vocab-grid{display:grid;gap:12px;margin-bottom:24px}.vocab-group-header{font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:8px 0 12px}.vocab-group-header:not(:first-child){margin-top:28px}.vocab-list-panel .vocab-card{text-align:left}.vocab-list-panel .vocab-word{font-size:18px;margin-bottom:8px}.vocab-carousel{display:flex;flex-direction:column;align-items:center;gap:16px}.vocab-counter{font-size:14px;font-weight:700;color:var(--muted);letter-spacing:.02em}.vocab-carousel-viewport{width:100%;max-width:420px;min-height:180px;touch-action:pan-y}.vocab-slide{display:flex;align-items:center;justify-content:center;min-height:180px}.vocab-carousel-nav{display:flex;gap:16px}.vocab-nav-btn{width:48px;height:48px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:28px;line-height:1;font-weight:600;color:var(--ink);cursor:pointer}.vocab-nav-btn:hover{border-color:var(--brand);color:var(--brand)}.vocab-separator{width:100%;padding:32px 20px;border:2px dashed var(--line);border-radius:16px;text-align:center;background:#fbfcfe}.vocab-separator-name{font-size:22px;font-weight:700;color:var(--ink)}.vocab-card{width:100%;padding:20px 18px;border:1px solid var(--line);border-radius:12px;background:var(--surface);text-align:center}.vocab-word{font-size:28px;font-weight:700;color:var(--ink);margin-bottom:12px}.vocab-card-head{display:flex;align-items:center;justify-content:center;gap:10px}.vocab-list-panel .vocab-card-head{justify-content:space-between}.vocab-play{flex:none;width:38px;height:38px;margin-bottom:12px;font-size:17px;line-height:1;border:1px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer}.vocab-play:hover{border-color:var(--brand);background:#f4f4ff}.vocab-play:active{transform:translateY(1px)}.vocab-play.is-playing{border-color:var(--brand);background:#eceaff}.vocab-carousel .vocab-card .sentence{margin:0 auto;text-align:left}.vocab-list-panel .vocab-card .sentence{margin:0;text-align:left}#game-view{display:none}.gv-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.back{border:1px solid var(--line);background:var(--surface);border-radius:10px;padding:8px 14px;font-weight:600;font-size:14px;cursor:pointer;color:var(--ink)}.back:hover{border-color:var(--brand)}.gv-title{display:flex;align-items:center;gap:10px}.gv-title .tile{width:34px;height:38px;font-size:20px}.gv-title h2{font-size:21px}.progress{display:flex;align-items:center;gap:14px;margin-bottom:18px;flex-wrap:wrap}.pbar{flex:1;min-width:140px;height:10px;background:#e7eaf3;border-radius:999px;overflow:hidden}.pbar i{display:block;height:100%;background:var(--brand);width:0;transition:width .3s ease}.tally{display:flex;gap:8px;font-size:13px;font-weight:700}.tally .g{color:var(--ok)}.tally .r{color:var(--bad)}.stage{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:26px 22px;min-height:230px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:18px}.scramble{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.scramble .tile{width:46px;height:52px;font-size:26px;cursor:default}.scramble .letter-pick{cursor:pointer;transition:transform .08s ease,opacity .15s ease}.scramble .letter-pick:hover:not(.used){background:#ffd98a;transform:translateY(-2px)}.scramble .letter-pick:active:not(.used){transform:translateY(0)}.scramble .letter-pick.used{opacity:.35;cursor:default;pointer-events:none}.letter-pad{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;max-width:460px;margin:0 auto}.letter-pad .pad-btn{font-family:var(--display);font-weight:700;font-size:15px;min-width:36px;height:38px;padding:0 6px;border:1px solid var(--line);background:var(--surface);border-radius:9px;color:var(--ink);cursor:pointer}.letter-pad .pad-btn:hover{border-color:var(--brand);background:#f4f4ff}.letter-pad .pad-btn:active{transform:translateY(1px)}.letter-pad .pad-back{font-family:var(--mono);font-weight:400}.letter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(58px,1fr));gap:10px;width:100%;max-width:560px;margin:0 auto}.letter-grid .letter-key{aspect-ratio:1 / 1;width:100%;font-size:24px;cursor:pointer;padding:0;flex-direction:column;gap:1px;transition:transform .08s ease,background .15s ease}.letter-grid .letter-key-ipa{font-family:var(--mono);font-size:10px;font-weight:400;line-height:1;text-transform:none;color:var(--muted);max-width:100%;padding:0 2px;overflow:hidden;text-overflow:ellipsis}.letter-grid .letter-key:hover{background:#ffd98a;transform:translateY(-2px)}.letter-grid .letter-key:active{transform:translateY(0)}.letter-grid .letter-key.is-playing{background:#ffd98a;box-shadow:inset 0 -3px #78500024,0 0 0 3px var(--brand)}#sayIn{text-transform:none;letter-spacing:normal;text-align:left;font-family:inherit;width:min(420px,86vw)}.say-ipa{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 18px;max-width:560px;margin:0 auto}.say-ipa-word{display:flex;flex-direction:column;align-items:center;gap:2px}.say-word{font-size:15px;font-weight:600}.say-phonemes{font-family:var(--mono);font-size:18px;color:var(--brand)}.say-ipa-note{text-align:center;margin-top:6px;font-size:12px}.say-translation{text-align:center;margin-top:10px;font-size:16px;font-style:italic;color:var(--muted)}.say-spinner{display:inline-block;width:12px;height:12px;vertical-align:-1px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;opacity:.7;animation:say-spin .7s linear infinite}@keyframes say-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.say-spinner{animation-duration:2.4s}}.answer{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap}.answer input{font-family:var(--mono);font-size:20px;text-align:center;letter-spacing:.18em;text-transform:uppercase;width:min(320px,80vw);padding:12px 14px;border-radius:12px;border:2px solid var(--line)}.hint{font-size:13px;color:var(--muted)}.btn{background:var(--brand);color:#fff;border:0;border-radius:12px;padding:12px 22px;font-size:15px;font-weight:700;cursor:pointer;box-shadow:0 4px 12px #5350e847}.btn:hover{background:var(--brand-ink)}.btn:active{transform:translateY(1px)}.btn.ghost{background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:none}.btn.ok{background:var(--ok);box-shadow:0 4px 12px #14a06b47}.btn.bad{background:var(--bad);box-shadow:0 4px 12px #e23d4b47}.btn-row{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}.big-word{font-family:var(--mono);font-weight:700;font-size:34px;letter-spacing:.12em;text-transform:uppercase}.feedback{font-weight:700;font-size:15px;min-height:22px}.feedback.ok{color:var(--ok)}.feedback.bad{color:var(--bad)}.complete-word{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;align-items:flex-end}.complete-word .fixed{width:42px;height:50px;font-size:24px}.complete-word .slot{width:42px;height:50px;font-size:24px;text-align:center;text-transform:uppercase;font-family:var(--display);font-weight:700;border:2px dashed var(--brand);border-radius:10px;background:#f4f4ff;color:var(--ink)}.complete-word .slot:focus{outline:none;border-style:solid;background:#fff}.ws-wrap{display:flex;gap:22px;flex-wrap:wrap;justify-content:center;align-items:flex-start;width:100%}.grid{display:grid;gap:3px;touch-action:none;user-select:none}.cell{aspect-ratio:1;min-width:24px;display:flex;align-items:center;justify-content:center;background:#f4f6fb;border-radius:6px;font-family:var(--mono);font-weight:700;font-size:clamp(11px,2.4vw,16px);color:var(--ink);cursor:pointer}.cell.sel{background:var(--warn);color:#fff}.cell.found{background:var(--ok);color:#fff}.ws-words{display:flex;flex-direction:column;gap:6px;min-width:130px;text-align:left}.ws-words .w{font-family:var(--mono);font-size:14px;padding:3px 4px;border-radius:6px}.ws-words .w.done{color:var(--muted);text-decoration:line-through;background:var(--ok-soft)}.flash{font-family:var(--mono);font-weight:700;font-size:40px;letter-spacing:.14em;text-transform:uppercase}.countdown{font-size:13px;color:var(--muted)}.summary{display:flex;flex-direction:column;gap:14px;align-items:center}.score-ring{font-family:var(--display);font-weight:700;font-size:48px}.summary-score{font-weight:700}.summary-note{font-size:13px}.miss-list{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;max-width:520px}.miss-list .m{font-family:var(--mono);font-size:13px;background:var(--bad-soft);color:var(--bad);padding:4px 10px;border-radius:999px}.rep-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.rep-card{border:1px solid var(--line);border-radius:14px;padding:16px;background:#fbfcfe}.rep-card h3{font-size:15px;margin-bottom:10px}.rep-stats{display:flex;gap:18px;margin-bottom:10px}.rep-stats div span{display:block;font-family:var(--display);font-weight:700;font-size:22px}.rep-stats div small{color:var(--muted);font-size:12px}.spark{display:flex;align-items:flex-end;gap:3px;height:38px;margin-top:6px}.spark i{flex:1;background:var(--brand);border-radius:3px 3px 0 0;min-height:3px;opacity:.85}.trend{font-size:13px;font-weight:700;margin-top:8px}.trend.up{color:var(--ok)}.trend.down{color:var(--bad)}.trend.flat{color:var(--muted)}.rep-empty{color:var(--muted);font-size:14px}.rep-miss{font-size:12px;color:var(--muted);margin-top:8px}.clear-row{margin-top:16px}.clear-link{background:none;border:0;color:var(--bad);font-size:13px;font-weight:600;cursor:pointer;padding:0}.clear-link.armed{text-decoration:underline}.sentence{font-size:15px;color:var(--ink);max-width:44ch;line-height:1.7;background:#f4f6fb;border:1px solid var(--line);border-radius:12px;padding:10px 16px}.sentence .blank{display:inline-block;min-width:62px;border-bottom:2px solid var(--brand);font-family:var(--mono);font-weight:700;text-transform:uppercase;text-align:center;color:var(--ok);line-height:1.2;vertical-align:-2px}.sentence .blank.bad{color:var(--bad);border-bottom-color:var(--bad)}.riddle-loading{display:flex;justify-content:center;padding:28px 0}.riddle-loading svg{width:96px;height:96px}.riddle-loading .rl-track{fill:none;stroke:var(--line);stroke-width:6}.riddle-loading .rl-arc{fill:none;stroke:var(--brand);stroke-width:6;stroke-linecap:round;stroke-dasharray:54 160;transform-origin:50% 50%;animation:rl-spin 1.4s linear infinite}.riddle-loading .rl-dots circle{fill:var(--brand);opacity:.25;animation:rl-think 1.4s ease-in-out infinite}.riddle-loading .rl-dots circle:nth-child(2){animation-delay:.18s}.riddle-loading .rl-dots circle:nth-child(3){animation-delay:.36s}@keyframes rl-spin{to{transform:rotate(360deg)}}@keyframes rl-think{0%,70%,to{opacity:.25;transform:translateY(0)}35%{opacity:1;transform:translateY(-5px)}}@media(prefers-reduced-motion:reduce){.riddle-loading .rl-arc,.riddle-loading .rl-dots circle{animation:none}.riddle-loading .rl-dots circle{opacity:.6}}.riddle-text{font-size:17px;color:var(--ink);max-width:40ch;line-height:1.7;text-align:center;background:#f4f6fb;border:1px solid var(--line);border-radius:12px;padding:14px 18px}.riddle-blanks{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}.riddle-blanks .blank-cell{width:26px;height:32px;border-bottom:2px solid var(--brand);font-family:var(--mono);font-weight:700;font-size:20px;text-transform:uppercase;text-align:center;color:var(--ok)}.story-intro,.story-loader,.story-error,.reading-intro,.reading-loader,.reading-error{width:min(620px,100%);display:flex;flex-direction:column;align-items:center;gap:14px}.story-intro p,.story-loader p,.story-error p,.reading-intro p,.reading-loader p,.reading-error p{margin:0;color:var(--muted)}.story-icon,.reading-icon{font-size:48px}.story-loader-book{position:relative;width:76px;height:52px;perspective:260px}.story-loader-book span{position:absolute;top:0;width:50%;height:100%;background:#eceaff;border:2px solid var(--brand)}.story-loader-book span:first-child{left:0;border-radius:8px 2px 2px 8px;transform-origin:right center;animation:story-page-left 1.4s ease-in-out infinite alternate}.story-loader-book span:last-child{right:0;border-radius:2px 8px 8px 2px;transform-origin:left center;animation:story-page-right 1.4s ease-in-out infinite alternate}.story-spinner{width:56px;height:56px}.story-spinner-track,.story-spinner-arc{fill:none;stroke-width:4;stroke-linecap:round}.story-spinner-track{stroke:#eceaff}.story-spinner-arc{stroke:var(--brand);stroke-dasharray:40 86;transform-origin:50% 50%;animation:story-spin 1.1s linear infinite}@keyframes story-spin{to{transform:rotate(360deg)}}.story-stage-current{font-weight:700;color:var(--ink)!important}.story-stages{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;width:min(320px,100%);text-align:left}.story-stage{display:flex;align-items:center;gap:10px;font-size:15px;color:var(--muted)}.story-stage-mark{flex:none;width:20px;height:20px;border-radius:50%;border:2px solid #ddd9f5;display:grid;place-items:center}.story-stage.is-done{color:var(--ink)}.story-stage.is-done .story-stage-mark{background:var(--brand);border-color:var(--brand)}.story-stage-tick{width:12px;height:12px;fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.story-stage.is-active{color:var(--ink);font-weight:700}.story-stage.is-active .story-stage-mark{border-color:var(--brand);animation:story-stage-pulse 1.1s ease-in-out infinite}@keyframes story-stage-pulse{50%{box-shadow:0 0 0 5px #635bff29}}.story-still-working{font-weight:700;color:var(--ink)!important}@keyframes story-page-left{to{transform:rotateY(18deg)}}@keyframes story-page-right{to{transform:rotateY(-18deg)}}.story-task{width:100%;display:flex;flex-direction:column;gap:20px;text-align:left}.story-task-head,.reading-item-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.story-kicker,.reading-kicker{margin-bottom:5px;font-family:var(--mono);color:var(--brand);font-size:13px;font-weight:700;text-transform:uppercase}.story-grammar{max-width:44%;color:var(--muted);font-size:12px;text-align:right}.reading-item,.reading-recap{width:100%;display:flex;flex-direction:column;gap:20px;text-align:left}.reading-item-head{flex-direction:column;gap:0}.reading-item-head h3{margin:0}.reading-paragraphs{display:flex;flex-direction:column;gap:14px}.reading-paragraph{padding:16px 18px;border:1px solid var(--line);border-radius:14px;background:#fbfcfe}.reading-paragraph-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.reading-paragraph h4{margin:0;font-family:var(--display);color:var(--brand);font-size:14px}.reading-paragraph-text{margin:0;max-width:68ch;font-size:16px;line-height:1.75}.reading-actions{display:flex;flex-wrap:wrap;gap:10px}.reading-word-help-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:6px}.reading-word-help-head .reading-word-help-title{margin-bottom:0}.reading-word-help-close{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:-4px -4px 0 0;padding:0;border:0;border-radius:999px;background:transparent;color:var(--muted);cursor:pointer}.reading-word-help-close:hover{background:color-mix(in srgb,var(--accent) 12%,white);color:var(--ink)}.reading-word-help-close:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.reading-word-help-close svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}.reading-recap-group h4{margin:0 0 8px;font-family:var(--display);color:var(--brand);font-size:15px}.reading-recap-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}.reading-recap-list li{padding:10px 12px;border:1px solid var(--line);border-left:4px solid var(--brand);border-radius:10px;background:var(--surface)}.reading-recap-list.is-caution li{border-left-color:var(--bad)}.reading-recap-list strong{display:block;font-size:15px}.reading-recap-list span{color:var(--muted);font-size:13px;line-height:1.5}.story-figure{width:min(720px,100%);margin:0 auto}.story-figure img{display:block;width:100%;aspect-ratio:3 / 2;object-fit:cover;border:1px solid var(--line);border-radius:16px;background:#f4f6fb}.story-figure figcaption{display:flex;justify-content:flex-end;margin-top:8px}.story-report-link{border:0;background:none;padding:2px;color:var(--muted);font-size:12px;text-decoration:underline;cursor:pointer}.story-report{width:min(430px,100%);display:flex;flex-direction:column;gap:9px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fbfcfe}.story-report label{margin:0}.story-report select{width:100%;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink)}.story-scenes{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.story-scene{padding:14px;border:1px solid var(--line);border-radius:14px;background:#fbfcfe}.story-scene-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}.story-scene h4{margin:0;font-family:var(--display);color:var(--brand);font-size:14px}.story-scene-play,.reading-paragraph-play{display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:6px 10px;border:1px solid rgba(83,80,232,.3);border-radius:999px;background:var(--surface);color:var(--brand);font:700 12px/1 var(--display);cursor:pointer}.story-scene-play:hover:not(:disabled),.reading-paragraph-play:hover:not(:disabled){background:#f3f3fe}.story-scene-play:disabled,.reading-paragraph-play:disabled{cursor:wait;opacity:.68}.story-scene p,.story-scene-text{margin:0;font-size:15px;line-height:1.65}.story-word-wrap,.reading-word-wrap{position:relative;display:inline}.story-word,.reading-word{display:inline;margin:0;padding:.1em .15em;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;line-height:inherit;cursor:pointer;text-decoration:underline dotted color-mix(in srgb,var(--accent) 55%,transparent);text-underline-offset:.18em}.story-word:hover,.story-word.is-selected,.reading-word:hover,.reading-word.is-selected{background:color-mix(in srgb,var(--accent) 12%,white)}.story-word:focus-visible,.reading-word:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.story-word-help,.reading-word-help{position:absolute;z-index:2;left:0;top:calc(100% + 6px);min-width:min(240px,72vw);max-width:min(320px,86vw);padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 10px 28px #0f172a1f;text-align:left}.story-word-help-title,.reading-word-help-title{margin-bottom:6px;color:var(--accent);font-size:14px;font-weight:700}.story-word-help-form,.reading-word-help-form{margin:0 0 6px;color:var(--muted);font-size:12px;line-height:1.4}.story-word-help-definition,.reading-word-help-definition{margin:0 0 8px;font-size:14px;line-height:1.5}.story-word-help-recap,.reading-word-help-recap{margin:0 0 10px;font-size:13px;line-height:1.45;color:var(--ink)}.story-word-help-recap span,.reading-word-help-recap span{color:var(--muted);font-weight:600}.story-word-help-loading,.story-word-help-error,.reading-word-help-loading,.reading-word-help-error{margin:0 0 8px;font-size:14px;line-height:1.45}.story-word-help-error,.reading-word-help-error{color:var(--bad)}.story-word-help-retry,.story-word-help-listen,.reading-word-help-retry,.reading-word-help-listen{margin-top:2px}.story-audio-error,.reading-audio-error{margin-top:8px;color:var(--bad);font-size:12px}.story-questions{display:flex;flex-direction:column;gap:12px}.story-question{padding:16px;border:1px solid var(--line);border-radius:14px}.story-question.is-resolved{background:#fbfcfe}.story-question>label{font-size:15px}.story-scaffold{display:flex;flex-wrap:wrap;gap:7px 14px;margin:0 0 10px;color:var(--brand-ink);font-size:13px;font-weight:600}.story-answer-row{display:flex;gap:10px;align-items:center}.story-answer-row input{min-width:0;flex:1;padding:11px 12px;border:2px solid var(--line);border-radius:10px;font-family:var(--mono);font-size:17px}.story-answer-row input:disabled{color:var(--muted);background:#f1f3f9}.story-feedback{min-height:22px;margin-top:8px;font-size:14px;font-weight:700}.story-feedback.ok{color:var(--ok)}.story-feedback.bad{color:var(--bad)}.story-evidence{margin-top:7px;color:var(--ink);font-weight:400;line-height:1.5}.story-task-complete{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:14px;padding:14px;border-radius:12px;background:var(--ok-soft)}.summary-tasks,.rep-task-count{font-weight:700}.grammar-passage{display:flex;flex-direction:column;gap:16px;width:100%}.grammar-paragraph{margin:0;font-size:15px;line-height:2.4;text-align:left}.grammar-gap{display:inline-flex;flex-wrap:wrap;align-items:center;gap:5px;margin:0 3px;padding:2px 6px;border-radius:9px;background:var(--card-2, #f4f4ff);vertical-align:baseline}.grammar-gap.is-ok{background:var(--ok-soft)}.grammar-gap.is-bad{background:var(--bad-soft, #ffe9e9)}.grammar-gap-blank{font-weight:700;letter-spacing:1px;color:var(--muted)}.grammar-gap-answer{color:var(--ink)}.grammar-gap-options{display:inline-flex;flex-wrap:wrap;gap:4px}.grammar-gap-target{align-self:center;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.grammar-option{padding:3px 9px;border:1px solid var(--line, #d9d9e6);border-radius:999px;background:var(--bg, #fff);font:inherit;font-size:14px;line-height:1.3;cursor:pointer}.grammar-option:hover:not(:disabled){border-color:var(--brand)}.grammar-option:disabled{cursor:default;opacity:.45}.grammar-gap.is-ok .grammar-option.is-chosen,.grammar-gap.is-bad .grammar-option.is-chosen{opacity:1;font-weight:700}.grammar-gap.is-bad .grammar-option.is-chosen{color:var(--bad);text-decoration:line-through}.exp-script,.exp-quiz{display:flex;flex-direction:column;gap:18px;width:100%;text-align:left}.exp-head h3{margin:0 0 6px}.exp-section{display:flex;flex-direction:column;gap:8px}.exp-section-title{margin:0;font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--brand)}.exp-lines{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.exp-line{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line, #d9d9e6);border-radius:12px;background:var(--surface, #fff)}.exp-line-text{flex:1;min-width:0}.exp-en{margin:0;font-size:15px;line-height:1.5}.exp-es{margin:2px 0 0;font-size:13px;line-height:1.45;color:var(--muted)}.exp-listen{flex:none;min-width:44px;min-height:44px;padding:0 12px}.exp-script-actions{position:sticky;bottom:0;padding:10px 0;background:var(--bg, #fff)}.exp-focus{align-self:flex-start;padding:3px 10px;border-radius:999px;background:var(--card-2, #f4f4ff);font-size:12px;text-transform:lowercase;color:var(--brand);white-space:nowrap}.exp-answer-label{font-size:13px;color:var(--muted)}.exp-hint{padding:12px 14px;border-left:3px solid var(--brand);border-radius:0 12px 12px 0;background:var(--card-2, #f4f4ff);font-size:15px;line-height:1.5}.exp-answer{width:100%;padding:12px;border:1px solid var(--line, #d9d9e6);border-radius:12px;background:var(--surface, #fff);color:var(--ink);font:inherit;font-size:16px;line-height:1.5;resize:vertical}.exp-answer:focus{outline:none;border-color:var(--brand)}.exp-answer:disabled{opacity:.7}.exp-feedback{display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:12px;background:var(--card-2, #f4f4ff)}.exp-feedback.is-great,.exp-feedback.is-good{background:var(--ok-soft)}.exp-feedback.is-keep-trying{background:var(--bad-soft, #ffe9e9)}.exp-feedback.is-revealed{background:var(--card-2, #f4f4ff);border-left:3px solid var(--brand)}.exp-explanation{margin:0;font-size:15px;line-height:1.5}.exp-verdict{font-weight:700}.exp-corrected{margin:0;font-size:15px;line-height:1.5}.exp-notes{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;font-size:14px;line-height:1.5}.exp-note-label{display:inline-block;margin-right:6px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}.exp-alternatives ul{margin:6px 0 0;padding-left:20px;font-size:14px;line-height:1.5}.exp-alternatives li+li{margin-top:4px}.exp-encouragement{margin:0;font-size:14px;color:var(--muted)}@media(prefers-reduced-motion:reduce){.story-loader-book span,.story-spinner-arc,.story-stage.is-active .story-stage-mark{animation:none}.story-spinner-arc{stroke-dasharray:none;opacity:.55}}.slotrule{border:2px dashed var(--brand);background:#f4f4ff;color:var(--brand)}.slotrule.vok{background:var(--ok)!important;color:#fff!important;border-style:solid;border-color:var(--ok)!important}.slotrule.vbad{background:var(--bad)!important;color:#fff!important;border-style:solid;border-color:var(--bad)!important}.rule-opt{min-width:96px}.acc-bar{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin-top:-6px}.acc-btn{font-family:var(--mono);font-size:15px;min-width:36px;height:36px;border:1px solid var(--line);background:var(--surface);border-radius:9px;cursor:pointer;color:var(--ink)}.acc-btn:hover{border-color:var(--brand);background:#f4f4ff}.acc-btn:active{transform:translateY(1px)}button.tile{cursor:default;font-family:var(--display)}.vsel{cursor:pointer}.vsel.vhi{box-shadow:inset 0 -3px #78500024,0 0 0 2px var(--brand)}.vsel:hover:not(:disabled){background:#ffd98a}.vsel:disabled{cursor:default}.vok{background:var(--ok)!important;color:#fff!important;border-color:var(--ok)!important}.vbad{background:var(--bad)!important;color:#fff!important;border-color:var(--bad)!important}@media(max-width:680px){.config-row,.games,.rep-grid{grid-template-columns:1fr}.wordmark .tile{width:44px;height:50px;font-size:26px}.story-task-head{flex-direction:column}.story-grammar{max-width:none;text-align:left}.story-scenes{grid-template-columns:1fr}.story-answer-row{align-items:stretch;flex-direction:column}.story-answer-row .btn{width:100%}}.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,16px);max-width:min(420px,90vw);padding:12px 18px;border-radius:12px;background:var(--ink);color:#fff;font-family:var(--body);font-size:14px;font-weight:600;text-align:center;box-shadow:0 8px 24px #0000002e;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease;z-index:1000}.toast.show{opacity:1;transform:translate(-50%)}.sudoku-grid{margin:12px auto}.sudoku-cell{min-width:28px;min-height:28px;padding:0;border:none;touch-action:manipulation}.sudoku-given{background:#e8ecf8;color:var(--ink);cursor:default}.sudoku-selected{background:var(--warn);color:#fff}.sudoku-given.sudoku-selected{background:#d4daf0;color:var(--ink)}.sudoku-border-left{box-shadow:inset 3px 0 #1e233c59}.sudoku-border-top{box-shadow:inset 0 3px #1e233c59}.sudoku-border-left.sudoku-border-top{box-shadow:inset 3px 0 #1e233c59,inset 0 3px #1e233c59}.sudoku-pad{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:16px 0 8px;max-width:min(520px,92vw)}.sudoku-pad .math-key{min-width:44px;min-height:44px}.feedback.hint{color:var(--muted)}.math-settings{display:flex;flex-wrap:wrap;gap:12px 20px;margin:0 0 8px}.math-timer{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;margin:0 0 10px;font-size:.95rem;color:var(--muted)}.math-timer-elapsed{font-family:var(--display);color:var(--ink);font-variant-numeric:tabular-nums}.math-timer-best strong{color:var(--ink);font-family:var(--display);font-variant-numeric:tabular-nums}.math-timer-record{color:var(--accent, #6f6ff0);font-weight:600}.game-1024-hud .math-timer-elapsed,.game-1024-hud .math-timer-best{font-size:inherit}.math-setting{display:flex;align-items:center;gap:8px;font-size:.95rem}.math-setting select{font:inherit;padding:6px 10px;border-radius:8px;border:1px solid var(--line, #ddd);background:var(--panel, #fff)}.math-problem{font-size:1.15rem;line-height:1.6;margin:12px 0 16px}.math-problem p{margin:0 0 10px}.md-heading{font-family:var(--display);font-weight:700;font-size:1.05em;margin:0 0 8px}.math-problem p:last-child{margin-bottom:0}.math-problem .katex{font-size:1.05em}.math-loader{display:flex;flex-direction:column;align-items:center;gap:16px;padding:24px 0}.math-spinner{display:block;overflow:visible}.math-spinner .ring-track{fill:none;stroke:var(--line);stroke-width:8}.math-spinner .ring-arc{fill:none;stroke:url(#mgrad);stroke-width:8;stroke-linecap:round;stroke-dasharray:70 230;transform-box:view-box;transform-origin:60px 60px;animation:math-spin 1.1s linear infinite}.math-spinner .op{font-family:var(--display, sans-serif);font-weight:700;font-size:44px;fill:var(--brand);text-anchor:middle;opacity:0;transform-box:fill-box;transform-origin:center;animation:math-op-cycle 3.2s ease-in-out infinite}.math-spinner .op2{animation-delay:.8s}.math-spinner .op3{animation-delay:1.6s}.math-spinner .op4{animation-delay:2.4s}.math-loader-text{font-size:14px;color:var(--muted);animation:math-loader-pulse 1.4s ease-in-out infinite}@keyframes math-spin{to{transform:rotate(360deg)}}@keyframes math-op-cycle{0%{opacity:0;transform:scale(.4) rotate(-25deg)}8%{opacity:1;transform:scale(1.05) rotate(0)}18%{opacity:1;transform:scale(1) rotate(0)}27%{opacity:0;transform:scale(.5) rotate(25deg)}to{opacity:0;transform:scale(.4) rotate(25deg)}}@keyframes math-loader-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.math-spinner .ring-arc,.math-spinner .op,.math-loader-text{animation:none}.math-spinner .op1{opacity:1}}.math-pad{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:360px;margin:4px auto 0}.math-key{min-width:44px;height:44px;padding:0 12px;border-radius:12px;border:1px solid var(--line);background:var(--surface);font-family:var(--mono, monospace);font-size:18px;font-weight:700;color:var(--text, #1f2430);cursor:pointer;transition:transform .05s ease,background .15s ease,border-color .15s ease}.math-key:hover{border-color:var(--brand);background:#f4f4ff}.math-key:active{transform:translateY(1px)}.math-key-back{color:var(--bad, #d33)}.math-card{width:min(640px,100%);margin:16px auto 0;padding:0;border-radius:16px;line-height:1.7;text-align:left;overflow:hidden;box-shadow:0 4px 14px #0000000d}.math-card-head{display:flex;align-items:center;gap:8px;font-family:var(--display);font-weight:700;font-size:15px;padding:10px 16px}.math-card-icon{font-size:18px;line-height:1}.math-card-body{padding:4px 18px 16px;font-size:15px;color:var(--text, #1f2430)}.math-card-body p{margin:0 0 10px}.math-card-body p:last-child{margin-bottom:0}.math-card-body ol,.math-card-body ul{margin:6px 0;padding-left:4px;list-style:none}.math-card-body ol>li,.math-card-body ul>li{position:relative;padding:6px 0 6px 40px;margin:0}.math-card-body .math-code{background:#0000000d;border:1px solid rgba(0,0,0,.08);border-radius:10px;padding:10px 14px;margin:8px 0;font-family:var(--mono, monospace);font-size:15px;line-height:1.5;white-space:pre;overflow-x:auto}.math-card-body ol>li:before{content:attr(data-n);position:absolute;left:0;top:6px;width:26px;height:26px;display:grid;place-items:center;border-radius:50%;font-family:var(--display);font-weight:700;font-size:13px;color:#fff}.math-card-body ul>li:before{content:"✏️";position:absolute;left:6px;top:6px;font-size:15px}.math-method+.math-method{margin-top:14px;padding-top:14px;border-top:2px dashed rgba(80,160,255,.35)}.math-method-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-family:var(--display);font-weight:700;font-size:15px;color:#24557a;margin-bottom:4px}.math-method-num{display:inline-block;padding:2px 10px;border-radius:999px;background:linear-gradient(135deg,#5aa0ff,#6f6ff0);color:#fff;font-size:12px}.math-hint{background:#fffaf0;border:1px solid rgba(255,196,0,.4)}.math-hint .math-card-head{background:#ffc4002e;color:#8a6100}.math-solution{background:#f5f9ff;border:1px solid rgba(80,160,255,.35)}.math-solution .math-card-head{background:#50a0ff29;color:#24557a}.math-solution .math-card-body ol>li:before{background:linear-gradient(135deg,#5aa0ff,#6f6ff0)}lexia-scratch-pad.scratch-pad{display:block;width:100%;align-self:stretch;margin-top:8px;text-align:left}.scratch-pad.panel{border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:12px 14px;box-shadow:0 2px 8px #0000000a}.scratch-pad-toggle{display:flex;align-items:center;gap:8px;width:100%;margin-bottom:0;user-select:none;-webkit-user-select:none}.scratch-pad-toggle .scratch-pad-title{font-family:var(--display);font-size:15px;font-weight:700;margin:0;flex:0 0 auto}.scratch-pad-icon{font-size:18px;line-height:1}.scratch-pad-heights{display:flex;gap:4px;margin-left:auto;margin-right:4px}.scratch-height-btn{min-width:32px;height:32px;padding:0 8px;border-radius:8px;border:1px solid var(--line);background:var(--surface);font-family:var(--mono);font-size:11px;font-weight:700;cursor:pointer;color:var(--muted)}.scratch-height-btn.on{border-color:var(--brand);color:var(--brand);background:#f4f4ff}.scratch-height-btn:disabled{opacity:.45;cursor:default}.scratch-pad.is-collapsed .scratch-pad-heights{opacity:.55}.scratch-pad:not(.is-collapsed){touch-action:none;overscroll-behavior:contain}.scratch-pad-body{touch-action:none}.scratch-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:10px;user-select:none;-webkit-user-select:none}.scratch-toolbar.is-drawing{pointer-events:none}.scratch-tools,.scratch-colors,.scratch-sizes{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.scratch-tool{min-height:44px;padding:8px 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface);font-size:13px;font-weight:600;cursor:pointer;color:var(--ink);user-select:none;-webkit-user-select:none}.scratch-tool.on{border-color:var(--brand);background:#f4f4ff;color:var(--brand-ink)}.scratch-tool:disabled{opacity:.45;cursor:default}.scratch-tool-clear{color:var(--bad)}.scratch-color{width:44px;height:44px;padding:0;border-radius:999px;border:2px solid var(--line);background:var(--swatch);cursor:pointer;user-select:none;-webkit-user-select:none}.scratch-color.on{border-color:var(--ink);box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--brand)}.scratch-size{min-height:44px;min-width:44px;padding:8px 10px;border-radius:10px;border:1px solid var(--line);background:var(--surface);font-size:12px;font-weight:600;cursor:pointer;user-select:none;-webkit-user-select:none}.scratch-size.on{border-color:var(--brand);background:#f4f4ff}.scratch-canvas-wrap{position:relative;width:100%;border-radius:12px 12px 0 0;border:1px solid var(--line);border-bottom:none;overflow:hidden;background:#fff;touch-action:none}.scratch-canvas{display:block;width:100%;height:100%;touch-action:none;user-select:none;cursor:crosshair}.scratch-canvas.is-erase{cursor:none}.scratch-eraser-cursor{position:absolute;left:0;top:0;width:var(--eraser-size, 24px);height:var(--eraser-size, 24px);margin-left:calc(var(--eraser-size, 24px) / -2);margin-top:calc(var(--eraser-size, 24px) / -2);border:2px solid rgba(83,80,232,.55);border-radius:999px;background:#5350e81a;box-shadow:0 0 0 1px #ffffffd9;pointer-events:none;z-index:2;display:none}.scratch-resize-handle{position:relative;width:100%;height:14px;cursor:ns-resize;touch-action:none;border:1px solid var(--line);border-radius:0 0 12px 12px;background:linear-gradient(to bottom,#5350e814,#5350e81f)}.scratch-resize-handle:after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:36px;height:4px;border-radius:999px;background:var(--line)}#game-view.scratch-drawing-active{touch-action:none}#stage.scratch-drawing-active .math-pad,#stage.scratch-drawing-active .answer,#stage.scratch-drawing-active .btn-row,#stage.scratch-drawing-active .scratch-toolbar,#stage.scratch-drawing-active .scratch-pad-toggle,#stage.scratch-drawing-active .scratch-height-btn,#stage.scratch-drawing-active .math-problem,#stage.scratch-drawing-active .hint,#stage.scratch-click-guard .math-pad,#stage.scratch-click-guard .answer,#stage.scratch-click-guard .btn-row,#stage.scratch-click-guard .scratch-toolbar,#stage.scratch-click-guard .scratch-pad-toggle,#stage.scratch-click-guard .scratch-height-btn{pointer-events:none}#stage.scratch-drawing-active .math-problem,#stage.scratch-drawing-active .hint{user-select:none;-webkit-user-select:none}.game-1024{display:flex;flex-direction:column;gap:12px}.game-1024-hint{line-height:1.45}.game-1024-hint>div+div{margin-top:4px}.game-1024-hud{display:flex;flex-wrap:wrap;gap:16px 24px;font-size:.95rem;color:var(--muted)}.game-1024-hud strong{color:var(--ink);font-family:var(--display)}.game-1024-board{--grid-size: 4;--tile-gap: 8px;--tile-size: min(72px, calc((100vw - 72px) / var(--grid-size)));position:relative;width:calc(var(--grid-size) * var(--tile-size) + (var(--grid-size) - 1) * var(--tile-gap) + 20px);max-width:100%;margin:0 auto;padding:10px;border-radius:12px;background:#c9c5e8;touch-action:none;user-select:none;-webkit-user-select:none}.game-1024-grid{display:grid;grid-template-columns:repeat(var(--grid-size),var(--tile-size));grid-template-rows:repeat(var(--grid-size),var(--tile-size));gap:var(--tile-gap)}.game-1024 .tile-cell{border-radius:8px;background:#ffffff73;min-height:0}.game-1024-tiles{position:absolute;inset:10px;pointer-events:none}.game-1024 .tile-piece{position:absolute;top:0;left:0;width:var(--tile-size);height:var(--tile-size);display:flex;align-items:center;justify-content:center;border-radius:8px;font-family:var(--display);font-weight:700;font-size:clamp(.85rem,4vw,1.35rem);color:var(--ink);transition:left .14s ease-in-out,top .14s ease-in-out;will-change:left,top,transform;z-index:1}.game-1024 .tile-piece.tile-spawn{animation:tile-spawn .16s ease-out}.game-1024 .tile-piece.tile-merge{animation:tile-merge .16s ease-out;z-index:2}@keyframes tile-spawn{0%{transform:scale(.35);opacity:.4}to{transform:scale(1);opacity:1}}@keyframes tile-merge{0%{transform:scale(1)}45%{transform:scale(1.14)}to{transform:scale(1)}}.game-1024 .tile-1{background:#eee4ff}.game-1024 .tile-2{background:#ddd0ff}.game-1024 .tile-3{background:#c9b8ff}.game-1024 .tile-4{background:#b5a0ff;color:#fff}.game-1024 .tile-5{background:#9a82f5;color:#fff}.game-1024 .tile-6{background:#7f66e8;color:#fff}.game-1024 .tile-7{background:#6550d4;color:#fff}.game-1024 .tile-8,.game-1024 .tile-9,.game-1024 .tile-10,.game-1024 .tile-11,.game-1024 .tile-12{background:var(--brand);color:#fff;font-size:clamp(.7rem,3.2vw,1.1rem)}.game-1024-arrows{display:flex;flex-direction:column;align-items:center;gap:6px;margin:4px auto 0}.game-1024-arrows-mid{display:flex;gap:48px}.game-1024-arrow{width:52px;height:52px;border-radius:12px;border:1px solid var(--line);background:var(--surface);font-size:1.4rem;cursor:pointer;box-shadow:var(--shadow);color:var(--ink)}.game-1024-arrow:disabled{opacity:.45;cursor:not-allowed}.game-1024-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#1b1f3b8c;border-radius:12px;padding:12px;z-index:2}.game-1024-overlay-card{background:var(--surface);border-radius:12px;padding:16px 18px;max-width:100%;text-align:center;box-shadow:var(--shadow)}.game-1024-overlay-title{font-family:var(--display);font-weight:700;font-size:1.1rem;margin-bottom:6px}.game-1024-overlay-sub{color:var(--muted);font-size:.92rem;margin-bottom:10px}.game-1024-overlay-best{margin-bottom:10px}.game-1024-chain{text-align:left;font-size:.88rem;color:var(--muted);border-top:1px solid var(--line);padding-top:10px}.game-1024-chain-values{font-family:var(--mono);font-size:.82rem;color:var(--ink);margin:6px 0;word-break:break-word}.game-1024-chain-hint{font-size:.85rem}.teacher-prompt{display:flex;flex-direction:column;gap:12px;padding:4px 0 8px;align-self:stretch;width:100%;text-align:left}.teacher-intro{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}.teacher-intro__icon{font-size:42px}.teacher-intro h3{margin:0}.teacher-intro p{margin:0;color:var(--muted)}.teacher-prompt__label{font-weight:600}.teacher-prompt__field{width:100%;min-height:96px;border-radius:10px;border:1px solid var(--line);padding:10px 12px;font-family:var(--body);font-size:1rem;background:var(--surface);color:var(--ink);resize:vertical}.teacher-prompt__field:focus-visible{outline:2px solid var(--brand);outline-offset:2px}.teacher-prompt__row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.teacher-prompt__hint{color:var(--muted)}.teacher-suggestions{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:6px 12px;border-radius:999px;font:inherit;cursor:pointer}.chip:hover{background:var(--bg)}.chip:focus-visible{outline:2px solid var(--brand);outline-offset:2px}.teacher-history{border:1px solid var(--line);border-radius:10px;padding:8px 12px;background:var(--surface)}.teacher-history__list{list-style:none;padding:0;margin:8px 0 0;display:flex;flex-direction:column;gap:6px}.teacher-history__item{display:flex;align-items:center;gap:8px;justify-content:space-between}.teacher-history__open{flex:1;text-align:left;border:0;background:transparent;padding:6px 4px;cursor:pointer;color:var(--ink);display:flex;flex-direction:column}.teacher-history__open small{color:var(--muted)}.teacher-history__remove{border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:.85rem;text-decoration:underline}.teacher-loading{display:flex;flex-direction:column;align-items:center;gap:14px;padding:24px 8px;text-align:center}.teacher-loading__spinner{font-size:36px;animation:teacher-spin 2s linear infinite}@keyframes teacher-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.teacher-loading__stages{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}.teacher-loading__stage{color:var(--muted)}.teacher-loading__stage.is-active{color:var(--brand-ink);font-weight:600}.teacher-loading__stage.is-done{color:var(--ok)}.teacher-loading__hint{color:var(--muted)}.teacher-error{padding:12px;border-radius:10px;background:var(--bad-soft);color:var(--ink);display:flex;flex-direction:column;gap:8px}.teacher-error__actions{display:flex;gap:8px}.teacher-lesson{display:flex;flex-direction:column;gap:12px;align-self:stretch;width:100%;text-align:left}.teacher-lesson__actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-start}.teacher-lesson__body{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:20px 24px;line-height:1.6;color:var(--ink);overflow-wrap:break-word;font-size:.95rem;text-align:left}.teacher-lesson__body>*:first-child{margin-top:0}.teacher-lesson__body>*:last-child{margin-bottom:0}.teacher-lesson__body h1{font-size:1.45rem;line-height:1.25;margin:0 0 12px;padding-bottom:8px;border-bottom:1px solid var(--line)}.teacher-lesson__body h2{font-size:1.1rem;line-height:1.3;margin:22px 0 8px;color:var(--brand-ink)}.teacher-lesson__body h3{font-size:1rem;margin:16px 0 6px}.teacher-lesson__body p{margin:0 0 10px}.teacher-lesson__body ul,.teacher-lesson__body ol{margin:0 0 12px;padding-left:22px}.teacher-lesson__body li{margin:2px 0}.teacher-lesson__body li>p{margin:0 0 4px}.teacher-lesson__body strong{color:var(--brand-ink)}.teacher-lesson__body code{background:var(--bg);padding:1px 6px;border-radius:4px;font-family:var(--mono);font-size:.85em}.teacher-lesson__body pre{background:var(--bg);padding:10px 14px;border-radius:8px;overflow-x:auto;margin:8px 0 14px;border:1px solid var(--line)}.teacher-lesson__body pre code{background:none;padding:0;font-size:.85em;line-height:1.5}.teacher-lesson__body table{border-collapse:collapse;width:100%;margin:10px 0 16px;font-size:.9rem}.teacher-lesson__body th,.teacher-lesson__body td{border:1px solid var(--line);padding:6px 10px;text-align:left;vertical-align:top}.teacher-lesson__body th{background:var(--bg);font-weight:600}.teacher-lesson__body blockquote{border-left:3px solid var(--brand);margin:10px 0;padding:4px 12px;color:var(--muted);background:var(--bg);border-radius:0 8px 8px 0}.teacher-callout{--callout-tint: var(--brand);--callout-bg: var(--bg);--callout-label: "INFO";border-radius:8px;padding:10px 14px 10px 42px;margin:12px 0;background:var(--callout-bg);border-left:4px solid var(--callout-tint);position:relative;font-size:.9rem;line-height:1.5}.teacher-callout:before{content:"ℹ";position:absolute;left:12px;top:9px;width:20px;height:20px;border-radius:999px;background:var(--callout-tint);color:#fff;font-size:12px;display:flex;align-items:center;justify-content:center;font-weight:700}.teacher-callout--tip{--callout-tint: var(--ok);--callout-bg: var(--ok-soft)}.teacher-callout--tip:before{content:"✓"}.teacher-callout--beyond-a1{--callout-tint: var(--warn);--callout-bg: #fff4dd}.teacher-callout--beyond-a1:before{content:"★"}.teacher-callout--warning{--callout-tint: var(--bad);--callout-bg: var(--bad-soft)}.teacher-callout--warning:before{content:"!"}.teacher-callout p{margin:0}.teacher-callout p+p{margin-top:6px}.teacher-example-audio-btn{border:1px solid var(--line);background:var(--surface);border-radius:999px;width:24px;height:24px;padding:0;margin-left:4px;cursor:pointer;font-size:11px;line-height:1;vertical-align:-3px;display:inline-flex;align-items:center;justify-content:center}.teacher-example-audio-btn:hover{background:var(--bg);border-color:var(--brand)}.teacher-example-audio-btn.is-playing{border-color:var(--brand);color:var(--brand-ink);background:var(--ok-soft)}.teacher-example-audio-btn.is-unavailable{opacity:.4;cursor:not-allowed}.teacher-example-audio-btn.is-error{border-color:var(--bad);color:var(--bad)}.reader-wrapper{max-width:1060px;margin:0 auto;padding:12px 16px;display:flex;flex-direction:column;gap:16px}.reader-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:10px 16px;background:var(--surface);border:1px solid var(--line);border-radius:12px}.reader-book-info{display:flex;flex-direction:column}.reader-kicker{font-size:12px;font-weight:700;color:var(--accent);text-transform:uppercase;letter-spacing:.05em}.reader-chapter-jump{display:flex;align-items:center;gap:6px}.reader-chapter-select{font:inherit;font-size:15px;font-weight:600;color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:4px 8px;cursor:pointer}.reader-chapter-select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.reader-subheading{font-size:15px;font-weight:600;color:var(--ink)}.reader-nav-controls{display:flex;align-items:center;gap:10px}.reader-page-counter{font-size:13px;font-weight:600;color:var(--muted)}.reader-nav-btn{padding:6px 14px;font-size:13px;border-radius:8px}.reader-nav-btn:disabled{opacity:.45;cursor:default;pointer-events:none}.reader-book-container{max-width:680px;width:100%;margin:0 auto;background:#fdfbf7;border:1px solid #ded6c5;border-radius:12px;box-shadow:0 4px 20px #0000000f;min-height:540px;position:relative;perspective:1400px}.reader-page{padding:40px 48px 36px;text-align:left;display:flex;flex-direction:column;background:#fdfbf7;color:#2b2b2b;font-family:Georgia,Cambria,Times New Roman,Times,serif;line-height:1.65;border-radius:12px}.reader-chapter-title{text-align:center;font-size:19px;letter-spacing:.18em;text-transform:uppercase;margin:0 0 22px;color:#1a1a1a;font-family:inherit;font-weight:700}.reader-drop-cap{float:left;font-size:54px;line-height:.78;padding-top:4px;padding-right:8px;font-weight:700;color:#1a1a1a;font-family:inherit}.reader-word.is-drop-cap-word{display:inline-block;float:left;margin-right:4px}.reader-word.is-drop-cap-word:first-letter{float:left;font-size:54px;line-height:.78;padding-top:4px;padding-right:6px;font-weight:700;color:#1a1a1a;font-family:inherit}.reader-page-content{flex:1;display:flex;flex-direction:column;gap:12px}.reader-paragraph-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;position:relative}.reader-paragraph-text{flex:1;font-size:15.5px;color:#262626}.reader-paragraph-text.is-dialogue{color:#1e1e1e}.reader-audio-btn{flex-shrink:0;width:26px;height:26px;border-radius:999px;border:1px solid #d4c8b2;background:#f5efe2;color:#5a5243;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;font-size:12px;margin-top:2px;transition:background .12s ease,border-color .12s ease}.reader-audio-btn:hover{background:var(--brand);color:#fff;border-color:var(--brand)}.reader-audio-btn.is-playing{background:var(--ok);color:#fff;border-color:var(--ok)}.reader-audio-btn.is-loading{opacity:.7}.reader-audio-error{position:absolute;right:32px;top:4px;font-size:11px;color:var(--bad);background:var(--surface);padding:2px 6px;border-radius:4px;border:1px solid var(--bad)}.reader-review{margin-top:28px;padding:18px 20px;border-top:1px dashed #d4c8b2;background:#f7f1e4;border-radius:10px}.reader-review-title{margin:0 0 12px;font-size:15px;letter-spacing:.08em;text-transform:uppercase;color:#5a5243;font-family:inherit}.reader-review-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:14px}.reader-review-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.reader-review-question,.reader-review-answer{margin:0;flex:1;font-size:15px;line-height:1.5}.reader-review-answer-row{margin-top:6px;padding:8px 12px;background:#fdfbf7;border-left:3px solid var(--ok);border-radius:6px}.reader-review-answer{color:#2b2b2b}.reader-review-toggle{margin-top:6px;padding:4px 12px;font-size:12px;border-radius:6px}.reader-page-footer{margin-top:24px;display:flex;justify-content:flex-end;font-size:13px;color:#888;font-family:inherit}.reader-word-wrap{position:relative;display:inline}.reader-word{background:none;border:none;font:inherit;color:inherit;padding:0;margin:0;cursor:pointer;border-radius:2px;transition:background .12s ease,color .12s ease;display:inline;vertical-align:baseline;appearance:none;-webkit-appearance:none}.reader-word:hover{background:#ffe399;color:#000}.reader-word.is-selected{background:#fc6;color:#000;outline:none}.reader-word-help{position:absolute;top:calc(100% + 6px);left:50%;transform:translate(-50%);z-index:100;min-width:240px;max-width:320px;background:var(--surface);border:1px solid var(--line);box-shadow:0 8px 24px #00000029;border-radius:10px;padding:12px 14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:var(--ink);font-size:13px;line-height:1.45;text-align:left}.reader-word-help-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.reader-word-help-title{font-size:15px;font-weight:700;color:var(--accent)}.reader-word-help-close{background:none;border:none;font-size:14px;color:var(--muted);cursor:pointer;padding:0 4px}.reader-word-help-loading,.reader-word-help-error{margin:6px 0;font-size:13px}.reader-word-help-error{color:var(--bad)}.reader-word-help-retry{margin-top:4px;font-size:12px;padding:4px 10px}.reader-word-help-form{font-size:12px;color:var(--muted);margin:0 0 6px}.reader-word-help-definition{font-size:14px;color:var(--ink);margin:0 0 8px}.reader-word-help-recap{font-size:13px;color:var(--muted);margin:0 0 8px}.reader-word-help-recap span{font-weight:600;color:var(--ink)}.reader-word-help-spanish{font-size:13px;color:var(--muted);margin:0 0 8px;font-style:italic}.reader-word-help-spanish span{font-weight:600;font-style:normal;color:var(--ink)}.reader-word-help-listen{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;font-size:12px;border-radius:6px;margin-top:4px}.reader-chapter-art{margin:0 0 20px;border-radius:10px;overflow:hidden;aspect-ratio:16 / 9;background:#efe7d6}.reader-chapter-art img{display:block;width:100%;height:100%;object-fit:cover}.reader-book-container[data-direction=next] .reader-page{animation:reader-curl-next .32s cubic-bezier(.2,.7,.3,1);transform-origin:left center}.reader-book-container[data-direction=prev] .reader-page{animation:reader-curl-prev .32s cubic-bezier(.2,.7,.3,1);transform-origin:right center}@keyframes reader-curl-next{0%{opacity:0;transform:translate(72px) rotateY(-16deg) scale(.98)}to{opacity:1;transform:none}}@keyframes reader-curl-prev{0%{opacity:0;transform:translate(-72px) rotateY(16deg) scale(.98)}to{opacity:1;transform:none}}.reader-book-container[data-direction] .reader-chapter-title{animation:reader-rise .3s ease-out backwards}.reader-book-container[data-direction] .reader-chapter-art{animation:reader-art-in .38s ease-out backwards}.reader-book-container[data-direction] .reader-paragraph-row{animation:reader-para-in .3s ease-out backwards}.reader-book-container[data-direction] .reader-paragraph-row:nth-child(2){animation-delay:.03s}.reader-book-container[data-direction] .reader-paragraph-row:nth-child(3){animation-delay:.06s}.reader-book-container[data-direction] .reader-paragraph-row:nth-child(4){animation-delay:.09s}.reader-book-container[data-direction] .reader-paragraph-row:nth-child(5){animation-delay:.12s}.reader-book-container[data-direction] .reader-paragraph-row:nth-child(6){animation-delay:.15s}.reader-book-container[data-direction] .reader-paragraph-row:nth-child(7){animation-delay:.18s}.reader-book-container[data-direction] .reader-paragraph-row:nth-child(8){animation-delay:.21s}.reader-book-container[data-direction] .reader-paragraph-row:nth-child(n+9){animation-delay:.21s}.reader-paragraph-row:has(.reader-word-help){z-index:1}@keyframes reader-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes reader-art-in{0%{opacity:0;transform:scale(1.045)}to{opacity:1;transform:none}}@keyframes reader-para-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.reader-audio-btn.is-loading span{display:inline-block;width:12px;height:12px;font-size:0;border-radius:50%;border:2px solid currentColor;border-top-color:transparent;animation:reader-spin .7s linear infinite}@keyframes reader-spin{to{transform:rotate(360deg)}}@media(max-width:720px){.reader-page{padding:24px 20px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}.reader-page,.reader-chapter-title,.reader-chapter-art,.reader-paragraph-row,.reader-audio-btn.is-loading span{animation:none!important}}a.game-card,a.course-card{display:block;color:inherit;text-decoration:none}a.back,a.btn{display:inline-block;text-decoration:none}
