/* ============================================================
   MRAD 2.0 — two-theme upgrade arena
   MM2  : dark, blood-red, sharp metal
   Adopt: pastel, candy, soft rounded
   ============================================================ */

/* ---------- tokens ---------- */
:root,
body[data-game="mm2"] {
  --bg: #0a0913;
  --bg-2: #100e1c;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --surface-solid: #15131f;
  --surface-solid-2: #1b1829;
  --line: rgba(167, 155, 255, 0.14);
  --line-strong: rgba(167, 155, 255, 0.3);
  --text: #f5f3ff;
  --muted: #a09ac2;
  --accent: #a855f7;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --accent-soft: rgba(168, 85, 247, 0.14);
  --accent-soft-2: rgba(168, 85, 247, 0.32);
  --gold: #ffc857;
  --good: #4ade80;
  --bad: #ff4d6d;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-lg: 0 34px 80px -34px rgba(2, 1, 8, 0.85);
  --shadow-card: 0 22px 48px -30px rgba(2, 1, 8, 0.9);
  --header-bg: rgba(10, 9, 19, 0.8);
  --card-grad: linear-gradient(168deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.014));
  --card-grad-2: linear-gradient(168deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  --gauge-track: rgba(167, 155, 255, 0.14);
  --rarity-ink: var(--rarity, var(--muted));
  --rarity-soft: color-mix(in srgb, var(--rarity, #8d92a6) 20%, transparent);
  --rarity-line: color-mix(in srgb, var(--rarity, #8d92a6) 46%, transparent);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --display-weight: 800;
  --display-spacing: -0.02em;
}

body[data-game="am"] {
  --bg: #fff3fa;
  --bg-2: #ffe9f5;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.95);
  --surface-solid: #ffffff;
  --surface-solid-2: #fff7fc;
  --line: rgba(96, 50, 118, 0.12);
  --line-strong: rgba(96, 50, 118, 0.24);
  --text: #3a2450;
  --muted: #8b78a0;
  --accent: #ff4f9a;
  --accent-2: #7a5cff;
  --accent-3: #24bfd8;
  --accent-soft: rgba(255, 79, 154, 0.12);
  --accent-soft-2: rgba(255, 79, 154, 0.24);
  --gold: #d98200;
  --good: #12ad68;
  --bad: #e5484d;
  --radius: 22px;
  --radius-sm: 15px;
  --radius-lg: 30px;
  --radius-pill: 999px;
  --font-display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-lg: 0 26px 60px rgba(158, 84, 176, 0.2);
  --shadow-card: 0 14px 30px -18px rgba(158, 84, 176, 0.55);
  --header-bg: rgba(255, 255, 255, 0.74);
  --card-grad: linear-gradient(168deg, #ffffff, #fff6fc);
  --card-grad-2: linear-gradient(168deg, #ffffff, #ffeef8);
  --gauge-track: rgba(96, 50, 118, 0.1);
  --rarity-ink: color-mix(in srgb, var(--rarity, #8b78a0) 56%, #3a2450);
  --rarity-soft: color-mix(in srgb, var(--rarity, #8b78a0) 20%, #ffffff);
  --rarity-line: color-mix(in srgb, var(--rarity, #8b78a0) 38%, #ffffff);
  --display-weight: 700;
  --display-spacing: 0;
}

/* Rarity tokens must be declared on the element that carries the inline
   --rarity value, otherwise var() would resolve at :root. */
.item,
.case-drop,
.reel-item,
.case-result__icon,
.slot__preview {
  --rarity: #8d92a6;
  --rarity-ink: color-mix(in srgb, var(--rarity) 80%, #ffffff);
  --rarity-soft: color-mix(in srgb, var(--rarity) 20%, transparent);
  --rarity-line: color-mix(in srgb, var(--rarity) 46%, transparent);
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.45s ease, color 0.3s ease;
}

main { flex: 1 0 auto; position: relative; z-index: 1; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

::selection { background: var(--accent-soft-2); color: var(--text); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--line-strong);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: padding-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1280px, calc(100% - 44px));
  margin: 0 auto;
}

/* ---------- backdrop ---------- */
.bg-glow {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  transition: background 0.6s ease;
}

body[data-game="mm2"] .bg-glow--1 {
  width: 860px;
  height: 860px;
  top: -440px;
  left: -230px;
  background: rgba(126, 58, 242, 0.42);
}
body[data-game="mm2"] .bg-glow--2 {
  width: 700px;
  height: 700px;
  top: 20%;
  right: -270px;
  background: rgba(34, 211, 238, 0.2);
}

body[data-game="am"] .bg-glow--1 {
  width: 760px;
  height: 760px;
  top: -300px;
  left: -160px;
  background: rgba(255, 154, 199, 0.55);
}
body[data-game="am"] .bg-glow--2 {
  width: 620px;
  height: 620px;
  top: 26%;
  right: -220px;
  background: rgba(160, 190, 255, 0.45);
}
body[data-game="am"] .bg-glow--3 {
  background: rgba(255, 226, 150, 0.4);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(196, 181, 253, 0.13) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 92% 78% at 50% 0%, #000 16%, transparent 76%);
  mask-image: radial-gradient(ellipse 92% 78% at 50% 0%, #000 16%, transparent 76%);
}

body[data-game="am"] .bg-grid {
  background-image: radial-gradient(rgba(255, 79, 154, 0.16) 1.4px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
}

.bg-scratches {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
  background:
    radial-gradient(900px 520px at 82% -10%, rgba(240, 171, 252, 0.22), transparent 62%),
    radial-gradient(760px 460px at 12% 4%, rgba(34, 211, 238, 0.12), transparent 66%),
    linear-gradient(115deg, transparent 44%, rgba(255, 255, 255, 0.035) 50%, transparent 56%);
  -webkit-mask-image: radial-gradient(ellipse 95% 85% at 50% 10%, #000, transparent 84%);
  mask-image: radial-gradient(ellipse 95% 85% at 50% 10%, #000, transparent 84%);
}

body[data-game="am"] .bg-scratches {
  opacity: 0.6;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.9) 0 26px, transparent 27px),
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.9) 0 18px, transparent 19px),
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.9) 0 21px, transparent 22px),
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.75) 0 30px, transparent 31px),
    radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.75) 0 22px, transparent 23px);
  background-size: 900px 520px, 900px 520px, 900px 520px, 1000px 600px, 1000px 600px;
  background-repeat: no-repeat;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  filter: blur(1px);
}

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  transition: background 0.4s ease, border-color 0.4s ease;
}

body[data-game="mm2"] .header::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.9) 22%, rgba(34, 211, 238, 0.55) 55%, transparent);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.45);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(150deg, #c084fc, #8b5cf6 45%, #4c1d95);
  box-shadow: 0 12px 28px -10px rgba(139, 92, 246, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  transition: transform 0.3s var(--ease), background 0.4s ease, border-radius 0.4s ease;
}

.logo:hover .logo__mark { transform: rotate(-4deg) scale(1.05); }

body[data-game="am"] .logo__mark {
  border-radius: 15px;
  background: linear-gradient(140deg, #ff8fc0, #ff4f9a 55%, #b06bff);
  box-shadow: 0 10px 24px -8px rgba(255, 79, 154, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: none;
}
body[data-game="am"] .logo:hover .logo__mark { transform: rotate(-4deg) scale(1.05); }

.logo__text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
}

body[data-game="mm2"] .logo__text { letter-spacing: 0.01em; font-weight: 800; font-size: 22px; }
body[data-game="am"] .logo__text { letter-spacing: 0.02em; font-weight: 800; font-size: 22px; }

.logo__beta {
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body[data-game="am"] .logo__beta {
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
}

/* nav */
.nav {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  transition: background 0.4s ease, border-radius 0.4s ease;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.nav__icon { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.8; }

.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link:hover .nav__icon { opacity: 1; }

.nav__link.is-active {
  color: #fff;
  background: linear-gradient(140deg, #a855f7, #7c3aed 55%, #4c1d95);
  box-shadow: 0 10px 24px -10px rgba(139, 92, 246, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.nav__link.is-active .nav__icon { opacity: 1; }

body[data-game="am"] .nav { border-radius: 999px; background: rgba(255, 255, 255, 0.65); }
body[data-game="am"] .nav__link { border-radius: 999px; font-weight: 700; }
body[data-game="am"] .nav__link.is-active {
  color: #fff;
  background: linear-gradient(135deg, #ff7ab3, #ff4f9a 60%, #c05bff);
  box-shadow: 0 8px 18px -8px rgba(255, 79, 154, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.header__right {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

/* level chip */
.level-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.level-chip:hover { border-color: var(--line-strong); transform: translateY(-1px); }

.level-chip__ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    conic-gradient(var(--accent) var(--level-deg, 0deg), var(--gauge-track) var(--level-deg, 0deg));
  flex-shrink: 0;
}
.level-chip__ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--surface-solid);
}
.level-chip__ring b {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.level-chip__meta { display: flex; flex-direction: column; gap: 4px; min-width: 62px; }
.level-chip__meta > b {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}
.level-chip__bar {
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--gauge-track);
}
.level-chip__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.5s var(--ease);
}

.balance {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid color-mix(in srgb, var(--gold) 26%, transparent);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--gold) 9%, transparent);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.balance__icon { color: var(--gold); font-size: 13px; }

.balance-split { display: grid; gap: 7px; margin-top: 10px; }
.balance-split__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 11.5px;
}
.balance-split__row span { flex: 1; min-width: 0; color: var(--muted); }
.balance-split__row b { color: var(--gold); font-size: 13px; font-variant-numeric: tabular-nums; }
.balance-split__row i { color: var(--muted); font-size: 9px; font-style: normal; font-weight: 800; }
.balance__cur { color: color-mix(in srgb, var(--gold) 70%, var(--muted)); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s, opacity 0.18s, color 0.18s;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.btn--primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #c084fc, #a855f7 38%, #7c3aed 72%, #5b21b6);
  box-shadow: 0 14px 32px -12px rgba(139, 92, 246, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
}
.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: skewX(-18deg);
  transition: left 0.5s var(--ease);
  pointer-events: none;
}
.btn--primary:hover:not(:disabled)::after { left: 120%; }
.btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px -12px rgba(168, 85, 247, 0.95);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}
.btn--ghost:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.btn--sm { padding: 9px 14px; font-size: 12px; border-radius: calc(var(--radius-sm) - 2px); }

body[data-game="mm2"] .btn {
  letter-spacing: 0.01em;
  font-size: 13px;
}
body[data-game="mm2"] .btn--sm { font-size: 12px; }
body[data-game="am"] .btn { border-radius: 999px; font-weight: 800; }
body[data-game="am"] .btn--primary {
  background: linear-gradient(140deg, #ffa2c9, #ff4f9a 52%, #d7469b);
  box-shadow: 0 12px 24px -12px rgba(255, 79, 154, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
body[data-game="am"] .btn--primary:hover:not(:disabled) { transform: translateY(-2px) scale(1.01); }

/* ---------- toolbar / tabs ---------- */
.upgrade-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 0 16px;
}

.sound-toggles { display: flex; flex-shrink: 0; gap: 6px; }

.sound-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  transition: color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.sound-btn:hover { color: var(--text); border-color: var(--line-strong); }
.sound-btn.is-on {
  color: var(--text);
  border-color: var(--accent-soft-2);
  background: var(--accent-soft);
  box-shadow: 0 0 20px -6px color-mix(in srgb, var(--accent) 60%, transparent);
}
.sound-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 8px;
  right: 8px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0;
  transform: rotate(-45deg);
  transition: opacity 0.18s;
}
.sound-btn:not(.is-on)::after { opacity: 0.7; }
.sound-btn svg { width: 18px; height: 18px; }

.category-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.category-tabs--toolbar { margin: 0; }

.cat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  text-align: left;
  transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.cat:hover { color: var(--text); border-color: var(--line-strong); }
.cat__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  line-height: 1;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}
.cat__icon svg { width: 17px; height: 17px; color: currentColor; }
.cat.is-active .cat__icon { color: var(--text); border-color: var(--line-strong); background: #fff; }
.cat:hover .cat__icon { transform: rotate(-6deg) scale(1.05); }
body[data-game="mm2"] .cat.is-active .cat__icon {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(160deg, #a855f7, #6d28d9);
  box-shadow: 0 6px 18px -8px rgba(139, 92, 246, 0.85);
}
.cat__text { display: flex; flex-direction: column; gap: 2px; }
.cat__text b { font-size: 12.5px; font-weight: 700; line-height: 1.1; }
.cat__text i {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cat.is-active {
  color: var(--text);
  border-color: var(--accent-soft-2);
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  box-shadow: 0 0 24px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.cat.is-active .cat__text i { color: var(--accent); }

body[data-game="mm2"] .cat.is-active { box-shadow: inset 0 0 0 1px var(--accent-soft-2), 0 8px 20px -14px var(--accent); }
body[data-game="am"] .cat { border-radius: 999px; padding: 9px 16px; }
body[data-game="am"] .cat.is-active {
  background: #fff;
  border-color: rgba(255, 79, 154, 0.35);
  box-shadow: 0 10px 20px -14px rgba(255, 79, 154, 0.9);
}

.upgrade-toolbar__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-left: auto;
}

.live-pill,
.inv-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bad);
  animation: pulse 2s infinite;
}
.live-pill b { color: var(--text); font-variant-numeric: tabular-nums; }
.inv-pill b { color: var(--gold); font-variant-numeric: tabular-nums; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--accent-soft-2);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip--ghost { border-color: var(--line); background: var(--surface); color: var(--muted); }
.chip--tg { border-color: rgba(41, 171, 226, 0.35); background: rgba(41, 171, 226, 0.12); color: #29abe2; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  padding: 8px 0 22px;
}

.hero__copy { max-width: 620px; }

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 54px);
  font-weight: var(--display-weight);
  line-height: 1.04;
  letter-spacing: var(--display-spacing);
}

body[data-game="am"] .hero__title {
  text-transform: none;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.hero__text {
  max-width: 540px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.hero__badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
}

.stat {
  min-width: 118px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s;
}
.stat:hover { border-color: var(--line-strong); transform: translateY(-1px); }

.stat__label {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat b {
  display: block;
  margin: 4px 0 2px;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: var(--display-weight);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat__sub { color: var(--muted); font-size: 10px; }

/* ---------- rewards strip ---------- */
.rewards-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.reward-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 11px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-grad);
  text-align: left;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.reward-card:hover { transform: translateY(-2px); border-color: var(--accent-soft-2); box-shadow: var(--shadow-card); }
.reward-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}

.reward-card__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-sm) - 1px);
  background: var(--surface-2);
  font-size: 18px;
}

.reward-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reward-card__body b { overflow: hidden; font-size: 12.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.reward-card__body i { overflow: hidden; color: var(--muted); font-size: 10.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

.reward-card__dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2s infinite;
}

.reward-card--switch { cursor: pointer; }

.switch {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 23px;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  transition: background 0.25s, border-color 0.25s;
}
.switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.25s var(--ease), background 0.25s;
}
.reward-card--switch[aria-pressed="true"] .switch { border-color: var(--accent); background: var(--accent-soft-2); }
.reward-card--switch[aria-pressed="true"] .switch i { transform: translateX(17px); background: var(--accent); }
.reward-card--switch[aria-pressed="true"] { border-color: var(--accent-soft-2); }

/* ---------- upgrade stage ---------- */
.upgrade-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 340px) minmax(220px, 1fr);
  align-items: stretch;
  gap: 14px;
}
.upgrade-top.shake { animation: shake 0.45s ease; }

.pick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-grad);
  box-shadow: var(--shadow-card);
}
.pick-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 75%, transparent), transparent);
}
.pick-card--target::before {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent);
}

