:root{color-scheme:dark;--gold:#ffc43d;--cream:#fff2ce;--ink:#101722}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#0c1520;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
#game{display:block;width:100vw;height:100vh;touch-action:none;cursor:crosshair}
.hud{position:fixed;z-index:3;left:0;right:0;top:0;height:82px;padding:14px clamp(16px,4vw,52px);display:flex;align-items:center;gap:clamp(18px,4vw,64px);background:linear-gradient(#0a111bd9,transparent);pointer-events:none;text-shadow:0 2px 8px #000}
.brand{display:flex;align-items:center;gap:11px;margin-right:auto}.brand strong{display:block;color:var(--cream);font-size:18px;letter-spacing:.11em}.brand small,.stat small{display:block;color:#aeb9c4;font-size:9px;letter-spacing:.2em}.coin-mark{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;color:#5e3c00;font-weight:900;font-family:Georgia;background:radial-gradient(circle at 35% 30%,#fff5a6,#f7b51f 48%,#99600a);border:3px solid #ffe26c;box-shadow:0 0 22px #ffbd2d50}.stat{text-align:right}.stat strong{font:800 19px/1.2 tabular-nums,system-ui;color:white}.lives strong{color:var(--gold);font-size:13px;letter-spacing:4px}
.card{position:fixed;z-index:5;left:50%;top:50%;transform:translate(-50%,-50%);width:min(92vw,490px);padding:30px 38px 28px;text-align:center;color:#eaf1f5;background:linear-gradient(145deg,#172535ed,#0c1621f2);border:1px solid #ffffff24;border-radius:22px;box-shadow:0 30px 90px #000a,0 0 60px #eaa51d12;backdrop-filter:blur(12px)}
.big-coin{margin:-83px auto 13px;width:108px;height:108px;border-radius:50%;display:grid;place-items:center;font:900 58px Georgia;color:#704400;background:radial-gradient(circle at 32% 25%,#fff7a8 0,#ffc538 42%,#b36e08 78%);border:7px double #ffe774;box-shadow:0 16px 32px #0008,0 0 40px #ffba2a3d;transform:rotate(-8deg)}
.eyebrow{margin:7px 0;color:#e7ae3c;font-size:11px;font-weight:800;letter-spacing:.22em}.card h1,.card h2{margin:3px 0 10px;font-size:clamp(35px,8vw,55px);letter-spacing:.04em;line-height:1;color:#fff3cf}.card h2{font-size:36px}.card>p:not(.eyebrow){color:#b9c5cc;line-height:1.55;font-size:14px;margin:10px auto 22px;max-width:390px}.card button{border:0;border-radius:8px;padding:14px 28px;min-width:220px;color:#382400;background:linear-gradient(#ffdb60,#f1aa20);font-weight:900;letter-spacing:.08em;cursor:pointer;box-shadow:0 7px 0 #9b5f0b,0 12px 28px #0008}.card button:hover{filter:brightness(1.12);transform:translateY(-1px)}.controls{display:flex;justify-content:center;gap:24px;margin-top:25px;color:#82909b;font-size:11px}.compact{padding-top:25px}.hidden{display:none!important}
.tip{position:fixed;z-index:3;bottom:24px;left:50%;transform:translateX(-50%);padding:9px 15px;color:#dbe3e8;background:#07111bc2;border:1px solid #ffffff20;border-radius:30px;font-size:12px;transition:opacity .4s;pointer-events:none}.tilt{position:fixed;z-index:4;right:66px;bottom:21px;width:38px;height:38px;border:1px solid #ffffff2b;border-radius:50%;color:#8be1d0;background:#0b1520b8;font-size:17px;font-weight:800;cursor:pointer}.tilt.active{color:#0d2b26;background:#8be1d0;border-color:#d4fff2;box-shadow:0 0 16px #8be1d055}body.editing .tilt{display:none}.sound{position:fixed;z-index:4;right:22px;bottom:21px;width:38px;height:38px;border:1px solid #ffffff2b;border-radius:50%;color:#e5b84e;background:#0b1520b8;font-size:18px;cursor:pointer}
.hall{margin:18px auto -8px;padding-top:12px;border-top:1px solid #ffffff18;max-width:300px}.hall>strong{color:#d3a944;font-size:10px;letter-spacing:.18em}.hall ol{margin:7px 0 0;padding:0;list-style-position:inside;color:#8e9ca5;font:700 11px/1.5 tabular-nums,system-ui}.hall li::marker{color:#d3a944}.score-pop{position:fixed;z-index:7;left:50%;top:32%;color:#ffe36e;font-size:32px;font-weight:1000;text-shadow:0 4px 18px #000,0 0 20px #ffbd32;pointer-events:none;animation:scoreRise 1.1s ease-out forwards}@keyframes scoreRise{0%{opacity:0;transform:translate(-50%,10px) scale(.7)}20%{opacity:1;transform:translate(-50%,-10px) scale(1.1)}100%{opacity:0;transform:translate(-50%,-70px) scale(.9)}}
.restart-btn{position:fixed;z-index:4;right:202px;bottom:21px;height:38px;padding:0 15px;border:1px solid #ffffff2b;border-radius:20px;color:#dce5e9;background:#0b1520d9;font-size:10px;font-weight:900;letter-spacing:.08em;cursor:pointer}.restart-btn:hover{color:#fff;background:#263746}body.editing .restart-btn{display:none}
.edit-btn{position:fixed;z-index:4;right:112px;bottom:21px;height:38px;padding:0 16px;border:1px solid #ffffff2b;border-radius:20px;color:#ffd45e;background:#0b1520d9;font-size:11px;font-weight:900;letter-spacing:.1em;cursor:pointer}.editor-bar{position:fixed;z-index:6;left:50%;bottom:12px;transform:translateX(-50%);display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;width:max-content;max-width:calc(100vw - 24px);padding:10px 12px;border:1px solid #ffe07155;border-radius:13px;color:#dce5e9;background:#09131df7;box-shadow:0 12px 40px #0009}.editor-bar strong{color:#ffd45e;font-size:12px;letter-spacing:.12em}.editor-bar span{color:#93a2ad;font-size:11px;margin-right:8px}.editor-bar button{padding:8px 12px;border:1px solid #ffffff24;border-radius:7px;color:#dce5e9;background:#243342;cursor:pointer;font-size:10px;font-weight:800;white-space:nowrap}.editor-bar .new-poly{color:#291a00;background:#ffc94e;border-color:#ffe69b;font-size:11px;box-shadow:0 0 16px #ffc94e35}.editor-bar button.active{color:#211500;background:#75e9c4;border-color:#d4fff2}.editor-bar .done{color:#352000;background:#f8bd35;border-color:#ffd96b}.editor-bar .steer-tune{display:flex;align-items:center;gap:7px;padding:5px 9px;border:1px solid #ffffff24;border-radius:7px;color:#ffd45e;background:#243342;font-size:10px;font-weight:800;letter-spacing:.08em;white-space:nowrap}.editor-bar .steer-tune input[type=range]{width:104px;accent-color:#ffc94e;cursor:pointer}.editor-bar .steer-tune output{min-width:20px;text-align:right;color:#fff;font:800 11px/1 tabular-nums,system-ui}.editor-bar .steer-tune .mini{padding:3px 7px;font-size:11px;line-height:1}body.editing #game{cursor:move}body.editing .tip,body.editing .edit-btn{display:none}
@media(max-width:600px){.hud{height:68px;gap:13px;padding:10px 14px}.brand strong{font-size:13px}.brand small{display:none}.coin-mark{width:31px;height:31px}.stat strong{font-size:15px}.stat small{font-size:7px}.card{padding:26px 22px 23px}.big-coin{width:88px;height:88px;margin-top:-70px;font-size:47px}.controls{gap:12px;flex-direction:column}.tip{bottom:14px}.editor-bar{width:94vw;flex-wrap:wrap;justify-content:center}.editor-bar span{display:none}.editor-bar strong{width:100%;text-align:center}}
