:root{--ink:#25324b;--muted:#617384;--green:#188f7e;--bg:#f5f6ef;--line:#e1e8e4;--white:#fff;--gold:#eba741}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 100% 0,#e7f7ee,transparent 42%),#f7f6ee;color:var(--ink);font:500 17px/1.7 Tahoma,Arial,sans-serif}button,input,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;border:0;letter-spacing:0}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #2877b3;outline-offset:3px}button:disabled{opacity:.5;cursor:not-allowed}h1,h2,h3,p{margin:0}h1{line-height:1.3;font-size:clamp(26px,4vw,48px)}h2{font-size:24px}h3{font-size:20px}small,.muted{color:var(--muted);font-size:13px}.portal-shell,.math-shell{max-width:1350px;padding:0 30px;margin:auto;min-height:100vh}.portal-brand,.math-header{display:flex;align-items:center;gap:14px;justify-content:space-between;padding:19px 0;border-bottom:1px solid var(--line)}.portal-brand{justify-content:flex-start}.portal-brand small,.brandlink small{display:block}.brandmark{width:52px;height:52px;display:grid;place-items:center;font-size:34px;font-weight:900;border-radius:18px;color:white;background:var(--green);box-shadow:0 4px 0 #126653}.version{margin-inline-start:auto;font-size:12px;color:var(--muted)}.portal-hero,.math-hero{padding:38px;background:linear-gradient(120deg,#e1f4e9,#fff8df);border:2px solid white;box-shadow:0 8px 30px #24324d09;border-radius:30px;display:flex;justify-content:space-between;align-items:center;gap:24px;margin:24px 0}.portal-hero h1,.math-hero h1{margin:12px 0}.portal-hero em{font-style:normal;color:#b96c31}.eyeline{font-size:14px;font-weight:900;color:#166f68}.hero-numbers{display:grid;grid-template-columns:repeat(2,85px);gap:12px;transform:rotate(-7deg);padding:10px}.hero-numbers span{background:white;color:var(--green);display:grid;place-items:center;border-radius:20px;box-shadow:0 6px 0 #add5bd;font-size:45px;font-weight:900}.hero-numbers span:nth-child(2n){color:#cf7948;background:#fff4cb}.subjects{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin:18px 0 35px}.subject{display:flex;align-items:center;gap:22px;background:white;border:1px solid var(--line);border-inline-start:9px solid var(--accent);padding:24px;border-radius:25px;box-shadow:0 8px 25px #25324b0c;transition:.2s}.subject:hover,.chapter-card:hover,.lesson-card-m:hover{transform:translateY(-3px)}.subject img{width:138px;max-width:36%;border-radius:8px;box-shadow:0 5px 10px #0002}.subject h2{color:var(--accent);margin:8px 0}.subject p{font-size:14px;color:var(--muted);margin-bottom:16px}.subject strong{color:var(--accent)}.brandlink{display:flex;align-items:center;gap:12px;min-width:210px}.math-header nav{display:flex;gap:6px;flex-wrap:wrap}.math-header nav>*{font-size:14px;padding:9px 15px;border-radius:12px;background:white;color:#30576a;font-weight:700}.math-header nav>*:hover{background:#d8eee7}.stars{background:#fff4ca;border:1px solid #e9d6a4;border-radius:14px;padding:7px 15px;color:#a87518;font-weight:900}.math-shell main{padding:24px 0 40px;min-height:70vh}.math-hero{margin:0 0 26px;min-height:215px}.math-hero img{max-height:190px;width:auto;max-width:35%;border-radius:12px;box-shadow:0 9px 20px #1d352333}.math-hero p{color:#486a64}.bar{height:12px;border-radius:20px;overflow:hidden;background:#e8ede9;margin:12px 0}.bar>i{height:100%;background:#259d85;display:block;border-radius:20px}.section-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 13px;flex-wrap:wrap}.section-row input{border:1px solid #cddbd4;padding:8px 14px;border-radius:12px;background:white;max-width:100%;min-width:215px}.chapters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.chapter-card{display:flex;align-items:stretch;text-align:right;padding:0;background:white;border:1px solid var(--line);border-radius:21px;overflow:hidden;color:var(--ink);box-shadow:0 6px 15px #25324b0b;transition:.2s;min-height:170px}.chapter-card img{width:31%;object-fit:cover;object-position:top;border-inline-end:1px solid var(--line)}.chapter-copy{flex:1;display:flex;flex-direction:column;padding:17px;gap:6px;border-top:5px solid var(--accent)}.chapter-copy strong{font-size:18px;line-height:1.55}.chapter-copy small:last-child{margin-top:auto;color:var(--green)}.crumbs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:18px;color:#547367;font-size:14px}.crumbs button{background:transparent;padding:0;color:var(--green);font-weight:700}.panel{background:white;border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:0 5px 19px #27384909;margin-bottom:18px}.chapter-head{border-right:8px solid var(--accent);display:flex;align-items:center;justify-content:space-between;gap:15px}.chapter-head img{height:105px;border-radius:8px}.chapter-head h1{font-size:clamp(24px,3.3vw,36px);margin:6px 0}.brow{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}.btn{padding:10px 19px;border-radius:14px;background:#e0f2ec;color:#206554;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:45px}.btn.primary{background:#198e7d;color:white}.btn.gold{background:#ffd77f;color:#55400c}.btn.pale{background:#f2f4f8;color:#314e66}.lessons-m{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.lesson-card-m{text-align:right;color:var(--ink);background:white;border:1px solid var(--line);border-radius:19px;padding:13px;display:flex;flex-direction:column;gap:6px;transition:.15s;min-height:225px}.lesson-card-m img{width:100%;height:112px;object-fit:contain;background:#f7f9f5;border-radius:10px}.lesson-card-m strong{font-size:16px;line-height:1.5}.lesson-card-m small:last-child{margin-top:auto}.lesson-top{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}.lesson-top h1{font-size:clamp(25px,3.6vw,37px)}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.tabs button{border-radius:14px;padding:10px 19px;background:#fff;color:#476275;font-weight:800;border:1px solid var(--line)}.tabs button.selected{background:#198e7d;color:white;border-color:#198e7d}.learn-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:18px}.book-example{padding:12px;border:1px solid #dfe3da;border-radius:14px;background:#fff;cursor:zoom-in;width:100%}.book-example img{width:100%;display:block;max-height:460px;object-fit:contain}.lesson-idea{font-size:22px;font-weight:800;margin:12px 0;color:#2c6457}.reader-controls{display:flex;gap:9px;align-items:center;justify-content:center;flex-wrap:wrap;margin:12px 0}.reader-controls input{width:80px;text-align:center;padding:8px;border:1px solid var(--line);border-radius:10px}.page-img{display:block;width:min(100%,800px);margin:14px auto;background:white;border:1px solid var(--line);box-shadow:0 8px 24px #0001;cursor:zoom-in}.quiz{max-width:950px;margin:0 auto}.quiz .bar{margin:8px 0 24px}.question{text-align:center;font-size:clamp(22px,3.5vw,32px);font-weight:800;line-height:1.5;margin:18px 0}.visual{min-height:65px;margin:10px auto 22px;text-align:center;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:10px;max-width:100%}.visual .dots{display:flex;flex-wrap:wrap;gap:10px;max-width:450px;justify-content:center}.dot{width:33px;height:33px;border-radius:50%;background:#e9a748;border:2px solid #c68b31;box-shadow:inset 0 4px 0 #fff3}.dot.blue{background:#65b8ce;border-color:#4194aa}.dot.cross{opacity:.36;text-decoration:line-through;position:relative}.dot.cross:after{content:'×';position:absolute;inset:-13px 0;color:#a02f39;font-weight:bold;font-size:35px}.equation{direction:ltr;font-size:clamp(26px,5vw,54px);font-weight:900;letter-spacing:3px;line-height:1.4;text-align:center;background:#f3f9f7;padding:12px 22px;border-radius:18px;max-width:100%;overflow-wrap:anywhere}.numberline{direction:ltr;display:flex;max-width:100%;overflow-x:auto;padding:8px 5px;align-items:center;gap:0}.numberline span{min-width:30px;padding:0 4px;color:#5c6370;font-size:14px;border-bottom:2px solid #739e91;text-align:center}.numberline span.mark{background:#ffdf95;border-radius:8px;font-weight:900;color:#594414}.opt-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.opt{min-height:86px;border:2px solid #dbe8e1;border-radius:18px;background:#fff;color:var(--ink);font-size:clamp(19px,4vw,34px);font-weight:900;padding:15px 9px;display:grid;place-items:center;line-height:1.5;white-space:normal}.opt:hover:not(:disabled){background:#eef9f3;border-color:#71b4a7}.opt.right{background:#d8f3e2;border-color:#28946e;color:#176747}.opt.wrong{background:#fce8e6;border-color:#db837e;color:#b34842}.opt:disabled{opacity:1;cursor:default}.feedback{margin:18px 0 4px;min-height:44px;font-weight:800;text-align:center}.feedback.good{color:#167c55}.feedback.bad{color:#ab3c3e}.shape{width:57px;height:57px;display:inline-block;vertical-align:middle;margin:3px;background:var(--sc,#e9ab44);border:2px solid #0002}.shape.circle{border-radius:50%}.shape.square{border-radius:5px}.shape.triangle{clip-path:polygon(50% 0,100% 100%,0 100%);border:0}.shape.rect{width:83px;height:45px;border-radius:4px}.graph{min-width:250px;max-width:100%;display:grid;gap:5px;text-align:right}.graph-row{display:flex;align-items:center;gap:6px;border:1px solid #d8e2de;border-radius:10px;padding:6px 10px}.graph-row b{min-width:85px;font-size:14px}.graph-row .dot{width:23px;height:23px}.fraction-bar{display:flex;border:3px solid #355564;border-radius:8px;overflow:hidden;width:220px;height:75px}.fraction-bar i{flex:1;border-inline-end:2px solid #355564}.fraction-bar i.on{background:#59c1ab}.fraction-bar i:last-child{border:0}.length-bar{display:flex;gap:3px;margin:5px;direction:ltr}.length-bar i{width:26px;height:35px;border:1px solid #ab803f;background:#ffd176;border-radius:4px}.length-bar:nth-child(2) i{background:#85c7d5;border-color:#479cac}.placeview{display:flex;align-items:flex-end;gap:25px}.placeview>div{background:#f1f7f3;padding:12px;border-radius:13px;text-align:center}.rods{display:flex;flex-wrap:wrap;max-width:200px;gap:5px;justify-content:center}.rod{width:13px;height:90px;background:repeating-linear-gradient(to bottom,#86c5e8 0 8px,#468aaf 8px 9px);border:1px solid #468aaf;border-radius:3px}.units{display:grid;grid-template-columns:repeat(3,20px);gap:4px;justify-content:center}.units i{height:20px;background:#ffc96e;border:1px solid #bc9148;border-radius:4px}.progress-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.stat{padding:24px;background:#fff;border:1px solid var(--line);border-radius:20px;text-align:center}.stat strong{font-weight:900;font-size:38px;color:#198e7d;display:block}footer{color:var(--muted);font-size:12px;padding:19px 0;border-top:1px solid var(--line);display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap}dialog{border:0;border-radius:18px;padding:12px;max-width:94vw;max-height:94vh}dialog::backdrop{background:#17242dbb}dialog img{display:block;max-height:79vh;max-width:90vw;object-fit:contain;margin:auto}dialog button{display:block;margin:0 0 9px auto;border-radius:10px;background:#e6f4ee;padding:5px 12px}.draw-area{position:relative;background:white;border:2px dashed #8ac2b0;border-radius:18px;overflow:hidden;height:225px}.draw-area b{position:absolute;inset:0;display:grid;place-items:center;font-size:128px;color:#e3ebe6;pointer-events:none;line-height:1}.draw-area canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none}.result{text-align:center;padding:40px 15px}.result .big{font-size:65px;color:#daa34a;font-weight:900}.status-label{color:#278366;font-weight:800}.notice{padding:12px 16px;border-radius:12px;background:#fff8e4;font-size:13px;color:#88652a;margin:16px 0}.search-results{display:grid;gap:8px}.search-results button{background:#fff;text-align:right;padding:14px;border-radius:12px;border:1px solid var(--line);color:var(--ink)}@media(max-width:950px){.chapters{grid-template-columns:repeat(2,minmax(0,1fr))}.lessons-m{grid-template-columns:repeat(3,minmax(0,1fr))}.learn-grid{grid-template-columns:1fr}.math-header{flex-wrap:wrap}.math-header nav{order:3;width:100%}}@media(max-width:640px){.portal-shell,.math-shell{padding:0 12px}.portal-hero,.math-hero{padding:21px;gap:10px}.hero-numbers{grid-template-columns:repeat(2,43px);gap:7px}.hero-numbers span{font-size:27px;border-radius:10px}.subjects,.chapters{grid-template-columns:1fr}.subject{padding:16px;gap:12px}.subject img{width:100px}.subject h2{font-size:20px}.math-header nav>*{font-size:12px;padding:8px 10px}.brandlink{min-width:0;font-size:14px}.brandmark{width:43px;height:43px}.lessons-m{grid-template-columns:repeat(2,minmax(0,1fr))}.chapter-card{min-height:153px}.panel{padding:14px}.lesson-card-m{min-height:200px}.lesson-card-m img{height:90px}.opt-grid{gap:7px}.opt{min-height:70px;padding:9px 6px}.progress-grid{grid-template-columns:1fr 1fr}.dot{width:26px;height:26px}.math-hero img{max-height:140px}h2{font-size:21px}.graph-row b{min-width:65px}.numberline span{min-width:28px}}

.token-group{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:flex-end}.tokwrap{display:inline-flex;position:relative}.book-icon,.count-icon,.pattern-icon,.graph-icon,.shape-book,.solid-book,.rod-img,.unit-img{display:block;max-width:100%;height:auto}.count-icon{height:42px;object-fit:contain}.pattern-icon{height:54px;object-fit:contain}.shape-book{height:74px;object-fit:contain}.solid-book{height:90px;object-fit:contain}.graph-icon{height:26px;object-fit:contain}.token-group .cross::after,.tokwrap.cross::after{content:"×";position:absolute;inset:-10px 0 0 0;display:grid;place-items:center;color:#a02f39;font-weight:900;font-size:38px}.book-place .rods,.book-place .units{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;align-items:flex-end}.rod-img{height:82px}.unit-img{height:22px}.book-note{background:#eef8f4;border:1px solid #cfe7dc;color:#296256;padding:10px 14px;border-radius:12px;font-size:13px;margin-top:12px}
.lesson-map{display:grid;gap:8px}.lesson-map-row{display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:right;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink)}.lesson-map-row:hover{background:#f2faf6}.lesson-pages-inline{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.lesson-pages-inline span{background:#eef7f2;border:1px solid #d5e7dd;padding:6px 10px;border-radius:999px;font-size:13px;color:#285f54}.lesson-sequence{display:grid;gap:18px}.page-study-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.page-study{position:relative}.page-badge{position:absolute;inset-inline-start:14px;top:14px;width:36px;height:36px;border-radius:50%;background:#198e7d;color:#fff;display:grid;place-items:center;font-weight:900}.fullpage img{max-height:540px;object-fit:contain}.source-block+.source-block{margin-top:16px}@media(max-width:900px){.page-study-grid{grid-template-columns:1fr}}