:root{--paper:#f7fbf8;--ink:#17383b;--muted:#587477;--line:#cdded9;--gold:#ffe343;--teal:#007b83;--purple:#8b6a00;--radius:24px;font-family:"Trebuchet MS",Arial,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:350px;display:flex;flex-direction:column;min-height:100dvh}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none}button:disabled{cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--ink);outline-offset:4px}button svg,svg.icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}button{color:inherit}a{color:inherit}button[hidden],[hidden]{display:none!important}.svg-library{position:absolute;width:0;height:0;overflow:hidden}.app-header,.app-main,.app-footer{width:min(1440px,100%);margin-inline:auto}.app-header{display:flex;align-items:center;justify-content:space-between;padding:23px 38px 20px;border-bottom:1px solid var(--line);gap:20px}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;flex-shrink:0}.brand-icon{display:grid;place-items:center;background:var(--gold);width:44px;height:44px;border-radius:13px;font-size:45px;font-weight:900;line-height:1;transform:rotate(-8deg);padding-bottom:4px}.brand-type{display:flex;flex-direction:column;line-height:1.1}.brand-type>span{font-size:10px;letter-spacing:2px;font-weight:900}.brand-type>strong{font-size:24px;font-weight:900;letter-spacing:-1px}.brand-dot{color:#cb7a08}.header-note{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:bold;color:#6d766b}.little-dot{width:7px;height:7px;background:#589875;border-radius:50%}.header-actions{display:flex;gap:10px}.utility-button{display:flex;align-items:center;gap:8px;background:transparent;border:1px solid var(--line);border-radius:10px;min-height:42px;padding:8px 13px;font-size:12px;font-weight:700}.utility-button:hover{background:#eeeee5;border-color:#a5ac9e}.utility-button svg{width:18px;height:18px}.app-main{padding:27px 38px 10px}.intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:25px}.eyebrow{font-size:10px;font-weight:900;letter-spacing:1.7px;margin:0 0 9px;text-transform:uppercase}.intro .eyebrow{color:#6d776b}.intro h1{font-size:clamp(30px,3vw,45px);font-weight:900;letter-spacing:-1.8px;line-height:1.1;margin:0}.intro h1>span{position:relative;white-space:nowrap;z-index:0}.intro h1>span:after{position:absolute;content:"";height:11px;background:var(--gold);left:0;right:-2px;bottom:2px;transform:rotate(-1deg);z-index:-1}.title-spark{width:30px;height:30px;margin-left:12px;vertical-align:top;fill:none;stroke:#c78a15;stroke-width:1.4;transform:rotate(12deg)}.intro>p{font-size:14px;line-height:1.7;margin:0;color:#6e786d}.intro>p strong{color:var(--ink)}.setup{display:flex;gap:20px;align-items:center;padding:17px 20px;background:#eeefe6;border:1px solid #e2e4d7;border-radius:16px}.setup-label{flex-shrink:0}.setup h2{font-size:13px;margin:0 0 4px}.setup-label p{font-size:11px;color:#737a6d;margin:0}.table-options{display:grid;grid-template-columns:repeat(12,1fr);gap:7px;flex:1}.table-choice{border:1px solid #d6d9cb;border-radius:9px;background:var(--paper);font-size:17px;font-weight:900;min-height:43px;min-width:34px;padding:5px 2px;transition:background .12s,transform .12s}.table-choice:hover{transform:translateY(-2px);border-color:#8d9a86}.table-choice[aria-pressed=true]{background:var(--ink);color:#fff;border-color:var(--ink);box-shadow:0 2px 0 #b2bbaa}.all-tables{min-height:43px;padding:8px 12px;border:1px solid #cad0bc;border-radius:9px;font-size:11px;font-weight:900;background:transparent;display:flex;gap:7px;align-items:center;white-space:nowrap}.all-tables svg{width:14px;height:14px;opacity:0}.all-tables[aria-pressed=true] svg{opacity:1}.all-tables[aria-pressed=true]{background:#dde6d7}.arena{display:flex;flex-direction:column}.game-bar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px;padding:16px 3px}.round-detail .eyebrow{font-size:10px;margin-bottom:6px}.round-detail p{margin:0;font-size:11px;color:#737c70;line-height:1.6}.round-detail strong{color:var(--ink)}.timer{--progress:100%;width:73px;height:73px;border-radius:50%;background:conic-gradient(var(--gold) var(--progress),#e6e7dc 0);padding:5px;position:relative;box-shadow:0 0 0 1px #ebe5cf}.timer-inner{background:var(--paper);height:100%;width:100%;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center}.timer strong{font-size:30px;line-height:1;letter-spacing:-1.5px;font-variant-numeric:tabular-nums}.timer span{font-size:7px;font-weight:900;letter-spacing:.8px;margin-top:2px}.timer.urgent{background:conic-gradient(#ce4d30 var(--progress),#f5ddd1 0);color:#bc4428}.round-actions{display:flex;justify-content:flex-end;align-items:center;gap:16px}.primary-button{border:1.5px solid var(--ink);border-radius:12px;background:var(--gold);padding:13px 20px;min-height:49px;display:flex;justify-content:center;align-items:center;gap:28px;font-size:15px;font-weight:900;box-shadow:0 3px 0 var(--ink);transition:transform .12s,box-shadow .12s;white-space:nowrap}.primary-button:hover{background:#ffd16d;transform:translateY(-1px);box-shadow:0 4px 0 var(--ink)}.primary-button:active{transform:translateY(3px);box-shadow:none}.primary-button:disabled{opacity:.5;transform:none;box-shadow:0 3px 0 var(--ink)}.text-button{background:none;border:0;padding:10px 2px;font-size:12px;font-weight:bold;text-decoration:underline;text-decoration-color:#aeb4a4;text-underline-offset:4px}.text-button:hover{color:#946000}.players{display:grid;grid-template-columns:1fr 1fr;gap:22px;position:relative}.versus{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-7deg);z-index:2;font-size:12px;font-weight:900;background:var(--paper);border:1px solid var(--line);border-radius:50%;width:41px;height:41px;display:grid;place-items:center;box-shadow:0 2px 0 #dedfd3}.player{--accent:var(--teal);--tint:#d9f3ee;--deep:#00525a;--key-shadow:#9bcac1;display:flex;flex-direction:column;background:var(--tint);border:1.5px solid #76b6ad;border-radius:var(--radius);padding:20px 24px 24px;position:relative;min-width:0;isolation:isolate}.player-yellow{--accent:var(--purple);--tint:#fff2ad;--deep:#594500;--key-shadow:#d5be66;border-color:#d9be49}.player-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.player-identity{display:flex;align-items:center;gap:11px;min-width:0}.player-badge{width:41px;height:41px;border-radius:12px;background:var(--accent);display:grid;place-items:center;color:#fff;flex-shrink:0;transform:rotate(-5deg)}.player-yellow .player-badge{transform:rotate(5deg)}.player-badge svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.player-label{display:block;font-size:8px;letter-spacing:1.6px;font-weight:900;color:var(--accent);margin-bottom:3px}.player-name{color:var(--deep);border:0;border-bottom:1px dashed #95bba9;background:transparent;font-size:21px;font-weight:900;width:100%;max-width:250px;padding:0 0 3px;border-radius:0;min-width:0}.player-yellow .player-name{border-bottom-color:#b7a354}.player-name[readonly]{border-bottom-color:transparent;outline:none;cursor:default}.score{display:flex;align-items:baseline;gap:6px;color:var(--deep);flex-shrink:0}.score strong{font-size:37px;font-variant-numeric:tabular-nums;line-height:1}.score span{font-size:8px;letter-spacing:.7px;font-weight:900}.question-area{text-align:center;padding:19px 0 13px}.equation{display:flex;align-items:center;justify-content:center;gap:17px;color:var(--deep);font-weight:900;font-size:clamp(35px,3.8vw,62px);letter-spacing:-1.5px;font-variant-numeric:tabular-nums;white-space:nowrap;line-height:1.2}.equals{font-size:.68em;font-weight:500;opacity:.7}.answer{border:2px dashed #9dbdaa;background:#f7fbf6b0;border-radius:12px;min-width:96px;min-height:69px;display:grid;place-items:center;padding:3px 10px;line-height:1.15;letter-spacing:0}.player-yellow .answer{border-color:#c5a841;background:#ffffffa6}.answer.is-empty{color:#88aaa3}.player-yellow .answer.is-empty{color:#aaa064}.feedback{height:18px;margin:9px 0 0;line-height:18px;font-size:11px;font-weight:700;color:#657d6a;letter-spacing:.1px}.player-yellow .feedback{color:#85743b}.feedback.success{color:#116246}.feedback.error{color:#ac3b29}.keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,clamp(44px,6.6vh,77px));gap:9px;touch-action:none}.key{border:1px solid #bfd0c3;border-radius:12px;background:#fffffff0;box-shadow:0 3px 0 var(--key-shadow);font-size:28px;font-weight:900;color:var(--deep);min-width:0;min-height:40px;transition:background .1s,transform .08s,box-shadow .08s;position:relative;line-height:1}.player-yellow .key{border-color:#e0ce8c}.key:hover:enabled{background:#fff}.key:active:enabled,.key.pressed{transform:translateY(3px);box-shadow:none;background:#e7eede}.key:disabled{opacity:.63}.key-delete{background:#ffffff75;display:grid;place-items:center}.key-delete svg{width:25px;height:25px}.key-submit{display:flex;justify-content:center;align-items:center;gap:7px;background:var(--accent);color:#fff;border-color:var(--accent)!important;font-size:17px;box-shadow:0 3px 0 var(--deep)}.key-submit:hover:enabled{background:var(--deep)}.key-submit svg{width:21px;height:21px;stroke-width:2.5}.player.is-correct .answer{border-color:var(--accent);border-style:solid;background:#fff}.player.is-wrong .answer{border-color:#cc725b;border-style:solid;animation:shake .22s}.app-footer{display:flex;justify-content:space-between;gap:12px;padding:18px 40px;font-size:10px;color:#7e8579}.footer-mark{margin-right:5px;color:#ab882e}.app-footer span{line-height:1.5}.countdown-overlay{position:fixed;inset:0;z-index:10;background:#23392f79;backdrop-filter:blur(5px);display:grid;place-items:center}.countdown-card{text-align:center;background:var(--paper);padding:35px 55px 30px;border-radius:28px;border:2px solid var(--ink);box-shadow:0 8px 0 #263c2e35;transform:rotate(-2deg)}.countdown-card>span{font-size:12px;letter-spacing:2px;font-weight:900}.countdown-card>strong{display:block;font-size:130px;line-height:1.2;color:var(--ink);text-shadow:5px 4px 0 var(--gold)}.countdown-card>p{margin:12px 0 0;font-size:13px}.game-dialog{width:min(480px,calc(100% - 40px));border:1.5px solid var(--ink);border-radius:26px;padding:32px;color:var(--ink);background:var(--paper);text-align:center;box-shadow:0 8px 0 #203d3226;overflow:hidden}.game-dialog::backdrop{background:#253e3282;backdrop-filter:blur(6px)}.game-dialog h2{overflow-wrap:anywhere;font-size:30px;letter-spacing:-1px;line-height:1.1;margin:0 0 12px}.game-dialog>p:not(.eyebrow){font-size:14px;line-height:1.6;margin:0 0 20px;color:#697767}.game-dialog .primary-button{width:100%;margin:20px 0 7px}.game-dialog .text-button{font-size:13px}.dialog-symbol{height:60px;width:60px;display:grid;place-items:center;margin:0 auto 18px;border-radius:17px;background:var(--gold);transform:rotate(-6deg)}.dialog-symbol svg{height:34px;width:34px;fill:none;stroke:var(--ink);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.trophy svg{height:43px;width:43px;stroke-width:2.7}.game-dialog .eyebrow{font-size:9px;color:#8c772f;margin-bottom:12px}.result-scores{display:grid;grid-template-columns:1fr 1fr;gap:12px;position:relative}.result-player{padding:18px 8px;display:flex;flex-direction:column;align-items:center;border-radius:15px;min-width:0}.teal-result{background:#d8f3ed;color:#00515a}.yellow-result{background:#fff0a6;color:#685000}.result-player>span:first-child{font-size:14px;font-weight:900;max-width:100%;overflow-wrap:anywhere}.result-player strong{font-size:55px;line-height:1.2;font-variant-numeric:tabular-nums}.result-player>span{font-size:11px}.result-player>small{font-size:10px;margin-top:9px;opacity:.75;min-height:12px}.results-dialog .results-tables{font-size:11px;color:#7c8578;margin:16px 0 0}.confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}.confetti i{position:absolute;width:7px;height:13px;left:var(--x);top:-30px;background:var(--c);transform:rotate(var(--r));animation:confetti-fall 2.5s var(--delay) ease-in both;opacity:.65}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:30;background:var(--ink);color:white;padding:12px 18px;border-radius:10px;max-width:90%;font-size:13px;box-shadow:0 3px 15px #0002;text-align:center}
body.is-round{height:100dvh;min-height:600px;overflow:hidden}body.is-round .intro,body.is-round .setup{display:none}body.is-round .app-main{flex:1;min-height:0;display:flex;flex-direction:column;padding-top:0}body.is-round .arena{flex:1;min-height:0}body.is-round .players{flex:1;min-height:0}body.is-round .player{min-height:0}body.is-round .keypad{flex:1;grid-template-rows:repeat(4,minmax(36px,1fr));min-height:0}body.is-round .equation{font-size:clamp(46px,5.5vw,82px)}body.is-round .answer{min-width:120px;min-height:90px}body.is-round .question-area{padding:20px 0}body.is-round .key{font-size:clamp(24px,3.1vw,44px)}body.is-round .key-submit{font-size:22px}body.is-round .app-footer{padding-block:12px}body.is-round .game-bar{padding-block:17px}body.is-round .keypad .key:disabled{opacity:.6}body[data-phase=countdown] .countdown-overlay{display:grid}
@keyframes shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}@keyframes confetti-fall{0%{transform:translateY(-30px) rotate(0);opacity:0}10%{opacity:.9}100%{transform:translateY(650px) rotate(var(--r));opacity:0}}
@media(min-width:1700px){.app-header,.app-main,.app-footer{width:min(1720px,100%)}.app-main{padding-top:32px}.app-header{padding-block:28px}.intro h1{font-size:50px}.intro>p{font-size:16px}.setup{padding:20px 24px}.table-choice{min-height:50px;font-size:21px}.setup h2{font-size:15px}.setup-label p{font-size:12px}.game-bar{padding-block:22px}.player{padding:27px 34px 30px}.player-name{font-size:27px}.player-label{font-size:10px}.player-badge{width:48px;height:48px}.score strong{font-size:49px}.score span{font-size:10px}.question-area{padding:24px 0 18px}.equation{font-size:70px}.feedback{font-size:14px;margin-top:14px;height:22px}.keypad{gap:12px}.key{font-size:36px}.key-submit{font-size:22px}.round-detail p{font-size:13px}.round-detail .eyebrow{font-size:12px}.timer{width:84px;height:84px}.timer strong{font-size:37px}.timer span{font-size:8px}.app-footer{font-size:12px}body.is-round .question-area{padding:25px 0}body.is-round .game-bar{padding-block:22px}body.is-round .equation{font-size:92px}body.is-round .answer{min-height:106px;min-width:150px}}
@media(max-width:1050px){.app-header,.app-main{padding-inline:24px}.header-note{display:none}.intro>p{font-size:12px}.intro h1{font-size:34px}.title-spark{width:24px}.setup{gap:12px;padding:14px}.table-options{gap:5px}.table-choice{min-width:27px;min-height:40px;font-size:15px}.setup h2{font-size:12px}.setup-label p{font-size:10px}.all-tables{padding:8px;min-height:40px;gap:2px}.game-note{display:none}.player{padding:18px}.player-name{font-size:19px}.question-area{padding:16px 0 12px}.equation{font-size:42px;gap:12px}.answer{min-width:77px;min-height:60px}.players{gap:18px}.keypad{gap:8px}.score{flex-direction:column;align-items:center;gap:2px}.score strong{font-size:32px}.score span{font-size:7px}.round-actions{gap:10px}.primary-button{font-size:14px;gap:16px;padding-inline:17px}body.is-round .equation{font-size:57px}body.is-round .answer{min-width:100px;min-height:75px}.feedback{font-size:10px}.app-footer{padding-inline:26px}}
@media(max-width:760px){.app-header{padding:15px 16px}.app-main{padding:22px 14px 5px}.brand-type>strong{font-size:21px}.brand-type>span{font-size:8px}.brand-icon{width:38px;height:38px;font-size:39px;border-radius:11px}.header-actions{gap:6px}.utility-button{padding:9px;min-width:39px;min-height:39px}.utility-button span{display:none}.intro{margin-bottom:18px;align-items:flex-start}.intro>p{display:none}.intro .eyebrow{font-size:8px;letter-spacing:1.1px}.intro h1{font-size:32px}.setup{flex-wrap:wrap;gap:10px}.setup-label{flex:1}.setup-label p{display:inline;margin-left:8px}.setup h2{display:inline}.table-options{order:3;flex-basis:100%;grid-template-columns:repeat(12,1fr);gap:4px}.table-choice{font-size:14px;min-width:20px;min-height:38px;border-radius:7px}.all-tables{min-height:30px;padding:4px 8px}.game-bar{gap:10px;padding:14px 0;grid-template-columns:1fr auto 1fr}.round-detail .eyebrow{font-size:8px;letter-spacing:1px}.round-detail p{font-size:10px;max-width:150px}.timer{width:62px;height:62px;padding:4px}.timer strong{font-size:27px}.timer span{font-size:6px}.round-actions{gap:6px}.round-actions .primary-button{font-size:12px;min-height:43px;padding:9px 10px;gap:8px;border-radius:9px}.round-actions .primary-button svg{width:17px;height:17px}.round-actions .text-button{font-size:10px}.players{gap:12px}.player{padding:14px 12px 17px;border-radius:18px}.player-identity{gap:7px}.player-badge{width:30px;height:32px;border-radius:9px}.player-badge svg{width:20px;height:20px}.player-label{font-size:7px;letter-spacing:.8px}.player-name{font-size:16px;max-width:160px}.score strong{font-size:29px}.score span{font-size:6px}.question-area{padding:18px 0 12px}.equation{font-size:34px;gap:8px;letter-spacing:-1px}.answer{min-height:48px;min-width:66px;padding:3px 5px;border-radius:9px}.feedback{font-size:9px;letter-spacing:0;height:16px;line-height:16px;margin-top:7px}.keypad{gap:7px;grid-template-rows:repeat(4,clamp(48px,6.5vh,65px))}.key{font-size:25px;border-radius:9px;box-shadow:0 2px 0 var(--key-shadow)}.key-submit{font-size:13px;gap:3px;box-shadow:0 2px 0 var(--deep)}.key-submit svg{width:17px;height:17px}.key-delete svg{width:22px;height:22px}.versus{width:29px;height:29px;font-size:9px}.app-footer{padding:14px 17px;font-size:9px}.app-footer #footer-tip{display:none}body.is-round .equation{font-size:clamp(29px,5.8vw,48px);gap:8px}body.is-round .answer{min-width:68px;min-height:60px}body.is-round .question-area{padding:18px 0}body.is-round .key{font-size:28px}body.is-round .key-submit{font-size:16px}body.is-round .game-bar{padding-block:15px}}
@media(max-width:460px){.brand-type>strong{font-size:18px}.brand-type>span{font-size:7px;letter-spacing:1.4px}.brand-icon{width:33px;height:34px;font-size:36px}.intro h1{font-size:29px}.title-spark{width:21px;margin-left:8px}.table-options{grid-template-columns:repeat(6,1fr);gap:6px}.table-choice{min-height:38px;font-size:16px}.setup{padding:12px}.setup-label p{font-size:9px;margin-left:5px}.players{gap:9px}.player{padding:12px 8px 14px;border-radius:15px}.player-header{gap:3px}.player-badge{display:none}.player-name{font-size:16px}.player-label{font-size:7px}.score strong{font-size:27px}.score span{font-size:6px}.equation{font-size:26px;gap:5px}.answer{min-width:47px;min-height:43px;border-radius:8px}.feedback{font-size:8px}.keypad{gap:6px}.key{font-size:23px}.key-submit{font-size:11px;gap:1px}.key-submit svg{width:14px}.round-detail .eyebrow{font-size:7px;letter-spacing:.6px}.round-detail p{font-size:9px}.round-actions .primary-button{font-size:11px;padding-inline:8px;gap:5px}.round-actions .text-button{font-size:8px;max-width:30px}.timer{width:57px;height:57px}.game-bar{gap:8px}.versus{width:24px;height:24px;font-size:8px}.app-main{padding-inline:10px}body.is-round .equation{font-size:27px;gap:5px}body.is-round .answer{min-width:50px;min-height:49px}body.is-round .key{font-size:25px}body.is-round .key-submit{font-size:12px}.countdown-card{padding:25px}.countdown-card strong{font-size:110px}.game-dialog{padding:25px 20px}.game-dialog h2{font-size:27px}}
@media(max-height:820px) and (min-width:761px){.app-header{padding-block:14px}.app-main{padding-top:18px}.intro{margin-bottom:18px}.intro h1{font-size:35px}.setup{padding-block:12px}.game-bar{padding-block:12px}.timer{width:65px;height:65px}.timer strong{font-size:28px}.player{padding-block:16px}.question-area{padding:12px 0 10px}.answer{min-height:55px}.equation{font-size:44px}.keypad{grid-template-rows:repeat(4,clamp(42px,6.2vh,60px))}.key{font-size:26px}.key-submit{font-size:16px}.app-footer{padding-block:12px}body.is-round .game-bar{padding-block:12px}body.is-round .question-area{padding:12px 0}body.is-round .equation{font-size:55px}body.is-round .answer{min-height:65px}body.is-round .app-header{padding-block:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.confetti{display:none}}