.pick-card__head { display: flex; flex-direction: column; gap: 5px; }

.pick-card__eyebrow {
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pick-card--target .pick-card__eyebrow { color: var(--accent-2); }

.pick-card__head h2 { font-size: 14.5px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }

.pick-card .slot {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 218px;
  margin: 16px 0;
  padding: 18px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: calc(var(--radius-lg) - 4px);
  background:
    radial-gradient(ellipse at 50% 22%, var(--accent-soft), transparent 66%),
    var(--surface);
}

.slot__preview {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  border: 1px solid var(--rarity-line);
  border-radius: calc(var(--radius-lg) - 1px);
  background:
    radial-gradient(circle at 50% 45%, var(--rarity-soft), transparent 70%),
    var(--surface-2);
  box-shadow:
    0 20px 44px -20px color-mix(in srgb, var(--rarity, #000) 70%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-size: 50px;
  line-height: 1;
  animation: popIn 0.3s var(--ease);
}

.slot__preview--empty {
  border-style: dashed;
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: none;
  color: var(--muted);
}
.slot__preview--empty span { font-size: 40px; font-weight: 300; opacity: 0.6; }

.slot__preview .icon-img img { padding: 10px; }

.slot__meta { text-align: center; }
.slot__meta b { display: block; font-size: 14.5px; line-height: 1.3; }
.slot__meta span { display: inline-block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.slot__meta i { font-style: normal; font-weight: 700; }

.pick-card .slot__clear {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-sm) - 3px);
  background: color-mix(in srgb, var(--surface-solid) 75%, transparent);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: color 0.18s, background 0.18s;
}
.pick-card .slot__clear:hover { color: var(--text); background: var(--surface-2); }

.pick-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}
.pick-card__foot b { color: var(--gold); font-size: 13px; font-variant-numeric: tabular-nums; }
.pick-card__foot--hint b { max-width: 60%; color: var(--text); font-size: 11px; font-weight: 600; text-align: right; }

/* center wheel */
.upgrade-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 18px 14px;
  border: 1px solid var(--accent-soft-2);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 50% 40%, var(--accent-soft), transparent 64%),
    var(--card-grad-2);
  box-shadow: var(--shadow-card);
}
.upgrade-center::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  width: 260px;
  height: 180px;
  border-radius: 50%;
  background: var(--accent-soft-2);
  filter: blur(52px);
  pointer-events: none;
  transform: translateX(-50%);
}

