: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}
.progress-memory{margin:-8px auto 18px;color:#a8f0e4;font-size:11px;font-weight:900;letter-spacing:.12em}
.coin-mark,.big-coin{background-image:url('assets/cricket-clean-atlas.png');background-size:600% 300%;background-position:left top;background-repeat:no-repeat;border:0;border-radius:0;box-shadow:none}
body[data-creature=legacy] .coin-mark,body[data-creature=legacy] .big-coin{background-image:url('assets/ChatGPT%20Image%20Sep%2022%2C%202026%2C%2008_00_26%20AM.png');background-size:300% 200%}
.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)}}
.level-stat strong{color:#a8f0e4}.level-pop{position:fixed;z-index:4;top:105px;left:50%;transform:translateX(-50%);padding:10px 22px;border:1px solid #a8f0e47a;border-radius:22px;color:#d8fff7;background:#102c37e8;font-size:12px;font-weight:900;letter-spacing:.14em;text-align:center;pointer-events:none;animation:levelReveal 2.4s ease-out forwards}@keyframes levelReveal{0%{opacity:0;transform:translate(-50%,-12px)}15%,70%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-8px)}}
.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}
.confirm-overlay{position:fixed;z-index:10;inset:0;display:grid;place-items:center;padding:20px;background:#050c15ba;backdrop-filter:blur(5px)}.confirm-dialog{width:min(92vw,400px);padding:28px;border:1px solid #ffe17a66;border-radius:18px;background:linear-gradient(145deg,#1d2c3b,#101a27);box-shadow:0 24px 80px #000c;text-align:center;color:#edf6f7}.confirm-dialog h2{margin:0 0 10px;color:#fff0c7;font-size:25px}.confirm-dialog p{margin:0 0 24px;color:#b9c8cf;font-size:14px;line-height:1.5}.confirm-actions{display:flex;gap:10px;justify-content:center}.confirm-actions button{min-width:0;flex:1;padding:12px 10px;border:1px solid #ffffff35;border-radius:9px;background:#2b3d4b;color:#eff8fa;font-size:11px;font-weight:900;letter-spacing:.04em;cursor:pointer}.confirm-actions button:last-child{background:#ffcb54;border-color:#ffe289;color:#322001}.confirm-actions button:hover{filter:brightness(1.12)}.confirm-actions button:focus-visible{outline:3px solid #a9fff0;outline-offset:3px}
.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:7px;padding:calc(10px + env(safe-area-inset-top)) 10px 10px}.brand{gap:6px}.brand strong{font-size:11px}.brand small,.best-stat{display:none}.coin-mark{width:27px;height:27px}.stat strong{font-size:13px}.stat small{font-size:7px}.lives strong{letter-spacing:1px}.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:calc(72px + env(safe-area-inset-bottom));max-width:90vw;text-align:center}.tilt,.sound{bottom:calc(14px + env(safe-area-inset-bottom))}.restart-btn,.edit-btn{bottom:calc(14px + env(safe-area-inset-bottom))}.editor-bar{bottom:calc(10px + env(safe-area-inset-bottom));width:94vw;flex-wrap:wrap;justify-content:center}.editor-bar span{display:none}.editor-bar strong{width:100%;text-align:center}body.flying .edit-btn,body.flying .restart-btn{opacity:0;pointer-events:none}}
.editor-bar .texture-control{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}
.texture-control select{padding:4px 7px;border:1px solid #9add5577;border-radius:5px;background:#14222a;color:#e8f6e9;font:800 10px system-ui;cursor:pointer}
