@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap');
@import url('abacus-theme.css');
:root{font-family:'DM Sans','Noto Sans Thai',sans-serif;color:#29273e;background:#f7f6fc;font-synthesis:none;--purple:#7160c5;--muted:#8b889f;--teal:#2aa99e;--orange:#ee8a55}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}button,a,input{-webkit-tap-highlight-color:transparent}button{border:0}button:focus-visible,a:focus-visible{outline:3px solid #bba9f1;outline-offset:4px}button:disabled{cursor:default}.header{height:92px;border-bottom:1px solid #e9e7f1;background:#ffffffcf;display:flex;align-items:center;justify-content:space-between;padding:0 max(5%,calc((100vw - 1440px)/2));gap:20px}.brand{display:flex;align-items:center;gap:12px;font-family:Manrope,sans-serif;font-weight:800;font-size:23px;text-decoration:none;color:#37324d;letter-spacing:-1px}.brand-light{font-weight:500;color:#9691a6}.brand-mark{display:flex;gap:4px;align-items:center;border:2px solid #7660b3;border-radius:7px;padding:5px 6px;height:32px}.brand-mark i{width:4px;height:19px;background:linear-gradient(to bottom,#b2a0dc 20%,transparent 20%,transparent 42%,#7660b3 42%,#7660b3 55%,transparent 55%,transparent 63%,#ee986c 63%,#ee986c 90%,transparent 90%);border-radius:3px}.header nav{display:flex;background:#f2f0f8;border-radius:12px;padding:5px;gap:5px}.nav{padding:11px 25px;border-radius:8px;background:none;color:#898398;font-size:14px;font-weight:700}.nav.active{background:white;color:var(--purple);box-shadow:0 2px 6px #3124420c}.language{background:none;color:#4c455e;font-size:14px;font-weight:700}.language span{color:#a29aae;margin-left:5px}main{max-width:1440px;margin:auto;padding:43px 4.5% 0}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px}.eyebrow{font-weight:700;font-size:11px;letter-spacing:1.7px;color:#8b7cb1}.tiny-star{color:#e7a16e;font-size:18px;vertical-align:middle;margin-right:6px}h1{font-family:Manrope,'Noto Sans Thai',sans-serif;font-size:42px;line-height:1.25;letter-spacing:-1.7px;margin:11px 0 10px;font-weight:800}h1 em{font-style:normal;color:var(--purple)}.intro p{color:#8b869c;font-size:15px;margin:0}.demo-tag{display:flex;gap:13px;align-items:center;padding-right:4px}.demo-tag>span{font-size:43px;color:#b6a4db}.demo-tag strong{font-size:13px;font-weight:600}.demo-tag small{display:block;color:#a19aaf;font-size:12px;margin-top:4px}.workspace{display:grid;grid-template-columns:228px minmax(400px,1fr) 250px;gap:23px;align-items:start}.card{background:#fff;border:1px solid #ebe8f3;border-radius:20px;box-shadow:0 4px 16px #37255703}.settings{padding:25px 21px}.section-kicker{color:#a09aad;letter-spacing:1.5px;font-size:10px;font-weight:700}h2{font-family:Manrope,'Noto Sans Thai',sans-serif}.settings h2{font-size:18px;margin:9px 0 25px;letter-spacing:-.5px}.field-label{display:block;font-size:12px;color:#888196;margin:20px 0 10px}.segmented{display:flex;background:#f5f3fa;border-radius:9px;padding:4px;gap:2px}.segmented button{font-size:11px;background:none;color:#9791a5;border-radius:6px;padding:9px 5px;flex:1;white-space:nowrap}.segmented button>span:first-child{font-size:15px}.segmented button.selected{background:white;color:var(--purple);box-shadow:0 2px 5px #34204b0b}.levels{display:flex;flex-direction:column;gap:8px}.levels button{display:flex;align-items:center;gap:10px;border-radius:9px;padding:13px 10px;background:#fff;border:1px solid #eeeaf4;text-align:left;font-size:12px;color:#878193}.levels button.selected{border-color:#d6ccec;color:var(--purple);background:#f5f1fc}.levels small{margin-left:auto;font-size:10px;color:#b8afc8}.level-icon{font-size:10px;color:#bdacd8;width:32px;letter-spacing:-1px}.levels .selected .level-icon{color:#9176c0}.session{border-top:1px dashed #e7e2ee;padding-top:21px;margin-top:26px}.session>span{font-size:9px;letter-spacing:1.2px;color:#aaa3b5;font-weight:700}.session>div{display:flex;gap:8px;align-items:baseline;margin-top:8px}.session strong{font-size:26px;font-family:Manrope,sans-serif;font-weight:800;color:#7561ab}.session div>span{font-size:11px;color:#a19aac}.session .session-star{font-size:28px;color:#c5b5e3;margin-left:auto}.tip{padding:25px 20px;background:#eee9f7;border-radius:17px;margin-top:18px;position:relative;overflow:hidden}.tip-symbol{color:#ab95cd;font-size:25px}.tip h3{font-size:14px;margin:9px 0}.tip p{font-size:12px;line-height:1.8;color:#9384a6;margin:0 0 15px}.tip button{font-size:11px;font-weight:700;color:#81709b;background:none;padding:0;border-bottom:1px solid #c6b9d9;padding-bottom:3px}.play-card{padding:26px 29px 23px;min-height:667px}.play-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.pill{display:flex;align-items:center;gap:6px;font-size:9px;letter-spacing:1px;font-weight:700;background:#f2f8f6;color:#619e92;padding:7px 10px;border-radius:6px;white-space:nowrap}.pill-dot{width:5px;height:5px;background:#7db7a5;border-radius:50%}#question-count{font-size:11px;color:#a59daf}.progress{height:4px;background:#f2eff8;border-radius:5px;margin-top:17px;overflow:hidden}#progress-fill{height:100%;width:0;background:#b8a2de;transition:width .4s}.problem-area{text-align:center;padding-top:29px;min-height:119px}.problem-area p{font-size:12px;color:#9690a5;margin:0 0 12px}.problem-area h2{font-size:28px;line-height:1.5;letter-spacing:-.5px;margin:0;color:#4a3f65;font-weight:800}.problem-area h2 span{color:#b6a8ca;font-size:22px;font-weight:500;margin:0 3px}.problem-area h2 .question-mark{color:#9176bd;font-size:30px;font-weight:800}.abacus-area{text-align:center;padding-top:10px}.value-label{font-size:9px;font-weight:700;letter-spacing:1.8px;color:#b2a7bf}.live-value{font-family:Manrope,sans-serif;font-size:40px;font-weight:800;color:#8370af;line-height:1.3;margin:3px 0 16px;transition:color .2s}.abacus{width:100%;max-width:372px;height:281px;border:12px solid #88664e;border-radius:23px;margin:auto;background:#faf7f0;box-shadow:0 3px 0 #654a39,0 17px 22px -13px #654d4555,inset 0 2px 5px #6a453b18;padding:0 13px;position:relative;user-select:none;touch-action:pan-x}.abacus-inner{position:relative;height:100%}.rods{display:grid;grid-template-columns:repeat(5,1fr);height:100%;gap:2px}.rod{position:relative;min-width:0;height:100%}.place-name{font-size:9px;color:#a39687;white-space:nowrap;position:absolute;top:10px;left:50%;transform:translateX(-50%)}.wire{position:absolute;left:calc(50% - 1px);top:34px;bottom:33px;width:2px;background:linear-gradient(90deg,#b9ad9b,#e2d9c9)}.beam{height:7px;background:linear-gradient(#957053,#745039);position:absolute;top:97px;left:-5px;right:-5px;border-radius:3px;pointer-events:none;display:flex;justify-content:space-around;align-items:center;box-shadow:0 1px 2px #5a44382b}.beam i{width:3px;height:3px;background:#d8bf9f;border-radius:50%}.bead{width:calc(100% - 7px);max-width:44px;height:23px;border-radius:48%;position:absolute;left:50%;transform:translateX(-50%);box-shadow:inset 0 2px 3px #fff6,inset 0 -3px 4px #0002,0 2px 3px #2e3d3620;transition:top .18s cubic-bezier(.2,.8,.3,1),filter .15s;touch-action:none;padding:0}.bead:hover{filter:brightness(1.08)}.bead:active{filter:brightness(.95)}.bead.upper{background:radial-gradient(ellipse at 35% 28%,#80d8c6,#49b5a2 60%,#2b998c);top:38px}.bead.lower{background:radial-gradient(ellipse at 35% 28%,#ffc593,#efa16a 55%,#de8955)}.bead[aria-pressed=true]{filter:saturate(1.2)}.rod-value{position:absolute;bottom:9px;left:0;right:0;font-size:12px;font-weight:700;color:#a18c79}.reset{background:none;color:#a99eb3;font-size:11px;display:inline-flex;gap:5px;align-items:center;padding:16px 10px 5px}.reset>span:first-child{font-size:18px}.feedback{min-height:43px;text-align:center;display:flex;justify-content:center;align-items:center;font-size:12px;line-height:1.6;margin:4px 0 6px;color:#9682ae}.feedback.success{color:#2d9a81}.feedback.error{color:#d37c65}.play-actions{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #f0edf6;padding-top:18px;gap:12px}.hint-button{background:none;font-size:12px;color:#a392b9;padding:9px 0}.hint-button>span:first-child{font-size:17px;margin-right:4px;color:#c6a879}.primary{background:#8b72ba;color:white;border:1px solid #8065af;border-radius:10px;font-size:12px;font-weight:700;box-shadow:0 4px 8px #7d60aa24;padding:13px 26px;transition:background .2s,transform .2s}.primary:hover{background:#765ba8;transform:translateY(-1px)}.guide{padding:25px 21px}.guide-heading{display:flex;gap:8px;align-items:center;font-size:9px;font-weight:700;letter-spacing:1.3px;color:#a498b6}.guide-heading>span:first-child{font-size:20px;color:#a491bf}.guide h2{font-size:18px;letter-spacing:-.6px;margin:13px 0 25px}.bead-guide{display:flex;align-items:flex-start;gap:12px;margin-bottom:23px}.sample{flex-shrink:0;width:28px;height:17px;border-radius:50%;margin-top:2px;box-shadow:inset 0 2px 3px #fff5,inset 0 -2px 3px #0001}.teal{background:linear-gradient(135deg,#7cd4c1,#3aa894)}.orange{background:linear-gradient(135deg,#ffc297,#e99b63)}.bead-guide strong{font-size:12px;font-weight:700}.bead-guide p{font-size:12px;line-height:1.7;color:#a096ad;margin:5px 0 0}.guide-note{display:flex;align-items:center;gap:11px;padding:11px 12px;background:#f7f5fb;border-radius:9px}.guide-note>span{font-size:21px;color:#ae9ac6}.guide-note p{font-size:11px;color:#9e90ae;line-height:1.7;margin:0}.example{border-top:1px dashed #e9e2f0;margin-top:23px;padding-top:19px}.example>span{font-size:9px;letter-spacing:1px;font-weight:700;color:#b0a2bf}.example-number{display:flex;gap:14px;align-items:center;margin-top:13px}.example-number b,.example-number strong{font-size:25px;font-family:Manrope,sans-serif}.example-number b:first-child{color:#5fb7a5}.example-number b{color:#e8aa7b}.example-number span{font-size:18px;color:#c0b7cb}.example-number strong{color:#9780b5}.example p{font-size:11px;color:#a498ae;margin:10px 0 0;line-height:1.6}.custom{padding:23px 20px;margin-top:18px}.custom h3{font-size:13px;margin:10px 0}.custom label{font-size:11px;line-height:1.6;color:#a097ae;display:block}.custom input{width:100%;border:1px solid #e6e0ee;border-radius:8px;padding:11px 12px;background:#fcfbfe;font-size:12px;color:#615071;margin-top:13px;outline-color:#bca5db}.custom input::placeholder{color:#c0b7cc}.custom button{width:100%;background:#f0ebf8;color:#9b84b8;font-size:11px;padding:11px 8px;border-radius:8px;margin-top:8px;font-weight:700}.custom button:hover{background:#e7ddf5}#custom-error{font-size:11px;color:#c87862;line-height:1.6;margin:8px 0 0}#custom-error:empty{display:none}footer{display:flex;justify-content:space-between;align-items:center;padding:30px 0;color:#b0a7bd;font-size:10px}footer>span:last-child{font-size:9px;letter-spacing:1.2px}.footer-star{color:#b8a5ce;margin-right:7px;font-size:15px}.footer-dot{padding:0 8px}dialog{border:1px solid #e8e1f2;border-radius:22px;max-width:480px;width:calc(100% - 32px);padding:35px;color:#453751;box-shadow:0 20px 90px #40305030}dialog::backdrop{background:#34244966;backdrop-filter:blur(5px)}dialog h2{font-size:24px;line-height:1.4}dialog p{font-size:15px;line-height:1.9;color:#91809f}.close{position:absolute;right:15px;top:10px;background:none;color:#a99ab7;font-size:25px}dialog .primary{margin-top:10px}body.explore .progress{opacity:0}body.explore #hint,body.explore #check{visibility:hidden}body.explore #question-count{visibility:hidden}[hidden]{display:none!important}.confetti{position:fixed;pointer-events:none;z-index:20;animation:fall 1.6s ease-in forwards;width:7px;height:10px;border-radius:2px}@keyframes fall{from{transform:translateY(-20px) rotate(0);opacity:1}to{transform:translateY(65vh) rotate(500deg);opacity:0}}@media(min-width:1500px){main{padding-left:30px;padding-right:30px}.workspace{grid-template-columns:250px minmax(440px,1fr) 275px;gap:28px}.abacus{max-width:395px}.play-card{padding-left:40px;padding-right:40px}}@media(max-width:1150px){main{padding:30px 3% 0}.workspace{grid-template-columns:190px minmax(340px,1fr);gap:18px}.rightbar{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:18px}.custom{margin:0}.guide{display:grid;grid-template-columns:1fr 1fr;gap:10px 20px}.guide-heading,.guide h2{grid-column:1/-1}.guide h2{margin:0 0 10px}.bead-guide{margin-bottom:8px}.guide-note,.example{grid-column:1/-1}.example{display:none}.intro h1{font-size:36px}.demo-tag{display:none}.segmented{flex-direction:column}.segmented button{text-align:left;padding:8px}.settings{padding:22px 16px}.levels button{gap:5px}.level-icon{width:28px}.play-card{padding:24px}}@media(max-width:650px){.header{height:76px;padding:0 17px;gap:8px}.brand{font-size:18px;gap:7px}.brand-light{display:none}.brand-mark{height:29px;padding:3px 4px}.nav{padding:9px 12px;font-size:12px}.header nav{gap:0;padding:4px}.language{font-size:12px;padding:4px}.language span{display:none}main{padding:26px 16px 0}.intro{margin-bottom:23px}.eyebrow{font-size:8px;letter-spacing:1.3px}h1,.intro h1{font-size:33px;letter-spacing:-1.1px}.intro p{font-size:12px;line-height:1.7}.workspace{display:flex;flex-direction:column;gap:16px}.sidebar{width:100%}.settings{padding:16px}.settings .section-kicker,.settings h2,.session,.tip,.field-label{display:none}.segmented{flex-direction:row;margin-bottom:12px}.segmented button{text-align:center;font-size:12px;padding:9px}.levels{flex-direction:row;gap:6px}.levels button{flex:1;justify-content:center;padding:10px 4px;font-size:11px;gap:4px}.levels small{display:none}.level-icon{width:auto;font-size:9px}.play-card{width:100%;padding:21px 17px;min-height:650px}.problem-area h2{font-size:25px}.problem-area h2 span{font-size:20px;margin:0 1px}.abacus{max-width:350px;border-width:11px;padding:0 10px}.place-name{font-size:8px}.rightbar{display:flex;flex-direction:column;width:100%;gap:16px}.guide{padding:22px}.guide h2{font-size:19px}.custom{padding:22px}.custom label,.custom input,.custom button{font-size:13px}.custom h3{font-size:15px}.custom input{padding:13px}.custom button{padding:12px}.primary{font-size:13px}.hint-button{font-size:12px}footer{gap:12px;flex-wrap:wrap;padding:25px 2px}.play-top #question-count{font-size:11px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