.upgrade-center__eyebrow {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gauge {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 50%;
}

.gauge--xl { width: 190px; height: 190px; margin-top: 14px; }

.gauge::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.gauge--xl::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: repeating-conic-gradient(color-mix(in srgb, var(--text) 55%, transparent) 0deg 0.8deg, transparent 0.8deg 15deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  opacity: 0.3;
  pointer-events: none;
}

.gauge__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--good) 0deg var(--success, 0deg),
    color-mix(in srgb, var(--bad) 55%, transparent) var(--success, 0deg) 353deg,
    var(--gold) 353deg 357deg,
    color-mix(in srgb, var(--bad) 55%, transparent) 357deg 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px));
  transition: opacity 0.3s;
}

.gauge.is-idle .gauge__ring { background: conic-gradient(from 0deg, var(--gauge-track) 0deg 360deg); }

.gauge__needle {
  position: absolute;
  bottom: 50%;
  left: 50%;
  z-index: 2;
  width: 3px;
  height: 40%;
  margin-left: -1.5px;
  border-radius: 2px;
  background: linear-gradient(to top, color-mix(in srgb, var(--text) 18%, transparent), var(--text));
  transform: rotate(0deg);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--text) 65%, transparent));
}
.gauge__needle::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 12px var(--text);
  transform: translateX(-50%);
}

.gauge__hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 13px;
  height: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--surface-2), var(--surface-solid) 70%);
  box-shadow: 0 0 0 4px var(--surface-solid);
  transform: translate(-50%, -50%);
}

.gauge__label {
  position: absolute;
  bottom: -12px;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-solid);
  white-space: nowrap;
  transform: translateX(-50%);
}
.gauge__label b {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.gauge__label span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gauge.is-spinning { filter: drop-shadow(0 0 26px color-mix(in srgb, var(--accent) 55%, transparent)); }

.btn--upgrade {
  position: relative;
  z-index: 1;
  width: min(100%, 272px);
  margin-top: 30px;
  padding: 16px 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(140deg, #e879f9, #a855f7 40%, #7c3aed 74%, #4c1d95);
  box-shadow:
    0 20px 44px -16px rgba(168, 85, 247, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.btn--upgrade:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px -16px color-mix(in srgb, var(--accent) 100%, transparent);
}
.btn--upgrade:disabled { filter: grayscale(0.4); }

.upgrade-center .dock__note { position: relative; z-index: 1; margin-top: 9px; text-align: center; }
.dock__note { color: var(--muted); font-size: 10px; }

body[data-game="am"] .btn--upgrade {
  letter-spacing: 0.02em;
  border-radius: 999px;
  font-weight: 800;
  background: linear-gradient(150deg, #ffa9cd, #ff4f9a 50%, #d7469b);
  box-shadow: 0 18px 36px -16px rgba(255, 79, 154, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ---------- panels / filters ---------- */
.upgrade-lists {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
  margin-top: 16px;
}

.panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-grad);
  box-shadow: var(--shadow-card);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.panel__head h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

.panel__title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.panel__eyebrow {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.panel__hint {
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 11px;
}
.filters--page {
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 150px;
  min-width: 0;
}
.search svg {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}
.search input,
.select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-solid-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search input { padding-left: 32px; }
.search input::placeholder { color: var(--muted); font-weight: 500; }
.search input:focus,
.select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.select {
  flex: 0 1 auto;
  width: auto;
  min-width: 112px;
  padding-right: 26px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 15px, calc(100% - 9px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.select option { background: var(--surface-solid); color: var(--text); }

.filters__count {
  display: flex;
  align-items: center;
  padding: 0 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body[data-game="am"] .search input,
body[data-game="am"] .select { border-radius: 999px; background-color: #fff; }

/* ---------- items ---------- */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
  max-height: 470px;
  overflow-y: auto;
  padding: 2px 6px 2px 2px;
  scrollbar-gutter: stable;
}
.items-more {
  grid-column: 1 / -1;
  margin: 4px 0 2px;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.items-more:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.items-grid--wide {
  max-height: none;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  overflow: visible;
  padding: 0;
}

.item {
  --rarity: #8d92a6;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-sm) + 3px);
  background: var(--card-grad);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rarity), transparent);
  opacity: 0.8;
}
.item::after {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  width: 120%;
  height: 70%;
  background: radial-gradient(ellipse at center, var(--rarity-soft), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.25s;
}
.item:hover {
  transform: translateY(-3px);
  border-color: var(--rarity-line);
  box-shadow: 0 18px 34px -22px color-mix(in srgb, var(--rarity) 75%, transparent);
}
.item:hover::after { opacity: 0.75; }
.item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.item.is-selected {
  border-color: var(--rarity);
  background: linear-gradient(160deg, var(--rarity-soft), var(--surface));
  box-shadow:
    0 0 0 1px var(--rarity-line),
    0 14px 34px -16px color-mix(in srgb, var(--rarity) 60%, transparent);
}
.item.is-selected::after { opacity: 0.9; }

.item.is-locked { opacity: 0.32; cursor: not-allowed; filter: grayscale(0.45); }
.item.is-locked:hover { transform: none; border-color: var(--line); box-shadow: none; }
.item.is-locked:hover::after { opacity: 0; }

.item--static { cursor: default; }
.item--static:hover { transform: translateY(-3px); }

.item__top { position: relative; display: block; }

.item__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 86px;
  border: 1px solid var(--rarity-line);
  border-radius: calc(var(--radius-sm) - 2px);
  background:
    radial-gradient(circle at 50% 45%, var(--rarity-soft), transparent 72%),
    var(--surface-2);
  font-size: 32px;
  line-height: 1;
  overflow: hidden;
}
.item__icon .icon-img img { padding: 6px; transition: transform 0.3s var(--ease); }
.item:hover .item__icon .icon-img img { transform: scale(1.08) translateY(-2px); }

.item__chance {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--good) 36%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  color: var(--good);
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.item__chance--lock {
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  font-size: 10px;
}

.item__name {
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item__meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.item__value { color: var(--gold); font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.item__rarity {
  overflow: hidden;
  color: var(--rarity-ink);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item__action {
  width: 100%;
  margin-top: 2px;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.item__action:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.item__action:disabled { opacity: 0.38; cursor: not-allowed; }

body[data-game="am"] .item { border-radius: 18px; }
body[data-game="am"] .item__icon { border-radius: 13px; }
body[data-game="am"] .item__action { border-radius: 999px; }
body[data-game="am"] .item:hover { transform: translateY(-4px) rotate(-0.6deg); }

/* icon helper */
.icon-img { position: relative; display: block; width: 100%; height: 100%; }
.icon-img img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.55));
}
/* emoji-заглушка видна только если картинка не загрузилась:
   прозрачные PNG раньше просвечивали насквозь — это и были «стикеры» за скинами. */
.icon-img img + .icon-fallback { display: none; }
.icon-fallback { position: absolute; inset: 0; display: grid; place-items: center; line-height: 1; }

/* ---------- history ---------- */
.history { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.history__count { color: color-mix(in srgb, var(--muted) 60%, transparent); }
.history__list { display: flex; flex-direction: column; gap: 5px; }
.history__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
}
.history__icons { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.history__thumb { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; font-size: 13px; }
.history__thumb .icon-img img { padding: 1px; }
.history__arrow { color: var(--muted); font-size: 10px; }
.history__names { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history__names b { color: var(--text); font-weight: 700; }
.history__res { flex-shrink: 0; font-weight: 800; }
.history__res.win { color: var(--good); }
.history__res.lose { color: var(--bad); }
.history__empty {
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

/* ---------- how ---------- */
.how {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%);
}
.how--inline { margin-top: 12px; }
.how__title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.how__list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.how__list li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11.5px; }
.how__list span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  border: 1px solid var(--accent-soft-2);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}
.how__note {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

/* ---------- empty ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 44px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.empty b { color: var(--text); font-size: 14px; }
.empty span { max-width: 380px; line-height: 1.5; }
.empty .btn { margin-top: 6px; }
.empty--page { margin-top: 16px; }

/* ---------- ticker ---------- */
.ticker {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.ticker--feed { margin-top: 16px; margin-bottom: 0; }
.ticker__live {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: var(--bad);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.ticker__live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bad);
  animation: pulse 2s infinite;
}
.ticker__track { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.ticker__track::-webkit-scrollbar { display: none; }
.ticker__item {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  animation: slideIn 0.4s ease;
}
.ticker__user { color: var(--text); font-weight: 700; }
.ticker__thumb { display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; font-size: 13px; }
.ticker__thumb .icon-img img { padding: 1px; }
.ticker__arrow { color: var(--muted); }
.ticker__res { font-weight: 800; }
.ticker__res.win { color: var(--good); }
.ticker__res.lose { color: var(--bad); }

/* ---------- page shell ---------- */
.page { display: none; padding-bottom: 40px; }
.page.is-active { display: block; animation: fadeUp 0.35s var(--ease); }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 30px 0 22px;
}
.page-head__eyebrow {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(27px, 3.3vw, 40px);
  font-weight: var(--display-weight);
  line-height: 1.06;
  letter-spacing: var(--display-spacing);
}
body[data-game="am"] .page-head h1 { text-transform: none; letter-spacing: -0.01em; }
.page-head p { max-width: 620px; margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.page-head__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* ---------- cases ---------- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 12px;
}

.case-card {
  --case-accent: #ff2d55;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-grad);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s var(--ease), border-color 0.22s, box-shadow 0.22s;
}
.case-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--case-accent) 45%, transparent);
  box-shadow: 0 26px 50px -30px color-mix(in srgb, var(--case-accent) 80%, transparent);
}
.case-card::before {
  content: '';
  position: absolute;
  top: -90px;
  right: -60px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--case-accent) 26%, transparent), transparent 70%);
  pointer-events: none;
}
.case-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--case-accent), transparent);
  opacity: 0.7;
}

.case-card__top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.case-card__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid color-mix(in srgb, var(--case-accent) 35%, transparent);
  border-radius: calc(var(--radius-sm) + 3px);
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--case-accent) 30%, transparent), var(--surface));
  box-shadow: 0 12px 30px -18px var(--case-accent);
  font-size: 28px;
  line-height: 1;
}
.case-card__tag {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.case-card h3 { position: relative; font-family: var(--font-display); font-size: 19px; font-weight: var(--display-weight); letter-spacing: 0.01em; }
body[data-game="am"] .case-card h3 { font-weight: 800; }
.case-card__best { margin-top: -5px; color: var(--muted); font-size: 11.5px; }
.case-card__best b { color: var(--text); }
.case-card__drops { display: flex; align-items: center; gap: 5px; margin-top: auto; }
.case-drop {
  --rarity: #8d92a6;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rarity-line);
  border-radius: calc(var(--radius-sm) - 2px);
  background: radial-gradient(circle at 30% 25%, var(--rarity-soft), var(--surface));
  font-size: 19px;
  line-height: 1;
}
.case-drop .icon-img img { padding: 3px; }
.case-card__more { margin-left: 2px; color: var(--muted); font-size: 11px; font-weight: 800; }
.case-card__btn { width: 100%; margin-top: 4px; }

.cases-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 11.5px;
}
.cases-foot__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
}
.cases-foot p { line-height: 1.5; }

