:root{--purple:#ffcf9c;--muted:#b8c7dd;background:#101c32}body{background:radial-gradient(ellipse at 85% 0,#475d8555,transparent 55%),#101c32;color:#f3f5fa}header{background:#10192bd9;padding:14px 28px}.brand-icon{font-size:24px;color:#ffd19d;font-variant-numeric:tabular-nums}.card{background:#1c2c46;border-color:#8ca1bd44}.primary{background:#ffd19d;color:#44301c;box-shadow:0 3px 0 #b88351}.primary:hover{background:#ffe2be}.wide{width:100%}.eyebrow{color:#b3d7ed}.decimal-hero{display:grid;grid-template-columns:1fr 1fr;gap:35px;align-items:center;margin:0 0 24px}.decimal-hero h1{font-size:clamp(40px,5vw,66px);letter-spacing:-3px;margin:12px 0}.decimal-hero em{font-style:normal;color:#ffd19d}.decimal-hero p{color:#c0d0e5;font-size:17px}.decimal-art{justify-self:center;transform:rotate(-3deg);text-align:center}.art-label{font-size:9px;letter-spacing:2.5px;color:#91acc7}.number-tiles{display:flex;align-items:center;justify-content:center;gap:12px;margin:12px 0}.number-tiles i{display:grid;place-items:center;font-style:normal;font-size:65px;font-weight:850;width:84px;height:94px;border-radius:16px;background:linear-gradient(140deg,#e9f7ff,#b6e4fa);color:#284862;box-shadow:0 6px 0 #7199b0,0 15px 30px #0003}.number-tiles b{color:#ffd19d;font-size:50px}.art-grid{display:flex;justify-content:space-between;color:#93adc6;font-size:11px;padding:0 15px}.home-grade{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.grade-picker{display:flex;gap:10px;border:0;padding:0;margin:12px 0 20px;min-width:0}.grade-picker legend{font-size:12px;color:#b9c9da;margin-bottom:8px}.grade-picker label{flex:1;position:relative;min-width:140px;cursor:pointer}.grade-picker input{position:absolute;opacity:0;width:1px;height:1px}.grade-picker span{display:flex;align-items:center;gap:10px;padding:13px 18px;background:#132139;border:1px solid #8b9bb555;border-radius:12px}.grade-picker small{color:#bdcce0;font-size:12px}.grade-picker input:checked+span{border-color:#ffcf9c;background:#5e4b3b70;box-shadow:inset 0 -3px #ffcf9c}.grade-picker input:focus-visible+span{outline:3px solid #91dafa;outline-offset:3px}.home-grade .grade-picker{margin:0}.home-grade .tiny{max-width:300px}.cards{gap:20px}.join-button{margin-top:15px}.solo-entry{display:flex;gap:14px;justify-content:center;margin:22px 0}.solo-entry button{padding:16px 24px;background:#283c56;border-color:#8da9bd66}.practice-setup{max-width:780px;margin:auto}.lesson-note{line-height:1.9;padding:16px;background:#102036;border-radius:12px;color:#c8d7eb}.lesson-note b{color:#ffcf9c}.play-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;font-size:14px;font-weight:750}.play-head>div{display:flex;gap:14px;align-items:center}.grade-tag{border:1px solid #a1d8e655;color:#b1e6f4;border-radius:8px;padding:6px 10px}.play-head #clock{font-size:28px;color:#ffddb6;font-variant-numeric:tabular-nums}.play-head #penalty{color:#ffc8af;font-size:12px}.play-head .quiet{padding:9px 12px;font-size:12px;min-height:40px}.decimal-play{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px;background:linear-gradient(130deg,#23364f,#172840);border:1px solid #8bafce55;border-radius:24px;padding:24px;box-shadow:0 20px 45px #0002}.problem-card{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px 24px;border-radius:18px;background:radial-gradient(ellipse at 50% 30%,#34527266,transparent 70%),#13233888;min-width:0}.problem-card h2{font-size:22px;font-weight:650;line-height:1.7;word-break:keep-all;margin:18px 0;color:#e5eef9;max-width:650px}.problem-card .eyebrow{color:#9bcddd;font-size:11px;letter-spacing:2px}.equation{font-size:clamp(24px,3vw,38px);font-weight:850;font-variant-numeric:tabular-nums;line-height:1.5;color:#ffddb9;word-break:keep-all;margin:14px 0 30px}.story-equation{font-size:18px;color:#c2d4e6}.dot-track{display:flex;gap:10px;margin:10px 0}.dot-track i{width:30px;height:30px;display:grid;place-items:center;border:1px solid #8ba2bb55;color:#8faac2;border-radius:50%;font-size:12px;font-style:normal}.dot-track .current{border-color:#ffd19d;color:#ffd19d;background:#ffd19d16}.dot-track .done{color:#b3ebd9;background:#4b9a8622;border-color:#b3ebd9}.answer-card{min-width:0}.answer-label{display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:750;margin:0 0 8px}.answer-label span{font-size:10px;color:#a8b9ce;font-weight:400}.answer-field{display:flex;align-items:center;gap:6px;border:2px solid #ffcf9c;background:#0c1a2d;border-radius:13px;padding:8px 12px;margin-bottom:12px}.answer-field:focus-within{outline:3px solid #98dcf655;outline-offset:2px}.answer-field input{width:100%;min-width:0;background:transparent;border:0;padding:0;height:45px;min-height:0;border-radius:0;font-size:29px;box-shadow:none;text-align:right;letter-spacing:1px;color:#fff2e1}.answer-field input:focus{outline:none}.answer-field strong{font-size:17px;color:#bfd5e6}.answer-field.inactive{border-color:#788a9f}.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.keypad button{font-size:24px;padding:8px;min-height:51px;background:#2a405b;border:1px solid #8aa7bf66;border-radius:12px;box-shadow:0 2px 0 #101d30;touch-action:manipulation}.keypad button:active{background:#4a6481;transform:translateY(1px)}.keypad button[data-key="."]{color:#ffcf9c;font-size:31px;background:#4d433d}.keypad button[data-key="⌫"]{font-size:23px}.answer-actions{display:flex;align-items:center;gap:10px;margin:10px 0}.answer-actions button{font-size:12px;padding:9px 12px;min-height:40px;white-space:nowrap}.answer-actions span{font-size:11px;line-height:1.4;color:#aec3d8}#submit{font-size:16px;min-height:52px}.combo-line{font-size:12px;color:#bce9d9;text-align:center;margin:12px 0 0}.compare-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}.compare-choices button{min-height:80px;font-size:36px}.compare-choices button[aria-pressed="true"]{border-color:#ffcf9c;background:#68503b;color:#ffe0b7}.scratch-panel{grid-column:1/-1;border-top:1px solid #95adc333;padding-top:12px}.scratch-panel summary{font-size:13px;cursor:pointer;min-height:38px;display:flex;align-items:center;gap:12px;color:#d5e7f3}.scratch-panel summary::before{content:'＋';font-size:20px;color:#ffcf9c}.scratch-panel[open] summary::before{content:'−'}.scratch-panel small{font-size:11px;color:#a3b6ca}.scratch-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;max-width:540px}.scratch-grid>span{font-size:10px;text-align:center;color:#b6cadb}.scratch-grid button{min-height:45px;padding:3px;font-size:20px;border-radius:6px}.place-grid button:nth-of-type(6n+3){border-right:3px dashed #ffd19d}.scratch-grid button.active{border-color:#ffce9d;background:#6c513d}.scratch-actions{display:flex;gap:10px;margin-top:12px}.scratch-actions button{min-height:44px;font-size:12px}.scratch-keys{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-top:12px;max-width:540px}.scratch-keys button{min-height:44px}.play-note{grid-column:1/-1;font-size:11px;color:#9fb4ca;margin:0;text-align:center}.rematch-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:16px}.rematch-actions #again,.rematch-actions #result-code{flex:0 1 230px}.rematch-actions strong{display:block;font-size:26px;letter-spacing:3px}#friend-end{display:block;margin:16px auto 0;font-size:12px}#success-impact{position:fixed;top:85px;left:50%;transform:translateX(-50%);pointer-events:none;opacity:0;z-index:20;background:#483d32f5;border:1px solid #ffcf9c;border-radius:14px;padding:18px 25px;color:#ffe5c6;font-size:22px;font-weight:850}#success-impact.show{animation:decimal-success .85s ease-out forwards}@keyframes decimal-success{0%{opacity:0;translate:0 8px}15%,80%{opacity:1;translate:0 0}100%{opacity:0;translate:0 -8px}}
@media(max-width:1050px){main{padding:20px}.decimal-play{padding:18px;gap:18px;grid-template-columns:minmax(0,1fr) 290px}.problem-card{padding:15px}.problem-card h2{font-size:20px}.equation{font-size:29px}.story-equation{font-size:17px}.decimal-hero h1{font-size:48px}.decimal-hero{margin-bottom:16px}.number-tiles i{height:80px;width:74px;font-size:55px}}
@media(max-width:650px){header{padding:10px 14px;flex-wrap:nowrap;gap:8px}.audio-controls{order:0;width:auto;margin-left:auto}.audio-controls label{display:none}.audio-controls button{padding:8px;min-height:44px}.brand{font-size:16px;white-space:nowrap}.brand-icon{font-size:19px}.creator img{width:34px;height:34px}.creator span{display:none}main{padding:14px 10px}.decimal-hero{grid-template-columns:1fr 110px;gap:5px}.decimal-hero h1{font-size:37px;letter-spacing:-2px}.decimal-hero p{font-size:12px}.decimal-hero .eyebrow{font-size:8px;letter-spacing:1px}.art-label,.art-grid{display:none}.number-tiles{gap:4px}.number-tiles i{font-size:30px;width:35px;height:49px;border-radius:8px;box-shadow:0 3px 0 #7199b0}.number-tiles b{font-size:24px}.home-grade{display:block}.home-grade>.tiny{display:none}.grade-picker{gap:8px;margin-bottom:14px}.grade-picker label{min-width:0}.grade-picker span{padding:12px;gap:7px}.grade-picker small{font-size:10px}.solo-entry{flex-direction:column;gap:10px}.practice-setup{padding:20px}.play-head{font-size:11px;gap:6px;margin-bottom:10px}.play-head>div{gap:7px}.grade-tag{padding:4px 6px}.play-head #clock{font-size:22px}.play-head .quiet{font-size:10px;min-height:36px;padding:7px}.decimal-play{display:flex;flex-direction:column;padding:12px;gap:12px;border-radius:18px}.problem-card{padding:13px 10px}.problem-card h2{font-size:15px;line-height:1.6;margin:8px 0}.problem-card .eyebrow{font-size:10px;letter-spacing:1px}.equation{font-size:28px;margin:7px 0;line-height:1.35}.story-equation{font-size:15px}.dot-track,.problem-note{display:none}.answer-label{font-size:12px;margin-bottom:6px}.answer-field{padding:6px 10px;margin-bottom:9px}.answer-field input{height:36px;font-size:26px}.keypad{gap:7px}.keypad button{min-height:47px;font-size:22px;padding:5px}.keypad button[data-key="."]{font-size:26px}.answer-actions{margin:8px 0}.answer-actions button{min-height:36px}.answer-actions span{font-size:10px}#submit{min-height:47px;font-size:15px}.combo-line{margin-top:8px}.scratch-panel{padding-top:6px}.scratch-panel summary{font-size:12px;min-height:32px}.scratch-panel small{font-size:10px}.play-note{font-size:10px;line-height:1.5}.compare-choices button{min-height:72px}.rematch-actions #again,.rematch-actions #result-code{flex:1;min-width:140px}#success-impact{top:64px;font-size:15px;width:max-content;max-width:90vw;padding:14px 18px}.scratch-grid{gap:4px}.scratch-grid button{min-height:42px}}
@media(prefers-reduced-motion:reduce){#success-impact.show{animation:none;opacity:1}}

.place-art{transform:none;width:min(100%,380px)}.place-art-title{color:#bbd7ea;font-size:13px;letter-spacing:1px;margin-bottom:16px}.place-cards{display:grid;grid-template-columns:1fr 16px 1fr 1fr;gap:10px;align-items:center}.place-cards>div{min-width:0}.place-cards strong{display:grid;place-items:center;height:94px;border-radius:16px;background:linear-gradient(145deg,#e9f7ff,#b6e4fa);box-shadow:0 6px 0 #7199b0,0 15px 30px #0003;color:#284862;font-size:56px}.place-cards>div:last-child strong{background:linear-gradient(145deg,#fff1dd,#ffcd96);box-shadow:0 6px 0 #a77a50,0 15px 30px #0003}.place-cards span{display:block;font-size:11px;color:#bdcee1;margin-top:16px;white-space:nowrap}.decimal-dot{font-size:42px;color:#ffcf9c;align-self:center;margin-top:-24px}.place-equation{color:#ffddb6;margin-top:20px;font-size:17px;font-variant-numeric:tabular-nums}

.place-grid > span:nth-child(3) { box-shadow: inset -3px 0 0 #ffd19d; }
.scratch-grid:not(.place-grid) button.active { box-shadow: inset 0 0 0 2px #ffce9d; color: #fff; font-weight: 750; }
