@import url('/assets/fonts/fonts.css');
:root{font-family:'DM Sans',sans-serif;color:#fff9f5;color-scheme:dark;background:#1b1239;--gold:#ffe7a0}*{box-sizing:border-box}body{margin:0;min-height:100svh;background:radial-gradient(ellipse at 12% 15%,#278abc88,transparent 48%),radial-gradient(ellipse at 90% 70%,#b43ae277,transparent 55%),linear-gradient(150deg,#152b67,#38205d 55%,#15122e);background-attachment:fixed}body:before{content:'';position:fixed;inset:0;pointer-events:none;opacity:.45;background-image:radial-gradient(1px 1px at 10% 20%,white 99%,transparent),radial-gradient(2px 2px at 70% 45%,#f4d3ff 99%,transparent),radial-gradient(1px 1px at 35% 80%,white 99%,transparent);background-size:210px 190px,340px 270px,170px 250px}button,a{touch-action:manipulation}button{font:inherit;color:inherit;cursor:pointer;border:1px solid #b3b5e74d;border-radius:12px;background:#231d49;padding:10px 16px}button:hover{background:#423969}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #fff1ab;outline-offset:4px}a{color:inherit;text-decoration:none}header{position:relative;display:flex;align-items:center;justify-content:space-between;padding:14px 4%;border-bottom:1px solid #ffffff20;background:#17132b80;gap:14px}header a{font-size:14px}header button{font-size:13px}.brand{font-size:11px;letter-spacing:3px;color:#ddcff2}main{position:relative;max-width:1100px;margin:auto;padding:34px 24px}h1,h2,.bubble,.equation,.stat strong{font-family:'Fredoka',sans-serif}h1{font-size:clamp(48px,7vw,76px);line-height:1;margin:10px 0;color:#ffdfba;font-weight:500;text-shadow:0 3px 0 #71416e,0 0 32px #e989bd55}.intro{text-align:center}.eyebrow{font-size:11px;letter-spacing:4px;color:#d8c5ff;text-transform:uppercase}.intro p{color:#ddd4f2;line-height:1.7;margin:16px auto 22px;max-width:600px}.intro .wand-art{width:60px;height:70px;transform:rotate(-15deg);filter:drop-shadow(0 0 12px #ffd28a);vertical-align:middle}.setup{max-width:820px;margin:25px auto;background:#17132cbb;border:1px solid #d5baf144;border-radius:24px;padding:28px;box-shadow:0 25px 70px #08061755}fieldset{border:0;padding:0;margin:0 0 25px}legend{font-weight:700;font-size:18px;margin-bottom:14px}.table-actions{float:right;font-size:12px;padding:5px 10px;margin-top:-42px}.tables{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.tables button{font-family:'Fredoka',sans-serif;font-size:22px;padding:14px}.tables button[aria-pressed=true]{background:linear-gradient(135deg,#ffd899,#f4a4bf);color:#3a204a;border-color:#fff2bc;box-shadow:0 3px 0 #885b79}.modes{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.modes label{cursor:pointer;border:1px solid #8c81b566;border-radius:14px;padding:12px 8px;display:flex;flex-direction:column;align-items:center;gap:8px;color:#dcd4ec}.modes label:has(input:checked){border-color:#efd496;background:#594065;color:white}.modes input{accent-color:#f9ca90}.modes strong{font-size:14px}.modes small{font-size:12px}.rules{text-align:center;color:#eee0f7;font-size:14px;line-height:1.7}.best{text-align:center;color:#ffdd9a;font-size:13px}.play{display:block;width:100%;font-weight:700;font-size:20px;padding:16px;background:linear-gradient(100deg,#ffd492,#eda2d1);color:#362140;border:1px solid #ffe8b4;box-shadow:0 4px 0 #805279}.play:hover{background:#ffe4bb}.fine{font-size:12px;color:#cbbfdd;text-align:center;line-height:1.6}.play-main{max-width:none;padding:0}.hud{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:center;padding:18px 4% 10px;background:#20163b88}.equation{font-size:clamp(27px,5vw,46px);padding:12px 28px;background:#fdf2de;color:#462458;border-radius:18px;box-shadow:0 4px 0 #a082b3;text-align:center;min-width:200px}.stat{display:flex;flex-direction:column;gap:3px}.stat span{font-size:10px;text-transform:uppercase;letter-spacing:2px;color:#d4c3e6}.stat strong{font-size:30px}.stat:last-child{text-align:right}.play-controls{display:flex;align-items:center;justify-content:space-between;padding:8px 4%;gap:12px;font-size:12px;color:#e6d6f2}.play-controls button{font-size:12px;padding:7px 14px}.field{position:relative;height:calc(100svh - 275px);min-height:320px;max-height:900px;overflow:hidden;isolation:isolate;cursor:url('/assets/pop-wand.svg') 10 11,crosshair;background:radial-gradient(ellipse at 18% 75%,#499de142,transparent 50%),radial-gradient(ellipse at 80% 65%,#be5eb84d,transparent 50%)}.field:after{content:'';position:absolute;left:-10%;right:-10%;bottom:-90px;height:200px;pointer-events:none;border-radius:50%;background:#8475d42b;box-shadow:0 -20px 90px #aba4f355;z-index:-1}.bubble{position:absolute;left:0;top:0;width:clamp(54px,8vw,88px);height:clamp(54px,8vw,88px);padding:0;border-radius:50%;color:#422642;font-weight:500;font-size:clamp(20px,3vw,28px);border:1.5px solid #fff4cc;cursor:inherit;background:radial-gradient(ellipse at 29% 19%,#fff 0%,#fffae3cc 8%,transparent 22%),radial-gradient(ellipse at 70% 83%,#fca28faa,transparent 50%),radial-gradient(ellipse at 30% 65%,#ffe798dd,transparent 55%),conic-gradient(from 20deg,#ffddacdd,#ffd0e9ee,#ffc2a5ee,#fff5c3ee,#efc7ffee,#ffddacdd);box-shadow:inset 0 0 8px #fff,inset -6px -7px 15px #e7809c77,0 0 18px #ffd6a33b,0 4px 8px #0d08233b;text-shadow:0 1px #fff8;will-change:transform}.bubble:hover{background-color:#fff0c9}.bubble:before{content:'';position:absolute;inset:5px;border:1px solid #fff7;border-radius:50%;pointer-events:none}.bubble.wrong:after{content:'×';position:absolute;inset:-2px;display:grid;place-items:center;border:3px solid #cf355d;border-radius:50%;background:#ffddd0db;color:#ac1644;font:600 42px 'Fredoka',sans-serif}.bubble:focus-visible{outline:3px solid #fff;outline-offset:5px}.point-feed{position:absolute;right:22px;top:10px;z-index:3;pointer-events:none;display:flex;flex-direction:column;gap:6px}.points{font-weight:700;font-size:23px;border-radius:12px;padding:5px 12px;background:#1b153fe8;color:#8dffc0}.points.loss{color:#ffb0bd}.burst{position:absolute;pointer-events:none;font-size:48px;color:#ffe8a3;text-shadow:0 0 15px #ff9de5}.play-help{text-align:center;color:#d9cbea;font-size:12px;margin:8px 15px}.result{max-width:700px;margin:25px auto;text-align:center;background:#19142dc7;border:1px solid #c1a7db55;padding:36px 24px;border-radius:24px;overflow:hidden}.result h1{font-size:48px}.result .total{font-family:'Fredoka';font-size:88px;color:#ffe0a0;margin:15px 0}.result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:24px 0}.result-grid strong{display:block;font-size:25px;color:#ffe5c2}.result-grid span{font-size:12px;color:#ddd0ee}.result-actions{display:flex;justify-content:center;gap:12px;margin-top:24px;flex-wrap:wrap}.result-actions .play{width:auto}.magic{font-size:44px;letter-spacing:12px;color:#ffd28d;text-shadow:0 0 18px #e770ff,30px -10px #bfabff,-30px 10px #8be4ff}.paused{position:absolute;inset:0;z-index:5;display:grid;place-content:center;text-align:center;background:#17122bea;padding:25px;cursor:default}.paused h2{font-size:35px}.paused p{max-width:400px;line-height:1.7}.paused button{background:#f7d4a2;color:#3b234c;font-weight:700}footer{font-size:11px;text-align:center;color:#c9bddb;padding:15px;position:relative}.skip{position:fixed;top:-100px;z-index:10;background:#fff;color:#201a39;padding:12px}.skip:focus{top:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:650px){header{padding:10px 16px}.brand{display:none}main{padding:22px 15px}.setup{padding:20px 15px}.tables{gap:8px}.tables button{padding:10px 4px;font-size:20px}.modes{grid-template-columns:repeat(2,1fr)}.hud{gap:8px;padding:12px 14px 8px}.equation{min-width:150px;padding:12px 10px}.stat strong{font-size:23px}.stat span{font-size:9px;letter-spacing:.5px}.play-controls{padding:10px 14px}.field{height:calc(100svh - 255px);min-height:300px}.point-feed{right:12px}.result h1{font-size:38px}.intro p{font-size:14px}}@media(prefers-reduced-motion:no-preference){.burst{animation:burst .45s ease-out forwards}.points{animation:points .8s ease-out forwards}.magic{animation:magic 1.4s ease-out}@keyframes burst{to{transform:scale(1.8) rotate(40deg);opacity:0}}@keyframes points{to{transform:translateY(-12px);opacity:0}}@keyframes magic{from{transform:scale(.6);opacity:.1}to{transform:scale(1);opacity:1}}}
@media(max-width:400px){.bubble{width:44px;height:44px;font-size:19px}.table-actions{float:none;margin:0 0 12px}.equation{min-width:135px;font-size:26px}.stat strong{font-size:21px}}