body[data-game="am"] .case-card { border-radius: 26px; }
body[data-game="am"] .case-card__icon { border-radius: 18px; }

/* ---------- leaderboard ---------- */
.rank-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  padding: 20px 22px;
  overflow: hidden;
  border: 1px solid var(--accent-soft-2);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 8% 20%, var(--accent-soft), transparent 60%),
    var(--card-grad-2);
  box-shadow: var(--shadow-card);
}
.rank-hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: 8%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--accent-soft);
  filter: blur(40px);
  pointer-events: none;
}
.rank-hero__rank {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--accent-soft-2);
  border-radius: 18px;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
}
.rank-hero__info { position: relative; min-width: 0; }
.rank-hero__info span {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rank-hero__info b { display: block; margin: 2px 0 4px; font-family: var(--font-display); font-size: 26px; font-weight: var(--display-weight); line-height: 1.1; }
.rank-hero__info p { color: var(--muted); font-size: 12px; }
.rank-hero__stats { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.rank-hero__stat {
  min-width: 92px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.rank-hero__stat b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.rank-hero__stat span { color: var(--muted); font-size: 9.5px; }

.leaders {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-grad);
  box-shadow: var(--shadow-card);
}
.leaders__head,
.leader-row {
  display: grid;
  grid-template-columns: 54px minmax(140px, 1.4fr) 90px 130px 100px;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
}
.leaders__head {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.leader-row { border-bottom: 1px solid var(--line); transition: background 0.2s; }
.leader-row:last-child { border-bottom: 0; }
.leader-row:hover { background: var(--surface); }
.leader-row.is-you {
  background: linear-gradient(90deg, var(--accent-soft), transparent 70%);
  box-shadow: inset 2px 0 0 var(--accent);
}

.leader-row__rank { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.leader-row__rank.is-top { color: var(--gold); }
.leader-row__player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.leader-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(140deg, var(--av-a, #ff5577), var(--av-b, #7c3aed));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}
.leader-row__player b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.leader-row__player i { display: block; color: var(--muted); font-size: 10px; font-style: normal; }
.leader-row__level { color: var(--muted); font-size: 11px; }
.leader-row__worth { color: var(--gold); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.leader-row__wins { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }

.season-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 11.5px;
}
.season-note span { font-size: 16px; }

/* ---------- deposit / telegram ---------- */
.deposit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 14px;
}
.deposit-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.deposit-side { display: flex; flex-direction: column; gap: 14px; }

.tg-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(41, 171, 226, 0.28);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 12% 10%, rgba(41, 171, 226, 0.18), transparent 58%),
    radial-gradient(ellipse at 90% 100%, var(--accent-soft), transparent 55%),
    var(--card-grad-2);
  box-shadow: var(--shadow-card);
}
.tg-hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 1px dashed rgba(41, 171, 226, 0.25);
  pointer-events: none;
}
.tg-hero__orb {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(41, 171, 226, 0.35);
  border-radius: 24px;
  background: linear-gradient(150deg, #2aabee, #1d84c6);
  box-shadow: 0 18px 36px -18px rgba(41, 171, 226, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-size: 34px;
  line-height: 1;
  animation: float 5s ease-in-out infinite;
}
.tg-hero__body { position: relative; min-width: 0; }
.tg-hero__eyebrow {
  display: inline-block;
  margin-bottom: 5px;
  color: #29abe2;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.tg-hero__body h2 { font-family: var(--font-display); font-size: clamp(21px, 2.4vw, 28px); font-weight: var(--display-weight); line-height: 1.1; }
body[data-game="am"] .tg-hero__body h2 { font-weight: 800; }
.tg-hero__body > p { max-width: 560px; margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.tg-code {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed rgba(41, 171, 226, 0.5);
  border-radius: var(--radius-sm);
  background: rgba(41, 171, 226, 0.08);
}
.tg-code__label { color: var(--muted); font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.tg-code b {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #29abe2;
  font-variant-numeric: tabular-nums;
}
.tg-code .btn { margin-left: auto; }

.tg-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tg-code__timer { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.tg-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
}
.tg-status b { color: var(--text); }
.tg-status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.tg-status__dot.is-ok { background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 18%, transparent); }
.tg-status__dot.is-warn { background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); }
.tg-status__dot.is-bad { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 18%, transparent); }

.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 9px; }
.pack-card {
  --pack-accent: #29abe2;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.pack-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pack-accent) 45%, transparent); }
.pack-card__head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pack-card__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--pack-accent) 45%, transparent);
  border-radius: 11px;
  background: radial-gradient(circle at 30% 22%, color-mix(in srgb, var(--pack-accent) 26%, transparent), rgba(10, 9, 19, 0.9));
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--pack-accent) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: color-mix(in srgb, var(--pack-accent) 88%, #ffffff);
}
.pack-card__title { min-width: 0; }
.pack-card__title b { display: block; overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.pack-card__title span { color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.pack-card__list { display: flex; flex-wrap: wrap; gap: 4px; }
.pack-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px 3px 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.pack-item__icon { display: grid; place-items: center; width: 18px; height: 18px; font-size: 12px; color: var(--text); }
.pack-item__icon .icon-img img { padding: 1px; }
.pack-item b { color: var(--text); font-weight: 700; }
.pack-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.pack-card__note { color: var(--muted); font-size: 10px; }
.pack-card__link {
  color: color-mix(in srgb, var(--pack-accent) 72%, var(--text));
  font-size: 10.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.pack-card__link:hover { text-decoration: underline; }
.pack-card__link[aria-disabled="true"] { color: var(--muted); pointer-events: none; opacity: 0.6; }

.tg-log { display: flex; flex-direction: column; gap: 6px; }
.tg-log__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 11.5px;
}
.tg-log__icon { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.tg-log__body { min-width: 0; flex: 1; }
.tg-log__body b { display: block; font-size: 12px; }
.tg-log__body span { color: var(--muted); font-size: 10.5px; }
.tg-log__time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.tg-log__empty { padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); font-size: 12px; text-align: center; }

.steps { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 10px; }
.steps li > span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid var(--accent-soft-2);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.steps b { display: block; font-size: 12.5px; }
.steps p { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.steps code, .tg-setup code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 10.5px;
}

.tg-setup__text { margin-top: 10px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.tg-setup__list { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.tg-setup__list li { margin-bottom: 8px; }
.tg-setup__list pre {
  margin: 6px 0 0;
  padding: 8px 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.tg-setup__list pre code { padding: 0; border: 0; background: none; font-size: 10.5px; }
.tg-setup__note { margin-top: 10px; color: var(--muted); font-size: 10px; }
.tg-setup .btn { margin-top: 12px; }
#demoTopUp { width: 100%; margin-top: 12px; }

/* ---------- footer ---------- */
.footer {
  margin-top: 20px;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer__about { max-width: 680px; }
.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.logo__mark--sm { width: 26px; height: 26px; border-radius: 8px; font-size: 14px; transform: none; }
.footer__tag {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.footer p { line-height: 1.65; }
.footer__meta { display: flex; flex-direction: column; gap: 6px; text-align: right; }

/* ---------- modal ---------- */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.case-modal.is-open { opacity: 1; visibility: visible; }
.case-modal__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.case-modal__dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--accent-soft-2);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s var(--ease);
}
.case-modal.is-open .case-modal__dialog { transform: none; }
.case-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.case-modal__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.case-modal__head h2 { font-family: var(--font-display); font-size: 24px; font-weight: var(--display-weight); }
body[data-game="am"] .case-modal__head h2 { font-weight: 800; }
.case-modal__close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
  transition: color 0.18s, background 0.18s;
}
.case-modal__close:hover { color: var(--text); background: var(--surface-2); }
.case-modal__close:disabled { opacity: 0.35; cursor: not-allowed; }
.case-modal__foot { margin-top: 14px; color: var(--muted); font-size: 10.5px; text-align: center; }

.case-reel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(ellipse at 50% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
}
.case-reel::before,
.case-reel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 56px;
  pointer-events: none;
}
.case-reel::before { left: 0; background: linear-gradient(90deg, var(--surface-solid), transparent); }
.case-reel::after { right: 0; background: linear-gradient(270deg, var(--surface-solid), transparent); }
.case-reel__track { display: flex; gap: 8px; width: max-content; padding: 10px; will-change: transform; }

.reel-item {
  --rarity: #8d92a6;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  width: 94px;
  height: 112px;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-sm) - 1px);
  background: var(--card-grad);
}
.reel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rarity), transparent);
  opacity: 0.8;
}
.reel-item__icon { display: block; width: 44px; height: 44px; }
.reel-item__icon .icon-img img { padding: 2px; }
.reel-item__name { max-width: 100%; overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.reel-item__value { color: var(--gold); font-size: 9.5px; font-weight: 700; }
.reel-item.is-winner {
  border-color: var(--rarity);
  background: linear-gradient(160deg, var(--rarity-soft), var(--surface-2));
  box-shadow: 0 0 0 1px var(--rarity), 0 0 32px color-mix(in srgb, var(--rarity) 35%, transparent);
}
.case-reel__marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 4;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, transparent, var(--text) 20%, var(--text) 80%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--text) 70%, transparent);
  pointer-events: none;
}
.case-reel__marker::before,
.case-reel__marker::after {
  content: '';
  position: absolute;
  left: 50%;
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;
  transform: translateX(-50%);
}
.case-reel__marker::before { top: -2px; border-top: 7px solid var(--text); }
.case-reel__marker::after { bottom: -2px; border-bottom: 7px solid var(--text); }

