:root{--bg:#f5f6fb;--paper:#fff;--navy:#14192f;--text:#273047;--muted:#63718b;--violet:#6955d8;--lavender:#ece7ff;--mint:#a4eed2;--line:#e5e9f2;--red:#a43e4a;--gold:#ffda7c;font-family:ui-rounded,"SF Pro Rounded",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button,summary{cursor:pointer}button{min-height:46px;border:0;border-radius:14px;padding:12px 19px;font-weight:700;color:var(--text);background:var(--lavender);transition:background .15s}button:hover{filter:brightness(.96)}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid var(--violet);outline-offset:3px}button.primary{background:var(--violet);color:white;box-shadow:0 5px 0 #5946c326}button.secondary{background:var(--lavender);color:#443790}.wide{width:100%;margin-top:20px}.text-button{background:transparent;color:var(--muted)}.danger{color:var(--red)}input,select{border:1px solid #d8deea;border-radius:13px;min-height:49px;padding:12px 14px;background:#fafbfe;color:var(--navy);width:100%}input:disabled{background:#e9ecf2}label{display:block;margin:17px 0 7px;font-size:14px;font-weight:700}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(30px,3.4vw,48px);line-height:1.08;letter-spacing:-1.2px;margin-bottom:18px;color:var(--navy)}h2{font-size:26px;letter-spacing:-.6px;color:var(--navy);margin:13px 0}h3{font-size:19px;color:var(--navy)}p{line-height:1.6}a{color:inherit;text-decoration:none}.topbar{max-width:1220px;margin:auto;padding:24px 32px;display:flex;justify-content:space-between;align-items:center;gap:12px}.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:20px;letter-spacing:-.6px}.brand-mark{width:37px;height:37px;display:grid;place-items:center;background:var(--violet);color:white;border-radius:12px;font-size:27px}.brand-light{font-weight:500;color:var(--muted);font-size:15px;padding-left:8px;border-left:1px solid var(--line)}.language{display:flex;border:1px solid var(--line);padding:3px;border-radius:15px;background:white}.language button{min-height:40px;min-width:44px;padding:8px 12px;background:transparent;font-size:13px}.language button.active{background:var(--navy);color:white}main{max-width:1160px;margin:auto;padding:10px 32px 24px}.hero{background:var(--navy);color:white;border-radius:28px;padding:40px 48px;display:flex;justify-content:space-between;align-items:center;gap:30px;overflow:hidden}.hero h1{font-size:clamp(34px,4.3vw,54px);color:white;margin:14px 0 18px;max-width:650px}.hero p{color:#cdd5e6;max-width:520px;font-size:17px;margin-bottom:22px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:1.8px}.hero .eyebrow{color:var(--mint)}.purple{color:var(--violet)}.hero-tags{display:flex;gap:10px;flex-wrap:wrap}.hero-tags span{font-size:12px;border:1px solid #ffffff30;border-radius:30px;padding:7px 12px;color:#dfe7f6}.medal{width:190px;height:190px;min-width:190px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:50%;border:12px solid #ffffff0f;box-shadow:0 0 0 18px #ffffff04;color:var(--gold);position:relative;background:#1c2340;transform:rotate(8deg)}.medal-star{font-size:86px;line-height:.95}.medal>span{font-size:17px;margin-top:9px;letter-spacing:2px}.medal-ribbon{position:absolute;z-index:-1;background:var(--violet);width:85px;height:105px;top:145px;clip-path:polygon(0 0,100% 0,100% 100%,50% 77%,0 100%)}.entry-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:25px}.card{background:var(--paper);border:1px solid var(--line);padding:28px;border-radius:23px;box-shadow:0 5px 18px #17264b03}.step-badge{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--lavender);color:var(--violet);font-size:12px;font-weight:800}.step-badge.mint{background:#d8f8e9;color:#23694c}.muted{color:var(--muted)}.small{font-size:12px;line-height:1.5}.benefits{list-style:none;padding:6px 0 14px;margin:0}.benefits li{position:relative;padding:12px 0 12px 29px;font-size:14px}.benefits li:before{content:'✓';position:absolute;left:0;top:11px;width:21px;height:21px;border-radius:50%;display:grid;place-items:center;background:#def8ed;color:#29734e;font-size:12px}.host-card>p.small{text-align:center;margin:15px 0 0}.notice{position:sticky;top:8px;z-index:9;background:#fff6d9;border:1px solid #ecd48c;color:#705314;padding:13px 18px;border-radius:14px;margin-bottom:16px;line-height:1.5;box-shadow:0 4px 20px #0001}.notice.error{color:#8b2634;background:#fff1f1;border-color:#f2cdd0}.section-heading{margin:25px 0}.section-heading h1{margin-top:10px}.narrow{max-width:660px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 18px}.soft-note{padding:14px 17px;background:#f0edff;border-radius:14px;color:#5b5085;font-size:14px;margin:20px 0}.resume{margin-top:25px;border-top:1px solid var(--line);padding-top:15px}.resume summary{font-size:14px;padding:12px 0}.inline-form{display:flex;gap:10px;margin-top:12px}.inline-form input{min-width:0}.room-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:24px 0}.room-heading h1{margin:9px 0 0;font-size:36px}.room-meta{display:flex;align-items:center;gap:20px;background:var(--navy);color:white;border-radius:20px;padding:18px 25px;margin-bottom:23px}.room-meta>div{display:flex;flex-direction:column;gap:4px}.room-meta>div>span{font-size:11px;color:#bac5de}.room-meta strong{letter-spacing:5px;font-size:26px}.room-meta .secondary{background:#333051;color:#eae5ff;font-size:13px}.connection{margin-left:auto;font-size:12px;color:var(--mint)}.connection.stale{color:var(--gold)}.lobby-grid{display:grid;grid-template-columns:1fr 1fr;gap:35px}.large-icon{font-size:55px;line-height:1;color:var(--violet)}.player-list{list-style:none;padding:0;margin:0;max-height:425px;overflow:auto}.player-list li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.player-alias{display:flex;align-items:center;gap:9px;min-width:0;overflow-wrap:anywhere}.avatar{width:32px;height:32px;min-width:32px;border-radius:11px;background:var(--lavender);display:grid;place-items:center;font-size:13px;font-weight:800;color:var(--violet)}.player-actions{display:flex;gap:5px}.player-actions button{font-size:12px;padding:8px 10px;min-height:44px}.badge{font-size:11px;background:#ddf7eb;color:#2c7255;padding:5px 8px;border-radius:10px}.badge.pending{background:#fff0cf;color:#876324}.round-bar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:28px 0 18px}.round-bar>div:first-child{display:flex;flex-direction:column;gap:9px}.round-bar strong{font-size:21px;color:var(--navy)}.timer{display:flex;flex-direction:column;align-items:center;background:white;border:1px solid var(--line);border-radius:16px;min-width:150px;padding:12px 20px}.timer span{font-size:11px;color:var(--muted)}.timer strong{font-size:31px;font-variant-numeric:tabular-nums;letter-spacing:1px}.timer.urgent strong{color:var(--red)}.play-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px;align-items:start}.prompt{font-size:24px;line-height:1.5;color:var(--navy);white-space:pre-wrap;overflow-wrap:anywhere;margin-bottom:15px}.math-keys{display:flex;gap:7px;margin-top:10px;flex-wrap:wrap}.math-keys button{min-width:45px;min-height:44px;padding:8px 11px;font-size:18px}.choices{display:grid;gap:10px;margin:20px 0}.choices button{background:#f2efff;text-align:left;font-size:18px;font-weight:600;border:2px solid transparent;white-space:pre-wrap;overflow-wrap:anywhere}.choices button.selected{border-color:var(--violet);background:#e8e1ff}.scratch-card{padding:19px}.scratch-card summary{padding:7px;min-height:48px;font-weight:700;color:var(--navy)}.scratch-card summary small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin:6px 0 0 16px}.paper-tools{display:flex;gap:8px;padding:12px 0}.paper-tools button{font-size:13px}canvas{display:block;width:100%;height:330px;touch-action:none;border:1px solid var(--line);border-radius:12px;cursor:crosshair;background-color:#fff;background-image:linear-gradient(#e5edf780 1px,transparent 1px),linear-gradient(90deg,#e5edf780 1px,transparent 1px);background-size:22px 22px}.scratch-card p{margin:12px 3px 0}.received{background:#e5faf0;border-radius:18px;padding:24px;margin-top:24px}.received>span{color:#2a7c58;font-size:33px}.received h3{margin:10px 0}.received p{margin:0;color:#41715c;font-size:14px}#finish{margin-top:20px}.results-intro{text-align:center;padding:20px}.results-intro h2{font-size:34px;margin:15px 0}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;text-align:left;font-size:15px}th{padding:13px 15px;color:var(--muted);font-size:12px;background:#f7f8fc}td{padding:16px 15px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}tbody tr:first-child td{background:#f4fff9}.review{margin-top:22px}.review summary{padding:5px;font-size:18px;font-weight:700;min-height:44px}.review-item{padding:18px 0;border-top:1px solid var(--line);margin-top:15px}.review-item p{margin-bottom:7px;overflow-wrap:anywhere;white-space:pre-wrap}.review-item .result-ok{color:#25704c}.review-item .result-no{color:#8e444b}footer{padding:24px 10px 0;text-align:center;font-size:11px;color:#818a9e;max-width:750px;margin:auto}#join-code{text-transform:uppercase;letter-spacing:4px;font-size:22px;font-weight:750}#answer{font-size:24px;min-height:59px}#room-setup>form>.primary{margin-bottom:6px}[hidden]{display:none!important}@media(max-width:800px){.hero{padding:30px}.medal{width:140px;height:140px;min-width:140px}.medal-star{font-size:62px}.medal-ribbon{top:100px}.entry-grid,.play-grid{grid-template-columns:1fr}.lobby-grid{gap:22px}.hero h1{font-size:36px}.scratch-card{order:2}canvas{height:330px}}@media(max-width:540px){main{padding:4px 16px 20px}.topbar{padding:17px 16px}.brand-light{display:none}.brand{font-size:18px}.hero{padding:28px 24px}.hero h1{font-size:34px}.hero p{font-size:15px}.medal{display:none}.card{padding:22px}.lobby-grid,.form-grid{grid-template-columns:1fr}.room-heading h1{font-size:29px}.room-meta{padding:16px;gap:12px;flex-wrap:wrap}.room-meta strong{font-size:24px}.connection{width:100%;margin-left:0}.room-meta button{margin-left:auto}.round-bar{gap:10px}.timer{min-width:130px;padding:10px}.round-bar strong{font-size:18px}.timer strong{font-size:29px}.prompt{font-size:22px}.room-heading .text-button{font-size:12px;padding:10px}.results-intro h2{font-size:29px}th,td{padding:12px 8px}.inline-form{flex-wrap:wrap}.inline-form button{width:100%}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.question-diagram{margin:18px 0}.diagram-scroll{overflow:auto;border:1px solid var(--line);border-radius:14px;background:#fff}.diagram-scroll img{display:block;width:100%;max-width:600px;height:auto;margin:auto}.diagram-scroll.expanded img{width:600px;max-width:none}.question-diagram>button{margin-top:8px;font-size:13px;min-height:44px}

#recovery-value { overflow-wrap:anywhere; }
