:root { --red: #ff2d4f; --pink: #ff6b9a; --ink: #fff5f7; --dim: #ffc9d3; --bg: #16020a; --green: #9dff6a; --cyan: #7af3ff;
  --font: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button { font-family: inherit; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.vig { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 58%, transparent 42%, rgba(12, 0, 4, .7) 100%); }
#flash { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 25%, var(--fc, rgba(255, 20, 50, .6))); opacity: 0; transition: opacity .45s; }
#flash.on { opacity: 1; transition: none; }

#hud { position: fixed; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: calc(env(safe-area-inset-top) + 12px) 14px 0 18px; pointer-events: none; }
#hud[hidden] { display: none; }
.score { font-weight: 900; font-size: 42px; line-height: 1; letter-spacing: -.02em; text-shadow: 0 2px 18px rgba(255, 40, 80, .65); font-variant-numeric: tabular-nums; }
.sub { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.lv { padding: 3px 8px; border-radius: 999px; background: linear-gradient(135deg, #ffd36b, #ff9a3c); color: #2a1200; font-weight: 900; font-size: 12px; letter-spacing: .04em; }
.combo { font-weight: 800; font-size: 13px; color: var(--green); letter-spacing: .08em; text-transform: uppercase; min-height: 20px; text-shadow: 0 0 10px rgba(120, 255, 80, .6); }
.combo b { font-size: 19px; letter-spacing: 0; }
.hr { display: flex; gap: 8px; align-items: center; pointer-events: auto; }
.hearts { display: flex; gap: 3px; margin-right: 4px; }
.hearts svg { width: 24px; height: 24px; filter: drop-shadow(0 0 6px rgba(255, 40, 80, .85)); }
.hearts svg.off { opacity: .2; filter: none; }
.icon { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(20, 0, 8, .45); color: #fff; font-weight: 800; font-size: 14px; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

#banner { position: fixed; left: 0; right: 0; top: 26%; text-align: center; pointer-events: none; opacity: 0; transform: scale(.88); transition: opacity .4s, transform .4s cubic-bezier(.2, 1.4, .4, 1); }
#banner.on { opacity: 1; transform: none; }
#banner b { display: block; font-weight: 900; font-size: clamp(44px, 13vw, 78px); letter-spacing: .03em; text-transform: uppercase; text-shadow: 0 0 34px rgba(255, 40, 80, .95); }
#banner span { display: block; margin-top: 6px; font-weight: 800; font-size: 16px; color: var(--dim); }
#hint { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 20%); transform: translate(-50%, 12px); padding: 13px 20px; border-radius: 999px; background: rgba(20, 0, 8, .72); border: 1px solid rgba(255, 255, 255, .22); font-weight: 800; font-size: 15.5px; line-height: 1.3; text-align: center; white-space: normal; width: max-content; opacity: 0; transition: .3s; pointer-events: none; display: flex; gap: 10px; align-items: center; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); max-width: calc(100vw - 24px); }
#hint.on { opacity: 1; transform: translate(-50%, 0); }
.hand { display: inline-block; font-size: 22px; animation: swipe 1.3s ease-in-out infinite; }
@keyframes swipe { 0%, 100% { transform: translateX(-14px) rotate(-8deg); } 50% { transform: translateX(14px) rotate(8deg); } }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: calc(env(safe-area-inset-top) + 24px) 22px calc(env(safe-area-inset-bottom) + 64px); background: radial-gradient(ellipse at 50% 40%, rgba(40, 0, 12, .25), rgba(12, 0, 5, .8)); overflow-y: auto; }
.screen[hidden] { display: none; }
.kicker { font-weight: 800; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--dim); opacity: .85; }
.logo { margin-top: 10px; font-weight: 900; font-size: clamp(56px, 17vw, 120px); letter-spacing: -.035em; line-height: .92; background: linear-gradient(180deg, #fff 0%, #ffc2cd 40%, #ff2d4f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 30px rgba(255, 30, 70, .6)); }
.tag { margin-top: 14px; font-weight: 700; font-size: 17px; color: var(--dim); max-width: 340px; line-height: 1.4; }
.play { margin-top: 34px; min-width: 220px; padding: 19px 38px; border: 0; border-radius: 999px; font-weight: 900; font-size: 22px; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, #ff2d4f, #ff6b9a); box-shadow: 0 10px 40px rgba(255, 40, 80, .55), inset 0 1px 0 rgba(255, 255, 255, .45); cursor: pointer; animation: breathe 1.6s ease-in-out infinite; transition: transform .12s; }
.play:active { transform: scale(.95); }
.row .play { margin-top: 0; }
@keyframes breathe { 50% { box-shadow: 0 10px 64px rgba(255, 40, 80, .9), inset 0 1px 0 rgba(255, 255, 255, .45); } }
.best { margin-top: 14px; font-weight: 800; font-size: 13px; color: var(--dim); letter-spacing: .12em; text-transform: uppercase; min-height: 16px; }
.how { display: flex; gap: 14px; margin-top: 30px; justify-content: center; }
.how div { width: 98px; font-size: 12.5px; font-weight: 700; color: var(--dim); line-height: 1.3; }
.how i { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 8px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .15); font-style: normal; font-size: 24px; }
.how i.g { color: var(--green); text-shadow: 0 0 12px var(--green); font-size: 30px; }
.how i.v { color: #c77dff; text-shadow: 0 0 12px #c04dff; font-size: 30px; }
.links { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 12px); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; }
.links a, .links button { color: var(--dim); font-weight: 700; font-size: 14px; text-decoration: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.over-h { font-weight: 900; font-size: clamp(28px, 8.5vw, 46px); letter-spacing: -.01em; }
.final { font-weight: 900; font-size: clamp(68px, 23vw, 128px); line-height: 1; margin-top: 8px; font-variant-numeric: tabular-nums; text-shadow: 0 0 44px rgba(255, 40, 80, .65); }
.newbest { display: inline-block; margin-top: 8px; padding: 6px 13px; border-radius: 999px; background: var(--green); color: #132b00; font-weight: 900; font-size: 13px; letter-spacing: .12em; animation: breathe 1.6s infinite; }
.newbest[hidden] { display: none; }
.stats { display: flex; gap: 26px; justify-content: center; margin-top: 14px; color: var(--dim); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.stats b { display: block; color: #fff; font-size: 24px; letter-spacing: 0; }
.fact { margin-top: 22px; max-width: 420px; padding: 14px 18px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); font-weight: 600; font-size: 15px; line-height: 1.5; color: #ffe3e9; text-align: left; }
.fact small { display: block; color: var(--green); font-weight: 800; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.row { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }
.ghost { min-width: 160px; padding: 15px 26px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .06); color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; }
.pop { position: fixed; left: 0; top: 0; pointer-events: none; font-weight: 900; text-shadow: 0 0 12px currentColor; animation: pop .8s ease-out forwards; z-index: 5; }
@keyframes pop { from { opacity: 1; transform: translate(-50%, -50%) scale(.7); } 30% { transform: translate(-50%, -80%) scale(1.15); } to { opacity: 0; transform: translate(-50%, -170%) scale(1); } }
@media (max-height: 640px) { .how { margin-top: 18px; } .play { margin-top: 22px; } .fact { margin-top: 14px; font-size: 14px; } }

#hud2 { position: fixed; left: 18px; right: 18px; top: calc(env(safe-area-inset-top) + 84px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
#hud[hidden] + #hud2 { display: none; }
.inf { display: flex; align-items: center; gap: 8px; width: min(100%, 320px); font-weight: 800; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.inf .bar { flex: 1; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.inf .bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, #ffb02e, #ff2d4f); transition: width .3s; }
.inf.hot span { color: #ff6b7f; animation: blink .6s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.task { padding: 6px 13px; border-radius: 999px; background: rgba(20, 0, 8, .5); border: 1px solid rgba(255, 255, 255, .16); font-weight: 800; font-size: 13.5px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.task:empty { display: none; }
.task i { font-style: normal; margin-right: 4px; } .task i.y { color: #ffe36b; } .task i.g { color: var(--green); }
#netBtn { position: fixed; right: calc(env(safe-area-inset-right) + 18px); bottom: calc(env(safe-area-inset-bottom) + 26px); width: 84px; height: 84px; border-radius: 50%; border: 2px solid rgba(122, 243, 255, .7); background: radial-gradient(circle, rgba(122, 243, 255, .35), rgba(10, 40, 60, .55)); color: #eaffff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 0 28px rgba(122, 243, 255, .45); cursor: pointer; touch-action: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#netBtn[hidden] { display: none; }
#netBtn b { font-weight: 900; font-size: 18px; letter-spacing: .1em; }
#netBtn .pips { display: flex; gap: 4px; } #netBtn .pips span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .2); } #netBtn .pips span.on { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
#netBtn.empty { opacity: .45; box-shadow: none; }
#netBtn:active { transform: scale(.93); }
.how i.n { color: var(--cyan); text-shadow: 0 0 12px var(--cyan); font-size: 30px; }

.combo { margin-top: 0 !important; min-height: 0 !important; }
.textbtn { margin-top: 10px; background: none; border: 0; color: var(--dim); font-weight: 800; font-size: 14px; padding: 8px 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 201, 211, .4); }
.power { background: radial-gradient(ellipse at 50% 40%, rgba(60, 20, 0, .55), rgba(12, 0, 5, .88)); }
.power .kicker { color: #ffd36b; }
.cards { display: grid; gap: 12px; width: min(100%, 420px); margin-top: 20px; }
.cards .card { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto auto; column-gap: 14px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(255, 211, 107, .35); background: linear-gradient(135deg, rgba(255, 211, 107, .14), rgba(255, 255, 255, .04)); color: #fff; cursor: pointer; animation: cardin .45s cubic-bezier(.2, 1.3, .4, 1) both; transition: transform .12s; }
.cards .card:nth-child(2) { animation-delay: .08s; } .cards .card:nth-child(3) { animation-delay: .16s; }
.cards .card:active { transform: scale(.97); }
.cards .card i { grid-row: 1 / 4; font-style: normal; font-size: 34px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: rgba(0, 0, 0, .25); }
.cards .card b { font-weight: 900; font-size: 18px; }
.cards .card span { font-size: 13.5px; font-weight: 600; color: #ffe8c2; line-height: 1.35; margin-top: 2px; }
.cards .card em { display: flex; gap: 4px; margin-top: 7px; }
.cards .card u { width: 18px; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .18); } .cards .card u.on { background: #ffd36b; } .cards .card u.nx { background: #ffd36b; animation: blink .7s infinite; }
@keyframes cardin { from { opacity: 0; transform: translateY(24px) scale(.95); } }
#intro { position: fixed; inset: 0; pointer-events: none; }
#intro[hidden] { display: none; }
#intro .skip { position: absolute; top: calc(env(safe-area-inset-top) + 14px); right: 14px; pointer-events: auto; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(20, 0, 8, .5); color: #fff; font-weight: 800; font-size: 14px; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#intro .istep { position: absolute; top: calc(env(safe-area-inset-top) + 28px); left: 18px; display: flex; gap: 5px; }
#intro .istep u { width: 22px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); } #intro .istep u.on { background: #fff; }
#intro .itext { position: absolute; left: 22px; right: 22px; bottom: calc(env(safe-area-inset-bottom) + 13%); margin: 0 auto; max-width: 460px; text-align: center; font-weight: 800; font-size: clamp(19px, 5.4vw, 26px); line-height: 1.35; text-shadow: 0 2px 20px rgba(0, 0, 0, .8); opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
#intro .itext.on { opacity: 1; transform: none; }
#intro .itext.big { font-size: clamp(22px, 6.4vw, 32px); }
#intro .itext b { display: block; margin-top: 8px; font-weight: 900; color: #ff8fa3; font-size: 1.25em; }

.volrow { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); width: min(280px, 80vw); }
.volrow .mute { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 16px; cursor: pointer; padding: 0; }
.volv { flex: none; width: 40px; text-align: right; font-weight: 800; font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.vol { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 28px; background: transparent; cursor: pointer; touch-action: none; --p: 50%; }
.vol::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, #ff6a8a var(--p), rgba(255, 255, 255, .2) var(--p)); }
.vol::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .2); }
.vol::-moz-range-progress { height: 6px; border-radius: 6px; background: #ff6a8a; }
.vol::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.vol::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; }
body.intense::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; animation: alarm 1.1s ease-in-out infinite; box-shadow: inset 0 0 90px 10px rgba(255, 20, 40, .55); }
@keyframes alarm { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.intense::after { animation: none; opacity: .6; } }
