@font-face{font-family:Fredoka;font-style:normal;font-weight:500 700;font-display:swap;src:url(/assets/fredoka-latin.27d49d7c8362.woff2) format('woff2')}
@font-face{font-family:"Lilita One";font-style:normal;font-weight:400;font-display:swap;src:url(/assets/lilita-one-latin.8d6cd0f29873.woff2) format('woff2')}

:root {
  color-scheme: light;
  --ink: #2a1d4a;
  --ink-soft: #4b3a78;
  --pink: #ff5fa8;
  --yellow: #ffd23f;
  --cyan: #38d6ff;
  --lime: #8cf04a;
  --purple: #8f6bff;
  --paper: #fff8fc;
  --sky: #86d4ff;
  --display: "Lilita One", "Arial Black", "Arial Rounded MT Bold", sans-serif;
  --body: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
}
html, body { height: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0; overflow: hidden; background: #86d4ff; color: var(--ink);
  font-family: var(--body); font-weight: 600; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#stage { position: fixed; inset: 0; touch-action: none; }
#touch-ui { touch-action: none; }
.panel, #results .card { touch-action: pan-y; overscroll-behavior: contain; }
#stage canvas { display: block; width: 100%; height: 100%; outline: none; }

button { font-family: inherit; cursor: pointer; color: inherit; }
button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.ui { position: fixed; pointer-events: none; }
.ui * { pointer-events: auto; }

/* ---------- logo ---------- */
.logo {
  font-family: var(--display); font-weight: 400; margin: 0; line-height: 0.86; letter-spacing: 0.01em;
  font-size: clamp(48px, 6.6vw, 92px); color: #fff; white-space: nowrap; text-transform: uppercase;
  -webkit-text-stroke: 0; paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--ink), 4px 0 0 var(--ink), -4px 0 0 var(--ink), 0 -4px 0 var(--ink), 4px 5px 0 var(--ink), -4px 5px 0 var(--ink), 0 12px 0 rgba(42,29,74,.25);
}
.logo .l { display: inline-block; animation: bob 2.4s ease-in-out infinite; }
.logo .w1 { color: var(--yellow); } .logo .w2 { color: var(--pink); }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }

/* ---------- loading ---------- */
#loading {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; gap: 28px; text-align: center;
  background: radial-gradient(circle at 50% 35%, #ffd6f0 0%, #9fdcff 55%, #6fb8ff 100%);
  transition: opacity .6s ease, visibility .6s;
}
#loading.gone { opacity: 0; visibility: hidden; }
#loading .bar { width: min(340px, 70vw); height: 22px; margin: 0 auto; border-radius: 99px; background: #fff; border: 4px solid var(--ink); overflow: hidden; }
#load-bar { display: block; height: 100%; width: 5%; background: repeating-linear-gradient(-45deg, var(--pink) 0 14px, #ff85bf 14px 28px); transition: width .4s ease; animation: slide 0.6s linear infinite; background-size: 40px 40px; }
@keyframes slide { to { background-position: 40px 0; } }
#load-msg { margin: 0; font-size: 18px; color: var(--ink); }

