:root{--ink:#233b39;--muted:#5c706e;--green:#147c69;--line:#d9e4df;--blue:#317bd1;--red:#dc6250;--yellow:#f2bd45;--paper:#fff;--bg:#f4f7f6;font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--bg);letter-spacing:0}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,select,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit;border:1px solid var(--line);background:#fff;border-radius:6px;min-height:44px;padding:10px 16px;font-weight:650}button:disabled{cursor:default;opacity:.65}button:hover:not(:disabled){border-color:var(--green)}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid var(--blue);outline-offset:3px}[hidden]{display:none!important}svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}a{color:inherit}h1,h2,h3,p{margin:0}small{font-size:12px}.primary{background:var(--green);border-color:var(--green);color:white;display:inline-flex;align-items:center;justify-content:center;gap:9px}.primary:hover:not(:disabled){background:#0e6858}.icon-btn{width:44px;height:44px;min-height:44px;padding:10px;display:inline-flex;justify-content:center;align-items:center;text-decoration:none;border:1px solid var(--line);border-radius:6px;background:white}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 32px;border-bottom:1px solid var(--line);background:#fff}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;min-width:0}.brand-mark{background:var(--green);color:white;display:grid;place-items:center;min-width:54px;height:48px;border-radius:7px;font-size:22px;font-weight:900}.brand strong{font-size:21px}.brand small{display:block;color:var(--muted);margin-top:3px}.toolbar{display:flex;gap:8px}.toolbar button[aria-pressed=false]{background:#f3f3f3;color:#899590}
#homeView,#playView{max-width:1280px;margin:auto;padding:30px 32px 48px}.library-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;flex-wrap:wrap}.eyebrow{color:var(--green);font-size:12px;font-weight:750;margin-bottom:8px}h1{font-size:28px;line-height:1.4}.setup{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.setup label{display:grid;gap:6px;color:var(--muted);font-size:12px}.setup select{height:44px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink);padding:0 30px 0 12px;min-width:90px}.filters{display:flex;gap:8px;flex-wrap:wrap;margin:28px 0 22px;padding-bottom:16px;border-bottom:1px solid var(--line)}.filters button{border-color:transparent;background:transparent;font-size:14px;padding:8px 14px}.filters button[aria-pressed=true]{background:#dbede6;color:#11604f}.filters span{font-size:12px;margin-left:6px;opacity:.7}.game-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.game-card{display:flex;flex-direction:column;align-items:stretch;padding:0;border-radius:8px;overflow:hidden;text-align:left;background:white;border:1px solid var(--line)}.game-art{height:132px;background:var(--tint);display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;border-bottom:1px solid var(--line)}.game-art svg{width:70px;height:70px;stroke:none}.game-art .mini-number{font-size:44px;color:var(--accent);font-weight:850;line-height:1}.game-art .mini-sign{font-size:28px;margin:0 8px;color:#536b68}.game-art .game-number{position:absolute;left:13px;top:10px;color:#536b68;font-size:11px;font-weight:500}.game-art .mini-dots{display:grid;grid-template-columns:repeat(2,18px);gap:6px;margin:0 14px}.mini-dots i{width:18px;height:18px;background:var(--accent);border-radius:50%}.game-copy{padding:16px}.game-copy h2{font-size:19px;line-height:1.4}.game-copy p{margin:6px 0 14px;color:var(--muted);font-size:13px;font-weight:400}.game-meta{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--accent)}.game-meta svg{width:18px;height:18px}.game-card:hover{box-shadow:0 4px 12px #233b3910}.game-card:active{background:#f7faf8}
.play-top{display:flex;align-items:center;gap:16px}.play-top h1{font-size:22px}.play-top span{font-size:13px;color:var(--muted)}#scoreLabel{margin-left:auto;font-weight:700;color:var(--green);white-space:nowrap}.progress-track{height:6px;background:#dee7e3;border-radius:6px;margin:20px 0 24px;overflow:hidden}#progress{height:100%;background:var(--green)}.question-zone{text-align:center;padding:8px 0;max-width:1000px;margin:auto}.question-zone h2{font-size:28px;line-height:1.5;margin:0 0 24px}#questionVisual{min-height:190px;display:flex;align-items:center;justify-content:center;gap:20px;flex-wrap:wrap;margin:0 auto 24px}.objects{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;align-items:center;max-width:520px;width:100%;padding:20px;border:1px solid var(--line);background:#fff;border-radius:8px}.objects svg{width:100%;height:auto;aspect-ratio:1;max-height:70px;stroke:none}.object-button{padding:6px;min-height:48px;aspect-ratio:1;border:2px solid transparent;display:grid;place-items:center}.object-button svg{width:100%;height:100%;stroke:none;max-height:64px}.object-button[aria-pressed=true]{border-color:var(--green);background:#d6eee3;border-radius:50%}.object-button.crossed svg{opacity:.28}.object-button.crossed{background:repeating-linear-gradient(135deg,transparent,transparent 10px,#dc625022 10px,#dc625022 13px)}.group-choice{flex:1;min-width:0;max-width:400px;padding:16px;min-height:210px;display:flex;align-items:center;justify-content:center;border-width:2px}.group-choice .objects{border:0;padding:0;background:transparent}.group-choice[aria-pressed=true],.choice[aria-pressed=true]{border-color:var(--green);background:#e1f1e9}.comparison{display:flex;width:100%;align-items:center;justify-content:center;gap:18px}.comparison>.objects{max-width:410px}.comparison>.symbol{font-size:40px;color:var(--green);font-weight:700}.choice-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:14px}.choice{width:92px;height:72px;border-width:2px;font-size:30px}.choice.correct{border-color:var(--green);background:#d6eee3}.choice.wrong{border-color:var(--red);background:#fff1ed}.big-number{font-size:76px;font-weight:800;color:var(--green);font-variant-numeric:tabular-nums}.math-equation{display:flex;gap:16px;align-items:center;justify-content:center;flex-wrap:wrap;font-size:48px;font-weight:800;color:var(--green)}.mapping{display:flex;gap:14px;align-items:center;justify-content:center;flex-wrap:wrap}.mapping>span{display:flex;align-items:center;gap:8px;padding:10px 16px;border:1px solid var(--line);border-radius:6px;background:white;font-size:24px}.mapping svg{height:48px;width:48px;stroke:none}.code-sequence{display:flex;gap:16px;justify-content:center;flex-wrap:wrap}.code-sequence svg{width:60px;height:60px;stroke:none}.entry-grid{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.entry-grid label{display:grid;gap:8px;justify-items:center}.entry-grid label svg{width:44px;height:44px;stroke:none}.entry-grid input{width:76px;height:62px;border:2px solid var(--line);border-radius:6px;text-align:center;font-size:28px;color:var(--ink);background:white}.sort-slots{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;min-height:72px;margin-bottom:20px}.sort-slot{display:grid;place-items:center;width:70px;height:66px;border:2px dashed #9db7af;border-radius:6px;background:#edf4f1;color:var(--green);font-size:28px;font-weight:800}.ten-frame{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;max-width:480px;width:100%;padding:12px;border:2px solid var(--ink);border-radius:6px;background:white}.ten-frame button{aspect-ratio:1;min-height:38px;padding:5px;background:#f3f7f5;border-radius:3px}.ten-frame i{display:block;width:85%;height:85%;margin:auto;border-radius:50%;background:#d9e2de}.ten-frame button[aria-pressed=true] i{background:var(--green)}.ten-frame .fixed i{background:var(--blue)}.measure-options{display:flex;align-items:end;justify-content:center;gap:14px;width:100%}.measure-choice{display:flex;flex:1;flex-direction:column;justify-content:end;align-items:center;gap:12px;height:220px;max-width:260px;padding:12px;border-width:2px}.measure-choice[aria-pressed=true]{border-color:var(--green);background:#e1f1e9}.measure-choice svg{stroke:none;max-width:100%}.measure-bar{background:repeating-linear-gradient(90deg,#efb737,#efb737 24px,#cf941c 24px,#cf941c 26px);border:2px solid #bf8521;border-radius:4px;align-self:flex-start}.height-tower{background:repeating-linear-gradient(0deg,#438ed4,#438ed4 20px,#2c6599 20px,#2c6599 23px);border:2px solid #2c6599;width:70px}.sequence-number{display:grid;place-items:center;width:70px;height:75px;background:#fff;border:1px solid var(--line);font-size:34px;border-radius:6px}.sequence-number.blank{border:2px dashed var(--green);color:var(--green)}.pattern-row{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap}.pattern-row svg{width:55px;height:55px;stroke:none}.shape-choice svg{width:44px;height:44px;stroke:none}#feedback{min-height:50px;margin:18px 0 6px;font-size:18px;line-height:1.6;font-weight:650}#feedback.good{color:#137257}#feedback.bad{color:#a94634}.round-actions{display:flex;align-items:center;justify-content:center;gap:12px}.round-actions button{min-width:130px}.round-actions .primary{min-width:160px}
dialog{border:1px solid var(--line);border-radius:8px;padding:0;color:var(--ink);width:min(520px,calc(100% - 24px));max-height:88dvh}dialog::backdrop{background:#142b2766}.dialog-body{padding:28px}.dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.dialog-head h2{font-size:23px}.dialog-actions{display:flex;justify-content:center;gap:12px;margin-top:24px}#resultDialog{text-align:center}.result-score{font-size:64px;font-weight:900;color:var(--green);margin:20px 0 12px}#resultDetail{color:var(--muted);line-height:1.7}#historyList{max-height:50dvh;overflow:auto;margin-bottom:20px}.history-row{display:flex;justify-content:space-between;gap:10px;padding:14px 0;border-bottom:1px solid var(--line);font-size:14px}.history-row small{display:block;color:var(--muted);margin-top:4px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:14px 22px;background:#233b39;color:#fff;z-index:999999;border-radius:6px;max-width:90%;text-align:center}
body.access-pending{overflow:hidden}body.access-pending>:not(.access-gate){visibility:hidden}.access-gate{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;overflow:auto;padding:20px;background:#eff5f2}.access-card{width:min(460px,100%);background:white;padding:32px;border:1px solid var(--line);border-radius:8px}.access-brand{display:flex;gap:14px;align-items:center;margin-bottom:30px}.access-brand>span{display:grid;place-items:center;width:52px;height:48px;color:#fff;background:var(--green);border-radius:6px;font-weight:800;font-size:22px}.access-brand strong{font-size:22px}.access-card h1{font-size:24px;margin-bottom:20px}.access-card label{display:block;margin-bottom:10px}.access-card input{width:100%;height:50px;border:1px solid var(--line);border-radius:6px;padding:12px}.access-submit{width:100%;margin-top:16px}.access-home{display:block;text-align:center;margin-top:24px;font-size:14px;color:var(--green)}#accessMessage{min-height:24px;color:#a94634;margin-top:14px}.access-preview-return{width:100%;margin-top:14px}.classroom-trial-banner{display:flex;gap:14px;justify-content:space-between;align-items:center;padding:10px 32px;background:#e2eee9;border-bottom:1px solid var(--line);font-size:13px}.classroom-trial-banner b{display:block;color:#17664f}.classroom-trial-banner span{color:var(--muted)}.classroom-trial-banner button{white-space:nowrap;font-size:13px;min-height:36px;padding:8px 12px}.classroom-trial-banner.expired{background:#fff0eb}.game-purchase-overlay{position:fixed;inset:0;z-index:100100;display:grid;place-items:center;padding:16px;background:#142b2777}.game-purchase-card{position:relative;padding:28px;background:#fff;max-height:90dvh;overflow:auto;border-radius:8px;width:min(680px,100%)}.game-purchase-close{position:absolute;right:12px;top:12px;font-size:24px;width:44px;padding:0}.game-purchase-kicker{font-size:12px;color:var(--green)}.game-purchase-card h2{font-size:24px;margin:14px 40px 12px 0}.game-purchase-card>p{font-size:14px;color:var(--muted);line-height:1.7;margin-bottom:20px}.game-purchase-plans{display:grid;grid-template-columns:1fr 1fr;gap:14px}.game-purchase-plan{padding:16px;border:1px solid var(--line);border-radius:6px}.game-purchase-plan h3{font-size:18px;margin:8px 0}.game-purchase-plan p{font-size:13px;min-height:40px;line-height:1.5}.game-purchase-plan strong{display:block;font-size:32px;margin:12px 0}.game-purchase-plan button{width:100%;background:var(--green);color:white}.game-purchase-best{color:#a94634;font-size:12px}.game-purchase-actions{display:flex;justify-content:center;gap:10px;margin-top:16px}.game-purchase-message{margin-top:12px;color:#a94634;text-align:center;font-size:14px}.game-purchase-toast{position:fixed;top:24px;left:50%;transform:translateX(-50%);z-index:100200;background:var(--green);color:white;padding:16px;border-radius:6px}
@media(min-width:1600px){.game-art{height:155px}.game-copy h2{font-size:21px}.question-zone h2{font-size:32px}}
@media(max-width:1050px){.game-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.setup{margin-top:8px}.question-zone h2{font-size:25px}}
@media(max-width:720px){.topbar{padding:14px 16px;gap:8px}.brand-mark{min-width:42px;height:42px;font-size:18px}.brand strong{font-size:18px}.brand small{font-size:10px}.toolbar{gap:4px}.toolbar .icon-btn{width:36px;height:38px;min-height:38px;padding:7px}.toolbar #historyBtn{display:none}#homeView,#playView{padding:24px 16px}.library-heading h1{font-size:24px}.setup{gap:9px}.filters{gap:2px;margin-top:20px}.filters button{padding:8px 10px;font-size:13px}.game-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.game-art{height:110px}.game-art svg{width:52px;height:52px}.game-art .mini-number{font-size:34px}.game-copy{padding:12px}.game-copy h2{font-size:17px}.game-copy p{font-size:12px;min-height:34px}.game-art .mini-dots{margin:0 7px;grid-template-columns:repeat(2,14px)}.mini-dots i{width:14px;height:14px}.game-art .mini-sign{margin:0 4px}.play-top{gap:10px}.play-top h1{font-size:19px}.question-zone h2{font-size:23px}#questionVisual{min-height:150px;gap:12px}.objects{padding:10px;gap:4px}.comparison{gap:8px}.comparison>.symbol{font-size:25px}.group-choice{padding:10px;min-height:160px}.choice{width:65px;height:62px;font-size:26px}.measure-options{gap:8px}.measure-choice{height:190px;padding:8px;min-width:0}.height-tower{width:45px}.mapping{gap:8px}.mapping>span{padding:8px;font-size:21px}.mapping svg{width:30px;height:30px}.entry-grid{gap:8px}.entry-grid input{width:65px}.sort-slots{gap:7px}.sort-slot{width:53px;height:60px}.sequence-number{width:52px;height:62px;font-size:28px}.math-equation{font-size:34px;gap:10px}.pattern-row svg{width:38px;height:38px}.round-actions button{min-width:105px}.round-actions .primary{min-width:130px}.classroom-trial-banner{padding:10px 16px;align-items:center}.classroom-trial-banner span{display:none}.game-purchase-card{padding:24px 18px}.game-purchase-plans{grid-template-columns:1fr}.game-purchase-plan p{min-height:0}.game-purchase-actions{flex-wrap:wrap}}
@media(max-width:370px){.brand small{display:none}.setup{width:100%}.setup select{min-width:80px;padding-right:20px}.setup .primary{padding:10px}.game-copy h2{font-size:16px}.game-meta{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
@media(max-width:720px){.toolbar #historyBtn{display:inline-flex}}
@media(max-width:370px){.toolbar .icon-btn{width:32px;padding:6px}.brand{gap:8px}.topbar{gap:6px}}