.case-result { display: none; margin-top: 14px; }
.case-result.is-visible {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  animation: fadeUp 0.35s ease;
}
.case-result__icon {
  --rarity: #8d92a6;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border: 1px solid var(--rarity-line);
  border-radius: calc(var(--radius-sm) - 1px);
  background: radial-gradient(circle at 30% 25%, var(--rarity-soft), var(--surface-2));
  font-size: 24px;
  line-height: 1;
}
.case-result__icon .icon-img img { padding: 3px; }
.case-result__info { flex: 1; min-width: 0; }
.case-result__label { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.case-result__info b { display: block; font-size: 14px; }
.case-result__meta { color: var(--muted); font-size: 11px; }
.case-result__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

/* reward / promo dialogs */
.reward-dialog { width: min(560px, 100%); }
.reward-dialog__text { color: var(--muted); font-size: 12.5px; }
.daily-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 14px; }
.daily-tile {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: center;
}
.daily-tile span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.daily-tile b { display: block; margin-top: 3px; font-size: 13px; color: var(--gold); font-variant-numeric: tabular-nums; }
.daily-tile i { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-style: normal; }
.daily-tile.is-done { opacity: 0.55; }
.daily-tile.is-done b { color: var(--muted); text-decoration: line-through; }
.daily-tile.is-today { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.daily-tile.is-today b { color: var(--accent); }
.reward-dialog__btn { width: 100%; margin-top: 14px; }
.reward-dialog__btn:disabled { opacity: 0.5; }

.promo-dialog { width: min(500px, 100%); }
.promo-form { display: flex; gap: 8px; margin-top: 6px; }
.promo-form input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.promo-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.promo-hint { margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.promo-used { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.promo-used span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

/* ---------- toasts / confetti ---------- */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 260;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-solid) 96%, transparent);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateX(120%);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.toast.is-in { opacity: 1; transform: translateX(0); }
.toast--success { border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.toast--error { border-color: color-mix(in srgb, var(--bad) 42%, transparent); }
.toast--info { border-color: var(--accent-soft-2); }
.toast__icon { font-size: 18px; line-height: 1.3; }
.toast b { display: block; font-size: 13px; }
.toast span { color: var(--muted); font-size: 12px; line-height: 1.45; }

.confetti { position: fixed; inset: 0; z-index: 300; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute;
  top: -24px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

/* ---------- animations ---------- */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 55%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0.15; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   v3 — иконки, хром и мягкие эффекты
   ============================================================ */

/* ---------- svg-глифы ---------- */
.sigil,
.glyph { display: block; width: 1em; height: 1em; flex-shrink: 0; fill: currentColor; }

.reward-card__icon svg { width: 20px; height: 20px; color: var(--text); transition: transform 0.35s var(--ease); }
.reward-card:hover .reward-card__icon svg { transform: rotate(-7deg) scale(1.08); }
.cases-foot__icon svg { width: 16px; height: 16px; }
.tg-hero__orb svg { width: 38px; height: 38px; color: #fff; }
.toast__glyph { width: 18px; height: 18px; }
.toast--success .toast__glyph { color: var(--good); }
.toast--error .toast__glyph { color: var(--bad); }
.toast--info .toast__glyph { color: var(--text); }
.item__chance--lock svg { width: 12px; height: 12px; color: var(--muted); }
.tg-log__icon .sigil { width: 15px; height: 15px; }
.pack-card__icon .sigil { width: 20px; height: 20px; }
.pack-item__icon .icon-fallback { font-size: 11px; }

/* ---------- крафтовые иконки кейсов ---------- */
.case-card__icon {
  position: relative;
  display: block;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--case-accent) 48%, transparent);
  border-radius: 15px;
  background:
    radial-gradient(circle at 30% 18%, color-mix(in srgb, var(--case-accent) 32%, transparent), transparent 66%),
    linear-gradient(160deg, #1e1b2c, #100e1a);
  box-shadow:
    0 16px 30px -18px color-mix(in srgb, var(--case-accent) 80%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: color-mix(in srgb, var(--case-accent) 88%, #ffffff);
  font-size: 0;
  overflow: visible;
}
.case-card__crate {
  position: absolute;
  top: 7px;
  left: 8px;
  width: 46px;
  height: 46px;
  transition: transform 0.45s var(--ease);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}
.case-card:hover .case-card__crate { transform: translateY(-3px) rotate(-4deg) scale(1.04); }
.case-card__sigil {
  position: absolute;
  bottom: -7px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--case-accent) 55%, transparent);
  background: #0b0914;
  color: color-mix(in srgb, var(--case-accent) 92%, #ffffff);
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--case-accent) 80%, transparent);
  transform: translateX(-50%);
}
.case-card__sigil .sigil { width: 12px; height: 12px; }
.case-card h3 { font-size: 20px; }

/* ---------- медали топа ---------- */
.medal {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffe08a, #f5a524 52%, #b45309);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 6px 16px -4px rgba(245, 165, 36, 0.6);
  color: #2a1a00;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.medal--2 { background: linear-gradient(160deg, #eef1f5, #aab1bd); color: #23262e; box-shadow: inset 0 1px 0 #fff, 0 6px 14px -6px rgba(186, 194, 206, 0.55); }
.medal--3 { background: linear-gradient(160deg, #d4c8b6, #998a75); color: #2a2621; box-shadow: inset 0 1px 0 #fff, 0 6px 14px -6px rgba(153, 138, 117, 0.5); }

/* ---------- hero: хромовое свечение ---------- */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -70px;
  right: 2%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: conic-gradient(from 130deg, rgba(168, 85, 247, 0.5), rgba(34, 211, 238, 0.35), rgba(232, 121, 249, 0.45), rgba(168, 85, 247, 0.5));
  filter: blur(70px);
  opacity: 0.85;
  pointer-events: none;
}
body[data-game="am"] .hero::before {
  background: conic-gradient(from 130deg, rgba(255, 255, 255, 0.95), rgba(255, 194, 226, 0.7), rgba(255, 255, 255, 0.95));
}

/* ---------- карточки: стекло и блик ---------- */
.panel,
.pick-card,
.case-card,
.leaders,
.rank-hero { box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.stat { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); background: var(--surface-2); }
.stat:hover { box-shadow: 0 16px 32px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.item,
.case-card,
.pack-card,
.reward-card,
.panel { transition: transform 0.25s var(--ease), border-color 0.2s, box-shadow 0.25s, background 0.2s; }

.item__icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, 0.78) 50%, transparent 66%);
  transform: translateX(-130%);
  transition: transform 0.65s var(--ease);
  pointer-events: none;
}
.item:hover .item__icon::after { transform: translateX(130%); }
.item__chance { background: rgba(9, 8, 18, 0.8); box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); }

.case-card:hover { transform: translateY(-5px); }
.case-card::after { opacity: 0.85; }
.case-card:hover::before { opacity: 0.85; transform: scale(1.08); }
.case-card::before { transition: opacity 0.3s, transform 0.5s var(--ease); }
.reward-card:hover { transform: translateY(-3px); }
.pack-card:hover { transform: translateY(-3px); }

/* ---------- колесо: вращающееся хромовое кольцо ---------- */
.gauge--xl::after { animation: spinSlow 26s linear infinite; opacity: 0.3; }
.gauge.is-spinning { filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.45)); }
.gauge__hub { background: radial-gradient(circle at 35% 30%, #322c4a, #12101f 70%); }

.upgrade-center::after {
  content: '';
  position: absolute;
  bottom: -74px;
  left: 50%;
  width: 320px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.32), transparent 70%);
  filter: blur(22px);
  transform: translateX(-50%);
  pointer-events: none;
}
body[data-game="am"] .upgrade-center::after {
  background: radial-gradient(circle, rgba(255, 79, 154, 0.2), transparent 70%);
}
body[data-game="am"] .upgrade-center { border-radius: 34px; }

