:root{color-scheme:dark;--ink:#f7f4ff;--muted:#b9b0df;--panel:rgba(18,14,51,.88);--violet:#8b66ff;--cyan:#5de9ff;--orange:#ff9c54;--pink:#ff80d4}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#100c2e;color:var(--ink);font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;touch-action:manipulation}
body{min-height:100dvh;background:radial-gradient(ellipse at 52% 0%,#34216f 0%,#17113f 42%,#100c2e 82%)}
button{font:inherit;color:inherit;border:0;cursor:pointer;touch-action:manipulation}
.app{height:100dvh;min-height:560px;max-width:560px;margin:0 auto;padding:calc(12px + env(safe-area-inset-top)) 16px calc(9px + env(safe-area-inset-bottom));display:flex;flex-direction:column;position:relative;overflow:hidden}
.topbar{height:40px;display:flex;align-items:center;justify-content:space-between;z-index:3;flex:none}.brand{display:flex;gap:9px;align-items:center;font-size:12px;font-weight:900;letter-spacing:.18em;color:#d9d2ff}.brand-mark{width:23px;height:23px;border:1px solid rgba(145,127,255,.7);border-radius:8px;display:grid;place-items:center;color:#91edff;font-size:14px;background:rgba(80,61,157,.32);box-shadow:0 0 18px #6244d555}.top-actions{display:flex;gap:7px}.sound-button,.pause-button{font-size:12px;font-weight:700;padding:8px 11px;border:1px solid #ffffff22;border-radius:999px;background:#ffffff0a;color:#e7e1ff}.pause-button{min-width:37px;font-size:14px;color:#99f3ff}.pause-button[hidden]{display:none}
.game-shell{position:relative;flex:1;min-height:0;margin-top:10px;border:1px solid #a995ff2b;border-radius:28px;overflow:hidden;background:linear-gradient(180deg,#1c1250 0%,#171247 55%,#20164e 100%);box-shadow:0 18px 60px #08051e80,inset 0 1px #ffffff12}
canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.hud{position:absolute;z-index:2;top:14px;left:14px;right:14px;display:flex;justify-content:space-between;pointer-events:none}.hud[hidden],.controls[hidden]{display:none}.hud-box{min-width:74px;padding:8px 12px;border:1px solid #ffffff20;border-radius:15px;background:#100c2eae;backdrop-filter:blur(10px);box-shadow:0 6px 20px #08051e33}.hud-box small{display:block;font-size:10px;letter-spacing:.08em;color:#bfb5e9;margin-bottom:2px}.hud-box strong{font-size:21px;line-height:1;font-variant-numeric:tabular-nums}.timer-box{text-align:center}.timer-box i{font-size:10px;font-style:normal;color:#c9c0ea;margin-left:3px}.lives{font-size:16px!important;letter-spacing:2px;color:#ff86be}
.screen{position:absolute;inset:0;z-index:4;display:flex;align-items:center;justify-content:center;padding:24px;text-align:center;background:linear-gradient(180deg,rgba(11,8,32,.2),rgba(11,8,32,.48))}.screen[hidden]{display:none}.intro-screen{align-items:center;flex-direction:column;padding-top:clamp(34px,9vh,80px)}.eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:11px;letter-spacing:.12em;color:#d4cbff;font-weight:800;text-transform:uppercase}.pulse-dot{width:7px;height:7px;border-radius:50%;background:#6bf3ff;box-shadow:0 0 12px #6bf3ff;animation:pulse 1.4s infinite}@keyframes pulse{50%{opacity:.45;transform:scale(.75)}}
h1{font-size:clamp(44px,12vw,66px);line-height:.91;letter-spacing:-.07em;margin:14px 0 12px;text-shadow:0 8px 28px #130a4b}.intro-screen h1 em{font-style:normal;color:#ffbc74;text-shadow:0 0 24px #ff9c5444}.intro-copy{font-size:14px;line-height:1.8;color:#d2c9f0;margin:0 0 17px}.howto{display:grid;grid-template-columns:26px 1fr;gap:8px 10px;text-align:left;align-items:center;padding:12px 15px;width:min(100%,300px);border:1px solid #ffffff1c;border-radius:17px;background:#ffffff0b;color:#e8e2ff;font-size:12px;line-height:1.45}.howto-icon{font-size:16px;text-align:center}.howto-icon.danger{color:#ffb57c}.primary-button{min-height:52px;width:min(100%,300px);margin-top:18px;border-radius:17px;background:linear-gradient(100deg,#ff9a55,#ffbd71);color:#28123e;font-weight:950;font-size:16px;box-shadow:0 9px 28px #ff945755,inset 0 1px #ffffff99;transition:transform .15s,filter .15s}.primary-button:active,.lane-button:active{transform:scale(.97);filter:brightness(1.08)}.primary-button span{margin-left:8px;color:#fff8dd}.best-line{font-size:12px;color:#c2b8e6;margin-top:12px}.best-line b{color:#fff;font-size:14px;margin-left:4px}
.controls{flex:none;display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;padding:12px 7px 2px}.lane-button{height:58px;border-radius:18px;background:linear-gradient(180deg,#34266f,#21194e);border:1px solid #a491ff35;color:#d9d1ff;font-size:19px;font-weight:800;box-shadow:inset 0 1px #ffffff12,0 6px 20px #06041d40}.lane-button small{display:block;font-size:10px;letter-spacing:.08em;color:#9c91c6;margin-top:1px}.center-lane{border-color:#63ebff55;color:#7bf0ff;background:linear-gradient(180deg,#29336f,#202050)}
.footer{height:28px;flex:none;display:flex;align-items:end;justify-content:space-between;color:#9a91c5;font-size:10px;letter-spacing:.02em;padding:0 4px}.footer span:last-child{color:#c4b9ea}
.pause-screen,.result-screen{background:rgba(10,7,31,.62);backdrop-filter:blur(5px)}.panel-card{width:min(100%,330px);padding:28px 22px 22px;border:1px solid #b09aff44;border-radius:25px;background:linear-gradient(160deg,#2a2063f5,#17123ff5);box-shadow:0 20px 70px #08051e9c}.panel-card h2,.result-screen h2{font-size:29px;letter-spacing:-.04em;margin:10px 0 6px}.panel-card p{color:#bcb2e4;font-size:13px;margin:0}.result-screen{flex-direction:column;padding:20px}.result-stars{font-size:21px;letter-spacing:10px;color:#ffce7c;text-shadow:0 0 18px #ffc05b88;margin-bottom:4px}.result-screen h2{margin:7px 0 4px}.score-ring{width:122px;height:122px;border:5px solid transparent;border-radius:50%;background:linear-gradient(#191340,#191340) padding-box,conic-gradient(from 15deg,#5de9ff,#8c6aff,#ff8ac8,#ffbc6f,#5de9ff) border-box;display:flex;align-items:baseline;justify-content:center;padding-top:30px;margin:8px 0;box-shadow:0 0 28px #8470ff33}.score-ring strong{font-size:42px;letter-spacing:-.06em}.score-ring small{font-size:13px;color:#c7bee7;margin-left:4px}.result-copy{font-size:13px;color:#d5ccef;margin:4px 0 9px}.result-stats{display:flex;gap:8px;width:min(100%,310px);justify-content:center}.result-stats div{flex:1;padding:10px 5px;border-radius:13px;background:#ffffff0b;border:1px solid #ffffff14;display:flex;flex-direction:column;gap:3px}.result-stats b{font-size:17px;color:#fff}.result-stats span{font-size:10px;color:#aaa0d1}.result-screen .primary-button{margin-top:14px}.share-button{width:min(100%,300px);height:42px;margin-top:7px;border-radius:14px;background:transparent;border:1px solid #c2b4ff55;color:#e4ddff;font-size:13px;font-weight:750}.toast{position:absolute;z-index:8;left:50%;bottom:18px;transform:translate(-50%,12px);padding:9px 14px;border-radius:999px;background:#f4efff;color:#261b55;font-size:12px;font-weight:800;opacity:0;pointer-events:none;transition:.2s;white-space:nowrap}.toast.show{opacity:1;transform:translate(-50%,0)}
@media (max-height:700px){.intro-screen{padding-top:20px}.intro-screen h1{font-size:46px;margin:9px 0}.intro-copy{margin-bottom:10px;line-height:1.55}.howto{padding:9px 13px}.primary-button{min-height:46px;margin-top:12px}.best-line{margin-top:7px}.controls{padding-top:8px}.lane-button{height:50px}.result-screen h2{font-size:25px}.score-ring{width:104px;height:104px;padding-top:24px}.score-ring strong{font-size:36px}}
@media (min-width:600px){.app{padding-left:24px;padding-right:24px}.game-shell{border-radius:34px}.intro-screen{padding-top:55px}}