/* ---------- menu ---------- */
#menu { inset: 0; display: none; padding: 16px; box-sizing: border-box; }
body[data-state="menu"] #menu { display: flex; align-items: center; }
.panel {
  width: min(470px, 100%); max-height: calc(100% - 8px); overflow: auto; box-sizing: border-box;
  padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 16px;
  background: rgba(255, 248, 252, 0.93); border: 5px solid var(--ink); border-radius: 34px;
  box-shadow: 0 10px 0 var(--ink), 0 24px 50px rgba(42,29,74,.25);
  animation: panelIn .7s cubic-bezier(.2,1.6,.4,1) both;
  scrollbar-width: thin;
}
@keyframes panelIn { from { transform: translateX(-60px) rotate(-4deg); opacity: 0; } }
.tag { margin: 2px 0 0; font-size: 18px; color: var(--ink-soft); text-wrap: balance; }
.custom { display: grid; gap: 8px; }
.custom h3 { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatches .sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ink); padding: 0; box-shadow: inset -4px -5px 0 rgba(0,0,0,.14), inset 3px 3px 0 rgba(255,255,255,.45); transition: transform .15s; }
.swatches .sw:hover { transform: scale(1.12); }
.swatches .sw[aria-pressed="true"] { transform: scale(1.18); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 99px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); transition: transform .1s; }
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--yellow); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
#btn-random { justify-self: start; background: var(--cyan); }
.btn-big {
  font-family: var(--display); font-size: 40px; letter-spacing: .04em; padding: 12px 20px 16px; border-radius: 26px;
  color: #fff; background: linear-gradient(#ffe066, var(--yellow) 55%, #ffb81f); border: 5px solid var(--ink);
  box-shadow: 0 8px 0 var(--ink), inset 0 -6px 0 rgba(0,0,0,.12); text-shadow: 0 3px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink);
  transition: transform .1s, box-shadow .1s; animation: pulse 1.6s ease-in-out infinite;
}
.btn-big:hover { transform: translateY(-2px) scale(1.02); }
.btn-big:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--ink); }
@keyframes pulse { 50% { transform: scale(1.03); } }
.controls { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; color: var(--ink-soft); align-items: center; }
kbd { font-family: var(--body); font-weight: 700; font-size: 12px; padding: 3px 7px; border: 2px solid var(--ink); border-bottom-width: 4px; border-radius: 8px; background: #fff; color: var(--ink); white-space: nowrap; }
#quality { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--ink-soft); flex-wrap: wrap; }
#quality .chip { font-size: 13px; padding: 4px 10px; }

/* ---------- HUD ---------- */
#hud { inset: 0; display: none; pointer-events: none; }
body[data-state="play"] #hud, body[data-state="countdown"] #hud, body[data-state="ending"] #hud { display: block; }
.hud-top { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pill {
  background: #fff; border: 4px solid var(--ink); border-radius: 20px; padding: 6px 16px 8px; box-shadow: 0 5px 0 var(--ink);
  font-family: var(--display); font-size: 24px; line-height: 1; color: var(--ink); white-space: nowrap;
}
.pill small { display: block; font-family: var(--body); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 3px; }
.pill.round { transform: rotate(-2deg); background: var(--pink); color: #fff; text-shadow: 0 2px 0 var(--ink); }
.pill.round small { color: #ffe0f0; text-shadow: none; }
.pill.qual { text-align: center; background: var(--yellow); transform: rotate(1.5deg); min-width: 120px; }
.pill.qual b { font-weight: 400; font-size: 32px; font-variant-numeric: tabular-nums; }
.pill.qual.bump { animation: bump .45s cubic-bezier(.2,2,.4,1); }
@keyframes bump { 40% { transform: rotate(1.5deg) scale(1.2); } }
.pill.time { font-variant-numeric: tabular-nums; font-size: 30px; padding-top: 9px; }
.pill.time.low { background: #ff4b5c; color: #fff; animation: bump 1s infinite; }
#pos {
  position: absolute; left: 18px; bottom: max(26px, env(safe-area-inset-bottom)); font-family: var(--display); font-size: 74px; line-height: 1; color: #fff;
  text-shadow: 0 5px 0 var(--ink), 4px 0 0 var(--ink), -4px 0 0 var(--ink), 0 -4px 0 var(--ink), 4px 5px 0 var(--ink), -4px 5px 0 var(--ink);
  font-variant-numeric: tabular-nums;
}
#pos small { font-size: 32px; vertical-align: top; margin-left: 2px; }
#progress { position: absolute; left: 50%; bottom: max(30px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(520px, calc(100% - 220px)); }
#progress .track { position: relative; height: 16px; border-radius: 99px; background: rgba(255,255,255,.85); border: 4px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
#prog-dots { position: absolute; inset: 0 10px; }
#prog-dots i { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid var(--ink); transition: left .2s linear; }
#prog-dots i.me { width: 22px; height: 22px; margin: -11px 0 0 -11px; border-width: 3px; z-index: 2; box-shadow: 0 0 0 3px #fff; }
#progress .flag { position: absolute; right: -14px; top: -16px; width: 26px; height: 26px; border-radius: 6px; border: 3px solid var(--ink); background: conic-gradient(var(--ink) 0 25%, #fff 0 50%, var(--ink) 0 75%, #fff 0); background-size: 10px 10px; }
.keys-hint { position: absolute; right: 16px; bottom: max(24px, env(safe-area-inset-bottom)); display: grid; gap: 5px; justify-items: end; font-size: 13px; color: #fff; text-shadow: 0 2px 0 var(--ink); animation: fadeOut 1s 12s forwards; }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }
#spec-hint { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); font-size: 16px; color: #fff; background: rgba(42,29,74,.7); padding: 8px 16px; border-radius: 99px; }
#marker { position: fixed; left: 0; top: 0; z-index: 4; pointer-events: none; will-change: transform; }
#marker > div { transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; animation: mk 0.9s ease-in-out infinite; }
#marker span { font-family: var(--display); font-size: 16px; color: #fff; background: var(--pink); border: 3px solid var(--ink); border-radius: 10px; padding: 1px 8px 3px; }
#marker i { width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 11px solid var(--ink); margin-top: -1px; }
@keyframes mk { 50% { translate: 0 -6px; } }

/* ---------- banner / big text ---------- */
#banner { position: fixed; left: 0; right: 0; top: 18%; z-index: 6; text-align: center; pointer-events: none; opacity: 0; padding: 0 16px; }
#banner.show { opacity: 1; animation: bannerOut .6s 6.6s forwards; }
#banner .b-title { font-family: var(--display); font-size: clamp(56px, 11vw, 150px); line-height: .9; color: var(--yellow); text-shadow: 0 7px 0 var(--ink), 5px 0 0 var(--ink), -5px 0 0 var(--ink), 0 -5px 0 var(--ink), 5px 7px 0 var(--ink), -5px 7px 0 var(--ink), 0 18px 30px rgba(42,29,74,.35); }
#banner.show .b-title span { display: inline-block; animation: letterIn .7s cubic-bezier(.2,2,.4,1) both; }
#banner .b-sub { display: inline-block; margin-top: 18px; font-size: clamp(16px, 2.4vw, 24px); background: #fff; border: 4px solid var(--ink); border-radius: 99px; padding: 8px 22px; box-shadow: 0 5px 0 var(--ink); }
#banner.show .b-sub { animation: letterIn .6s .6s cubic-bezier(.2,2,.4,1) both; }
#banner .b-skip { margin-top: 16px; font-size: 14px; color: #fff; text-shadow: 0 2px 0 var(--ink); opacity: .9; }
@keyframes letterIn { from { transform: translateY(-120px) scale(.3) rotate(-20deg); opacity: 0; } }
@keyframes bannerOut { to { opacity: 0; transform: scale(1.3); } }
#bigs { position: fixed; inset: 0; z-index: 7; pointer-events: none; display: grid; place-items: center; }
.big { grid-area: 1 / 1; font-family: var(--display); font-size: clamp(90px, 20vw, 240px); line-height: 1; color: #fff; text-align: center; padding: 0 16px;
  text-shadow: 0 9px 0 var(--ink), 7px 0 0 var(--ink), -7px 0 0 var(--ink), 0 -7px 0 var(--ink), 7px 9px 0 var(--ink), -7px 9px 0 var(--ink), 0 20px 40px rgba(42,29,74,.4); }
.big span { display: inline-block; animation: bigIn .55s cubic-bezier(.2,2.2,.4,1) both; }
.big.out { animation: bigOut .45s forwards; }
.big.cd { color: var(--yellow); }
.big.go { color: var(--lime); }
.big.win { color: var(--yellow); font-size: clamp(64px, 13vw, 170px); }
.big.win span:nth-child(odd) { color: var(--pink); }
.big.end { color: var(--cyan); font-size: clamp(48px, 9vw, 120px); }
.big.lose { color: #ff4b5c; font-size: clamp(64px, 13vw, 170px); }
@keyframes bigIn { from { transform: scale(0) rotate(-25deg); } }
@keyframes bigOut { to { transform: scale(1.6); opacity: 0; } }
#toast { position: fixed; top: 96px; left: 50%; z-index: 8; transform: translate(-50%, -30px); opacity: 0; pointer-events: none; font-size: 20px; color: var(--ink); background: #fff; border: 4px solid var(--ink); border-radius: 99px; padding: 8px 22px; box-shadow: 0 5px 0 var(--ink); white-space: nowrap; }
#toast.show { animation: toast 2.2s cubic-bezier(.2,1.8,.4,1); }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -30px) scale(.6); } 15%, 80% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -10px) scale(.95); } }

/* ---------- results ---------- */
#results { inset: 0; display: none; place-items: center; padding: 16px; box-sizing: border-box; background: rgba(42, 29, 74, .35); z-index: 9; }
body[data-state="results"] #results { display: grid; }
#results .card { width: min(520px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; padding: 24px; background: var(--paper); border: 5px solid var(--ink); border-radius: 32px; box-shadow: 0 10px 0 var(--ink); animation: panelIn .6s cubic-bezier(.2,1.6,.4,1) both; }
#res-title { margin: 0; font-family: var(--display); font-weight: 400; font-size: 56px; line-height: 1; color: var(--yellow); text-shadow: 0 4px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink), 3px 4px 0 var(--ink), -3px 4px 0 var(--ink); }
#results[data-win="0"] #res-title { color: #ff4b5c; }
#res-sub { margin: 0; font-size: 17px; color: var(--ink-soft); }
#res-list { list-style: none; margin: 0; padding: 4px; overflow: auto; display: grid; gap: 6px; min-height: 0; scrollbar-width: thin; }
#res-list li { display: grid; grid-template-columns: 34px 26px 1fr auto; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 16px; background: #fff; border: 3px solid var(--ink); animation: rowIn .4s cubic-bezier(.2,1.6,.4,1) both; }
#res-list li.e { background: #f1e9f7; color: #8b7aa8; border-color: #b7a8cf; }
#res-list li.me { background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
#res-list .rk { font-family: var(--display); font-size: 20px; text-align: center; font-variant-numeric: tabular-nums; }
#res-list .sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink); }
#res-list .st { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
@keyframes rowIn { from { transform: translateX(-30px); opacity: 0; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row button { flex: 1 1 160px; font-family: var(--display); font-size: 24px; padding: 10px 14px 12px; border-radius: 20px; border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink); background: var(--lime); color: var(--ink); }
.row button + button { background: #fff; }
.row button:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }

/* ---------- pause / sound ---------- */
#pause { position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; background: rgba(42,29,74,.45); padding: 16px; }
#pause[hidden] { display: none; }
#pause .card { background: var(--paper); border: 5px solid var(--ink); border-radius: 30px; padding: 24px; box-shadow: 0 10px 0 var(--ink); display: grid; gap: 14px; width: min(360px, 100%); box-sizing: border-box; text-align: center; }
#pause h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 48px; color: var(--cyan); text-shadow: 0 4px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink); }
#btn-sound { position: fixed; z-index: 11; right: 16px; bottom: calc(max(24px, env(safe-area-inset-bottom)) + 70px); width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--ink); background: #fff; box-shadow: 0 4px 0 var(--ink); display: grid; place-items: center; padding: 0; }
body[data-state="menu"] #btn-sound { top: 16px; bottom: auto; }
#btn-sound svg { width: 22px; height: 22px; }
#btn-sound .off { display: none; }
body.muted #btn-sound .on { display: none; }
body.muted #btn-sound .off { display: block; }

/* ---------- touch ---------- */
#touch-ui { display: none; }
body.touch[data-state="play"] #touch-ui, body.touch[data-state="countdown"] #touch-ui { display: block; }
body.touch .keys-hint { display: none; }
#joy { position: fixed; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: rgba(255,255,255,.3); border: 4px solid rgba(42,29,74,.5); opacity: 0; pointer-events: none; z-index: 5; }
#joy.on { opacity: 1; }
#joy-knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); }
#t-jump, #t-dive, #t-grab { position: fixed; z-index: 5; border-radius: 50%; border: 4px solid var(--ink); box-shadow: 0 5px 0 var(--ink); font-family: var(--display); color: #fff; text-shadow: 0 2px 0 var(--ink); }
#t-jump { right: 22px; bottom: 110px; width: 92px; height: 92px; background: var(--pink); font-size: 20px; }
#t-dive { right: 124px; bottom: 60px; width: 72px; height: 72px; background: var(--cyan); font-size: 16px; }
#t-grab { right: 40px; bottom: 214px; width: 66px; height: 66px; background: var(--yellow); font-size: 15px; }
#t-jump.down, #t-dive.down, #t-grab.down { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
body.touch #pos { font-size: 54px; }
body.touch #progress { bottom: auto; top: 90px; width: min(420px, calc(100% - 40px)); }


/* ---------- menu round list ---------- */
.rounds { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rounds li { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 7px 10px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; font-family: var(--display); font-size: 16px; line-height: 1.05; box-shadow: 0 3px 0 var(--ink); }
.rounds li b { grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; border: 2px solid var(--ink); font-weight: 400; font-size: 15px; text-shadow: 0 1px 0 var(--ink); }
.rounds li small { font-family: var(--body); font-size: 11px; font-weight: 600; color: var(--ink-soft); letter-spacing: .02em; }

/* ---------- round card ---------- */
#card { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; pointer-events: none; opacity: 0; visibility: hidden; padding: 16px; --accent: #ff5fa8; }
#card.show { opacity: 1; visibility: visible; transition: opacity .25s; }
.card-stripes { position: absolute; inset: -20%; background: repeating-linear-gradient(-35deg, var(--accent) 0 60px, color-mix(in srgb, var(--accent) 80%, #fff) 60px 120px); transform: translateX(110%) rotate(-6deg); opacity: .96; }
#card.show .card-stripes { animation: stripesIn .55s cubic-bezier(.2,1,.3,1) forwards, stripesMove 6s linear infinite; }
@keyframes stripesIn { to { transform: translateX(0) rotate(-6deg); } }
@keyframes stripesMove { to { background-position: 340px 0; } }
.card-body { position: relative; width: min(620px, 100%); box-sizing: border-box; text-align: center; background: var(--paper); border: 6px solid var(--ink); border-radius: 36px; padding: 26px 22px 22px; box-shadow: 0 12px 0 var(--ink), 0 30px 60px rgba(42,29,74,.35); transform: scale(.3) rotate(-10deg); opacity: 0; }
#card.show .card-body { animation: cardIn .7s .2s cubic-bezier(.2,1.7,.4,1) forwards; }
@keyframes cardIn { to { transform: scale(1) rotate(-1.5deg); opacity: 1; } }
.card-round { font-family: var(--body); font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.card-name { font-family: var(--display); font-size: clamp(46px, 9vw, 86px); line-height: .95; margin-top: 6px; color: var(--accent); text-shadow: 0 5px 0 var(--ink), 4px 0 0 var(--ink), -4px 0 0 var(--ink), 0 -4px 0 var(--ink), 4px 5px 0 var(--ink), -4px 5px 0 var(--ink); }
.card-kind { display: inline-block; margin-top: 14px; font-family: var(--display); font-size: 20px; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--ink); border-radius: 99px; padding: 5px 16px 7px; }
.card-goal { margin: 12px auto 0; max-width: 42ch; font-size: 18px; color: var(--ink); text-wrap: balance; }
.card-path { list-style: none; margin: 16px 0 0; padding: 0; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.card-path li { display: grid; justify-items: center; gap: 2px; min-width: 64px; padding: 6px 8px; border-radius: 14px; border: 3px solid #d9cde8; color: #9b8cb5; background: #fff; }
.card-path li b { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1; }
.card-path li span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.card-path li.done { border-color: var(--ink); color: var(--ink); }
.card-path li.now { border-color: var(--ink); background: var(--accent); color: #fff; box-shadow: 0 4px 0 var(--ink); transform: translateY(-3px); }
.card-path li.now span { color: #fff; }
.card-spec { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); }
.res-round { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
#results[data-win="2"] #res-title { color: var(--cyan); }
body[data-kind="survival"] #progress, body[data-kind="final"] #progress { display: none; }
#pos[hidden] { display: none; }

@media (max-width: 720px) {
  body[data-state="menu"] #menu { align-items: flex-end; }
  .panel { max-height: 62%; padding: 18px; gap: 12px; border-radius: 28px; }
  .logo { font-size: 50px; }
  .btn-big { font-size: 32px; }
  .controls, .rounds { display: none; }
  .pill { font-size: 18px; padding: 5px 10px 6px; border-width: 3px; }
  .pill.qual b { font-size: 24px; }
  .pill.time { font-size: 22px; }
  .pill.round small { display: none; }
  #progress { width: calc(100% - 150px); left: auto; right: 16px; transform: none; }
}

/* ---------- themed cursors ---------- */
html, body, #stage canvas { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'%3E%3Cpath d='M6 5 L6 27 L12 21.5 L16 30 L20.5 28 L16.5 19.5 L24 19.5 Z' fill='%232a1d4a' opacity='.35' transform='translate(2.5 2.5)'/%3E%3Cpath d='M6 5 L6 27 L12 21.5 L16 30 L20.5 28 L16.5 19.5 L24 19.5 Z' fill='%23ff5fa8' stroke='%232a1d4a' stroke-width='2.6' stroke-linejoin='round'/%3E%3Cpath d='M8.6 10.5 L8.6 20' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' opacity='.85'/%3E%3Ccircle cx='22.5' cy='8' r='2.4' fill='%23ffd23f' stroke='%232a1d4a' stroke-width='1.4'/%3E%3C/svg%3E") 6 5, auto; }
button, .chip, .sw, .btn-big, a { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'%3E%3Cpath d='M6 5 L6 27 L12 21.5 L16 30 L20.5 28 L16.5 19.5 L24 19.5 Z' fill='%232a1d4a' opacity='.35' transform='translate(2.5 2.5)'/%3E%3Cpath d='M6 5 L6 27 L12 21.5 L16 30 L20.5 28 L16.5 19.5 L24 19.5 Z' fill='%23ffd23f' stroke='%232a1d4a' stroke-width='2.6' stroke-linejoin='round'/%3E%3Cpath d='M8.6 10.5 L8.6 20' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' opacity='.85'/%3E%3Ccircle cx='22.5' cy='8' r='2.4' fill='%23ffd23f' stroke='%232a1d4a' stroke-width='1.4'/%3E%3C/svg%3E") 6 5, pointer !important; }
body[data-state="play"] #stage canvas, body[data-state="countdown"] #stage canvas, body[data-state="ending"] #stage canvas { cursor: none; }
#reticle { position: fixed; left: 0; top: 0; z-index: 20; pointer-events: none; will-change: transform; --accent: #ff5fa8; }
#reticle .ring { position: absolute; left: -19px; top: -19px; width: 38px; height: 38px; box-sizing: border-box; border-radius: 50%;
  border: 5px solid var(--accent); box-shadow: 0 0 0 3px #fff, 0 0 0 5.5px var(--ink), 0 5px 0 3px rgba(42,29,74,.35); transition: transform .12s cubic-bezier(.2,2,.4,1), border-color .15s; }
#reticle .dot { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); box-sizing: border-box; }
#reticle .ring::before, #reticle .ring::after { content: ""; position: absolute; left: 50%; width: 5px; height: 8px; margin-left: -2.5px; background: #fff; border: 2px solid var(--ink); border-radius: 3px; box-sizing: border-box; }
#reticle .ring::before { top: -15px; }
#reticle .ring::after { bottom: -15px; }
#reticle .ring { animation: retSpin 6s linear infinite; }
@keyframes retSpin { to { rotate: 360deg; } }
#reticle.grab .ring { transform: scale(.7); border-color: var(--yellow); }
#reticle.pop .ring { transform: scale(1.35); }
#reticle .edge { position: absolute; top: -16px; font-family: var(--display); font-size: 30px; line-height: 1; color: #fff; text-shadow: 0 3px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink); opacity: 0; transition: opacity .15s; }
#reticle .edge.l { left: -58px; } #reticle .edge.r { left: 30px; }
#reticle.el .edge.l, #reticle.er .edge.r { opacity: 1; animation: nudge .5s ease-in-out infinite alternate; }
@keyframes nudge { to { translate: var(--nx, 0) 0; } }
#reticle .edge.l { --nx: -5px; } #reticle .edge.r { --nx: 5px; }
body.touch #reticle { display: none; }

@media (prefers-reduced-motion: reduce) {
  .logo .l, .btn-big, #marker > div { animation: none; }
}
