.hub{padding:56px 0 92px}.hub-intro{text-align:center;margin-bottom:47px}.hub-intro h1{font:400 clamp(44px,5.3vw,74px)/1.22 Georgia,"Songti SC","SimSun",serif;letter-spacing:-2px;margin:22px 0 18px}.hub-intro p{color:var(--muted);font-size:16px}.portal-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px;max-width:1040px;margin:auto}.portal{border:1px solid #e2e5f0;border-radius:36px;overflow:hidden;background:linear-gradient(145deg,#fff,#ebe9f6);box-shadow:inset 0 1px 0 #fff,0 9px 30px #3e45600a;transition:transform .18s,box-shadow .18s}.portal-math{background:linear-gradient(145deg,#fff,#e4edeb);border-color:#dce6e3}.portal:hover{transform:translateY(-4px);box-shadow:inset 0 1px 0 #fff,0 18px 35px #3e456014}.portal-art{padding:20px 15px 0}.portal-art svg{display:block;width:100%;height:230px}.portal-copy{padding:12px 36px 35px}.portal-copy h2{font:400 38px/1.2 Georgia,"Songti SC","SimSun",serif;letter-spacing:-1px;margin:7px 0 12px}.portal-copy p{font-size:14px;color:#5d647b;margin-bottom:24px}.portal-count{float:right;color:#676584;background:#ffffffb8;border-radius:999px;padding:8px 13px;font-size:13px}.portal-open{display:inline-flex;align-items:center;padding:13px 20px;min-height:46px;font-size:13px;background:linear-gradient(145deg,#6566a4,#27283f);color:white;border-radius:999px;border:1px solid #514e7f;box-shadow:inset 0 1px 0 #ffffff6b,0 4px 8px #31344821}.portal-math .portal-open{background:linear-gradient(145deg,#547663,#294137);border-color:#4a6e5b}.library-back{padding-top:25px}.math-library-hero{display:grid;grid-template-columns:1.35fr 1fr;align-items:center;gap:60px;padding:55px 0 76px}.math-library-hero h1{font:400 clamp(43px,5.2vw,72px)/1.18 Georgia,"Songti SC","SimSun",serif;letter-spacing:-2px;margin:0 0 24px}.math-hero-art svg{width:100%;max-height:320px}.math-library-hero .hero-actions{justify-content:flex-start}.math-library-hero .lede{font-size:16px;color:#5b6878;margin-bottom:28px}
.math-board{padding:30px 38px;min-height:520px;background:linear-gradient(145deg,#fbfcff,#f0f3f8);font-family:"Segoe UI","Microsoft YaHei",sans-serif}.math-progress{display:flex;gap:9px;margin-bottom:20px;justify-content:center}.math-progress span{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#e5e9f2;color:#677083;font-size:12px}.math-progress .current{background:#65558e;color:white}.math-progress .done{background:#dde9df;color:#365d45}.math-question{text-align:center;font:600 clamp(21px,2.1vw,29px)/1.5 "Segoe UI","Microsoft YaHei",sans-serif;letter-spacing:0;margin:0 0 18px;color:#30354c;overflow-wrap:anywhere}.math-diagram{margin:6px auto 18px;max-width:530px}.math-diagram svg{display:block;width:100%;height:auto}.math-inputs{border:0;padding:0;margin:0;min-width:0}.math-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-width:570px;margin:16px auto}.math-tile{display:grid;place-items:center;min-height:60px;border:1px solid #c8cfdf;border-radius:14px;padding:10px 8px;background:#fff;color:#30384f;font-size:24px;font-weight:600;box-shadow:inset 0 2px 0 #fff,0 3px 6px #3742600b;transition:background .14s,box-shadow .14s}.math-tile:hover:not(:disabled){background:#eceaf7;border-color:#9588b2;box-shadow:inset 0 2px 0 #fff,0 5px 10px #37426017}.math-tile:active:not(:disabled){transform:translateY(1px)}.math-tile.selected{background:#65598b;border-color:#514675;color:#fff;box-shadow:inset 0 1px 0 #ffffff4d,0 3px 7px #54497528}.math-tile.used{background:#e1eae3;color:#476855;border-color:#acbfaf;opacity:1}.math-tile.given{background:#e4e9f1;color:#555d72;border-color:#d0d7e5;opacity:1}.math-inputs:disabled .math-tile{cursor:default}.math-grid{grid-template-columns:repeat(var(--math-cols,4),minmax(0,1fr));max-width:435px}.math-grid .math-tile{aspect-ratio:1;min-height:48px;font-size:23px}.math-board[data-mode=coordinate] .math-tile{font-size:14px}.coordinate-start{border:3px solid #779588}.math-coins .math-tile{border-radius:50%;background:#f4edda;border-color:#c5b282;color:#73591e}
.math-palette{display:flex;gap:9px;justify-content:center;flex-wrap:wrap;margin:14px 0 20px}.math-palette .math-tile{min-width:55px;min-height:50px;font-size:22px}.math-number-grid{border-collapse:separate;border-spacing:7px;margin:12px auto}.math-number-grid td{padding:0}.math-number-grid .math-tile{width:61px;height:61px;padding:0}.math-number-grid th{padding:5px;color:#556482;font-size:18px;min-width:27px}.math-number-grid .box-right{border-right:3px solid #acadc5;padding-right:7px}.math-number-grid .box-bottom{border-bottom:3px solid #acadc5;padding-bottom:7px}.math-pyramid{display:grid;grid-template-columns:repeat(6,1fr);grid-template-rows:repeat(3,60px);gap:9px;max-width:420px;margin:auto}.math-pyramid [data-cell="0"]{grid-area:3/1/4/3}.math-pyramid [data-cell="1"]{grid-area:3/3/4/5}.math-pyramid [data-cell="2"]{grid-area:3/5/4/7}.math-pyramid [data-cell="3"]{grid-area:2/2/3/4}.math-pyramid [data-cell="4"]{grid-area:2/4/3/6}.math-pyramid [data-cell="5"]{grid-area:1/3/2/5}.math-live-expression{text-align:center;font-size:29px;line-height:1.5;margin:10px 0}.math-selection{font-size:17px;text-align:center;color:#536077;min-height:28px;line-height:1.7;overflow-wrap:anywhere}.math-checks{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:20px}.math-feedback{text-align:center;color:#875128;font-size:14px;line-height:1.6;min-height:23px;margin:20px 0 0}.math-feedback.correct{color:#38664e}.math-explanation{text-align:center;color:#465d71;font-size:15px}.math-hint{background:#e7edf3;border:1px solid #ccd6e1;padding:15px 18px;border-radius:15px;line-height:1.7;color:#41576c;font-size:14px;margin:16px 0 0}body[data-library=math] #game-grid .thumb{background:linear-gradient(145deg,#fcfdff,#e7efed)}body[data-library=math] #game-grid .thumb svg{height:86%;top:5%;position:relative}.math-stage #pause-overlay{z-index:3}
.math-board[data-kind=symmetry][data-variant="0"] .math-tile:nth-child(4n+2){border-right:3px solid #8682a2}.math-board[data-kind=symmetry][data-variant="1"] .math-tile:nth-child(n+5):nth-child(-n+8){border-bottom:3px solid #8682a2}
.math-topic-chooser{width:100%;border:1px solid #d2d7e6;border-radius:15px;background:#f9faff;margin-bottom:10px}.math-topic-chooser summary{padding:13px 15px;min-height:46px;font-size:14px;color:#3d4b63;cursor:pointer}.math-topic-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:5px 10px 12px}.math-topic-list .pill{min-width:0;min-height:44px;font-size:12px;white-space:normal;line-height:1.4;padding:8px}.math-topic-list .selected{background:#65598b;color:#fff;border-color:#514675}.math-topic-chooser:not([open]) .math-topic-list{display:none}
@media(max-width:1000px){.math-board{padding:28px}.portal-art svg{height:210px}.portal-copy{padding:10px 28px 29px}.math-library-hero{gap:30px}.math-question{font-size:25px}}
@media(max-width:700px){.hub{padding:25px 0 55px}.hub-intro{margin-bottom:28px}.hub-intro h1{font-size:43px;letter-spacing:-1px}.portal-grid{grid-template-columns:1fr;gap:20px}.portal{border-radius:27px}.portal-art{padding:8px 10px 0}.portal-art svg{height:177px}.portal-copy{padding:4px 24px 26px}.portal-copy h2{font-size:31px}.portal-copy p{margin-bottom:18px}.portal-open{width:100%;justify-content:center}.nav nav{gap:13px}.nav nav a{font-size:11px}.library-back{padding-top:16px}.math-library-hero{grid-template-columns:1fr;gap:5px;padding:34px 0 43px}.math-library-hero h1{font-size:44px}.math-hero-art{display:none}.math-library-hero .hero-actions{justify-content:flex-start;flex-wrap:wrap}.math-board{padding:22px 16px;min-height:430px}.math-question{font-size:22px}.math-diagram{margin:2px auto 12px}.math-tile{font-size:22px;min-height:53px;padding:8px 5px;border-radius:11px}.math-tiles{gap:8px}.math-grid{gap:6px}.math-grid .math-tile{font-size:21px;min-height:44px}.math-board[data-mode=coordinate] .math-tile{font-size:12px}.math-number-grid{border-spacing:5px}.math-number-grid .math-tile{height:48px;width:48px;min-height:48px;font-size:21px}.math-number-grid .box-right{padding-right:4px}.math-number-grid .box-bottom{padding-bottom:4px}.math-pyramid{grid-template-rows:repeat(3,54px);gap:7px}.math-live-expression{font-size:23px}.math-selection{font-size:15px}.math-progress{margin-bottom:14px}.math-hint{font-size:13px}.math-checks .pill{font-size:13px;min-height:45px}}
@media(max-width:700px){.math-board[data-mode=choice] .math-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:360px){.nav nav{gap:8px}.nav nav a{font-size:10px}.nav .wordmark{font-size:21px}.math-board{padding:20px 12px}.math-number-grid .math-tile{width:43px;height:45px;min-height:45px}.math-board[data-mode=coordinate] .math-tile{font-size:11px}.math-tile{font-size:21px}.math-palette .math-tile{min-width:49px}.math-question{font-size:20px}}
