:root {
  --bg: #07070d;
  --bg2: #0e0f19;
  --card: rgba(22, 24, 40, .72);
  --card-solid: #151729;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .14);
  --text: #f1f2fa;
  --muted: #8d92ad;
  --lime: #c6ff3d;
  --cyan: #3dd6ff;
  --pink: #ff3dbb;
  --gold: #ffc83d;
  --violet: #8a5cff;
  --danger: #ff4d5e;
  --street: #a9b6e0;
  --pro: #3dd6ff;
  --elite: #ffc83d;
  --legend: #ff5fd2;
  --r: 22px;
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { background: var(--bg); color: var(--text); font-family: var(--body); min-height: 100%; }
body { overscroll-behavior: none; overflow-x: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { cursor: default; }
input { font: inherit; color: inherit; }
b { font-weight: 800; }

/* ============ фон: живое сияние */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(90px); opacity: .32; mix-blend-mode: screen; }
.aurora i:nth-child(1) { background: #8a5cff; left: -25vmax; top: -30vmax; animation: drift1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: #ff3dbb; right: -30vmax; top: 5vmax; opacity: .22; animation: drift2 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: #3dd6ff; left: -10vmax; bottom: -40vmax; opacity: .2; animation: drift3 28s ease-in-out infinite alternate; }
.aurora i:nth-child(4) { background: #c6ff3d; right: -20vmax; bottom: -45vmax; opacity: .1; animation: drift1 36s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(18vmax, 14vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, 20vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(14vmax, -16vmax) scale(1.1); } }
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }

#app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 16px 16px 110px; min-height: 100vh; }
.view { animation: rise .45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.glass { background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-radius: var(--r); }
.sub { color: var(--muted); }
.grad-text { background: linear-gradient(90deg, var(--lime), var(--cyan) 50%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 30px 2px 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.h-note { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 12px; font-weight: 600; opacity: .8; }
.ok { color: var(--lime); }
.bad { color: var(--danger); }
.win { color: var(--lime); font-weight: 800; }
.lose { color: var(--muted); }

/* ============ кнопки, поля */
.btn {
  position: relative; width: 100%; font-family: var(--display); font-weight: 700; font-size: 15px; padding: 17px 18px;
  border-radius: 16px; color: #07070d; overflow: hidden;
  background: linear-gradient(100deg, var(--lime), #7dffb0 55%, var(--cyan));
  box-shadow: 0 10px 30px -10px rgba(198, 255, 61, .55), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .15s var(--ease), filter .15s;
}
.btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-100%); animation: sheen 3.2s ease-in-out infinite; }
@keyframes sheen { 60%, 100% { transform: translateX(100%); } }
.btn:active { transform: scale(.975); }
.btn:disabled { filter: grayscale(.6) brightness(.7); }
.btn:disabled::after { display: none; }
.btn.ghost { background: rgba(255,255,255,.05); color: var(--text); border: 1px solid var(--line2); box-shadow: none; }
.btn.ghost::after { display: none; }
.btn small { display: block; font-family: var(--body); font-weight: 700; font-size: 12px; opacity: .7; margin-top: 3px; }
.field { display: block; margin-bottom: 10px; }
.field input { width: 100%; background: rgba(0,0,0,.35); border: 1px solid var(--line2); border-radius: 14px; padding: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(198,255,61,.12); }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin: 2px 2px 10px; font-weight: 700; }
.note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 14px; line-height: 1.5; }

.seg { display: inline-flex; background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 16px; gap: 2px; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; }
.seg button { padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--muted); transition: background .2s, color .2s; }
.seg button.on { background: var(--text); color: var(--bg); }

/* ============ бренд */
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 900; font-size: 18px; letter-spacing: .04em; }
.brand b { background: linear-gradient(90deg, var(--lime), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 12px rgba(198,255,61,.5)); }
.brand.sm { font-size: 15px; }
.brand.sm .logo-mark { width: 28px; height: 28px; }

/* ============ иконки игр */
.gicon {
  --s: 40px; width: var(--s); height: var(--s); flex: none; border-radius: 13px; display: grid; place-items: center; color: var(--c);
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 35%, transparent), color-mix(in srgb, var(--c) 10%, #0b0c16));
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  box-shadow: 0 6px 20px -8px var(--c);
}
.gicon svg { width: 58%; height: 58%; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 70%, transparent)); }
.gicon.xl { --s: 62px; border-radius: 18px; }

/* ============ аватар */
.ava {
  width: var(--s); height: var(--s); flex: none; border-radius: 30%; display: inline-grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: calc(var(--s) * .42); color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px -10px rgba(0,0,0,.8);
}
.ava.q { background: rgba(255,255,255,.05); border: 1px dashed var(--line2); color: var(--muted); text-shadow: none; }
.ava.elite { outline: 2px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 22px rgba(255,200,61,.6); }
.ava.legend { outline: 2px solid var(--legend); outline-offset: 2px; box-shadow: 0 0 26px rgba(255,61,187,.7); animation: hue 4s linear infinite; }
@keyframes hue { to { filter: hue-rotate(360deg); } }

