:root{color-scheme:dark;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:#000;color:#e8e8e8}*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden;overscroll-behavior:none}header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 24px;border-bottom:1px solid #292929;flex-shrink:0}h1{margin:0;font-size:18px;font-weight:500}header p{margin:6px 0 0;font-size:11px;color:#999}nav{display:flex;gap:8px;align-items:center}button{font:inherit;color:#ccc;background:#0b0b0b;border:1px solid #414141;padding:10px 13px;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none}button:hover,button:focus-visible{border-color:#ffb800}button:focus-visible{outline:2px solid #ffb800}#level-select{font:inherit;color:#ccc;background:#0b0b0b;border:1px solid #414141;padding:8px;max-width:130px}main{position:relative;flex:1;min-height:0;isolation:isolate;overflow:hidden}canvas{width:100%;height:100%;display:block;image-rendering:pixelated;outline:none;touch-action:none}
/* Every gameplay control is anchored inside the canvas container. */
.bottom-hud{position:absolute;z-index:2;top:max(12px,env(safe-area-inset-top));left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));display:flex;align-items:flex-start;gap:12px;pointer-events:none;text-shadow:1px 2px #000}#health{display:flex;flex-wrap:wrap;gap:5px;max-width:35%;padding:6px;background:#0008}.heart{width:20px;height:19px;fill:#df3166;shape-rendering:crispEdges}.heart.empty{fill:#51303e}#enemy-health{margin-left:auto;max-width:46%;font-size:14px;line-height:1.6;text-align:right;padding:4px 8px;color:#ffbd93;white-space:pre-line;background:#0009}#enemy-health:empty{display:none}.jug{display:none}#timer{position:absolute;top:0;left:50%;transform:translateX(-50%);pointer-events:auto;font-size:10px;padding:7px 9px;background:#0009;font-variant-numeric:tabular-nums}.hud{position:absolute;z-index:2;top:58px;left:16%;right:16%;display:flex;justify-content:center;font-size:11px;pointer-events:none;text-align:center;text-shadow:1px 1px #000}#status{background:#0009;padding:6px 10px;max-width:100%}#status:empty{display:none}
.controls{position:absolute;z-index:3;inset:auto 0 max(16px,env(safe-area-inset-bottom));display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:0 max(24px,env(safe-area-inset-right)) 0 max(24px,env(safe-area-inset-left));pointer-events:none}.controls button,.controls #joystick{pointer-events:auto}.hint{white-space:pre-line;font-size:10px;color:#ccc;line-height:1.7;text-align:center;background:#0009;padding:8px;margin:0;align-self:center}#joystick{--size:116px;width:var(--size);height:var(--size);flex-shrink:0;position:relative;background:#08080870;border:1px solid #ffffff50;border-radius:50%;touch-action:none;user-select:none;-webkit-user-select:none}.cross{position:absolute;background:#ffffff20}.horizontal{height:26%;width:80%;top:37%;left:10%}.vertical{width:26%;height:80%;left:37%;top:10%}#stick{position:absolute;left:30%;top:30%;width:40%;height:40%;background:#b3b3b370;border:1px solid #eee9;border-radius:50%;pointer-events:none}.actions{display:flex;gap:20px;align-items:flex-end;padding-bottom:2px}.actions button{width:78px;height:78px;border-radius:50%;border-color:#d0bbff88;background:#21162c99;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px}.actions button.active{background:#643584cc;border-color:#d0bbff}.actions strong{font-size:26px;color:#e5d8ff}.actions small{font-size:9px;line-height:1.1;margin-top:3px;color:#e0d4eb;max-width:100%;overflow-wrap:anywhere}#a{margin-bottom:30px}
#overlay{position:absolute;z-index:5;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#000b;text-align:center;padding:20px}#overlay[hidden]{display:none}h2{font-size:clamp(16px,3vw,24px);max-width:650px}footer{text-align:center;font-size:10px;line-height:1.5;color:#777;padding:8px 16px;flex-shrink:0;border-top:1px solid #222}footer a{color:#bda58a;text-decoration:none;margin-left:12px}footer a:hover{text-decoration:underline}
@media(max-width:650px){header{padding:8px 12px;flex-wrap:wrap}h1{font-size:15px}header p{font-size:9px}nav{gap:5px;max-width:100%;overflow:auto}nav button{font-size:10px;padding:8px}#level-select{font-size:10px;max-width:90px;padding:6px}.hint,footer{display:none}.hud{left:10px;right:10px;font-size:10px}.controls{padding-inline:14px}.actions{gap:12px}.actions button{width:66px;height:66px}#joystick{--size:102px}#enemy-health{font-size:11px}}
@media(orientation:landscape) and (max-height:600px){header{padding:5px max(12px,env(safe-area-inset-right)) 5px max(12px,env(safe-area-inset-left));gap:10px;flex-wrap:nowrap}h1{font-size:13px;white-space:nowrap}header p,footer,.hint{display:none}nav{gap:5px;overflow-x:auto}nav button,#level-select{font-size:10px;padding:7px;white-space:nowrap}.controls{bottom:max(12px,env(safe-area-inset-bottom));padding-inline:max(20px,env(safe-area-inset-left)) max(20px,env(safe-area-inset-right))}#joystick{--size:100px}.actions button{width:64px;height:64px}.actions{gap:18px}.actions strong{font-size:23px}.actions small{font-size:8px}#a{margin-bottom:22px}.bottom-hud{top:9px}.heart{width:15px;height:14px}#enemy-health{font-size:11px;max-width:38%}#timer{font-size:9px;padding:5px 7px}.hud{top:43px;left:20%;right:20%;font-size:10px}}
@media(orientation:landscape) and (max-height:350px){#joystick{--size:84px}.actions button{width:56px;height:56px}.controls{bottom:8px}.hud{top:38px;font-size:9px}}
/* Release shell: the canvas owns the entire viewport, including beneath controls. */
main{position:absolute;inset:0;width:100%;height:100dvh}
#dev-tools{position:absolute;z-index:6;top:0;left:0;right:0;background:#000c}
#dev-tools[hidden]{display:none}
.hud{display:none}
#info{position:absolute;z-index:4;left:50%;top:max(10px,env(safe-area-inset-top));transform:translateX(-50%);width:44px;height:44px;padding:0;border-radius:50%;font:italic 24px Georgia,serif;color:#fff;background:#0006;border-color:#ffffff60}
.local-tools #info,.local-tools .bottom-hud{top:82px}
#help{max-width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 24px);overflow:auto;padding:20px 28px;background:#111e;color:#eee;border:1px solid #777;text-align:center;z-index:20}
#help::backdrop{background:#000a}
#help h2{margin:0 0 12px}.help-copy{white-space:pre-line;line-height:1.8;font-size:13px}#help button{min-height:44px;margin:4px}#time-remaining{font-variant-numeric:tabular-nums}.credits{font-size:10px;margin-bottom:0}.credits a{color:#bda58a}
@media(orientation:landscape) and (max-height:600px){.local-tools #info,.local-tools .bottom-hud{top:48px}#help{padding:12px 24px}#help h2{font-size:16px;margin-bottom:8px}.help-copy{font-size:11px;line-height:1.6;margin:8px 0}.credits{margin:6px 0}#time-remaining{margin:8px 0}}
/* Help sits beside the direction controls, outside their touch target. */
#info,.local-tools #info{top:auto;left:max(24px,env(safe-area-inset-left));bottom:calc(max(16px,env(safe-area-inset-bottom)) + 130px);transform:none}
@media(max-width:650px){#info,.local-tools #info{left:max(14px,env(safe-area-inset-left));bottom:calc(max(16px,env(safe-area-inset-bottom)) + 116px)}}
@media(orientation:landscape) and (max-height:600px){#info,.local-tools #info{left:max(20px,env(safe-area-inset-left));bottom:calc(max(12px,env(safe-area-inset-bottom)) + 112px)}}
@media(orientation:landscape) and (max-height:350px){#info,.local-tools #info{bottom:104px}}
.actions button.recovering{opacity:.5;border-color:#777;transition:opacity .1s linear}

/* Native Telegram chrome and device cutouts must not cover gameplay controls. */
:root{--joystick-base:116px;--game-safe-top:max(env(safe-area-inset-top,0px),var(--telegram-inset-top,0px));--game-safe-right:max(env(safe-area-inset-right,0px),var(--telegram-inset-right,0px));--game-safe-bottom:max(env(safe-area-inset-bottom,0px),var(--telegram-inset-bottom,0px));--game-safe-left:max(env(safe-area-inset-left,0px),var(--telegram-inset-left,0px))}
html{overscroll-behavior:none}body{position:fixed;inset:0;width:100%}.controls{touch-action:none;bottom:calc(12px + var(--game-safe-bottom));padding-left:calc(20px + var(--game-safe-left));padding-right:calc(20px + var(--game-safe-right))}
#joystick{--size:calc(var(--joystick-base)*1.7)}
#info,.local-tools #info{left:calc(20px + var(--game-safe-left));bottom:calc(28px + var(--game-safe-bottom) + var(--joystick-base)*1.7)}
@media(max-width:650px){:root{--joystick-base:102px}}
@media(orientation:landscape) and (max-height:600px){:root{--joystick-base:100px}}
@media(orientation:landscape) and (max-height:350px){:root{--joystick-base:84px}}
.actions button.counter-ready{opacity:1;border-color:#ffda78;box-shadow:0 0 14px #ffc04d80}
@media(prefers-reduced-motion:reduce){.actions button.recovering{transition:none}}

/* Enemy lives use the same heart artwork and responsive size as the prince. */
.enemy-name{display:block}
.enemy-hearts{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px;margin-top:4px}
.enemy-hearts .heart{fill:currentColor;flex-shrink:0}
.enemy-hearts .heart.empty{fill:#563b2d}

/* Aurora Maximalism: a luminous death scene over the original game canvas. */
#overlay:has(.death-card:not([hidden])){z-index:30;background:radial-gradient(ellipse at 18% 8%,#5d34d096,transparent 58%),radial-gradient(ellipse at 88% 80%,#ff006e65,transparent 60%),#0a0014e8;backdrop-filter:blur(8px);overflow:auto;justify-content:flex-start;padding:max(24px,env(safe-area-inset-top)) 20px max(24px,env(safe-area-inset-bottom));font-family:Inter,"Helvetica Neue",system-ui,sans-serif}
.death-card{position:relative;isolation:isolate;flex-shrink:0;width:min(100%,520px);margin:auto;padding:30px 34px 24px;border:1px solid #b497ff66;border-radius:28px;background:radial-gradient(ellipse at 0 0,#5d34d069,transparent 65%),radial-gradient(ellipse at 100% 45%,#ff006e29,transparent 68%),#100720;box-shadow:0 0 90px #5d34d050,inset 0 1px #ffffff20;color:#fff;overflow:hidden}
.death-card[hidden],#result-screen[hidden]{display:none}
.death-card::before{content:"";position:absolute;z-index:-1;inset:-100px;background:conic-gradient(from 20deg at 50% 45%,transparent 15%,#5d34d04a 23%,transparent 31%,#ff006e29 51%,transparent 63%,#00f0ff25 79%,transparent 87%);filter:blur(22px);animation:death-aurora 16s ease-in-out infinite alternate;pointer-events:none}
.death-count{display:inline-block;color:#b7a2dd;font-size:12px;letter-spacing:.14em;text-transform:uppercase;font-variant-numeric:tabular-nums}
#death-title{max-width:none;margin:14px -8px 0;font-size:clamp(36px,7vw,56px);line-height:1.04;font-weight:850;letter-spacing:-.065em;background:linear-gradient(110deg,#fff 15%,#d9b9ff 50%,#ff65bc 85%);background-clip:text;color:transparent;text-shadow:0 0 40px #ff006e25}
.death-art{position:relative;display:flex;align-items:center;justify-content:center;height:145px;margin:10px -12px 6px;isolation:isolate}
.death-art::before{content:"";position:absolute;z-index:-1;inset:15% 5%;border-radius:50%;background:linear-gradient(100deg,#5d34d0,#ff006e,#00f0ff);filter:blur(35px);opacity:.42}
.death-art img{position:relative;width:min(100%,358px);height:auto;filter:drop-shadow(0 15px 16px #0009);transform:translateY(9px)}
.death-orbit{position:absolute;width:82%;height:60px;bottom:22px;border-radius:50%;border:1px solid #00f0ff70;box-shadow:0 0 25px #00f0ff28,inset 0 0 20px #5d34d040;transform:rotate(-5deg)}
.death-description{font-size:15px;line-height:1.55;max-width:360px;margin:0 auto 15px;color:#d0c4e2;text-wrap:balance}
.death-meter{display:grid;gap:8px;margin-bottom:20px;font-size:12px;color:#a998bf;font-variant-numeric:tabular-nums}.death-meter:has(progress[hidden]){display:none}
.death-meter progress{appearance:none;width:100%;height:4px;border:0;border-radius:10px;background:#ffffff14;overflow:hidden}.death-meter progress::-webkit-progress-bar{background:#ffffff14}.death-meter progress::-webkit-progress-value{background:linear-gradient(90deg,#a875ff,#ff006e,#00f0ff);border-radius:10px}.death-meter progress::-moz-progress-bar{background:linear-gradient(90deg,#a875ff,#ff006e,#00f0ff)}
.death-card button{font-family:inherit;touch-action:manipulation}
.death-primary{width:100%;min-height:58px;padding:15px;border:1px solid #c2a0ff;border-radius:14px;background:linear-gradient(105deg,#7946e8 0%,#a038df 50%,#dc168b 100%);color:#fff;font-size:16px;line-height:1.25;font-weight:750;box-shadow:0 6px 30px #9a28d555,inset 0 1px #ffffff3b;transition:filter .15s,transform .15s}
.death-primary:hover:not(:disabled){filter:brightness(1.15);transform:translateY(-1px)}.death-primary:disabled{opacity:.6;cursor:wait}
.death-offer{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:72px;margin:12px 0 0;padding:16px 18px;text-align:left;border:1px solid #00f0ff55;border-radius:14px;background:linear-gradient(105deg,#00f0ff10,#5d34d01f);color:#ccfaff;font-size:14px;line-height:1.4}
.death-offer strong{color:#fff;font-size:18px;white-space:nowrap;letter-spacing:-.04em}.death-offer:hover{border-color:#00f0ff;box-shadow:0 0 25px #00f0ff18}.death-offer[hidden]{display:none}
.death-notice{font-size:12px;line-height:1.5;color:#e5bde4;margin:14px 0 0}.death-notice:empty{display:none}
.death-payment{position:absolute;z-index:2;inset:0;padding:52px 26px 24px;display:flex;flex-direction:column;justify-content:center;gap:10px;background:linear-gradient(140deg,#24123d,#0a1220);border-radius:28px;overflow:auto;text-align:left}.death-payment[hidden]{display:none}.death-payment h3{margin:0;font-size:27px;letter-spacing:-.05em}.death-payment p{font-size:13px;line-height:1.5;color:#c2b1d6;margin:0 0 4px}.death-payment label{font-size:11px;color:#a698bd}.death-payment code{display:block;overflow-wrap:anywhere;font-size:11px;line-height:1.5;color:#d8d0e7;background:#ffffff08;border-radius:8px;padding:9px}
.payment-close{position:absolute;right:16px;top:16px;padding:5px 9px;border:0;background:transparent;font-size:12px}.payment-wallet{display:block;margin-top:8px;padding:14px;text-align:center;text-decoration:none;color:#fff;font-size:14px;font-weight:700;border-radius:12px;background:linear-gradient(100deg,#5d34d0,#ad2799)}.payment-actions{display:flex;gap:8px}.payment-actions button{flex:1;font-size:11px;padding:10px 6px;border-radius:9px;background:#ffffff09;border-color:#ffffff30}
@keyframes death-aurora{to{transform:rotate(12deg) scale(1.12)}}
@media(max-width:430px){.death-card{padding:24px 22px 22px;border-radius:24px}.death-offer{padding:14px;font-size:12px;gap:12px}.death-offer strong{font-size:17px}.death-art{height:128px}.death-description{font-size:14px}.death-payment{border-radius:24px;padding-inline:22px}}
@media(orientation:landscape) and (max-height:600px){#overlay:has(.death-card:not([hidden])){padding:16px 20px}.death-card{width:min(100%,680px);display:grid;grid-template-columns:1fr 1fr;gap:0 28px;padding:24px 30px;text-align:left}.death-count{grid-column:1;grid-row:1}#death-title{grid-column:1;grid-row:2;font-size:42px;margin:8px 0 0}.death-art{grid-column:1;grid-row:3 / 7;height:120px;margin:0 -6px}.death-description{grid-column:2;grid-row:1 / 3;margin:0 0 12px;font-size:13px}.death-meter{grid-column:2;grid-row:3;margin-bottom:12px}.death-primary{grid-column:2;grid-row:4;min-height:48px;font-size:14px}.death-offer{grid-column:2;grid-row:5;min-height:58px;font-size:11px;padding:12px}.death-offer strong{font-size:16px}.death-notice{grid-column:2;grid-row:6;font-size:11px}.death-payment{display:grid;grid-template-columns:1fr 1fr;align-content:center;gap:8px 20px;padding:36px 26px 18px}.death-payment h3,.death-payment p{grid-column:1 / -1}.death-payment label{display:none}.payment-wallet{grid-column:1;margin:0}.payment-actions{grid-column:2}}
@media(prefers-reduced-motion:reduce){.death-card::before{animation:none}.death-primary{transition:none}}

#treasure-hud{position:absolute;z-index:3;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;gap:9px;align-items:center;pointer-events:none}
#gram-balance{display:flex;align-items:center;gap:6px;background:linear-gradient(135deg,#251d11ed,#120f0ce6);border:1px solid #c7984966;border-radius:20px;padding:6px 12px 6px 7px;box-shadow:0 2px 12px #0008;color:#ffe3a3;font-size:14px;font-variant-numeric:tabular-nums;text-shadow:0 1px 2px #000}
#gram-balance img{width:24px;height:24px;object-fit:contain}#gram-balance span{font-size:10px;letter-spacing:1px}#key-inventory{display:flex;align-items:center;gap:3px;color:#ffe3a3;background:#17110bcc;border-radius:16px;padding:4px 8px}#key-inventory img{width:22px;height:22px;object-fit:contain}
#treasure-prompt{position:absolute;z-index:4;bottom:max(26px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:44%;padding:11px 16px;border:1px solid #d5a957;border-radius:12px;background:#241a0feb;color:#ffe4a5;font-size:12px;box-shadow:0 0 20px #e1a34022;touch-action:manipulation}
.local-tools #treasure-hud{top:82px}
@media(orientation:landscape) and (max-height:600px){#treasure-hud{top:9px}.local-tools #treasure-hud{top:48px}#gram-balance{padding:4px 8px;font-size:12px}#gram-balance img{width:20px;height:20px}#treasure-prompt{font-size:10px;padding:8px 12px}}

#key-inventory[hidden],#treasure-prompt[hidden]{display:none}

/* Death window v2: sharp custom art, explicit ad rule and Connect Wallet stub. */
.death-card{padding:30px 30px 26px}
#death-title{margin:0;font-size:clamp(38px,7vw,60px);letter-spacing:-.055em}
.death-art{height:165px;margin:18px -10px 14px}
.death-art img{width:100%;max-width:440px;transform:none;filter:drop-shadow(0 18px 18px #08001688)}
.death-art::after{content:"";position:absolute;z-index:-1;bottom:22px;left:12%;right:12%;height:12px;border-radius:50%;background:#0a0014;filter:blur(14px)}
.death-rule{margin:0 0 12px;font-size:13px;color:#c7a5f0;line-height:1.5;text-wrap:balance}
.death-description{font-size:14px;margin-bottom:16px}
.death-primary:focus-visible,.death-offer:focus-visible{outline:2px solid #9eeeff;outline-offset:4px}
.gram-price{display:flex;align-items:center;gap:7px;flex-shrink:0}.gram-price img{width:28px;height:28px;object-fit:contain;filter:drop-shadow(0 0 7px #30a1f544)}.gram-ticker{font-size:11px;color:#b9a9d1;letter-spacing:.03em;font-weight:600}
.death-payment{align-items:center;text-align:center;gap:18px;background:radial-gradient(ellipse at 20% 20%,#5d34d04a,transparent 70%),linear-gradient(140deg,#160d2b,#0c101f)}
.wallet-gram-logo{filter:drop-shadow(0 0 25px #30a1f540)}.wallet-price{font-size:30px;letter-spacing:-.05em}.death-payment .payment-wallet{width:100%;border:1px solid #8fc4ff80;background:linear-gradient(105deg,#387bf5,#6d41dc);padding:16px;font-size:16px;box-shadow:0 4px 25px #384af530}.death-payment #wallet-placeholder{font-size:12px;color:#bbb1ce;line-height:1.6}
@media(max-width:430px){.death-card{padding:26px 22px 24px}.death-art{height:135px;margin-block:16px}.death-offer{gap:10px}.gram-price img{width:25px;height:25px}.gram-ticker{font-size:10px}.death-rule{font-size:12px}.death-description{font-size:13px}}
@media(orientation:landscape) and (max-height:600px){.death-card{padding:24px 30px}#death-title{grid-column:1;grid-row:1 / 3;margin:0;font-size:42px}.death-art{grid-column:1;grid-row:3 / 7;height:124px;margin:8px -8px 0}.death-rule{grid-column:2;grid-row:1;font-size:11px;margin:0 0 8px}.death-description{grid-column:2;grid-row:2;font-size:12px;margin:0 0 12px}.death-meter{grid-column:2;grid-row:3}.death-payment{display:flex;gap:10px;padding:26px 60px}.wallet-gram-logo{width:44px;height:44px}.death-payment h3{font-size:24px}.wallet-price{font-size:24px}.death-payment .payment-wallet{width:min(100%,320px);margin-top:0;padding:12px}.death-payment #wallet-placeholder{margin:0}}

.local-tools #overlay:has(.death-card:not([hidden])){padding-top:max(86px,env(safe-area-inset-top))}
@media(orientation:landscape) and (max-height:600px){.local-tools #overlay:has(.death-card:not([hidden])){padding-top:64px}}

#key-inventory.key-arrived{animation:key-arrived .4s ease-out}@keyframes key-arrived{0%{transform:scale(1.45);filter:drop-shadow(0 0 10px #ffe399)}100%{transform:scale(1);filter:none}}

/* The game menu continues the Aurora palette used by the death window. */
.menu-open{position:absolute;z-index:4;top:max(12px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));display:flex;align-items:center;gap:9px;min-height:44px;padding:10px 15px;border-radius:14px;border-color:#ae8be866;background:linear-gradient(125deg,#5d34d088,#24113dcc);font:600 14px Inter,"Helvetica Neue",sans-serif;color:#fff;touch-action:manipulation;box-shadow:0 0 24px #5d34d040}
.local-tools .menu-open{top:82px}
#player-menu{width:min(720px,calc(100vw - 28px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #b497ff66;border-radius:28px;color:#f5efff;background:radial-gradient(ellipse at 0 0,#5d34d080,transparent 65%),radial-gradient(ellipse at 100% 80%,#ff006e35,transparent 65%),#100720;font:14px/1.5 Inter,"Helvetica Neue",system-ui,sans-serif;box-shadow:0 0 100px #5d34d066;overflow:auto;text-align:left;overscroll-behavior:contain}
#player-menu::backdrop{background:radial-gradient(ellipse at 20% 15%,#5d34d066,transparent 65%),#090013c9;backdrop-filter:blur(9px)}
#player-menu button,#player-menu input{font:inherit;touch-action:manipulation}
#player-menu .menu-heading{position:sticky;z-index:2;top:0;padding:25px 28px 18px;background:linear-gradient(120deg,#332060f5,#180c2af5);border:0}
#menu-title{margin:0;font-size:38px;letter-spacing:-.055em;line-height:1.1;background:linear-gradient(100deg,#fff,#ddaeff,#fa70bd);background-clip:text;color:transparent}
#player-menu .menu-text-button{border:0;color:#c7b5df;background:#ffffff08;border-radius:10px;padding:8px 12px;font-size:12px;min-height:38px}
.menu-tabs{display:flex;gap:6px;padding:0 28px 18px;flex-wrap:wrap}
.menu-tabs button{border:1px solid #b497ff22;border-radius:12px;color:#bbabcf;background:#ffffff05;padding:10px 14px;font-size:13px!important;flex:1;white-space:nowrap}
.menu-tabs button[aria-pressed="true"]{color:#fff;background:linear-gradient(115deg,#7946e8,#c028b1);border-color:#c19dff88;box-shadow:0 4px 20px #9a28d544}
.menu-body{padding:0 28px 22px}.menu-body h3{margin:6px 0 22px;font-size:27px;letter-spacing:-.045em;line-height:1.2}.menu-body h4{margin:0 0 16px;font-size:16px}.menu-body [hidden]{display:none!important}
.tasks-empty{text-align:center;padding:42px 15px 60px;color:#bcadd2}.tasks-empty svg{color:#bb8cfa;filter:drop-shadow(0 0 18px #5d34d0)}.tasks-empty p{margin-top:20px}
.menu-balance{padding:20px 24px;border-radius:20px;background:linear-gradient(120deg,#5d34d064,#ff006e25,#00f0ff13);box-shadow:inset 0 1px #ffffff20,0 0 45px #5d34d029}.menu-balance>span{color:#ccb8e5;font-size:12px}.menu-balance>div{display:flex;align-items:center;gap:14px;margin-top:5px}.menu-balance strong{font-size:54px;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-.04em;text-shadow:0 0 20px #ac80ff40}.menu-balance>div>span{color:#c8b5db;font-size:12px}
.balance-facts{display:flex;gap:12px;margin:18px 0 26px}.balance-facts>div{flex:1}.balance-facts dt{font-size:11px;color:#a996c2}.balance-facts dd{margin:5px 0 0;font-size:13px;font-variant-numeric:tabular-nums}
#withdraw-form{display:grid;gap:8px;padding:22px;border-radius:20px;background:#ffffff06;margin-bottom:26px}#withdraw-form h4{margin-bottom:4px}#withdraw-form label{font-size:12px;color:#c3b1d8}#withdraw-form input{width:100%;min-width:0;padding:12px 13px;border:1px solid #b497ff40;border-radius:10px;background:#0b0618a0;color:#fff;outline:none}#withdraw-form input:focus{border-color:#9beeff;box-shadow:0 0 0 2px #00f0ff15}.menu-primary{border-radius:12px;padding:13px;color:#fff;font-weight:700!important;background:linear-gradient(105deg,#7946e8,#dc168b);border:1px solid #c2a0ff88;margin-top:8px;min-height:48px}.menu-primary:disabled{opacity:.4;cursor:default}
.menu-caption{font-size:12px;color:#b1a0c5;margin:6px 0 0;line-height:1.6}#withdraw-history{list-style:none;padding:0;margin:0}#withdraw-history li{padding:15px 0;border-top:1px solid #b497ff20}#withdraw-history li>div{display:flex;justify-content:space-between;align-items:center;gap:10px}#withdraw-history p{overflow-wrap:anywhere;font-size:11px;color:#ad9bc2;margin:6px 0}#withdraw-history time{font-size:11px;color:#ad9bc2}#withdraw-history button{margin-left:12px}.withdraw-status{font-size:11px;color:#96eeeb}
.referral-group{margin:0 0 25px}.referral-rates{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0;margin:0;list-style:none}.referral-rates.coins{grid-template-columns:repeat(5,1fr)}.referral-rates li{min-width:0;padding:18px 12px;border-radius:17px;background:linear-gradient(145deg,#5d34d075,#ff006e28);box-shadow:inset 0 1px #ffffff22}.referral-rates li:nth-child(2n){background:linear-gradient(145deg,#ff006e40,#5d34d063)}.referral-rates li:nth-child(3n){background:linear-gradient(145deg,#00f0ff23,#5d34d063)}.referral-rates span{display:block;color:#c3addc;font-size:11px}.referral-rates strong{display:block;font-size:40px;letter-spacing:-.055em;color:#fff;line-height:1.3;text-shadow:0 0 24px #ce87ff50}
#player-menu .menu-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 28px;background:#08041250;border:0;color:#d7b4dc;text-align:left;font-size:12px}#menu-message{margin:0;flex:1}#menu-refresh{flex-shrink:0}
@media(max-width:650px){.local-tools .menu-open{top:128px}#player-menu{border-radius:22px}.menu-body{padding-inline:20px}#player-menu .menu-heading{padding:22px 20px 18px}.menu-tabs{padding-inline:20px;gap:5px}.menu-tabs button{padding:9px 10px;font-size:12px!important}.menu-tabs button[data-menu-section="referrals"]{flex-basis:100%}.referral-rates li{padding:15px 10px}.referral-rates strong{font-size:34px}.referral-rates.coins{gap:5px}.referral-rates.coins li{padding:13px 6px}.referral-rates.coins strong{font-size:27px}.referral-rates.coins span{font-size:9px}.balance-facts{gap:8px}.menu-balance strong{font-size:43px}.menu-balance{padding:18px}#withdraw-form{padding:18px}#player-menu .menu-footer{padding-inline:20px}}
@media(orientation:landscape) and (max-height:600px){.local-tools .menu-open{top:50px}#player-menu{max-height:calc(100dvh - 16px)}#player-menu .menu-heading{padding-block:14px}#menu-title{font-size:30px}}

#player-menu .menu-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}#player-menu .dialog-close,#help .dialog-close{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;min-height:44px;padding:0;margin:0;border:1px solid #ffffff40;border-radius:12px;background:#ffffff12;color:#fff;font:32px/1 system-ui,sans-serif;touch-action:manipulation}#help .dialog-close{position:absolute;top:10px;right:10px}#help h2{padding-inline:36px}#player-menu .dialog-close:hover,#help .dialog-close:hover{background:#ffffff25}

/* Static title screen and mandatory landscape gameplay. */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#launch-screen{position:fixed;inset:0;z-index:1000;background:#08090d;display:grid;place-items:center}
#launch-screen[hidden],#rotate-screen[hidden]{display:none}
#launch-banner{width:100%;height:100%;object-fit:contain}
.launch-actions{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:0;right:0;display:grid;justify-items:center;gap:8px;padding:0 20px}
#launch-play{position:relative;overflow:hidden;isolation:isolate;min-width:260px;min-height:72px;padding:18px 48px;border:2px solid #ffe2a0;border-radius:14px;background:linear-gradient(180deg,#ffe4a6 0%,#e9b85c 45%,#cc8e32 52%,#e6b354 100%);color:#38200a;font-size:26px;font-weight:800;letter-spacing:.04em;text-shadow:0 1px #fff1c9;box-shadow:inset 0 2px 0 #fff8d9,inset 0 -3px 0 #a66b25,0 6px 0 #744416,0 10px 0 #291708,0 14px 30px #000b,0 0 30px #edb85b33;touch-action:manipulation;transition:transform .12s,box-shadow .12s}
#launch-play::after{content:"";position:absolute;inset:-50% auto -50% -60%;width:35%;pointer-events:none;background:linear-gradient(90deg,transparent,#fff9 48%,#fff3 60%,transparent);transform:skewX(-22deg);animation:launch-play-shine 4s ease-in-out infinite}
#launch-play:active:not(:disabled){transform:translateY(5px);box-shadow:inset 0 2px 0 #fff8d9,inset 0 -3px 0 #a66b25,0 1px 0 #744416,0 5px 0 #291708,0 8px 20px #000b}
#launch-play:focus-visible{outline:3px solid #fff6dc;outline-offset:8px}
#launch-play:disabled{opacity:.65;cursor:wait}
#launch-play:disabled::after{animation:none}
@keyframes launch-play-shine{0%,55%{left:-60%}85%,100%{left:140%}}
@media(prefers-reduced-motion:reduce){#launch-play::after{animation:none}#launch-play{transition:none}}
#launch-error{max-width:560px;background:#100b08dd;padding:10px 16px;color:#ffd3bf;text-align:center;font-size:13px}
#rotate-screen{position:fixed;inset:0;z-index:1100;background:#08090d;color:#fff0d2;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:32px;gap:18px}
#rotate-screen h2{font-size:clamp(24px,6vw,34px);margin:0;max-width:380px}
#rotate-screen p{margin:0;max-width:340px;line-height:1.6;color:#c8bdab;font-size:16px}
.rotate-device{width:110px;height:64px;border:3px solid #dbb46a;border-radius:13px;font-size:54px;line-height:54px;color:#dbb46a;box-shadow:0 0 30px #dbb46a15}
@media(orientation:portrait){body>header,main{visibility:hidden}dialog[open],dialog::backdrop{visibility:hidden}}
@media(max-height:450px){#launch-play{min-width:230px;min-height:56px;padding:12px 36px;font-size:23px}.launch-actions{bottom:max(18px,env(safe-area-inset-bottom))}}

.menu-settings{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:20px;margin:0 28px 24px;padding:18px;border:1px solid #b497ff33;border-radius:18px;background:linear-gradient(130deg,#854be822,#00c8ff0c)}
.menu-wallet{min-width:0}.menu-wallet-heading{display:flex;gap:10px;align-items:center;color:#e5d9fa;font-weight:600}.menu-wallet-heading svg{color:#7eddf5;flex-shrink:0}#menu-wallet-address{overflow-wrap:anywhere;font:12px/1.6 ui-monospace,monospace;color:#8ee5e7;margin:10px 0 0}#player-menu #menu-wallet-connect{padding:10px 18px;min-height:44px;margin-top:14px;font-size:14px}#menu-wallet-rule{font-size:11px;margin:10px 0 0;max-width:440px}.menu-language{display:flex;flex-direction:column;gap:8px;color:#cbb9e2;font-size:12px}#menu-language{width:100%;min-height:44px;border:1px solid #b497ff66;border-radius:10px;background:#221439;color:#fff;padding:8px 10px;font:14px Inter,system-ui,sans-serif;cursor:pointer}#menu-language option{background:#221439;color:#fff}#menu-language:focus-visible{outline:2px solid #8ee5e7;outline-offset:3px}
@media(max-width:650px){.menu-settings{margin-inline:20px;grid-template-columns:minmax(0,1fr);gap:16px}.menu-language{flex-direction:row;align-items:center;justify-content:space-between}#menu-language{width:160px}}

.telegram-shell .menu-open{top:calc(12px + var(--game-safe-top));right:calc(16px + var(--game-safe-right))}
.telegram-shell .bottom-hud{top:calc(12px + var(--game-safe-top));left:calc(18px + var(--game-safe-left));right:calc(18px + var(--game-safe-right))}
.telegram-shell #treasure-hud{top:calc(12px + var(--game-safe-top))}
.telegram-shell #help,.telegram-shell #player-menu{inset:calc(12px + var(--game-safe-top)) calc(12px + var(--game-safe-right)) calc(12px + var(--game-safe-bottom)) calc(12px + var(--game-safe-left));margin:auto;max-height:calc(100dvh - var(--game-safe-top) - var(--game-safe-bottom) - 24px)}
.telegram-shell .actions{touch-action:none}

.referral-share{margin:0 0 26px;padding:18px;border:1px solid #8be8ef33;border-radius:17px;background:linear-gradient(130deg,#00d8ec13,#ac41e11c)}.referral-share label{display:block;margin-bottom:10px;color:#e9d9fb;font-weight:600}.referral-share-row{display:flex;gap:10px;align-items:center}#ref-link{min-width:0;flex:1;width:100%;padding:12px;border:1px solid #b497ff44;border-radius:10px;background:#120924;color:#b6eaf4;font:12px/1.5 ui-monospace,monospace!important;min-height:44px}#player-menu #ref-copy{flex-shrink:0;width:auto;padding:11px 16px;min-height:44px;margin:0;font-size:13px}#ref-link:focus-visible{outline:2px solid #8ee5e7;outline-offset:3px}@media(max-width:650px){.referral-share-row{flex-direction:column;align-items:stretch}#player-menu #ref-copy{width:100%}}