/* ---------- мелочи ---------- */
.ticker__live { color: var(--bad); }
.ticker__live::before { background: var(--bad); }
body[data-game="mm2"] .nav { border-radius: 12px; }
body[data-game="mm2"] .footer__brand { letter-spacing: 0.08em; }
body[data-game="mm2"] .case-modal__dialog { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
body[data-game="mm2"] .item__action { border-radius: 7px; }
body[data-game="mm2"] .pick-card .slot__clear,
body[data-game="mm2"] .case-modal__close { border-radius: 9px; }
body[data-game="mm2"] .slot,
body[data-game="mm2"] .slot__preview { border-radius: 16px; }
body[data-game="mm2"] .reel-item { border-radius: 9px; }

/* ---------- MM2 GUI: заголовки с неоновым градиентом ---------- */
body[data-game="mm2"] .hero__title,
body[data-game="mm2"] .page-head h1 {
  background: linear-gradient(100deg, #ffffff 0%, #d8ccff 34%, #f5a3e6 64%, #7ee7f5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 32px rgba(168, 85, 247, 0.35));
}

/* ---------- MM2 GUI: плитки предметов с полосой редкости ---------- */
body[data-game="mm2"] .item {
  gap: 5px;
  padding: 7px;
  border-color: rgba(255, 255, 255, 0.07);
  background: linear-gradient(170deg, #201d2f, #16141f);
}
body[data-game="mm2"] .item:hover { background: linear-gradient(170deg, #272239, #191623); }
body[data-game="mm2"] .item__icon {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 50% 42%, var(--rarity-soft), transparent 72%),
    #11101a;
}
body[data-game="mm2"] .item__meta { flex-direction: column; align-items: stretch; gap: 4px; }
body[data-game="mm2"] .item__value { text-align: center; }
body[data-game="mm2"] .item__rarity {
  display: block;
  width: 100%;
  padding: 3px 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rarity) 94%, #ffffff), var(--rarity));
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  -webkit-text-stroke: 0.4px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.1em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .header__inner { gap: 14px; }
  .nav__link { padding: 8px 9px; font-size: 12px; }
  .nav__icon { width: 14px; height: 14px; }
  .level-chip__meta { display: none; }
  .level-chip { padding: 4px; }
  .upgrade-top { grid-template-columns: minmax(200px, 1fr) 300px minmax(200px, 1fr); }
  .deposit-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 1020px) {
  .nav__link { padding: 7px 8px; font-size: 11.5px; }
  .logo__text { font-size: 18px; }
  .hero { grid-template-columns: 1fr; align-items: start; gap: 18px; }
  .hero__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .nav__icon { display: none; }
  .upgrade-lists { grid-template-columns: 1fr; }
  .deposit-grid { grid-template-columns: 1fr; }
  .deposit-side { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .upgrade-top {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'mine target'
      'center center';
  }
  .pick-card--mine { grid-area: mine; }
  .pick-card--target { grid-area: target; }
  .upgrade-center { grid-area: center; }
  .pick-card .slot { min-height: 186px; }
  .upgrade-center { padding-top: 22px; }
  .leaders__head, .leader-row { grid-template-columns: 44px minmax(120px, 1.4fr) 70px 110px; }
  .leaders__head span:last-child, .leader-row__wins { display: none; }
}

@media (max-width: 820px) {
  .level-chip { display: none; }
  .nav__link { padding: 8px 10px; }
  .rewards-strip { grid-template-columns: 1fr 1fr; }
  .reward-card--switch { grid-column: span 2; }
  .deposit-side { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { padding-bottom: 76px; }

  .header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
  }
  .header__inner { height: 62px; gap: 10px; }
  .container { width: calc(100% - 28px); }

  .nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }
  body[data-game="am"] .nav { background: rgba(255, 255, 255, 0.9); border-radius: 0; }

  .nav__icon { display: block; width: 18px; height: 18px; }
  .nav__link {
    flex-direction: column;
    gap: 4px;
    padding: 7px 2px;
    border-radius: 10px;
    font-size: 9.5px;
    font-weight: 700;
    text-align: center;
  }
  body[data-game="am"] .nav__link { border-radius: 14px; }
  .nav__link.is-active { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
  body[data-game="mm2"] .nav__link.is-active { background: var(--accent-soft); color: var(--accent); }
  body[data-game="am"] .nav__link.is-active { background: var(--accent-soft); color: var(--accent); }
  .nav__link.is-active .nav__icon { opacity: 1; }

  .topup__text { display: none; }
  .header__right .balance { padding: 8px 10px; font-size: 12.5px; }

  .upgrade-toolbar { padding-top: 14px; }
  .upgrade-toolbar__meta { width: 100%; margin-left: 0; }
  .category-tabs--toolbar { width: 100%; }
  .category-tabs--toolbar .cat { flex: 1; justify-content: center; }

  .hero { padding-top: 18px; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .hero__title { font-size: clamp(26px, 7.4vw, 36px); }

  .rewards-strip { grid-template-columns: 1fr; }
  .reward-card--switch { grid-column: auto; }

  .upgrade-top {
    grid-template-columns: 1fr;
    grid-template-areas:
      'mine'
      'center'
      'target';
  }
  .pick-card { padding: 14px; }
  .pick-card .slot { min-height: 170px; margin: 12px 0; }
  .slot__preview { width: 100px; height: 100px; font-size: 42px; }
  .gauge--xl { width: 160px; height: 160px; }
  .btn--upgrade { margin-top: 22px; }

  .page-head { padding-top: 22px; }
  .page-head__actions { width: 100%; }
  .filters--page { padding: 8px; }
  .filters--page .select { flex: 1 1 120px; width: auto; }
  .filters--page .search { flex: 1 1 100%; }

  .items-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); max-height: 380px; }
  .items-grid--wide { max-height: none; }

  .cases-grid { grid-template-columns: 1fr 1fr; }
  .rank-hero { grid-template-columns: auto 1fr; }
  .rank-hero__stats { grid-column: span 2; width: 100%; }
  .rank-hero__stat { flex: 1; }
  .leaders__head, .leader-row { grid-template-columns: 38px minmax(110px, 1.4fr) 90px; }
  .leader-row__level, .leaders__head span:nth-child(3) { display: none; }

  .tg-hero { flex-direction: column; gap: 14px; padding: 18px; }
  .tg-hero__orb { width: 58px; height: 58px; border-radius: 18px; font-size: 27px; }
  .tg-code { flex-wrap: wrap; }
  .tg-code .btn { margin-left: 0; }
  .packs { grid-template-columns: 1fr; }

  .toasts { right: 12px; bottom: 86px; left: 12px; width: auto; }
  .footer__meta { text-align: left; }
}

@media (max-width: 540px) {
  .logo__text { font-size: 18px; letter-spacing: 0.12em; }
  .logo__mark { width: 34px; height: 34px; font-size: 19px; }
  .logo__beta { display: none; }
  .header__right { gap: 6px; }
  .header__right .btn--sm { padding: 8px 11px; }

  .sound-btn { width: 36px; height: 36px; }
  .cat { padding: 8px 11px; }
  .cat__text i { display: none; }

  .hero__stats { gap: 6px; }
  .stat { padding: 9px 11px; }
  .stat b { font-size: 16px; }

  .panel { padding: 14px; }
  .items-grid { grid-template-columns: repeat(2, 1fr); }
  .item__icon { height: 76px; }

  .cases-grid { grid-template-columns: 1fr; }
  .case-modal { padding: 10px; }
  .case-modal__dialog { padding: 16px; border-radius: 18px; }
  .case-modal__head h2 { font-size: 19px; }
  .reel-item { width: 76px; height: 94px; padding: 6px; }
  .reel-item__icon { width: 34px; height: 34px; }
  .reel-item__name { font-size: 9px; }
  .case-result__actions { width: 100%; margin-left: 0; }
  .case-result__actions .btn { flex: 1; }

  .daily-grid { grid-template-columns: repeat(3, 1fr); }
  .promo-form { flex-direction: column; }
  .promo-form .btn { width: 100%; }

  .leaders__head, .leader-row { grid-template-columns: 30px minmax(100px, 1fr) 92px; padding: 10px 12px; gap: 8px; }
  .leader-avatar { width: 30px; height: 30px; font-size: 11px; }
  .leader-row__worth { font-size: 11.5px; }

  .tg-code b { font-size: 20px; }
  .tg-actions .btn { width: 100%; }
  .tg-code__timer { width: 100%; text-align: center; }
  .steps { gap: 10px; }
}

@media (max-width: 400px) {
  .nav__link { font-size: 8.5px; }
  .logo__text { font-size: 16px; letter-spacing: 0.08em; }
  .header__right .balance { padding: 7px 8px; font-size: 11.5px; }
  .header__right .btn--sm { padding: 8px 9px; }
}

/* ---------- превью кейса ---------- */
.preview-dialog { width: min(640px, 100%); }
.preview-hero {
  display: flex;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 12% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
}
.preview-hero__icon {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 78px;
  height: 78px;
  border: 1px solid var(--accent-soft-2);
  border-radius: 16px;
  background: radial-gradient(circle at 30% 25%, var(--surface-2), var(--surface-solid));
}
.preview-hero__icon .case-card__crate {
  width: 52px;
  height: 52px;
  color: var(--case-accent, var(--accent));
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--case-accent, var(--accent)) 45%, transparent));
}
.preview-hero__sigil { position: absolute; right: 6px; bottom: 6px; width: 22px; height: 22px; }
.preview-hero__sigil svg { width: 100%; height: 100%; }
.preview-hero__body { flex: 1; min-width: 0; }
.preview-hero__tag { color: var(--muted); font-size: 11px; }
.preview-hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.preview-hero__stats div { display: grid; gap: 3px; min-width: 0; }
.preview-hero__stats b {
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-hero__stats span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.preview-list { display: grid; gap: 6px; max-height: 330px; margin-top: 14px; padding-right: 4px; overflow-y: auto; }
.preview-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 88px 54px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--rarity, var(--line));
  border-radius: 10px;
  background: var(--surface);
}
.preview-row__icon { width: 32px; height: 32px; }
.preview-row__body { min-width: 0; }
.preview-row__body b { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.preview-row__body i { color: var(--muted); font-size: 10.5px; font-style: normal; }
.preview-row__bar { height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.preview-row__bar i { display: block; height: 100%; border-radius: inherit; background: var(--rarity, var(--accent)); }
.preview-row__chance { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.preview-note { margin-top: 12px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.preview-actions { display: flex; gap: 10px; margin-top: 14px; }
.preview-actions .btn { flex: 1; justify-content: center; }

/* ---------- анимация открытия кейса ---------- */
.case-stage {
  position: relative;
  display: none;
  place-items: center;
  height: 0;
  margin-bottom: 0;
  opacity: 0;
  transition: height 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
}
.case-modal.is-opening .case-stage { display: grid; height: 200px; margin-bottom: 10px; opacity: 1; }
.case-stage.is-done { display: none; }
.case-stage__glow {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--case-accent, var(--accent)) 55%, transparent), transparent 68%);
  opacity: 0.55;
  filter: blur(6px);
  animation: stageGlow 1s ease-in-out infinite alternate;
}
.case-stage__rays {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    color-mix(in srgb, var(--case-accent, var(--accent)) 40%, transparent) 0deg 6deg,
    transparent 6deg 24deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent 32%, #000 46%, transparent 78%);
  mask: radial-gradient(farthest-side, transparent 32%, #000 46%, transparent 78%);
  opacity: 0;
  animation: stageRays 8s linear infinite;
}
.case-stage.is-charging .case-stage__rays { opacity: 0.85; }
.case-stage__crate { position: relative; z-index: 2; display: grid; place-items: center; width: 100px; height: 100px; }
.case-stage__crate svg {
  width: 100px;
  height: 100px;
  color: var(--case-accent, var(--accent));
  filter: drop-shadow(0 0 26px color-mix(in srgb, var(--case-accent, var(--accent)) 60%, transparent));
}
.case-stage__sigil { position: absolute; right: 4px; bottom: 4px; width: 30px; height: 30px; }
.case-stage__sigil svg { width: 100%; height: 100%; }
.case-stage.is-charging .case-stage__crate { animation: crateShake 0.5s ease-in-out infinite; }
.case-stage.is-burst .case-stage__crate { animation: crateBurst 0.32s ease-out forwards; }
.case-stage.is-burst .case-stage__rays { opacity: 1; animation: stageRays 1.2s linear infinite; }
.case-stage.is-burst .case-stage__glow { opacity: 1; }

@keyframes crateShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  20% { transform: translate(-3px, 1px) rotate(-2deg) scale(1.03); }
  45% { transform: translate(3px, -2px) rotate(2deg) scale(1.04); }
  70% { transform: translate(-2px, 2px) rotate(-1deg) scale(1.05); }
}
@keyframes crateBurst {
  0% { transform: scale(1.05); filter: brightness(1); }
  45% { transform: scale(1.35); filter: brightness(2.4); }
  100% { transform: scale(0.4); opacity: 0; filter: brightness(3); }
}
@keyframes stageGlow { from { transform: scale(0.9); opacity: 0.4; } to { transform: scale(1.15); opacity: 0.8; } }
@keyframes stageRays { to { transform: rotate(360deg); } }

.case-modal.is-opening .case-reel { opacity: 0.35; }
.case-reel { transition: opacity 0.3s ease; }
.case-reel.is-spinning .case-reel__track { filter: blur(1.3px); }
.case-reel.is-spinning .case-reel__marker { background: linear-gradient(180deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent); }
.reel-item { transition: filter 0.2s ease; }

.case-modal.is-win .case-modal__dialog {
  animation: caseWinFlash 0.9s ease-out;
}
@keyframes caseWinFlash {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 0%, transparent); }
  25% { box-shadow: 0 0 0 2px var(--gold), 0 0 70px color-mix(in srgb, var(--gold) 55%, transparent); }
  100% { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
}