.badge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.08); color: #cfd3e8; }
.badge.elite { background: linear-gradient(90deg, #fff0a0, #ffa514); color: #2a1b00; box-shadow: 0 0 18px rgba(255,200,61,.5); }
.badge.legend { background: linear-gradient(90deg, #ff5fd2, #8a5cff, #3dd6ff, #ff5fd2); background-size: 300% 100%; color: #fff; animation: shimmer 4s linear infinite; box-shadow: 0 0 20px rgba(255,61,187,.55); }
@keyframes shimmer { to { background-position: 300% 0; } }
.elite:is(.pc-name, .name, b, .st-name) { color: var(--gold); text-shadow: 0 0 16px rgba(255,200,61,.55); }
.legend:is(.pc-name, .name, b, .st-name) { background: linear-gradient(90deg, #ff8be0, #b59bff, #7fe6ff, #ff8be0); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 4s linear infinite; filter: drop-shadow(0 0 10px rgba(255,61,187,.5)); }

/* ============ вход */
.auth { padding-top: 4vh; display: grid; gap: 18px; }
.hero-h { font-family: var(--display); font-weight: 900; font-size: clamp(34px, 9.5vw, 50px); line-height: 1.02; letter-spacing: -.02em; }
.lead { color: #b9bdd3; line-height: 1.55; font-size: 16px; }
.orbit { position: relative; height: 300px; margin: 0; }
.orbit-core { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; transform: translate(-50%, -50%); animation: float 5s ease-in-out infinite; }
.orbit-core svg { width: 100%; height: 100%; filter: drop-shadow(0 0 30px rgba(255,61,187,.6)); }
@keyframes float { 50% { transform: translate(-50%, -56%); } }
.orb { position: absolute; left: 50%; top: 50%; --a: calc(360deg / var(--n) * var(--i)); animation: orbit 40s linear infinite; }
.orb .gicon { --s: 46px; transform: translate(-50%, -50%); animation: counter 40s linear infinite; }
@keyframes orbit { from { transform: rotate(var(--a)) translateX(min(36vw, 128px)); } to { transform: rotate(calc(var(--a) + 360deg)) translateX(min(36vw, 128px)); } }
@keyframes counter { from { transform: translate(-50%, -50%) rotate(calc(-1 * var(--a))); } to { transform: translate(-50%, -50%) rotate(calc(-1 * var(--a) - 360deg)); } }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 6px; }
.steps b { font-family: var(--display); font-size: 20px; color: var(--lime); }
.steps span { font-size: 12px; color: #c4c8dc; line-height: 1.35; }
.auth form { padding: 16px; }
.ban { margin-top: 20vh; text-align: center; padding: 30px; }
.ban h1 { font-family: var(--display); color: var(--danger); margin-bottom: 12px; font-size: 22px; }

/* ============ верхняя панель */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.top-r { display: flex; align-items: center; gap: 8px; }
.mute { width: 40px; height: 40px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 16px; }
.balance { display: flex; align-items: center; gap: 7px; font-family: var(--display); font-weight: 700; font-size: 15px; background: var(--card); border: 1px solid rgba(255,200,61,.3); border-radius: 999px; padding: 8px 14px 8px 8px; box-shadow: 0 0 24px -8px rgba(255,200,61,.5); }
.coin { width: 22px; height: 22px; flex: none; filter: drop-shadow(0 0 6px rgba(255,200,61,.6)); }

/* ============ карточка игрока */
.pcard { display: flex; align-items: center; gap: 14px; padding: 16px; position: relative; overflow: hidden; }
.pcard::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 0% 0%, rgba(138,92,255,.25), transparent 60%); pointer-events: none; }
.pcard.elite { border-color: rgba(255,200,61,.4); }
.pcard.legend { border-color: rgba(255,95,210,.45); }
.pc-mid { flex: 1; min-width: 0; position: relative; }
.pc-name { font-family: var(--display); font-weight: 900; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; font-size: 13px; }
.pc-line b { color: var(--text); }
.streak { font-weight: 800; font-size: 12px; color: #ffb02e; background: rgba(255,176,46,.12); padding: 3px 8px; border-radius: 999px; }
.xp { height: 7px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.xp i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--pink), var(--gold)); box-shadow: 0 0 12px var(--pink); transition: width 1s var(--ease); }
.xp-l { font-size: 11px; color: var(--muted); margin-top: 6px; font-weight: 700; }

/* ============ бонус */
.bonus {
  width: 100%; margin-top: 12px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); text-align: left;
  background: linear-gradient(100deg, rgba(255,200,61,.18), rgba(255,61,187,.12)); border: 1px solid rgba(255,200,61,.35);
  animation: pulseGlow 2.4s ease-in-out infinite;
}
.bonus .coin { width: 36px; height: 36px; }
.bonus div { flex: 1; display: grid; }
.bonus small { color: #e8d9b0; font-size: 12px; }
.bonus span { font-family: var(--display); font-weight: 700; font-size: 13px; background: var(--gold); color: #2a1b00; padding: 9px 14px; border-radius: 12px; }
@keyframes pulseGlow { 50% { box-shadow: 0 0 30px -4px rgba(255,200,61,.45); } }

/* ============ живая лента */
.pulse { display: flex; align-items: center; gap: 10px; margin-top: 12px; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; overflow: hidden; }
.live { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; white-space: nowrap; color: var(--lime); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 var(--lime); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.ticker { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tk-run.static { animation: none; }
.tk-run { display: inline-flex; gap: 28px; white-space: nowrap; animation: tick 40s linear infinite; }
.tk { font-size: 13px; color: #cfd3e8; }
.tk em { color: var(--muted); font-style: normal; font-size: 11px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ============ арены */
.tiers { display: grid; gap: 12px; }
.tier {
  --c: var(--street); position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 6px 14px; align-items: center; text-align: left;
  padding: 16px 16px 16px 12px; border-radius: 24px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(circle at 12% 50%, color-mix(in srgb, var(--c) 28%, transparent), transparent 55%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 2px, transparent 2px 14px),
    var(--card-solid);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.tier:not(:disabled):active { transform: scale(.98); }
.tier:not(:disabled):hover { box-shadow: 0 14px 40px -16px var(--c); }
.tier:disabled { opacity: .45; }
.tier-street { --c: var(--street); }
.tier-pro { --c: var(--pro); }
.tier-elite { --c: var(--elite); }
.tier-legend { --c: var(--legend); border: 0; }
.tier.tier-legend::before {
  content: ''; position: absolute; inset: -60%; z-index: -2;
  background: conic-gradient(from 0deg, #ff5fd2, #8a5cff, #3dd6ff, #c6ff3d, #ffc83d, #ff5fd2);
  animation: spin 6s linear infinite;
}
.tier.tier-legend::after { content: ''; position: absolute; inset: 2px; border-radius: 22px; z-index: -1; background: radial-gradient(circle at 12% 50%, rgba(255,61,187,.3), transparent 55%), linear-gradient(135deg, #1d1030, #121326); }
@keyframes spin { to { transform: rotate(360deg); } }
.t-em { grid-row: 1 / span 2; width: 92px; height: 92px; filter: drop-shadow(0 8px 20px color-mix(in srgb, var(--c) 60%, transparent)); transition: transform .3s var(--ease); }
.tier:hover .t-em { transform: rotate(-6deg) scale(1.06); }
.t-em svg { width: 100%; height: 100%; }
.t-body { min-width: 0; }
.t-name { font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--c); text-transform: uppercase; letter-spacing: .02em; }
.t-prize { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 900; font-size: 28px; line-height: 1.1; margin: 2px 0 6px; }
.t-prize small { font-family: var(--body); font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.t-prize .coin { width: 22px; height: 22px; }
.t-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: #c4c8dc; }
.t-meta span { background: rgba(255,255,255,.06); padding: 3px 8px; border-radius: 8px; }
.t-meta b { color: var(--text); }
.t-wait { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; font-weight: 800; color: var(--lime); }
.t-wait i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: ping 1.6s infinite; }
.t-go { grid-column: 2; justify-self: start; font-family: var(--display); font-weight: 900; font-size: 13px; letter-spacing: .06em; color: #07070d; background: var(--c); padding: 10px 18px; border-radius: 12px; box-shadow: 0 8px 24px -8px var(--c); }
.tier-legend .t-go { background: linear-gradient(90deg, #ff5fd2, #8a5cff, #3dd6ff); color: #fff; }

/* ============ ожидающие матчи */
.pending { display: grid; gap: 8px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; }
.pr-mid { flex: 1; min-width: 0; display: grid; }
.pr-mid small, .pr-r small { color: var(--muted); font-size: 12px; }
.pr-r { text-align: right; display: grid; }
.pr-r b { font-family: var(--display); }

/* ============ дисциплины */
.gtiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gtile {
  --c: #fff; text-align: left; display: grid; gap: 4px; padding: 14px; border-radius: 20px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 60%), var(--card-solid);
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); transition: transform .2s var(--ease), border-color .2s;
}
.gtile:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.gtile:active { transform: scale(.97); }
.gtile .gicon { margin-bottom: 8px; }
.gtile b { font-size: 15px; }
.gtile small { color: var(--c); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.gtile em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 700; }
.gtile em.new { color: var(--lime); }

/* ============ шторка */
#sheet { position: fixed; inset: 0; z-index: 20; }
.sheet-bg { position: absolute; inset: 0; background: rgba(3,3,8,.6); backdrop-filter: blur(4px); opacity: 0; transition: opacity .22s; }
.sheet-card {
  position: absolute; left: 50%; bottom: 0; width: min(560px, 100%); max-height: 88vh; overflow-y: auto; transform: translate(-50%, 100%);
  background: linear-gradient(180deg, #171a2e, #0e0f1b); border: 1px solid var(--line2); border-bottom: 0; border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); transition: transform .3s var(--ease); display: grid; gap: 14px;
}
#sheet.open .sheet-bg { opacity: 1; }
#sheet.open .sheet-card { transform: translate(-50%, 0); }
.sheet-grip { width: 44px; height: 5px; border-radius: 9px; background: var(--line2); margin: 0 auto 4px; }
.sh-head { display: flex; align-items: center; gap: 14px; }
.sh-emblem { width: 70px; height: 70px; flex: none; }
.sh-emblem svg { width: 100%; height: 100%; }
.sh-title { font-family: var(--display); font-weight: 900; font-size: 22px; }
.sh-head.tier-street .sh-title { color: var(--street); }
.sh-head.tier-pro .sh-title { color: var(--pro); }
.sh-head.tier-elite .sh-title { color: var(--elite); }
.sh-head.tier-legend .sh-title { color: var(--legend); }
.sh-sub { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; text-align: center; }
.big-cta { font-size: 16px; }
.gpick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gpick { display: grid; justify-items: center; gap: 6px; padding: 10px 2px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.gpick:active { transform: scale(.95); }
.gpick b { font-size: 10px; text-align: center; line-height: 1.2; }
.gpick .gicon { --s: 38px; }
.rules { list-style: none; counter-reset: r; display: grid; gap: 8px; }
.rules li { counter-increment: r; display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; font-size: 14px; line-height: 1.4; }
.rules li::before { content: counter(r); font-family: var(--display); font-weight: 900; color: var(--c, var(--lime)); min-width: 16px; }
.recs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recs div { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 2px; }
.recs span { font-size: 11px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.recs b { font-family: var(--display); font-size: 20px; }
.recs small { color: var(--muted); font-size: 12px; }
.tlist { display: grid; gap: 8px; }
.trow { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; background: rgba(255,255,255,.035); border: 1px solid var(--line); text-align: left; }
.trow:disabled { opacity: .4; }
.trow-em { width: 48px; height: 48px; flex: none; }
.trow-em svg { width: 100%; height: 100%; }
.trow span:nth-child(2) { flex: 1; display: grid; }
.trow small { color: var(--muted); font-size: 12px; }
.trow em { font-style: normal; font-family: var(--display); font-weight: 700; }

/* ============ игровой экран */
#game {
  --c: var(--lime); position: fixed; inset: 0; z-index: 30; display: flex; justify-content: center; overflow-y: auto;
  background: radial-gradient(ellipse at 50% -10%, color-mix(in srgb, var(--c) 22%, transparent), transparent 60%), #07070d;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
#game.won { background: radial-gradient(ellipse at 50% 0%, rgba(198,255,61,.3), transparent 60%), radial-gradient(ellipse at 50% 100%, rgba(255,200,61,.18), transparent 60%), #07070d; }
#game.lost { background: radial-gradient(ellipse at 50% 0%, rgba(255,77,94,.22), transparent 60%), #07070d; }
#game.lead { background: radial-gradient(ellipse at 50% 0%, rgba(61,214,255,.25), transparent 60%), #07070d; }
.g-wrap { width: min(560px, 100%); min-height: 100%; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.center-col { align-items: center; justify-content: center; }
.loader { width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(255,255,255,.1); border-top-color: var(--c); animation: spin .8s linear infinite; }

/* VS */
.vs { width: min(560px, 100%); min-height: 100%; padding: 24px 18px; display: flex; flex-direction: column; gap: 20px; position: relative; animation: rise .4s var(--ease); }
.vs-top { display: flex; align-items: center; gap: 14px; }
.vs-game { font-family: var(--display); font-weight: 900; font-size: 26px; color: var(--c); text-shadow: 0 0 30px color-mix(in srgb, var(--c) 60%, transparent); }
.vs-arena { flex: 1; display: grid; align-content: center; gap: 20px; }
.vs.duel .vs-arena { grid-template-columns: 1fr auto 1fr; align-items: center; }
.vs-me, .vs-p { display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 0; }
.vs-me b, .vs-p b { font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-me small { font-family: var(--display); font-size: 11px; color: var(--c); letter-spacing: .2em; }
.vs-p small { font-size: 11px; color: var(--muted); }
.vs-p.played small { color: var(--lime); }
.vs.duel .vs-me { animation: slideL .6s var(--ease) both; }
.vs.duel .vs-them { animation: slideR .6s var(--ease) both; }
@keyframes slideL { from { transform: translateX(-60px); opacity: 0; } }
@keyframes slideR { from { transform: translateX(60px); opacity: 0; } }
.vs-x {
  font-family: var(--display); font-weight: 900; font-size: 54px; font-style: italic; justify-self: center;
  background: linear-gradient(180deg, #fff, var(--c)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px var(--c)); animation: slam .5s .35s var(--ease) both;
}
@keyframes slam { from { transform: scale(3); opacity: 0; } }
.vs.multi .vs-them { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px; }
.vs.multi .vs-them .ava { --s: 52px !important; }
.vs.multi .vs-x { font-size: 34px; }
.vs-hint { text-align: center; color: #c4c8dc; }
.cd { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.cd.show { background: rgba(7,7,13,.55); backdrop-filter: blur(3px); }
.cd span { font-family: var(--display); font-weight: 900; font-size: 140px; color: var(--c); text-shadow: 0 0 60px var(--c); animation: cdPop .9s var(--ease) both; }
@keyframes cdPop { from { transform: scale(2.2); opacity: 0; } 40% { transform: scale(1); opacity: 1; } to { transform: scale(.85); opacity: 0; } }

/* шапка игры */
.ghead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gh-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gt { font-family: var(--display); font-weight: 900; font-size: 18px; }
.gs { color: var(--muted); font-size: 12px; font-weight: 700; }
.gpts { text-align: right; display: grid; }
.gpts b { font-family: var(--display); font-weight: 900; font-size: 24px; color: var(--c); text-shadow: 0 0 18px color-mix(in srgb, var(--c) 50%, transparent); }
.gpts small { font-size: 10px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.gpts.bump b { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.3); } }
.dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; min-height: 10px; }
.dots i { width: 22px; height: 6px; border-radius: 9px; background: rgba(255,255,255,.1); transition: background .2s; }
.dots i.cur { background: #fff; box-shadow: 0 0 10px #fff; }
.dots i.ok { background: var(--lime); }
.dots i.bad { background: var(--danger); }
.dinfo { font-family: var(--display); font-size: 13px; color: var(--muted); }
.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; min-height: 0; }
.g-status { text-align: center; color: #c4c8dc; font-size: 15px; min-height: 22px; }
.g-status b { color: var(--text); }

/* Рефлекс */
.rpad { flex: 1; min-height: 340px; border-radius: 28px; display: grid; place-items: center; text-align: center; background: var(--card-solid); border: 1px solid var(--line); transition: background .05s linear; cursor: pointer; position: relative; overflow: hidden; }
.rp-in { font-family: var(--display); font-weight: 900; font-size: 28px; display: grid; gap: 6px; }
.rp-in small { font-family: var(--body); font-size: 14px; color: var(--muted); font-weight: 700; }
.rpad.wait { background: radial-gradient(circle, #5a1020, #2a0710); border-color: #7a1a2c; color: #ffb3bc; }
.rpad.go { background: radial-gradient(circle, #e4ff8a, var(--lime)); color: #07070d; box-shadow: 0 0 80px rgba(198,255,61,.6); }
.rpad.go .rp-in { font-size: 56px; animation: bump .3s; }
.rpad.foul { background: #3a0a12; }
.rbig { font-size: 72px; line-height: 1; }
.rbig small { font-size: 22px; margin-left: 4px; color: var(--muted); }
.rbig.bad { font-size: 36px; color: var(--danger); }
.dotsanim::after { content: '…'; animation: dotsA 1.2s steps(4) infinite; display: inline-block; width: 1.2em; text-align: left; overflow: hidden; vertical-align: bottom; }
@keyframes dotsA { from { width: 0; } }

/* клавиатура */
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; transition: opacity .2s; }
.pad.off { opacity: .3; pointer-events: none; }
.pad button { font-family: var(--display); font-weight: 700; font-size: 24px; padding: 15px 0; border-radius: 16px; background: var(--card-solid); border: 1px solid var(--line); transition: background .1s, transform .1s; }
.pad button:active { background: rgba(255,255,255,.12); transform: scale(.95); }
.pad button.go { background: var(--c); color: #07070d; border: 0; }

/* Чувство времени */
.tm-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0; }
.tm-sig { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 36px; color: var(--muted); background: var(--card-solid); border: 2px solid var(--line2); transition: all .15s; }
.tm-sig.on { background: radial-gradient(circle, #fff3c4, var(--c)); color: #07070d; border-color: transparent; box-shadow: 0 0 60px var(--c); transform: scale(1.08); }
.tm-sig.was { border-color: var(--c); color: var(--c); }
.tm-line { flex: 1; max-width: 120px; height: 4px; border-radius: 9px; background: rgba(255,255,255,.08); overflow: hidden; }
.tm-line.run i { display: block; height: 100%; width: 30%; background: linear-gradient(90deg, transparent, var(--c), transparent); animation: scan 1.4s linear infinite; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
.tm-out { font-family: var(--display); font-weight: 900; font-size: 42px; text-align: center; min-height: 52px; color: var(--c); }

/* Стоп-кран */
.sw-face { width: min(72vw, 300px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--c) 18%, #0d0f1c), #0b0c16 70%); border: 3px solid color-mix(in srgb, var(--c) 50%, transparent); box-shadow: 0 0 60px -10px var(--c), inset 0 0 40px rgba(0,0,0,.6); }
.sw-num { font-family: var(--display); font-weight: 900; font-size: 54px; transition: filter .4s, opacity .4s; }
.sw-num.hidden-t { filter: blur(10px); opacity: .5; }
.sw-btn { font-family: var(--display); font-weight: 900; font-size: 26px; letter-spacing: .12em; padding: 24px; border-radius: 22px; color: #fff; background: radial-gradient(circle at 50% 0%, #ff7a86, var(--danger)); box-shadow: 0 14px 40px -10px var(--danger), inset 0 2px 0 rgba(255,255,255,.35); transition: transform .1s; }
.sw-btn:active { transform: scale(.96); }
.sw-btn:disabled { filter: grayscale(.8) brightness(.5); }

/* Счёт */
.mq { width: 100%; max-width: 420px; aspect-ratio: 2.3; margin: 0 auto; display: block; border-radius: 22px; background: var(--card-solid); border: 1px solid var(--line); }
.mq.st { aspect-ratio: 2; }
.mans { font-family: var(--display); font-weight: 900; font-size: 40px; text-align: center; min-height: 52px; }
.mans.okc { color: var(--lime); }
.mans.shake { animation: shake .3s; color: var(--danger); }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }

/* Цвет-ловушка */
.st-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.st-opts button { height: 84px; border-radius: 20px; position: relative; box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 10px 24px -12px rgba(0,0,0,.8); transition: transform .1s, outline-color .2s; outline: 3px solid transparent; outline-offset: 3px; }
.st-opts button:active { transform: scale(.95); }
.st-opts button.right { outline-color: #fff; }
.st-opts kbd { position: absolute; left: 10px; top: 8px; font-family: var(--display); font-size: 11px; color: rgba(0,0,0,.45); }

/* Шульте */
.sc-top { display: flex; justify-content: space-between; font-family: var(--display); font-weight: 700; font-size: 16px; }
.sc-top b { color: var(--c); font-size: 26px; }
.sc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; width: 100%; max-width: 440px; margin: 0 auto; }
.sc-grid button { aspect-ratio: 1; border-radius: 14px; background: var(--card-solid); border: 1px solid var(--line2); font-family: var(--display); font-weight: 900; transition: background .15s, opacity .2s; }
.sc-grid button:active { transform: scale(.94); }
.sc-grid button.done { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: transparent; color: color-mix(in srgb, var(--c) 70%, #fff); opacity: .45; }
.sc-grid button.wrong { animation: shake .3s; background: rgba(255,77,94,.3); }

/* Меткость */
.arena { width: 100%; max-width: 460px; aspect-ratio: 1; margin: 0 auto; display: block; border-radius: 24px; background: radial-gradient(circle, #14162a, #0b0c16); border: 1px solid var(--line2); touch-action: none; cursor: crosshair; }

/* Память */
.grid9 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; max-width: 380px; margin: 0 auto; }
.grid9 button { aspect-ratio: 1; border-radius: 22px; background: var(--card-solid); border: 1px solid var(--line2); transition: background .1s, box-shadow .1s, transform .1s; }
.grid9 button.lit { background: radial-gradient(circle, #fff, var(--c)); box-shadow: 0 0 40px var(--c); transform: scale(1.04); }
.grid9 button.tap { background: var(--lime); box-shadow: 0 0 30px var(--lime); }
.grid9.locked button { pointer-events: none; }

/* Оттенок */
.od-grid { --n: 3; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 1; }
.od-grid button { border-radius: calc(36px / var(--n) + 4px); transition: transform .1s; }
.od-grid button:active { transform: scale(.92); }
.od-grid button.right { outline: 3px solid #fff; outline-offset: 2px; animation: bump .4s; }

/* Стрелки */
.ar-row { display: flex; justify-content: center; gap: 6px; padding: 30px 0; border-radius: 24px; background: var(--card-solid); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.ar-row span { width: 54px; height: 54px; color: #8d92ad; }
.ar-row span.mid { color: var(--c); filter: drop-shadow(0 0 10px var(--c)); }
.ar-row svg { width: 100%; height: 100%; }
.ar-row.okf { border-color: var(--lime); box-shadow: 0 0 30px -6px var(--lime); }
.ar-row.badf { border-color: var(--danger); box-shadow: 0 0 30px -6px var(--danger); }
.ar-pad { display: grid; grid-template-areas: ". u ." "l . r" ". d ."; grid-template-columns: repeat(3, 84px); grid-template-rows: repeat(3, 72px); gap: 8px; justify-content: center; }
.ar-pad button { border-radius: 18px; background: var(--card-solid); border: 1px solid var(--line2); display: grid; place-items: center; color: var(--c); }
.ar-pad button:active { background: color-mix(in srgb, var(--c) 25%, transparent); transform: scale(.94); }
.ar-pad svg { width: 38px; height: 38px; }

/* результат */
.result { align-items: stretch; text-align: center; animation: rise .45s var(--ease); }
.res-top { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.res-game { font-family: var(--display); font-weight: 700; color: var(--muted); }
.res-badge { justify-self: center; align-self: center; font-family: var(--display); font-weight: 900; font-size: 30px; letter-spacing: .02em; margin-top: 8px; animation: slam .5s var(--ease) both; }
.res-badge.win { font-size: 44px; background: linear-gradient(180deg, #fff, var(--lime)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 24px rgba(198,255,61,.6)); }
.res-badge.bad { color: var(--danger); }
.res-prize { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--display); font-weight: 900; font-size: 34px; color: var(--gold); text-shadow: 0 0 24px rgba(255,200,61,.6); }
.res-prize .coin { width: 32px; height: 32px; }
.res-score { font-family: var(--display); font-weight: 900; font-size: 64px; line-height: 1; margin-top: 8px; color: var(--c); text-shadow: 0 0 40px color-mix(in srgb, var(--c) 50%, transparent); }
.res-sum { color: #c4c8dc; font-weight: 700; }
.stand { display: grid; gap: 8px; margin-top: 10px; text-align: left; }
.st-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); animation: rise .4s var(--ease) both; }
.st-row:nth-child(2) { animation-delay: .08s; } .st-row:nth-child(3) { animation-delay: .16s; } .st-row:nth-child(4) { animation-delay: .24s; }
.st-row.me { border-color: color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 10%, var(--card-solid)); }
.st-row.empty { opacity: .45; }
.st-pos { font-family: var(--display); font-weight: 900; width: 18px; text-align: center; color: var(--muted); }
.st-row:first-child .st-pos { color: var(--gold); }
.st-mid { flex: 1; min-width: 0; display: grid; gap: 5px; }
.st-name { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-bar { height: 5px; border-radius: 9px; background: rgba(255,255,255,.07); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); animation: grow 1s var(--ease) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.st-score { font-family: var(--display); font-weight: 700; }
.res-actions { display: grid; gap: 10px; margin-top: auto; padding-top: 14px; }

/* ============ рейтинг */
.page-h { font-family: var(--display); font-weight: 900; font-size: 32px; margin: 8px 0 16px; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin: 26px 0 16px; }
.pod { display: grid; justify-items: center; gap: 5px; text-align: center; min-width: 0; position: relative; }
.pod b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod small { font-size: 11px; color: var(--muted); }
.crown { font-size: 28px; animation: float2 2.4s ease-in-out infinite; filter: drop-shadow(0 0 12px rgba(255,200,61,.8)); }
@keyframes float2 { 50% { transform: translateY(-5px); } }
.pod-base { width: 100%; border-radius: 16px 16px 6px 6px; display: grid; place-items: center; align-content: center; gap: 2px; margin-top: 4px; border: 1px solid var(--line2); }
.pod-base span { font-family: var(--display); font-weight: 900; font-size: 28px; }
.pod-base em { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 13px; }
.pod.p1 .pod-base { height: 120px; background: linear-gradient(180deg, rgba(255,200,61,.35), rgba(255,200,61,.05)); border-color: rgba(255,200,61,.5); box-shadow: 0 0 40px -10px var(--gold); }
.pod.p1 .pod-base span { color: var(--gold); }
.pod.p2 .pod-base { height: 90px; background: linear-gradient(180deg, rgba(200,210,235,.25), rgba(200,210,235,.03)); }
.pod.p3 .pod-base { height: 70px; background: linear-gradient(180deg, rgba(224,154,92,.28), rgba(224,154,92,.03)); }
.pod.p3 .pod-base span { color: #e8a56a; }
.lb { display: grid; gap: 6px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.lrow.me { border-color: rgba(198,255,61,.5); }
.lrow .pos { font-family: var(--display); font-weight: 900; color: var(--muted); width: 24px; }
.lrow .who { flex: 1; min-width: 0; }
.lrow .who .name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .who small { color: var(--muted); font-size: 12px; }
.lrow .val { font-family: var(--display); font-weight: 700; }
.recs-list { display: grid; gap: 8px; }
.rec { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border-color: color-mix(in srgb, var(--c) 25%, transparent); }
.rec-mid { flex: 1; min-width: 0; display: grid; }
.rec-mid small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-v { font-family: var(--display); font-weight: 900; color: var(--c); }
.empty { padding: 30px 20px; text-align: center; display: grid; justify-items: center; gap: 12px; color: #c4c8dc; }
.empty svg { width: 90px; height: 90px; }

/* ============ профиль */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.stat b { font-family: var(--display); font-size: 19px; display: block; }
.stat span { font-size: 11px; color: var(--muted); font-weight: 700; }
.bests { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.best { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.best .gicon { --s: 34px; border-radius: 10px; }
.best span { flex: 1; font-size: 13px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.best b { font-family: var(--display); font-size: 13px; color: var(--c); }
.hist { display: grid; gap: 8px; }
.hrow { display: flex; gap: 12px; padding: 12px 14px; border-radius: 18px; }
.h-mid { flex: 1; min-width: 0; display: grid; gap: 2px; }
.h1 { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.h-mid > small { color: var(--muted); font-size: 12px; }
.players { margin-top: 6px; color: var(--muted); font-size: 12px; display: grid; gap: 2px; }
.players .me { color: var(--text); font-weight: 700; }

/* ============ меню */
nav.tabs {
  position: fixed; z-index: 5; left: 50%; transform: translateX(-50%); bottom: 12px; width: min(420px, calc(100% - 24px));
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px;
  background: rgba(14,15,27,.78); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line2); border-radius: 22px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.7);
  margin-bottom: env(safe-area-inset-bottom);
}
nav.tabs button { display: grid; justify-items: center; gap: 3px; padding: 8px 0; font-weight: 800; font-size: 11px; color: var(--muted); border-radius: 16px; transition: color .2s, background .2s; }
nav.tabs svg { width: 22px; height: 22px; }
nav.tabs button.on { color: #07070d; background: linear-gradient(100deg, var(--lime), var(--cyan)); }

/* ============ уведомления */
#toast {
  position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 28px); min-width: 220px;
  display: flex; align-items: center; gap: 12px; background: rgba(241,242,250,.96); color: #07070d; font-weight: 800;
  padding: 12px 18px; border-radius: 18px; font-size: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.5); animation: drop .4s var(--ease);
}
#toast div { display: grid; }
#toast small { font-weight: 600; opacity: .7; font-size: 12px; }
#toast .coin { width: 32px; height: 32px; }
#toast.win { background: linear-gradient(100deg, #fff4b8, var(--gold)); }
#toast.bad { background: #ffd5da; }
@keyframes drop { from { transform: translate(-50%, -30px); opacity: 0; } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }

@media (max-width: 380px) {
  .tier { grid-template-columns: 72px 1fr; }
  .t-em { width: 72px; height: 72px; }
  .t-prize { font-size: 24px; }
  .gpick-grid { grid-template-columns: repeat(4, 1fr); }
  .ar-pad { grid-template-columns: repeat(3, 72px); grid-template-rows: repeat(3, 64px); }
}

/* ============ лиса-талисман */
.fox { display: block; width: 100%; height: 100%; filter: drop-shadow(0 10px 24px rgba(255,106,31,.45)); }
.fox .fox-ears { transform-origin: 100px 70px; animation: ears 4s ease-in-out infinite; }
@keyframes ears { 0%, 88%, 100% { transform: none; } 92% { transform: scaleY(.92); } }
.fox .fox-eyes { transform-origin: 100px 114px; animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: none; } 96% { transform: scaleY(.1); } }
.fox.happy .fox-eyes, .fox.sad .fox-eyes { animation: none; }
.fox .fox-crown { animation: float2 2.4s ease-in-out infinite; }
.orbit-core { width: 140px; height: 140px; }
.orbit-core .fox { filter: drop-shadow(0 0 40px rgba(255,106,31,.6)); }

.fox-tip { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px; }
.ft-fox { width: 64px; height: 64px; flex: none; animation: float2 3s ease-in-out infinite; }
.ft-bubble {
  position: relative; flex: 1; font-size: 14px; line-height: 1.45; color: #e9e3ff; padding: 12px 14px; border-radius: 18px 18px 18px 6px;
  background: linear-gradient(120deg, rgba(255,122,43,.18), rgba(138,92,255,.16)); border: 1px solid rgba(255,140,60,.35);
}
.ft-bubble b { color: #ffb347; }

.wait-box { border-radius: 20px; padding: 12px; display: grid; gap: 8px; background: linear-gradient(140deg, rgba(198,255,61,.12), rgba(61,214,255,.08)); border: 1px solid rgba(198,255,61,.35); }
.wait-h { display: flex; align-items: center; gap: 10px; }
.wait-h .fox { width: 46px; height: 46px; flex: none; }
.wait-h div { display: grid; }
.wait-h small { color: var(--muted); font-size: 12px; }
.wait-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; text-align: left; background: rgba(0,0,0,.3); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.wait-row > span:not(.gicon) { flex: 1; display: grid; }
.wait-row small { color: var(--lime); font-size: 12px; font-weight: 700; }
.wait-row em { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 12px; color: #07070d; background: var(--c); padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
.gpick { position: relative; }
.gpick.hot { border-color: rgba(198,255,61,.6); box-shadow: 0 0 18px -6px var(--lime); }
.gp-badge { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--lime); color: #07070d; font-size: 11px; font-weight: 900; display: grid; place-items: center; }

.fox-load { width: 110px; height: 110px; animation: float2 1.2s ease-in-out infinite; }
.res-fox { width: 120px; height: 120px; margin: 4px auto -6px; animation: rise .5s var(--ease) both; }
#game.won .res-fox { animation: jump .9s var(--ease) .2s both; }
@keyframes jump { 0% { transform: translateY(30px) scale(.8); opacity: 0; } 50% { transform: translateY(-14px) scale(1.05); opacity: 1; } 100% { transform: none; } }
.unseen-h { display: flex; align-items: center; gap: 14px; }
.unseen-h .fox { width: 76px; height: 76px; flex: none; }
.ban .fox { width: 120px; height: 120px; margin: 0 auto 10px; }
.empty .fox { width: 110px; height: 110px; }
.tm-hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: -6px; }
.pts-gain { color: var(--c); font-family: var(--display); font-size: 18px; }
