:root{
  --game-green:#56825c;
  --game-green-dark:#315a3a;
  --game-lime:#8dbb65;
  --game-sky:#79b9d1;
  --game-gold:#e6a93d;
  --game-red:#cb4965;
  --game-purple:#8565b8;
  --game-card:var(--panel-solid,#fffdfb);
  --game-soft:var(--panel-soft,#fff6f8);
  --game-line:var(--line,rgba(96,38,62,.2));
  --game-shadow:0 18px 52px rgba(49,32,39,.14);
}

*{box-sizing:border-box}
[hidden]{display:none!important}
button,input{font:inherit}
button{touch-action:manipulation}
.game-portal{min-height:100vh;padding:0;background:radial-gradient(circle at 12% 3%,rgba(141,187,101,.16),transparent 25%),radial-gradient(circle at 92% 10%,rgba(121,185,209,.2),transparent 28%),linear-gradient(180deg,#fffaf5,#f7f5eb)}
.game-topbar{position:sticky;top:0;z-index:50;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;min-height:68px;padding:10px clamp(14px,4vw,44px);border-bottom:1px solid var(--game-line);background:color-mix(in srgb,var(--game-card) 94%,transparent);backdrop-filter:blur(18px)}
.game-back,.game-brand{color:var(--text-primary);font-weight:900;text-decoration:none}
.game-back{justify-self:start;display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:8px 12px;border-radius:14px}
.game-back:hover{background:var(--game-soft)}
.game-brand{justify-self:center;font-size:1.05rem;letter-spacing:-.02em}
.game-brand span{margin-right:5px}
.game-top-actions{justify-self:end;display:flex;align-items:center;gap:8px}
.icon-button,.round-close,.dialog-close{display:grid;place-items:center;border:1px solid var(--game-line);background:var(--game-card);color:var(--text-primary);font-weight:950;cursor:pointer}
.icon-button{width:44px;height:44px;border-radius:14px;font-size:1.05rem}
.game-shell{width:min(1040px,calc(100% - 24px));margin:24px auto 80px}
.game-kicker{margin:0;color:var(--game-green-dark);font-size:.79rem;font-weight:950;letter-spacing:.11em;line-height:1.5;text-transform:uppercase}
.game-hero{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);min-height:390px;overflow:hidden;border:1px solid rgba(65,105,69,.2);border-radius:34px;background:linear-gradient(145deg,#fffef9 0%,#f6ffe9 52%,#e6f5f8 100%);box-shadow:var(--game-shadow)}
.game-hero:before{content:"";position:absolute;inset:auto -7% -32% -7%;z-index:-1;height:65%;border-radius:50% 50% 0 0;background:linear-gradient(180deg,#a8d27c,#6e9e5b)}
.game-hero-copy{z-index:2;padding:clamp(30px,6vw,64px)}
.game-hero h1{margin:.2rem 0 1rem;color:#24372a;font-size:clamp(3rem,7vw,5.5rem);font-weight:950;line-height:.92;letter-spacing:-.065em}
.game-hero h1 span{color:var(--game-green)}
.game-hero-copy>p:not(.game-kicker){max-width:640px;margin:0;color:#46594b;font-size:1.08rem;font-weight:650;line-height:1.85}
.hero-game-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:25px}
.quest-button{min-height:52px;padding:12px 19px;border:2px solid color-mix(in srgb,var(--game-green) 35%,var(--game-line));border-radius:15px;background:var(--game-card);color:var(--game-green-dark);font-weight:950;box-shadow:0 5px 0 color-mix(in srgb,var(--game-green) 30%,transparent);cursor:pointer;transition:transform .15s,box-shadow .15s}
.quest-button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 7px 0 color-mix(in srgb,var(--game-green) 30%,transparent)}
.quest-button:active:not(:disabled){transform:translateY(3px);box-shadow:0 2px 0 color-mix(in srgb,var(--game-green) 30%,transparent)}
.quest-button.primary{border-color:#315a3a;background:linear-gradient(135deg,#56825c,#3d6c47);color:#fff;box-shadow:0 5px 0 #294b31}
.quest-button:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
.hero-world{position:relative;min-height:330px}
.hero-world span{position:absolute;filter:drop-shadow(0 7px 7px rgba(34,67,42,.14))}
.hero-sun{top:36px;right:44px;font-size:4.5rem}.hero-cloud{top:58px;left:0;font-size:4rem}.hero-house{right:60px;bottom:102px;font-size:7rem}.hero-buffalo{left:14px;bottom:58px;font-size:5.5rem}.hero-rice{right:9px;bottom:16px;font-size:3.5rem;letter-spacing:-.25em}.hero-star{top:120px;right:128px;color:#d44f70;font-size:2.7rem;animation:game-star 2.4s ease-in-out infinite}
@keyframes game-star{50%{transform:translateY(-8px) scale(1.08)}}
.stat-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px 0}
.stat-strip article{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;min-height:92px;padding:16px;border:1px solid var(--game-line);border-radius:20px;background:var(--game-card);box-shadow:0 9px 25px rgba(49,32,39,.07)}
.stat-strip article>span{grid-row:1/3;font-size:2rem}.stat-strip strong{color:var(--text-primary);font-size:1.35rem;font-weight:950}.stat-strip small{color:var(--text-support);font-size:.78rem;font-weight:800}
.practice-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:20px 0 38px}
.practice-card{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;min-height:96px;padding:18px;border:1px solid var(--game-line);border-radius:23px;background:var(--game-card);color:var(--text-primary);text-align:left;box-shadow:0 10px 28px rgba(49,32,39,.08);cursor:pointer}
.practice-card:hover{border-color:color-mix(in srgb,var(--game-purple) 55%,var(--game-line));transform:translateY(-2px)}
.practice-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:17px;background:#fff4cf;font-size:1.7rem}
.practice-card.mistakes .practice-icon{background:#e9f6df}.practice-card strong,.practice-card small{display:block}.practice-card strong{font-size:1rem;font-weight:950}.practice-card small{margin-top:5px;color:var(--text-support);font-size:.82rem;font-weight:700}.practice-arrow,.practice-count{display:grid;place-items:center;min-width:38px;height:38px;border-radius:50%;background:var(--game-soft);font-weight:950}.practice-count{background:#dfeeda;color:#365f3e}
.path-section{padding:clamp(22px,5vw,42px);border:1px solid var(--game-line);border-radius:32px;background:var(--game-card);box-shadow:var(--game-shadow)}
.path-heading{display:grid;grid-template-columns:1fr minmax(240px,.7fr);gap:24px;align-items:end}
.path-heading h2{margin:.2rem 0 0;color:var(--text-primary);font-size:clamp(2rem,5vw,3.2rem);font-weight:950;letter-spacing:-.045em}
.path-heading>p{margin:0;color:var(--text-secondary);font-weight:650;line-height:1.75}
.quest-path{position:relative;display:flex;flex-direction:column;align-items:center;gap:18px;max-width:660px;margin:42px auto 10px;padding:0 0 12px}
.quest-path:before{content:"";position:absolute;top:30px;bottom:30px;left:50%;width:8px;border-radius:99px;background:linear-gradient(#9fc47d,#79b9d1,#d9a653);transform:translateX(-50%);opacity:.38}
.path-unit{position:relative;z-index:1;display:grid;grid-template-columns:112px minmax(0,1fr);gap:17px;align-items:center;width:min(100%,520px)}
.path-unit:nth-child(even){transform:translateX(74px)}.path-unit:nth-child(odd){transform:translateX(-74px)}
.unit-node{position:relative;display:grid;place-items:center;width:104px;height:91px;border:0;border-radius:50%;background:#dce3dc;color:#6b746c;font-size:2.4rem;box-shadow:0 8px 0 #bac4bb,0 13px 24px rgba(30,47,34,.13);cursor:pointer;transition:.18s transform}
.unit-node:before{content:"";position:absolute;inset:7px;border:3px solid rgba(255,255,255,.68);border-radius:50%}
.unit-node:not(:disabled):hover{transform:translateY(-4px)}
.path-unit.is-unlocked .unit-node{background:linear-gradient(145deg,#92c56e,#56825c);color:#fff;box-shadow:0 8px 0 #345d3d,0 13px 25px rgba(38,82,46,.24)}
.path-unit.is-complete .unit-node{background:linear-gradient(145deg,#f6ca5c,#e6a23c);box-shadow:0 8px 0 #b87928,0 13px 25px rgba(151,98,30,.2)}
.path-unit.is-current .unit-node{animation:node-pulse 1.8s ease-in-out infinite}
@keyframes node-pulse{50%{box-shadow:0 8px 0 #345d3d,0 0 0 11px rgba(104,156,84,.16),0 13px 25px rgba(38,82,46,.24)}}
.unit-lock{position:absolute;right:-3px;bottom:-2px;display:grid;place-items:center;width:31px;height:31px;border:3px solid var(--game-card);border-radius:50%;background:#7f8981;font-size:.8rem}
.unit-copy{min-width:0;padding:14px 16px;border:1px solid var(--game-line);border-radius:18px;background:var(--game-card);box-shadow:0 8px 20px rgba(49,32,39,.07)}
.unit-copy small,.unit-copy strong,.unit-copy span{display:block}.unit-copy small{color:var(--game-green-dark);font-size:.72rem;font-weight:950;text-transform:uppercase}.unit-copy strong{margin:3px 0;color:var(--text-primary);font-size:1.05rem;font-weight:950}.unit-copy span{color:var(--text-support);font-size:.78rem;font-weight:650;line-height:1.45}.unit-stars{margin-top:7px;color:var(--game-gold)!important;font-size:1rem!important;letter-spacing:.12em}
.game-settings{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:18px 0 0;padding:19px 22px;border:1px dashed var(--game-line);border-radius:20px;background:var(--game-soft)}
.game-settings h2{margin:0;color:var(--text-primary);font-size:1rem}.game-settings p{margin:5px 0 0;color:var(--text-support);font-size:.82rem;line-height:1.6}
.text-button{min-height:44px;padding:9px 13px;border:0;border-radius:12px;background:transparent;color:var(--text-secondary);font-weight:850;cursor:pointer}.text-button:hover{background:var(--game-soft)}.text-button.danger{color:#a42e4a}
.round-screen{width:min(780px,100%);margin:0 auto}
.round-header{display:grid;grid-template-columns:46px 1fr auto;gap:14px;align-items:center;margin-bottom:20px}
.round-close{width:44px;height:44px;border-radius:14px;font-size:1.7rem}
.round-progress{height:16px;overflow:hidden;border-radius:99px;background:#dfe6df;box-shadow:inset 0 2px 5px rgba(32,48,37,.12)}
.round-progress span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#8dbb65,#56825c);transition:width .3s ease}
.energy-counter{display:flex;align-items:center;gap:5px;min-width:66px;color:var(--game-red);font-size:1.35rem;font-weight:950}.energy-counter strong{font-size:1rem}
.round-meta{display:flex;align-items:center;gap:11px;margin:0 0 14px;color:var(--text-primary)}.round-meta>span:first-child{font-size:2rem}.round-meta div{display:grid}.round-meta small{color:var(--text-support);font-size:.75rem;font-weight:800}.round-meta strong{font-size:1rem;font-weight:950}.combo-pill{display:flex!important;grid-auto-flow:column;gap:4px!important;align-items:center;margin-left:auto;padding:7px 11px;border-radius:999px;background:#fff1c8;color:#8a5a0a;font-weight:950}
.challenge-card{min-height:430px;padding:clamp(23px,5vw,42px);border:1px solid var(--game-line);border-radius:30px;background:var(--game-card);box-shadow:var(--game-shadow)}
.challenge-type{margin:0;color:var(--game-green-dark);font-size:.78rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}
.challenge-prompt{margin:9px 0 4px;color:var(--text-primary);font-size:clamp(1.65rem,5vw,2.7rem);font-weight:950;line-height:1.24;letter-spacing:-.035em}
.challenge-helper{margin:0 0 24px;color:var(--text-support);font-size:.9rem;font-weight:650;line-height:1.65}
.prompt-word{display:flex;align-items:center;gap:12px;margin:23px 0;padding:19px;border:1px solid var(--game-line);border-radius:19px;background:var(--game-soft)}
.prompt-word strong{font-size:clamp(1.7rem,5vw,2.55rem);font-weight:950}.prompt-word button,.listen-button,.mini-audio{border:1px solid rgba(65,105,69,.26);background:var(--game-card);color:var(--game-green-dark);font-weight:900;cursor:pointer}
.prompt-word button{display:grid;place-items:center;width:52px;height:52px;border-radius:15px;font-size:1.35rem}
.answer-options{display:grid;grid-template-columns:repeat(2,1fr);gap:11px;margin-top:25px}
.answer-option{min-height:74px;padding:14px 16px;border:2px solid var(--game-line);border-radius:17px;background:var(--game-card);color:var(--text-primary);font-weight:850;text-align:left;box-shadow:0 4px 0 color-mix(in srgb,var(--game-line) 75%,transparent);cursor:pointer}.answer-option:hover{border-color:#8dbb65}.answer-option.is-selected{border-color:#56825c;background:#eef8e7;box-shadow:0 4px 0 #56825c}.answer-option:disabled{cursor:default}
.listen-stage{display:grid;place-items:center;min-height:150px;margin:18px 0 25px}.listen-button{width:118px;height:105px;border-radius:30px;background:linear-gradient(145deg,#e8f7ff,#c7e8f3);font-size:3.3rem;box-shadow:0 7px 0 #7eb7ca;cursor:pointer}.listen-button:hover{transform:translateY(-2px)}
.spell-wrap{margin-top:25px}.spell-input{width:100%;min-height:66px;padding:14px 18px;border:2px solid var(--game-line);border-radius:17px;background:var(--game-card);color:var(--text-primary);font-size:1.25rem;font-weight:850}.spell-input:focus{outline:4px solid rgba(86,130,92,.18);border-color:#56825c}.spell-hint{display:flex;align-items:center;gap:9px;margin-top:13px;color:var(--text-support);font-size:.85rem;font-weight:650}
.match-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:24px}.match-column{display:grid;align-content:start;gap:10px}.match-option{min-height:66px;padding:12px;border:2px solid var(--game-line);border-radius:16px;background:var(--game-card);color:var(--text-primary);font-weight:850;cursor:pointer}.match-option strong,.match-option small{display:block}.match-option small{margin-top:3px;color:var(--text-support);font-size:.72rem}.match-option.is-selected{border-color:#8565b8;background:#f1ebff}.match-option.is-matched{border-color:#6a9d58;background:#e8f6e2;color:#36652d;opacity:.7}.match-option.is-wrong{animation:wrong-shake .35s;background:#fff0f3;border-color:#cb4965}
@keyframes wrong-shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
.answer-panel{display:grid;grid-template-columns:54px 1fr;gap:14px;margin-top:14px;padding:18px;border:1px solid #75a765;border-radius:22px;background:#eaf7e5}.answer-panel.is-wrong{border-color:#d36a80;background:#fff0f3}.answer-status-icon{display:grid;place-items:center;width:50px;height:50px;border-radius:50%;background:#5d9650;color:#fff;font-size:1.4rem;font-weight:950}.answer-panel.is-wrong .answer-status-icon{background:#c44964}.answer-copy strong{display:block;color:#2f6330;font-size:1.18rem;font-weight:950}.answer-panel.is-wrong .answer-copy strong{color:#9f2f48}.answer-copy p{margin:5px 0 0;color:#3b533d;font-size:.91rem;font-weight:650;line-height:1.6}.answer-panel.is-wrong .answer-copy p{color:#713142}.mini-audio{min-height:44px;margin-top:9px;padding:7px 10px;border-radius:11px;font-size:.82rem}
.round-footer{display:flex;justify-content:flex-end;padding:15px 0}.round-footer .quest-button{min-width:190px}
.result-screen{width:min(720px,100%);margin:20px auto}.result-card{padding:clamp(28px,6vw,52px);border:1px solid var(--game-line);border-radius:32px;background:var(--game-card);text-align:center;box-shadow:var(--game-shadow)}.result-celebration{font-size:5rem;animation:result-pop .55s cubic-bezier(.2,1.4,.4,1)}@keyframes result-pop{from{opacity:0;transform:scale(.3) rotate(-14deg)}}.result-card h1{margin:.3rem 0;color:var(--text-primary);font-size:clamp(2.2rem,6vw,3.6rem);font-weight:950;letter-spacing:-.045em}.result-card>p:not(.game-kicker){margin:.3rem auto;color:var(--text-secondary);font-weight:650}.result-stars{margin:20px 0;color:var(--game-gold);font-size:3rem;letter-spacing:.12em}.result-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:22px 0}.result-stats article{padding:14px 8px;border:1px solid var(--game-line);border-radius:16px;background:var(--game-soft)}.result-stats span,.result-stats strong{display:block}.result-stats span{color:var(--text-support);font-size:.72rem;font-weight:750}.result-stats strong{margin-top:5px;color:var(--text-primary);font-size:1.12rem;font-weight:950}.result-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}.result-actions .text-button{width:100%}
.help-dialog{width:min(600px,calc(100% - 24px));padding:0;border:1px solid var(--game-line);border-radius:28px;background:var(--game-card);color:var(--text-primary);box-shadow:0 30px 90px rgba(25,18,21,.35)}.help-dialog::backdrop{background:rgba(28,20,24,.62);backdrop-filter:blur(5px)}.help-dialog form{position:relative;padding:clamp(24px,6vw,42px)}.dialog-close{position:absolute;top:16px;right:16px;width:46px;height:46px;border-radius:13px;font-size:1.4rem}.help-dialog h2{margin:.25rem 50px 20px 0;font-size:1.8rem}.help-dialog ol{display:grid;gap:10px;padding:0;list-style:none}.help-dialog li{display:grid;grid-template-columns:44px 1fr;gap:12px;padding:13px;border-radius:16px;background:var(--game-soft)}.help-dialog li>span{font-size:1.6rem}.help-dialog li strong{font-weight:950}.help-dialog li p{margin:4px 0 0;color:var(--text-support);font-size:.85rem;line-height:1.55}.full-width{width:100%;margin-top:14px}
.game-toast{position:fixed;z-index:100;right:18px;bottom:18px;max-width:420px;padding:14px 17px;border-radius:15px;background:#2d4e34;color:#fff;font-weight:850;box-shadow:0 15px 38px rgba(20,36,24,.3)}

html[data-theme-resolved="dark"] .game-portal{background:radial-gradient(circle at 12% 3%,rgba(90,133,74,.18),transparent 25%),radial-gradient(circle at 92% 10%,rgba(75,124,143,.18),transparent 28%),linear-gradient(180deg,#181c18,#181519)}
html[data-theme-resolved="dark"] .game-hero{background:linear-gradient(145deg,#2a3028 0%,#263523 52%,#23353a 100%)}
html[data-theme-resolved="dark"] .game-hero h1{color:#f6fff3}
html[data-theme-resolved="dark"] .game-hero h1 span{color:#a8d183}
html[data-theme-resolved="dark"] .game-hero-copy>p:not(.game-kicker){color:#dae8d4}
html[data-theme-resolved="dark"] .game-kicker,html[data-theme-resolved="dark"] .challenge-type,html[data-theme-resolved="dark"] .unit-copy small{color:#b0d491}
html[data-theme-resolved="dark"] .answer-option.is-selected{background:#30432d;color:#f5fff1}
html[data-theme-resolved="dark"] .match-option.is-selected{background:#3b3150}
html[data-theme-resolved="dark"] .match-option.is-matched{background:#2d462b;color:#dff4d7}
html[data-theme-resolved="dark"] .match-option.is-wrong{background:#4b2b34}
html[data-theme-resolved="dark"] .answer-panel{background:#263f28}
html[data-theme-resolved="dark"] .answer-panel.is-wrong{background:#472833}
html[data-theme-resolved="dark"] .answer-copy strong{color:#bfe6b3}
html[data-theme-resolved="dark"] .answer-copy p{color:#d9e8d5}
html[data-theme-resolved="dark"] .answer-panel.is-wrong .answer-copy strong{color:#ffc1ce}
html[data-theme-resolved="dark"] .answer-panel.is-wrong .answer-copy p{color:#f3dce3}
html[data-theme-resolved="dark"] .practice-icon{background:#4b4125}
html[data-theme-resolved="dark"] .practice-card.mistakes .practice-icon{background:#2e462c}
html[data-theme-resolved="dark"] .practice-count{background:#2f492e;color:#d9f2d2}
html[data-theme-resolved="dark"] .combo-pill{background:#4a3c20;color:#ffda82}
html[data-theme-resolved="dark"] .listen-button{background:linear-gradient(145deg,#2d4650,#345c6a);box-shadow:0 7px 0 #193943}
html[data-theme-resolved="dark"] .round-progress{background:#3b443c}

@media(max-width:800px){
  .game-hero{grid-template-columns:1fr}.hero-world{min-height:245px}.game-hero-copy{padding-bottom:10px}.path-heading{grid-template-columns:1fr}.stat-strip{grid-template-columns:repeat(2,1fr)}.practice-cards{grid-template-columns:1fr}.path-unit:nth-child(even),.path-unit:nth-child(odd){transform:none}.result-stats{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:600px){
  .game-topbar{grid-template-columns:auto 1fr auto;min-height:62px;padding:8px 10px}.game-back span,.game-brand span,.game-theme-control>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.game-brand{font-size:.87rem;text-align:center}.game-theme-control select{max-width:92px}.icon-button{display:none}.game-shell{width:min(100% - 14px,1040px);margin-top:10px}.game-hero{border-radius:25px}.game-hero-copy{padding:26px 19px 6px}.game-hero h1{font-size:3.2rem}.hero-world{min-height:215px}.hero-house{right:38px;bottom:76px;font-size:5.4rem}.hero-buffalo{font-size:4.2rem}.hero-rice{font-size:2.8rem}.hero-cloud{font-size:3.3rem}.hero-sun{font-size:3.8rem}.hero-game-actions>*{width:100%}.stat-strip{gap:7px}.stat-strip article{min-height:78px;padding:11px}.stat-strip article>span{font-size:1.6rem}.practice-card{padding:14px}.path-section{padding:24px 13px}.quest-path:before{left:52px;transform:none}.path-unit{grid-template-columns:96px minmax(0,1fr);gap:8px}.unit-node{width:88px;height:78px;font-size:2rem}.unit-copy{padding:12px}.game-settings{align-items:flex-start;flex-direction:column}.game-settings .text-button{width:100%}.round-screen{padding-top:3px}.round-header{grid-template-columns:44px 1fr 53px;gap:9px}.challenge-card{min-height:410px;padding:24px 17px;border-radius:23px}.answer-options{grid-template-columns:1fr}.answer-option{min-height:63px}.match-grid{gap:7px}.match-option{min-height:61px;padding:9px;font-size:.88rem}.round-footer .quest-button{width:100%}.answer-panel{grid-template-columns:44px 1fr;padding:14px}.answer-status-icon{width:42px;height:42px}.result-card{padding:28px 17px}.result-stars{font-size:2.5rem}.result-actions .quest-button{width:100%}.game-toast{right:10px;bottom:10px;left:10px;max-width:none}
}
@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
@media(forced-colors:active){
  .game-hero,.stat-strip article,.practice-card,.path-section,.unit-copy,.challenge-card,.answer-option,.match-option,.result-card{border:2px solid CanvasText}.quest-button,.unit-node{border:2px solid ButtonText}
}

/* ===== V11 bundled audio controls ===== */
.game-audio-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.game-audio-button{min-height:44px;padding:8px 12px;border:1px solid rgba(65,105,69,.28);border-radius:13px;background:var(--game-card);color:var(--game-green-dark);font-size:.86rem;font-weight:950;white-space:nowrap;cursor:pointer}
.game-audio-button.slow{border-color:rgba(150,119,42,.36);background:#fff9df;color:#74580d}
.game-audio-button.is-speaking,.mini-audio.is-speaking{animation:audio-pulse .7s ease-in-out infinite alternate}
@keyframes audio-pulse{to{transform:scale(1.05);box-shadow:0 0 0 5px rgba(86,130,92,.15)}}
.prompt-word{justify-content:space-between;flex-wrap:wrap}
.prompt-word .game-audio-button{display:inline-flex;width:auto;min-width:84px;height:46px;padding:8px 11px;font-size:.86rem}
.listen-audio-controls{justify-content:center}
.listen-audio-controls .game-audio-button{min-width:120px;min-height:88px;border-radius:24px;background:linear-gradient(145deg,#e8f7ff,#c7e8f3);font-size:1rem;box-shadow:0 6px 0 #7eb7ca}
.listen-audio-controls .game-audio-button.slow{background:linear-gradient(145deg,#fff8dc,#f0dda1);box-shadow:0 6px 0 #c4a84e}
.match-english-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:stretch}
.match-english-item .match-option{min-width:0}
.match-audio-controls{display:grid;grid-template-columns:1fr;gap:4px}
.match-audio-controls .game-audio-button{min-width:64px;min-height:44px;padding:4px 6px;border-radius:9px;font-size:.68rem}
.feedback-audio-controls{margin-top:9px}
.feedback-audio-controls .mini-audio{margin-top:0}
html[data-theme-resolved="dark"] .game-audio-button.slow{border-color:#c7aa58;background:#423a20;color:#ffe9a5}
html[data-theme-resolved="dark"] .listen-audio-controls .game-audio-button{background:linear-gradient(145deg,#2d4650,#345c6a);box-shadow:0 6px 0 #193943}
html[data-theme-resolved="dark"] .listen-audio-controls .game-audio-button.slow{background:linear-gradient(145deg,#4b4329,#5c502a);box-shadow:0 6px 0 #302b18}

@media(max-width:600px){
  .prompt-word .game-audio-controls{width:100%}
  .prompt-word .game-audio-button{flex:1}
  .listen-audio-controls{width:100%}
  .listen-audio-controls .game-audio-button{flex:1;min-width:0}
  .match-english-item{grid-template-columns:1fr}
  .match-audio-controls{grid-template-columns:repeat(2,1fr)}
  .match-audio-controls .game-audio-button{min-width:0}
}

/* ===== V12 subtle topic and activity illustrations ===== */
.hero-world{isolation:isolate;padding:24px}
.hero-world-art{position:absolute;inset:24px 24px 34px 6px;z-index:-1;width:calc(100% - 30px);height:calc(100% - 58px);object-fit:cover;border:1px solid rgba(255,255,255,.6);border-radius:28px;box-shadow:0 18px 36px rgba(33,62,39,.22);filter:saturate(.86) contrast(.94)}
.hero-world:after{content:"";position:absolute;inset:24px 24px 34px 6px;z-index:0;border-radius:28px;background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(34,66,40,.38));pointer-events:none}
.hero-world span{z-index:1}

.unit-copy{min-height:112px}
.unit-art{float:right;width:96px;height:66px;margin:0 0 8px 11px;overflow:hidden;border:1px solid var(--game-line);border-radius:13px;background:var(--game-soft);box-shadow:0 6px 14px rgba(35,28,31,.1)}
.unit-art img{display:block;width:100%;height:100%;object-fit:cover}

.challenge-card{position:relative}
.challenge-topic-art{float:right;width:138px;margin:0 0 14px 18px;overflow:hidden;border:1px solid var(--game-line);border-radius:17px;background:var(--game-soft);box-shadow:0 8px 19px rgba(35,28,31,.11)}
.challenge-topic-art img{display:block;width:100%;height:92px;object-fit:cover}
.challenge-topic-art figcaption{padding:7px 9px;color:var(--text-support);font-size:.67rem;font-weight:750;line-height:1.45}
.prompt-word,.listen-stage,.answer-options,.spell-wrap,.match-grid{clear:both}

html[data-theme-resolved="dark"] .hero-world-art{border-color:rgba(218,239,205,.2);filter:saturate(.7) brightness(.78)}
html[data-theme-resolved="dark"] .unit-art,
html[data-theme-resolved="dark"] .challenge-topic-art{background:#2c352b;border-color:rgba(218,239,205,.17)}

@media(max-width:600px){
  .hero-world-art,.hero-world:after{inset:14px 16px 24px;width:calc(100% - 32px);height:calc(100% - 38px)}
  .unit-art{width:82px;height:56px}
  .challenge-topic-art{width:112px;margin-left:11px}
  .challenge-topic-art img{height:75px}
  .challenge-topic-art figcaption{font-size:.62rem}
}

/* ===== V14.2 Duolingo-inspired mobile quest ===== */
@media(max-width:600px){
  .game-portal{
    padding-bottom:env(safe-area-inset-bottom,0);
    background:linear-gradient(180deg,#f7fff2 0,#f8fbf4 36%,#fffaf5 100%);
  }
  .game-shell{
    width:min(100% - 12px,1040px);
    margin:6px auto 76px;
  }
  .game-home{
    display:flex;
    flex-direction:column;
  }

  .mobile-stat-tabs{
    order:-4;
    position:sticky;
    top:62px;
    z-index:44;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:4px;
    margin:0 0 8px;
    padding:6px;
    border:1px solid var(--game-line);
    border-radius:18px;
    background:color-mix(in srgb,var(--game-card) 96%,transparent);
    box-shadow:0 8px 22px rgba(42,72,45,.12);
    backdrop-filter:blur(18px);
  }
  .mobile-stat-tabs .stat-tab{
    grid-template-columns:auto minmax(0,1fr);
    grid-template-rows:auto auto;
    gap:0 3px;
    align-content:center;
    min-width:0;
    min-height:59px;
    padding:6px 4px 5px;
    border:0;
    border-bottom:3px solid var(--stat-color,#8dbb65);
    border-radius:12px;
    background:var(--game-soft);
    box-shadow:none;
    text-align:center;
  }
  .mobile-stat-tabs .stat-tab>span{
    grid-row:1;
    align-self:center;
    font-size:1.05rem;
    line-height:1;
  }
  .mobile-stat-tabs .stat-tab strong{
    align-self:center;
    min-width:0;
    overflow:hidden;
    color:var(--stat-color,#56825c);
    font-size:1rem;
    line-height:1.1;
    text-overflow:ellipsis;
  }
  .mobile-stat-tabs .stat-tab small{
    grid-column:1/-1;
    color:var(--text-support);
    font-size:.61rem;
    font-weight:900;
    line-height:1.2;
    white-space:nowrap;
  }
  .mobile-stat-tabs .stat-th{display:none}
  .stat-streak{--stat-color:#e7862f}
  .stat-xp{--stat-color:#8565b8}
  .stat-stars{--stat-color:#d59a25}
  .stat-words{--stat-color:#4592ad}

  .game-hero{
    order:-3;
    min-height:0;
    margin:0 0 8px;
    border-radius:22px;
    background:linear-gradient(145deg,#eaf9d9,#dff3c9 54%,#e3f5f8);
    box-shadow:0 8px 0 rgba(66,112,64,.18),0 14px 30px rgba(49,82,48,.1);
  }
  .game-hero:before,.hero-world{display:none}
  .game-hero-copy{padding:19px 18px 17px}
  .game-hero .game-kicker{font-size:.67rem}
  .game-hero h1{
    margin:.22rem 0 .45rem;
    font-size:2.35rem;
    line-height:.98;
    letter-spacing:-.052em;
  }
  .game-hero-copy>p:not(.game-kicker){display:none}
  .hero-game-actions{
    display:grid;
    margin-top:15px;
  }
  .hero-game-actions [data-start-daily]{display:none}
  .hero-game-actions .quest-button{
    width:100%;
    min-height:50px;
    border-radius:16px;
    text-transform:none;
  }

  .practice-cards{
    order:-2;
    grid-template-columns:1fr;
    gap:8px;
    margin:8px 0 18px;
  }
  .practice-card{
    min-height:78px;
    padding:11px 13px;
    border-width:2px;
    border-radius:18px;
    box-shadow:0 4px 0 color-mix(in srgb,var(--game-line) 74%,transparent);
  }
  .practice-icon{
    width:46px;
    height:46px;
    border-radius:14px;
    font-size:1.45rem;
  }
  .practice-card strong{font-size:.92rem}
  .practice-card small{font-size:.72rem;line-height:1.4}

  .path-section{
    padding:17px 4px 24px;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }
  .path-heading{
    display:block;
    padding:0 14px;
    text-align:center;
  }
  .path-heading h2{
    margin:.15rem 0 0;
    font-size:1.85rem;
    line-height:1.18;
  }
  .path-heading>p{
    max-width:310px;
    margin:7px auto 0;
    font-size:.8rem;
    line-height:1.55;
  }
  .quest-path{
    width:100%;
    max-width:360px;
    gap:24px;
    margin:36px auto 4px;
    padding:5px 0 16px;
  }
  .quest-path:before{display:none}
  .path-unit{
    display:grid;
    grid-template-columns:1fr;
    justify-items:center;
    gap:8px;
    width:240px;
  }
  .path-unit:nth-child(4n+1){transform:translateX(-38px)}
  .path-unit:nth-child(4n+2){transform:translateX(34px)}
  .path-unit:nth-child(4n+3){transform:translateX(52px)}
  .path-unit:nth-child(4n+4){transform:translateX(-17px)}
  .unit-node{
    width:90px;
    height:80px;
    border-radius:50%;
    font-size:2.12rem;
    box-shadow:0 7px 0 #bac4bb,0 12px 21px rgba(30,47,34,.13);
  }
  .unit-node:before{inset:6px}
  .path-unit.is-current{margin-top:18px}
  .path-unit.is-current .unit-node:after{
    content:"START";
    position:absolute;
    top:-37px;
    left:50%;
    padding:6px 11px;
    border-radius:10px;
    background:#fff;
    color:#315a3a;
    font-size:.64rem;
    font-weight:950;
    letter-spacing:.08em;
    box-shadow:0 4px 14px rgba(34,70,39,.17);
    transform:translateX(-50%);
  }
  .unit-copy{
    width:100%;
    min-height:0;
    padding:7px 10px;
    border:0;
    border-radius:14px;
    background:transparent;
    box-shadow:none;
    text-align:center;
  }
  .unit-copy .unit-art{
    float:none;
    width:58px;
    height:40px;
    margin:0 auto 6px;
    border-radius:11px;
  }
  .unit-copy small{font-size:.65rem}
  .unit-copy strong{
    margin:2px 0;
    font-size:.9rem;
    line-height:1.35;
  }
  .unit-copy>span:not(.unit-stars){display:none}
  .unit-stars{
    margin-top:3px;
    font-size:.88rem!important;
    line-height:1.2!important;
  }
  .path-unit:not(.is-unlocked) .unit-copy{opacity:.58}
  .path-unit:not(.is-unlocked) .unit-art{filter:grayscale(1)}

  .game-settings{
    margin-top:4px;
    padding:16px;
    border-radius:18px;
  }
  .round-screen{
    min-height:calc(100dvh - 82px);
    padding-top:3px;
  }
  .round-footer{
    position:sticky;
    bottom:0;
    z-index:42;
    margin:0 -6px;
    padding:10px 6px calc(10px + env(safe-area-inset-bottom,0));
    border-top:1px solid var(--game-line);
    background:color-mix(in srgb,var(--game-card) 96%,transparent);
    backdrop-filter:blur(16px);
  }
}

@media(max-width:360px){
  .mobile-stat-tabs{gap:3px;padding-inline:4px}
  .mobile-stat-tabs .stat-tab{padding-inline:2px}
  .mobile-stat-tabs .stat-tab>span{font-size:.95rem}
  .mobile-stat-tabs .stat-tab strong{font-size:.9rem}
  .mobile-stat-tabs .stat-tab small{font-size:.56rem}
  .path-unit{width:220px}
  .path-unit:nth-child(4n+1){transform:translateX(-28px)}
  .path-unit:nth-child(4n+2){transform:translateX(27px)}
  .path-unit:nth-child(4n+3){transform:translateX(36px)}
  .path-unit:nth-child(4n+4){transform:translateX(-12px)}
}

@media(max-width:600px){
  html[data-theme-resolved="dark"] .game-portal{
    background:linear-gradient(180deg,#171c17,#181b18 45%,#1b1719);
  }
  html[data-theme-resolved="dark"] .mobile-stat-tabs{
    background:rgba(34,40,34,.96);
  }
  html[data-theme-resolved="dark"] .mobile-stat-tabs .stat-tab{
    background:#293129;
  }
  html[data-theme-resolved="dark"] .game-hero{
    background:linear-gradient(145deg,#2d3a28,#283823 54%,#263a3e);
  }
  html[data-theme-resolved="dark"] .path-unit.is-current .unit-node:after{
    background:#e9f7e3;
    color:#23472b;
  }
  html[data-theme-resolved="dark"] .round-footer{
    background:rgba(32,38,32,.96);
  }
}

@media(forced-colors:active) and (max-width:600px){
  .mobile-stat-tabs,.mobile-stat-tabs .stat-tab,.practice-card,.unit-node,.round-footer{
    border:2px solid CanvasText;
  }
  .mobile-stat-tabs .stat-tab strong{color:CanvasText}
}

/* V251.8 — implementation notes appear only in reset confirmation */
.game-settings-compact{
  justify-content:flex-end;
  padding:10px 0 0;
  border:0;
  background:transparent;
}
@media(max-width:620px){
  .game-settings-compact{padding-top:8px}
}


/* ===== V251.22 shared mobile game navigation and expandable stats ===== */
.game-mobile-stats-panel,
.game-mobile-actions{
  display:none;
}
@media(max-width:700px){
  .game-theme-control select{min-height:44px}
  .game-portal{
    padding-bottom:calc(92px + env(safe-area-inset-bottom,0px));
  }
  .game-shell{
    margin-bottom:104px;
  }
  .mobile-stat-tabs{
    display:none!important;
  }
  .game-mobile-actions{
    z-index:72;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .game-mobile-actions[hidden]{display:none!important}
  .game-mobile-actions a,
  .game-mobile-actions button{
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
  }
  .game-mobile-actions .game-current-action{
    color:#fff;
    background:linear-gradient(135deg,var(--game-green-dark),var(--game-green));
  }
  .game-mobile-actions [data-toggle-game-stats][aria-expanded="true"]{
    color:#fff;
    background:linear-gradient(135deg,#6d568f,#9172b6);
  }
  .game-mobile-stats-panel{
    position:fixed;
    z-index:70;
    right:10px;
    bottom:calc(88px + env(safe-area-inset-bottom,0px));
    left:10px;
    display:grid;
    gap:12px;
    max-width:640px;
    margin-inline:auto;
    padding:15px;
    border:1px solid var(--game-line);
    border-radius:24px;
    color:var(--text-primary);
    background:color-mix(in srgb,var(--game-card) 97%,transparent);
    box-shadow:0 22px 58px rgba(31,31,38,.28);
    backdrop-filter:blur(22px);
  }
  .game-mobile-stats-panel[hidden]{display:none!important}
  .game-mobile-stats-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }
  .game-mobile-stats-header div{
    display:grid;
    gap:1px;
  }
  .game-mobile-stats-header small{
    color:var(--text-support);
    font-size:.7rem;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
  }
  .game-mobile-stats-header strong{
    font-size:1.05rem;
    font-weight:950;
  }
  .game-mobile-stats-header button{
    display:grid;
    width:44px;
    height:44px;
    place-items:center;
    border:1px solid var(--game-line);
    border-radius:12px;
    color:var(--text-primary);
    background:var(--game-soft);
    font-size:1.25rem;
    font-weight:950;
    cursor:pointer;
    touch-action:manipulation;
  }
  .game-mobile-stats-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
  }
  .game-mobile-stat{
    display:grid;
    grid-template-rows:auto auto auto;
    place-items:center;
    min-width:0;
    min-height:88px;
    padding:9px 5px;
    border:1px solid var(--game-line);
    border-bottom:4px solid var(--stat-color,#56825c);
    border-radius:16px;
    color:var(--text-primary);
    background:var(--game-soft);
    cursor:pointer;
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
  }
  .game-mobile-stat>span{font-size:1.35rem;line-height:1}
  .game-mobile-stat>strong{
    max-width:100%;
    overflow:hidden;
    color:var(--stat-color,#56825c);
    font-size:1.05rem;
    line-height:1.25;
    text-overflow:ellipsis;
  }
  .game-mobile-stat>small{
    color:var(--text-support);
    font-size:.65rem;
    font-weight:900;
  }
  .game-mobile-stat:active,
  .game-mobile-stats-header button:active{
    transform:scale(.97);
  }
  html[data-theme-resolved="dark"] .game-mobile-stats-panel{
    background:rgba(36,42,36,.97);
  }
  html[data-theme-resolved="dark"] .game-mobile-stat,
  html[data-theme-resolved="dark"] .game-mobile-stats-header button{
    background:#293129;
  }
}
@media(max-width:380px){
  .game-mobile-stats-panel{padding:12px}
  .game-mobile-stats-grid{gap:6px}
  .game-mobile-stat{min-height:80px;padding-inline:3px}
  .game-mobile-stat>span{font-size:1.2rem}
  .game-mobile-stat>strong{font-size:.96rem}
  .game-mobile-stat>small{font-size:.59rem}
}
@media(hover:none), (pointer:coarse){
  .game-mobile-actions a:hover,
  .game-mobile-actions button:hover,
  .game-mobile-stat:hover,
  .game-mobile-stats-header button:hover{
    transform:none;
  }
}


/* ===== V261.5 short-height landscape gameplay ===== */
@media (orientation: landscape) and (max-height: 520px) and (pointer: coarse) {
  .game-shell {
    width:min(1040px,calc(100% - var(--private-safe-left) - var(--private-safe-right) - 20px));
    margin-top:10px;
    margin-bottom:28px;
  }
  .game-hero {
    grid-template-columns:minmax(0,1.15fr) minmax(240px,.85fr);
    min-height:250px;
    border-radius:24px;
  }
  .game-hero-copy { padding:20px 24px; }
  .game-hero h1 { font-size:clamp(2.2rem,5vw,3rem); }
  .game-hero-copy>p:not(.game-kicker) { margin-bottom:12px; line-height:1.45; }
  .hero-world { min-height:238px; }
  .stat-strip { gap:8px; margin:10px 0; }
  .stat-strip article { min-height:72px; padding:10px 12px; }
  .practice-cards { margin:10px 0 18px; }
  .path-section { padding-top:20px; }

  .round-screen { width:min(920px,100%); }
  .round-header { margin-bottom:9px; }
  .round-meta { margin-bottom:8px; }
  .challenge-card {
    min-height:0;
    padding:16px 22px;
    border-radius:22px;
  }
  .challenge-prompt { margin-top:6px; font-size:clamp(1.4rem,5vh,2rem); }
  .challenge-helper { margin-bottom:12px; line-height:1.4; }
  .prompt-word { margin:10px 0; padding:12px 14px; }
  .answer-options { gap:8px; margin-top:12px; }
  .answer-option { min-height:56px; padding:10px 13px; }
  .listen-stage { min-height:90px; margin:8px 0 12px; }
  .listen-audio-controls .game-audio-button { min-height:70px; }
  .spell-wrap { margin-top:12px; }
  .spell-input { min-height:54px; }
  .match-grid { gap:8px; margin-top:12px; }
  .match-option { min-height:54px; padding:9px 10px; }
  .answer-panel { margin-top:9px; padding:12px 14px; }
  .round-footer { padding:9px 0; }
  .result-screen { margin:8px auto; }
  .result-card { padding:20px 24px; }
  .result-celebration { font-size:3.4rem; }
  .result-stars { margin:10px 0; font-size:2.25rem; }
  .result-stats { margin:12px 0; }
  .help-dialog form { padding:18px 22px; }
}