@media (max-width: 560px) {
  .preview-row { grid-template-columns: 30px minmax(0, 1fr) 50px; }
  .preview-row__bar { display: none; }
  .preview-hero__stats { grid-template-columns: 1fr 1fr; }
  .case-modal.is-opening .case-stage { height: 160px; }
}

/* ---------- аккаунт, мультивыбор магазина, быстрый шанс ---------- */
.account-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.account-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.account-chip.is-authed { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.account-chip__avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.account-chip__avatar .glyph { width: 17px; height: 17px; }
.account-chip__avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-chip__meta { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.account-chip__meta b {
  max-width: 96px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-chip__meta i { color: var(--muted); font-size: 9px; font-style: normal; font-weight: 700; }

.auth-dialog { width: min(440px, 100%); }
.auth-body { display: grid; gap: 12px; margin-top: 14px; }
.auth-roblox {
  width: 100%;
  gap: 10px;
  background: linear-gradient(140deg, #ff6b6b, #e2231a 55%, #a30f08);
  box-shadow: 0 14px 30px -14px rgba(226, 35, 26, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.auth-roblox__mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
}
.auth-note { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-form { display: flex; gap: 8px; }
.auth-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.auth-profile__avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
}
.auth-profile__avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auth-profile__meta { display: grid; gap: 4px; }
.auth-profile__meta b { font-size: 15px; }
.auth-profile__meta i { color: var(--muted); font-size: 11px; font-style: normal; }
.auth-logout { justify-self: start; }

/* ---------- полоса доступа к игре ---------- */
.gate-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--gold) 8%, var(--surface));
  color: var(--text);
  font-size: 12px;
}
.gate-bar[hidden] { display: none; }
.gate-bar[data-mode="tg"] {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.gate-bar__icon { flex-shrink: 0; font-size: 15px; }
.gate-bar__text { flex: 1; min-width: 0; line-height: 1.45; }
.gate-bar .btn { flex-shrink: 0; }

/* ---------- вход через провайдеров ---------- */
.auth-providers { display: grid; gap: 8px; }
.auth-provider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.auth-provider:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-2));
  transform: translateY(-1px);
}
.auth-provider__mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
}
.auth-provider--google .auth-provider__mark { color: #4285f4; }
.auth-provider--telegram .auth-provider__mark { color: #229ed9; }
.auth-provider--discord .auth-provider__mark { color: #5865f2; }
.auth-provider--roblox .auth-provider__mark { color: #e2231a; }
.auth-provider__body { display: grid; gap: 3px; flex: 1; min-width: 0; }
.auth-provider__body b { font-size: 12px; }
.auth-provider__body i {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-provider__badge {
  flex-shrink: 0;
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  border-radius: 999px;
  color: var(--gold);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
}
.auth-account-row code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.auth-account-row b { font-size: 11px; }
.auth-account-row b.is-ok { color: var(--good); }
.auth-account-row b.is-warn { color: var(--gold); }
.auth-tg-wait {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 6px 0 2px;
  text-align: center;
}
.auth-tg-wait__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: authSpin 0.9s linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-tg-wait > b { font-size: 15px; }
.auth-tg-wait > p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}
.auth-tg-wait__open { width: 100%; }
.auth-tg-wait__code {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
.auth-tg-wait__code span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.auth-tg-wait__code b {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.08em;
}
.auth-tg-wait__cancel { width: 100%; }

@media (max-width: 540px) {
  .gate-bar { flex-wrap: wrap; }
  .gate-bar__text { flex-basis: calc(100% - 34px); }
  .gate-bar .btn { width: 100%; }
}

/* мультивыбор в магазине */
.item__pick {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  color: transparent;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.item__pick .glyph { width: 12px; height: 12px; }
.item.is-selected .item__pick { border-color: var(--rarity); background: var(--rarity); color: #fff; }

.shop-bar {
  position: sticky;
  bottom: 12px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.shop-bar[hidden] { display: none; }
.shop-bar__info { font-size: 12px; font-weight: 700; }
.shop-bar__info b { color: var(--gold); font-variant-numeric: tabular-nums; }
.shop-bar__note { margin-right: auto; color: var(--muted); font-size: 11px; }
.shop-bar__note.is-bad { color: var(--bad); }
.shop-bar__actions { display: flex; gap: 8px; margin-left: auto; }

/* быстрый шанс под целью */
.pick-card__foot--quick { align-items: center; }
.quick-bets { display: flex; flex-wrap: wrap; gap: 5px; }
.quick-bet {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.quick-bet:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.quick-bet:disabled { opacity: 0.4; cursor: not-allowed; }
.pick-card__foot--quick + .pick-card__foot--hint { padding-top: 8px; border-top: 0; }
body[data-game="am"] .quick-bet { border-radius: 999px; }

/* ---------- мультиставка в апгрейдере ---------- */
.slot__stack {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 96px;
  padding: 4px;
}
.slot__stack-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  overflow: hidden;
  border: 1px solid var(--rarity-line);
  border-radius: calc(var(--radius-sm) - 2px);
  background:
    radial-gradient(circle at 50% 45%, var(--rarity-soft), transparent 72%),
    var(--surface-2);
  box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--rarity) 80%, transparent);
  animation: popIn 0.28s var(--ease);
}
.slot__stack-icon .icon-img img { padding: 6px; }
.slot__stack-more {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px dashed var(--line-strong);
  border-radius: calc(var(--radius-sm) - 2px);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.slot__stack + .slot__meta { margin-top: 9px; }

/* ставка: предметы + сумма с баланса (как на Caser) */
.pick-card__foot--stake { align-items: center; }
.pick-card__foot--stake > span { display: flex; align-items: center; gap: 6px; }

.stake-bet {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  margin-top: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.stake-bet__label {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stake-bet__row { display: flex; align-items: center; gap: 8px; }
.stake-bet__field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.stake-bet__field:focus-within { border-color: var(--accent); }
.stake-bet__field input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  outline: none;
  -moz-appearance: textfield;
}
.stake-bet__field input::-webkit-outer-spin-button,
.stake-bet__field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stake-bet__field span { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; }
.stake-bet__quick { display: flex; gap: 4px; }
.stake-bet__quick button {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.stake-bet__quick button:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.stake-bet__hint { color: var(--muted); font-size: 10px; }
.stake-bet__hint b { color: var(--gold); font-variant-numeric: tabular-nums; }

.slot__coin-stake {
  display: grid;
  place-items: center;
  gap: 4px;
  width: 120px;
  height: 120px;
  border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 70%),
    var(--surface-2);
  color: var(--gold);
  font-size: 34px;
  animation: popIn 0.28s var(--ease);
}
.slot__coin-stake b { font-size: 13px; font-variant-numeric: tabular-nums; }

/* стрелка едет по ободу, как на Caser */
.gauge__arrow {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}
.gauge__arrow-head {
  position: absolute;
  top: -11px;
  left: 50%;
  width: 24px;
  height: 30px;
  color: var(--text);
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--text) 65%, transparent));
  transform: translateX(-50%);
}
.gauge__arrow-head svg { width: 100%; height: 100%; }

@media (max-width: 1180px) {
  .account-chip__meta { display: none; }
  .account-chip { padding: 4px; }
}
@media (max-width: 540px) {
  .slot__stack-icon, .slot__stack-more { width: 52px; height: 52px; }
  .shop-bar { bottom: 74px; }
  .shop-bar__note { width: 100%; }
  .shop-bar__actions { margin-left: 0; width: 100%; }
  .shop-bar__actions .btn { flex: 1; }
  .auth-form { flex-direction: column; }
}

/* ---------- открытие кейса в стиле Caser ---------- */
.case-open .case-open__dialog {
  width: min(940px, 100%);
  padding: 20px 22px 18px;
}
.case-open__head { align-items: center; margin-bottom: 12px; }
.case-open__side { display: flex; align-items: center; gap: 10px; }
.case-open__price {
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 10%, var(--surface-2));
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.case-open.is-opening .case-stage { height: 128px; margin-bottom: 8px; }
.case-open .case-stage__crate { width: 84px; height: 84px; }

.case-open .case-reel {
  height: 212px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 50%, var(--accent-soft), transparent 72%),
    var(--surface);
}
.case-open .case-reel::before,
.case-open .case-reel::after { width: 110px; }
.case-open .case-reel__track { gap: 10px; padding: 18px 10px; }
.case-open .reel-item {
  width: 128px;
  height: 176px;
  gap: 7px;
  border-radius: 10px;
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s var(--ease);
}
.case-open .reel-item__icon { width: 68px; height: 68px; }
.case-open .reel-item__name { font-size: 11px; }
.case-open .reel-item__value { font-size: 10.5px; }
.case-open .reel-item.is-winner { transform: scale(1.04); z-index: 2; }
.case-open .case-reel.is-landed .reel-item:not(.is-winner) {
  opacity: 0.28;
  filter: saturate(0.35);
}
.case-reel__lens {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 50%;
  z-index: 3;
  width: 140px;
  transform: translateX(-50%);
  border-right: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent) 10%, transparent),
    transparent 30%,
    transparent 70%,
    color-mix(in srgb, var(--accent) 10%, transparent)
  );
  box-shadow: inset 0 0 34px color-mix(in srgb, var(--accent) 12%, transparent);
  pointer-events: none;
}
.case-open .case-reel__marker::before { border-top-color: var(--accent); }
.case-open .case-reel__marker::after { border-bottom-color: var(--accent); }

.case-open .case-result.is-visible {
  padding: 14px 16px;
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.case-open .case-result__icon { width: 58px; height: 58px; }
.case-open .case-result__info b { font-size: 17px; }
.case-open .case-result__meta { font-size: 11.5px; }
.case-open .case-result__actions { gap: 8px; }

@media (max-width: 700px) {
  .case-open .case-open__dialog { padding: 16px 14px; }
  .case-open .case-reel { height: 176px; }
  .case-open .reel-item { width: 104px; height: 142px; gap: 5px; }
  .case-open .reel-item__icon { width: 52px; height: 52px; }
  .case-open .reel-item__name { font-size: 10px; }
  .case-reel__lens { width: 112px; }
  .case-open .case-reel__track { padding: 16px 10px; }
  .case-open .case-reel::before,
  .case-open .case-reel::after { width: 54px; }
  .case-open .case-result__actions { margin-left: 0; width: 100%; }
}
