/* =========================================================================
   ArhiGame — Telegram Mini App
   Визуальный язык: глубокий космический графит, фиолетово-голубая энергия,
   мягкое стекло поверх контента и аккуратные световые акценты.
   Подарки и их .tgs-анимации остаются нетронутыми — меняется только оправа.
   ========================================================================= */

:root {
  /* поверхности */
  --bg: #070810;
  --s1: #0e101a;
  --s2: #151826;
  --s3: #1f2335;
  --line: rgba(205, 213, 255, 0.075);
  --line-2: rgba(205, 213, 255, 0.14);

  /* текст */
  --t1: #f4f5fb;
  --t2: #a8adc4;
  --t3: #747a92;

  /* смысловые цвета */
  --red: #7c5cff;
  --red-hi: #a68cff;
  --red-soft: rgba(124, 92, 255, 0.15);
  --gold: #ffc65a;
  --ton: #45a8ff;
  --green: #3ee0a1;
  --amber: #ffb84d;

  /* фирменные градиенты */
  --accent-2: #37d4ff;
  --accent-3: #ff6ec7;
  --grad: linear-gradient(135deg, #8b5cff 0%, #6a7dff 46%, #36c9ff 100%);
  --grad-soft: linear-gradient(135deg, rgba(139, 92, 255, 0.22), rgba(54, 201, 255, 0.12));
  --grad-text: linear-gradient(100deg, #d3c6ff 0%, #9a86ff 36%, #69dcff 100%);

  --r-common: #9aa0aa;
  --r-rare: #4d8ff0;
  --r-epic: #a867f2;
  --r-legendary: #f2b640;

  /* обводка: светлее сверху, почти исчезает внизу */
  --edge: linear-gradient(180deg, rgba(198, 188, 255, 0.18), rgba(198, 188, 255, 0.06) 45%, rgba(198, 188, 255, 0.03));
  --edge-red: linear-gradient(180deg, rgba(139, 92, 255, 0.75), rgba(54, 201, 255, 0.24) 62%, rgba(139, 92, 255, 0.08));

  /* стекло */
  --glass: rgba(20, 22, 36, 0.72);
  --glass-line: rgba(205, 213, 255, 0.12);
  --glass-blur: saturate(155%) blur(24px);

  --r-sm: 13px;
  --r-md: 17px;
  --r-lg: 21px;
  --r-xl: 26px;
  --gutter: 16px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.25, 0.5, 1);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: #070810; }
html, body { margin: 0; color: var(--t1); }
body { background: transparent; }
body {
  font: 400 15px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input { font: inherit; color: var(--t1); }
img { display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--red-soft); color: #fff; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 2px; }
.ic { display: inline-flex; width: 20px; height: 20px; flex: none; }
.ic svg { width: 100%; height: 100%; }

/* сплошная поверхность с обводкой — основной материал */
.panel, .case, .item, .tile, .summary, .copy-field, .invite-stats, .rules, .task, .tickets, .list-row, .metric,
.best, .balance-card, .support, .goal, .free, .slot, .player, .bet, .pvp-pot, .game-card {
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--s2), var(--s1)) padding-box, var(--edge) border-box;
}

/* ---------------------------------------------------------------- валюта */
.cur { display: inline-block; width: 0.92em; height: 0.92em; margin-left: 0.22em; vertical-align: -0.12em; flex: none; }

/* ---------------------------------------------------------------- header */
.header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(9px + env(safe-area-inset-top, 0px)) var(--gutter) 9px;
  background: linear-gradient(180deg, rgba(7, 8, 16, 0.96) 0%, rgba(7, 8, 16, 0.78) 100%);
  -webkit-backdrop-filter: var(--glass-blur);
          backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(139, 92, 255, 0.12);
}
.header::after {
  content: ''; position: absolute; left: 12%; right: 12%; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 255, 0.5), rgba(55, 212, 255, 0.35), transparent);
  pointer-events: none;
}
.avatar {
  --size: 40px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center; font-weight: 700; font-size: calc(var(--size) * 0.38);
  background: linear-gradient(145deg, var(--s3), var(--s2)); color: var(--t1);
  border: 1px solid rgba(205, 213, 255, 0.18);
  box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.16), 0 6px 18px -10px rgba(124, 92, 255, 0.9);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
button.avatar { transition: transform 0.15s var(--ease), box-shadow 0.2s; }
button.avatar:active { transform: scale(0.92); }
.hello { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.hello__brand { display: flex; align-items: center; gap: 7px; min-width: 0; }
.brand-mark { width: 29px; height: 29px; flex: none; border-radius: 9px; filter: drop-shadow(0 3px 10px rgba(124, 92, 255, 0.5)); }
.brand-word { font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: -0.035em; line-height: 1; white-space: nowrap; }
.brand-word span { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hello__name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello__sub { font-size: 11.5px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet {
  display: flex; align-items: center; flex: none; height: 40px; padding: 0 3px 0 12px; border-radius: 99px;
  background: linear-gradient(180deg, rgba(34, 38, 58, 0.9), rgba(18, 21, 34, 0.94));
  border: 1px solid rgba(205, 213, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 24px -18px #000;
}
.wallet__val { display: flex; align-items: center; font-weight: 700; font-size: 14.5px; padding-right: 8px; }
.wallet__sep { width: 1px; height: 16px; background: var(--line-2); margin-right: 8px; }
.wallet__ton { display: inline-flex; align-items: center; font-weight: 700; font-size: 14px; color: var(--t1); margin-right: 8px; }
.wallet__add {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); box-shadow: 0 5px 14px -6px rgba(124, 92, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.15s var(--ease);
}
.wallet__add .ic { width: 16px; height: 16px; }
.wallet__add:active { transform: scale(0.88); }

/* ---------------------------------------------------------------- layout */
main { padding: 16px var(--gutter) calc(var(--nav-h) + var(--safe-b) + 40px); }
.view { animation: view-in 0.24s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.page-title { font-family: var(--font-display); font-size: 25px; font-weight: 700; letter-spacing: -0.035em; margin: 4px 0 16px; }
.section { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 28px 0 12px; }
.section__title { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 800; letter-spacing: -0.025em; }
.section__title::before {
  content: ''; width: 3px; height: 17px; border-radius: 3px;
  background: var(--grad); box-shadow: 0 0 12px rgba(124, 92, 255, 0.65);
}
.section__meta { font-size: 13px; color: var(--t3); }
.eyebrow { font-size: 11px; font-weight: 700; color: var(--t3); text-transform: uppercase; letter-spacing: 0.09em; display: flex; align-items: center; gap: 7px; margin: 26px 0 10px; }
.eyebrow .ic { width: 14px; height: 14px; color: var(--red-hi); }
.panel { border-radius: var(--r-lg); }
.muted { color: var(--t2); }
.dim { color: var(--t3); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- buttons */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-sm);
  font-weight: 700; font-size: 15px; white-space: nowrap;
  -webkit-user-select: none; user-select: none;
  transition: transform 0.12s var(--ease), background 0.15s, opacity 0.2s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn .ic { width: 18px; height: 18px; }
.btn--primary {
  background: var(--grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 12px 28px -14px rgba(124, 92, 255, 0.95);
}
.btn--secondary {
  background: linear-gradient(180deg, rgba(45, 50, 76, 0.92), rgba(29, 33, 52, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(205, 213, 255, 0.1);
}
.btn--ghost { border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); }
.btn--success {
  background: linear-gradient(135deg, #47e6aa, #28c8bb); color: #042019;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 26px -16px rgba(62, 224, 161, 0.9);
}
.btn--sm { height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 11px; }
.btn--lg { height: 53px; font-size: 16px; border-radius: 16px; }
.btn--block { width: 100%; }
.btn--primary .cur--tix, .case__price .cur--tix { filter: brightness(0) invert(1); }

.chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(205, 213, 255, 0.08); white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; }
.chip--red { background: var(--grad); border-color: transparent; box-shadow: 0 8px 18px -12px rgba(124, 92, 255, 0.9); }

/* ---------------------------------------------------------------- banners */
.carousel { margin: 0 calc(var(--gutter) * -1); }
.carousel__track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter); scrollbar-width: none; scroll-behavior: smooth; }
.carousel__track::-webkit-scrollbar { display: none; }
.banner {
  --bc: var(--red);
  flex: 0 0 100%; scroll-snap-align: center; position: relative; overflow: hidden;
  min-height: 148px; border-radius: var(--r-xl); text-align: left;
  padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(110% 130% at 100% 0%, rgba(255, 255, 255, 0.19), transparent 54%),
    linear-gradient(115deg, var(--bc) 0%, color-mix(in srgb, var(--bc) 42%, #0d0e1b) 60%, #111222 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 22px 40px -28px rgba(0, 0, 0, 0.9);
  transition: transform 0.15s var(--ease);
}
.banner::after {
  content: ''; position: absolute; right: -40px; bottom: -70px; width: 190px; height: 190px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.035), 0 0 0 58px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}
.banner:active { transform: scale(0.985); }
.banner--image { padding: 0; aspect-ratio: 5 / 2; min-height: 0; background: var(--s2); }
.banner--image::after { display: none; }
.banner--image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner--image .banner__body { position: relative; padding: 18px 20px; height: 100%; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(90deg, rgba(6, 7, 14, 0.78), rgba(6, 7, 14, 0.16) 76%); }
.banner__title { position: relative; z-index: 1; font-family: var(--font-display); font-size: 19px; line-height: 1.22; font-weight: 700; letter-spacing: -0.03em; white-space: pre-line; max-width: 82%; }
.banner__sub { position: relative; z-index: 1; font-size: 13px; opacity: 0.82; margin-top: 6px; max-width: 74%; }
.banner__cta { align-self: flex-start; margin-top: 14px; height: 32px; padding: 0 14px; border-radius: 99px; display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 700; background: #fff; color: #171127; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.7); }
.dots { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
.dots i { width: 5px; height: 5px; border-radius: 5px; background: rgba(205, 213, 255, 0.23); transition: width 0.3s var(--ease), background 0.3s; }
.dots i.on { width: 17px; background: var(--grad); }

/* ---------------------------------------------------------------- free case strip */
.free { margin-top: 12px; width: 100%; text-align: left; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-lg); transition: transform 0.15s var(--ease), box-shadow 0.2s; }
.free:active { transform: scale(0.985); }
.free__art { width: 52px; height: 52px; border-radius: 14px; background: var(--s2); flex: none; overflow: hidden; padding: 6px; }
.free__title { font-weight: 700; font-size: 15px; }
.free__sub { font-size: 13px; color: var(--t3); margin-top: 1px; }

/* ---------------------------------------------------------------- live */
.live { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 1px var(--gutter); }
.live::-webkit-scrollbar { display: none; }
.live__item { flex: none; width: 56px; height: 56px; border-radius: 15px; padding: 7px; }
.live__item .art { width: 100%; height: 100%; display: grid; place-items: center; }
@keyframes pop { from { transform: scale(0.8); opacity: 0; } }

/* ---------------------------------------------------------------- segmented */
.seg { display: flex; gap: 3px; padding: 4px; border-radius: 15px; background: rgba(11, 13, 23, 0.72); border: 1px solid var(--line); }
.seg__btn { flex: 1; min-width: 0; height: 35px; padding: 0 8px; border-radius: 11px; font-weight: 600; font-size: 13.5px; color: var(--t2); display: flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.seg__btn .ic { width: 15px; height: 15px; }
.seg__btn.on { background: linear-gradient(180deg, rgba(124, 92, 255, 0.28), rgba(124, 92, 255, 0.12)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 16px -12px rgba(124, 92, 255, 0.9); border: 1px solid rgba(166, 140, 255, 0.22); }

/* ---------------------------------------------------------------- rarity */
.r-common { --rc: var(--r-common); }
.r-rare { --rc: var(--r-rare); }
.r-epic { --rc: var(--r-epic); }
.r-legendary { --rc: var(--r-legendary); }
/* редкость — мягкий свет снизу плитки + подкрашенная сверху обводка */
.rbg { border: 1px solid transparent; background: linear-gradient(var(--s2), var(--s2)) padding-box, var(--edge) border-box; }
.art { line-height: 1; }
.art img { width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; }

/* ---------------------------------------------------------------- фон подарка
   Тот же радиальный градиент центр → край, которым Telegram рисует NFT-подарки */
[data-bd] { background: radial-gradient(circle at 50% 42%, var(--bd-c), var(--bd-e) 78%) !important; border-color: transparent !important; }

/* ---------------------------------------------------------------- анимации .tgs */
.tgs { display: block; width: 100%; height: 100%; }
.tgs img, .tgs svg { display: block; width: 100% !important; height: 100% !important; object-fit: contain; }
.tgs:not([data-state="still"]):not([data-state="live"]) { border-radius: 30%; background: rgba(0, 0, 0, 0.12); }
.tgs[data-state="error"] { background: rgba(0, 0, 0, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.45' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='8' width='17' height='4.5' rx='1.2'/%3E%3Cpath d='M5 12.5v6.5A1.5 1.5 0 0 0 6.5 20.5h11A1.5 1.5 0 0 0 19 19v-6.5M12 8v12.5'/%3E%3C/svg%3E") center / 42% no-repeat; }
.art-star { width: 58%; height: 58%; display: block; margin: auto; }
.art { line-height: 1; display: grid; place-items: center; }

/* ---------------------------------------------------------------- case grid */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.case { position: relative; overflow: hidden; text-align: center; border-radius: 22px; padding: 7px 7px 13px; transition: transform 0.15s var(--ease), box-shadow 0.2s; }
.case::before {
  content: ''; position: absolute; inset: -40% 10% auto; height: 80%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(124, 92, 255, 0.17), transparent);
  pointer-events: none;
}
.case:active { transform: scale(0.98); }
.case__pic {
  position: relative; aspect-ratio: 1.15; border-radius: 17px; display: grid; place-items: center;
  background: radial-gradient(120% 100% at 50% 0%, #262b45 0%, #151827 55%, #11131f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.case__pic .art { width: 62%; height: 72%; }
.case__name { position: relative; font-weight: 700; font-size: 15px; margin: 10px 6px 0; letter-spacing: -0.015em; }
.case__dist { display: flex; gap: 2px; height: 4px; margin: 8px 14px 0; border-radius: 4px; overflow: hidden; }
.case__dist i { display: block; min-width: 3px; }
.case__foot { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 9px; }
.case__price { display: inline-flex; align-items: center; height: 29px; padding: 0 11px; border-radius: 99px; background: rgba(255, 255, 255, 0.065); border: 1px solid rgba(205, 213, 255, 0.09); font-weight: 800; font-size: 13.5px; }
.case__max { font-size: 12px; color: var(--t3); }
.seg--inline { padding: 3px; border-radius: 12px; }
.seg--inline .seg__btn { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; flex: none; border: 0; }
.seg--inline .seg__btn.on { box-shadow: none; }

/* ---------------------------------------------------------------- item tiles */
.items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.item { position: relative; border-radius: var(--r-md); padding: 5px 5px 9px; text-align: left; overflow: hidden; display: flex; flex-direction: column; }
.item[data-bd] { background: linear-gradient(var(--s1), var(--s1)) padding-box, var(--edge) border-box !important; border: 1px solid transparent !important; }
.item .art { aspect-ratio: 1; border-radius: 12px; padding: 12%; background: var(--s2); }
.item[data-bd] .art { background: radial-gradient(circle at 50% 42%, var(--bd-c), var(--bd-e) 78%); }
.item__name { margin: 7px 4px 0; font-size: 12.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__name small { display: block; font-size: 12px; font-weight: 400; color: var(--t3); overflow: hidden; text-overflow: ellipsis; }
.item__val { margin: 4px 4px 0; display: flex; align-items: center; font-size: 13px; font-weight: 700; }
.item__chance { position: absolute; top: 9px; left: 9px; z-index: 1; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 7px; background: rgba(7, 8, 16, 0.62); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.item__lock { position: absolute; left: 6px; right: 6px; top: 8px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgba(7, 8, 16, 0.9); border: 1px solid var(--line-2); font-size: 11px; font-weight: 700; color: var(--amber); white-space: nowrap; overflow: hidden; z-index: 3; }
button.item { transition: transform 0.15s var(--ease); }
button.item:active { transform: scale(0.97); }

/* ---------------------------------------------------------------- case page */
.back { display: inline-flex; align-items: center; gap: 2px; height: 32px; color: var(--t2); font-weight: 600; margin-left: -6px; }
.back .ic { width: 22px; height: 22px; }
.case-hero { text-align: center; padding: 4px 0 0; }
.case-hero__art { width: 150px; height: 150px; margin: 0 auto; border-radius: 28px; padding: 18px; background: var(--s2); }
.case-hero__art .art { width: 100%; height: 100%; }
.case-hero h1 { margin: 10px 0 4px; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.035em; }
.case-hero .dim { display: flex; align-items: center; justify-content: center; }

.roulette {
  position: relative; overflow: hidden; margin: 14px calc(var(--gutter) * -1) 12px; height: 160px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.roulette::before {
  content: ''; position: absolute; inset: 10px 0; pointer-events: none;
  background: radial-gradient(70% 120% at 50% 50%, rgba(124, 92, 255, 0.15), transparent 70%);
}
.strip { display: flex; gap: 8px; padding: 12px; will-change: transform; }
.tile-col { flex: 0 0 104px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.tile { width: 100%; aspect-ratio: 1; border-radius: var(--r-md); display: grid; place-items: center; }
.tile .art { width: 70%; height: 70%; }
.tile__price { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(205, 213, 255, 0.07); font-size: 12px; font-weight: 700; }
.tile__price .cur { width: 12px; height: 12px; }
.roulette--sm { height: 128px; margin-top: 8px; margin-bottom: 0; }
.roulette--sm .tile-col { flex-basis: 78px; gap: 5px; }
.roulette--sm .tile__price { height: 20px; font-size: 11px; padding: 0 7px; }
.tile-col.win .tile { animation: win 0.7s var(--ease) 2; }
.tile__ton { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; white-space: nowrap; }
.tile__ton .cur { width: 11px; height: 11px; margin-left: 3px; vertical-align: 0; }
.tile.win, .ava-tile.win { animation: win 0.7s var(--ease) 2; }
@keyframes win { 50% { transform: scale(1.06); } }
.marker { position: absolute; left: 50%; top: 6px; bottom: 34px; width: 2px; transform: translateX(-50%); transform-origin: 50% 0; z-index: 2; border-radius: 2px; background: var(--t1); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 14px rgba(166, 140, 255, 0.9); }
.roulette--sm .marker { bottom: 28px; }
.marker::before, .marker::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 6px solid transparent; }
.marker::before { top: -6px; border-top-color: var(--t1); }
.marker::after { bottom: -6px; border-bottom-color: var(--t1); }

.switch { display: inline-flex; align-items: center; gap: 10px; margin: 14px auto 0; color: var(--t2); font-weight: 600; font-size: 14px; }
.switch__track { width: 38px; height: 22px; border-radius: 99px; background: var(--s3); position: relative; transition: background 0.2s; }
.switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.switch.on .switch__track { background: var(--grad); }
.switch.on .switch__track::after { transform: translateX(16px); }

/* ---------------------------------------------------------------- inventory */
.summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); }
.summary__val { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; }

/* ---------------------------------------------------------------- friends */
.promo-card {
  position: relative; overflow: hidden; padding: 21px; border-radius: var(--r-xl);
  background:
    radial-gradient(95% 120% at 100% 0%, rgba(55, 212, 255, 0.34), transparent 56%),
    radial-gradient(120% 120% at 0% 100%, rgba(255, 110, 199, 0.18), transparent 52%),
    linear-gradient(125deg, #8b5cff 0%, #5b48cf 40%, #211c46 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 22px 40px -26px rgba(124, 92, 255, 0.9);
}
.promo-card::after {
  content: ''; position: absolute; right: -50px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 0 0 26px rgba(255, 255, 255, 0.04), 0 0 0 56px rgba(255, 255, 255, 0.025);
}
.promo-card h2 { position: relative; z-index: 1; margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 1.25; font-weight: 700; letter-spacing: -0.03em; max-width: 85%; }
.promo-card p { position: relative; z-index: 1; margin: 8px 0 0; font-size: 14px; opacity: 0.85; max-width: 82%; display: flex; flex-wrap: wrap; align-items: center; }
.promo-card .btn { position: relative; z-index: 1; }
.copy-field { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 5px 5px 5px 14px; border-radius: var(--r-md); }
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 13px/1 var(--font); color: var(--t2); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.metric { padding: 14px 12px; border-radius: var(--r-md); }
.metric__val { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; }
.metric__label { font-size: 12px; color: var(--t3); margin-top: 2px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); }
.list-row__icon { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--s2); color: var(--t2); overflow: hidden; }
.list-row__icon.art { padding: 4px; }
.list-row__icon .ic { width: 20px; height: 20px; }
.list-row__title { font-weight: 500; }
.list-row__sub { font-size: 12px; color: var(--t3); margin-top: 1px; }
.friend-av { font-weight: 600; font-size: 15px; color: var(--t1); border-radius: 50%; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 500; color: var(--t3); border: 1px solid var(--line-2); flex: none; }
.pill .ic { width: 13px; height: 13px; }
.pill--ok { color: var(--green); border-color: rgba(60, 196, 124, 0.3); }
.hint-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--t2); margin: -4px 0 10px; }
.hint-row .ic { width: 15px; height: 15px; color: var(--amber); flex: none; margin-top: 2px; }

.invite-stats { padding: 16px; border-radius: var(--r-lg); }
.invite-stats__kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.invite-stats__kpis div { display: flex; flex-direction: column; gap: 2px; }
.invite-stats__kpis b { font-size: 19px; font-weight: 700; display: inline-flex; align-items: center; }
.invite-stats__kpis span { font-size: 12px; color: var(--t3); }
.bars { position: relative; display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; height: 140px; margin-top: 14px; padding: 28px 0 20px; border-bottom: 1px solid var(--line); }
.bars__col { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.bars__bar { width: 100%; max-width: 14px; border-radius: 4px 4px 0 0; background: var(--red); transition: background 0.15s, height 0.5s var(--ease); }
.bars__bar--zero { background: var(--s3); }
.bars__col.on .bars__bar { background: var(--red-hi); }
.bars__x { position: absolute; bottom: -20px; font-size: 10px; color: var(--t3); white-space: nowrap; }
.bars__tip { position: absolute; top: 0; transform: translateX(-50%); padding: 4px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; background: var(--s3); border: 1px solid var(--line-2); }

/* ---------------------------------------------------------------- rewards / tasks */
.tickets { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--r-lg); }
.tickets__icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--red-soft); color: var(--red-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.tickets__val { font-size: 20px; font-weight: 800; }
.task { padding: 14px; border-radius: var(--r-lg); }
.task--required { background: linear-gradient(180deg, rgba(38, 30, 54, 0.96), var(--s1)) padding-box, var(--edge-red) border-box; }
.task__head { display: flex; gap: 12px; }
.task__icon { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; background: var(--s2); font-size: 22px; color: var(--t2); }
.task__icon .ic { width: 21px; height: 21px; }
.task__title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.task__desc { font-size: 13px; color: var(--t2); margin-top: 3px; line-height: 1.45; }
.task__timer { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--amber); }
.task__timer .ic { width: 13px; height: 13px; }
.task__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.reward { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 11px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(205, 213, 255, 0.08); font-weight: 700; font-size: 15px; }
.reward b { font-weight: 700; }
.progress { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); margin-top: 12px; overflow: hidden; }
.progress > div { height: 100%; border-radius: 5px; background: var(--grad); box-shadow: 0 0 10px rgba(124, 92, 255, 0.6); transition: width 0.4s var(--ease); }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--t3); margin-top: 6px; }
.tag-req { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--red-soft); color: var(--red-hi); font-size: 10.5px; font-weight: 700; margin-left: 6px; vertical-align: 1px; text-transform: uppercase; letter-spacing: 0.04em; }

.gate { min-height: calc(100vh - 120px); display: flex; flex-direction: column; padding-top: 24px; }
.gate__icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; background: var(--s2); border: 1px solid var(--line-2); color: var(--red-hi); }
.gate__icon .ic { width: 30px; height: 30px; }
.gate h1 { text-align: center; font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.gate p { text-align: center; color: var(--t2); margin: 8px auto 22px; max-width: 300px; }

/* ---------------------------------------------------------------- profile */
.profile { text-align: center; padding-top: 6px; }
.profile .avatar { --size: 94px; margin: 0 auto 14px; border: 2px solid rgba(166, 140, 255, 0.55); box-shadow: 0 0 0 5px rgba(124, 92, 255, 0.08), 0 18px 38px -22px rgba(124, 92, 255, 0.9); }
.profile__name { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.profile__handle { display: inline-flex; margin-top: 8px; height: 28px; align-items: center; padding: 0 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); color: var(--t2); font-size: 13px; }
.balance-card { display: flex; align-items: center; gap: 12px; padding: 18px; margin-top: 22px; border-radius: var(--r-lg); text-align: left; }
.balance-card__label { display: flex; align-items: center; gap: 6px; color: var(--t2); font-size: 14px; }
.balance-card__label .ic { width: 16px; height: 16px; }
.balance-card__val { font-size: 29px; font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; display: flex; align-items: center; }
.admin-card {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; width: 100%;
  margin-top: 10px; padding: 13px 15px; border-radius: var(--r-lg); text-align: left;
  color: inherit; text-decoration: none;
  background: linear-gradient(120deg, rgba(255, 198, 90, 0.14), rgba(124, 92, 255, 0.1) 55%, rgba(20, 22, 36, 0.96));
  border: 1px solid rgba(255, 198, 90, 0.28);
  transition: transform 0.15s var(--ease);
}
.admin-card:active { transform: scale(0.985); }
.admin-card__icon { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; background: rgba(255, 198, 90, 0.16); color: var(--gold); }
.admin-card__icon .ic { width: 21px; height: 21px; }
.admin-card b { display: block; font-size: 15px; font-weight: 700; }
.admin-card .dim { display: block; font-size: 12px; margin-top: 1px; line-height: 1.35; }
.admin-card__go { color: var(--gold); opacity: 0.8; }
.support { position: relative; width: 100%; text-align: left; padding: 16px 18px; margin-top: 10px; border-radius: var(--r-lg); display: block; }
.support__badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--green); }
.support__badge .ic { width: 13px; height: 13px; }
.support__title { font-size: 17px; font-weight: 700; margin-top: 6px; }
.support__sub { font-size: 13px; color: var(--t2); margin-top: 2px; }
.support__icon { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--s2); color: var(--t2); }
.support__icon .ic { width: 24px; height: 24px; }
.input { flex: 1; min-width: 0; height: 48px; border-radius: 14px; background: rgba(10, 12, 21, 0.86); border: 1px solid var(--line-2); padding: 0 14px; outline: none; font-weight: 600; transition: border-color 0.2s, box-shadow 0.2s; }
.input:focus { border-color: rgba(139, 92, 255, 0.7); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14); }
.input::placeholder { color: var(--t3); font-weight: 500; }
.best { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-lg); text-align: left; }
.hist__val { font-weight: 700; display: flex; align-items: center; }
.hist__val.is-plus { color: var(--green); }
.hist .art { width: 44px; height: 44px; border-radius: 12px; flex: none; padding: 5px; }
.credit { display: block; text-align: center; margin: 28px 0 0; font-size: 12px; color: var(--t3); text-decoration: none; }

/* ---------------------------------------------------------------- tab bar (стекло) */
.tabbar {
  --count: 5;
  position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b));
  height: var(--nav-h); padding: 5px;
  display: grid; grid-template-columns: repeat(var(--count), 1fr);
  border-radius: 24px;
  background: rgba(13, 15, 25, 0.86);
  -webkit-backdrop-filter: var(--glass-blur);
          backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(205, 213, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 22px 45px -18px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(0, 0, 0, 0.3);
  isolation: isolate;
}
.tabbar::before {
  content: ''; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166, 140, 255, 0.55), rgba(55, 212, 255, 0.35), transparent);
  pointer-events: none;
}
.tabbar__glider {
  position: absolute; z-index: -1; top: 5px; bottom: 5px; left: 5px;
  width: calc((100% - 10px) / var(--count));
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 0.4s var(--spring);
  border-radius: 19px;
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.3), rgba(55, 212, 255, 0.08));
  border: 1px solid rgba(166, 140, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 8px 24px -16px rgba(124, 92, 255, 0.95);
}
.tabbar:not(.has-active) .tabbar__glider { opacity: 0; }
.tabbar button { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 19px; color: var(--t2); font-size: 10.5px; font-weight: 600; transition: color 0.2s; }
.tabbar button span { max-width: 100%; overflow: hidden; white-space: nowrap; }
.tabbar .ic { width: 22px; height: 22px; transition: transform 0.3s var(--spring), filter 0.2s; }
.tabbar button:active .ic { transform: scale(0.86); }
.tabbar button.on { color: #d8ceff; }
.tabbar button.on .ic { filter: drop-shadow(0 0 8px rgba(166, 140, 255, 0.85)); }
.tabbar__dot { position: absolute; top: 7px; right: calc(50% - 15px); width: 7px; height: 7px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 0 2px #0d0f19, 0 0 10px rgba(255, 110, 199, 0.8); }

/* ---------------------------------------------------------------- sheet (стекло) */
.sheet-bg { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; background: rgba(3, 4, 9, 0.6); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: relative; width: 100%; max-height: 90vh; overflow: auto; padding: 10px 18px calc(22px + var(--safe-b));
  border-radius: 28px 28px 0 0;
  background: radial-gradient(120% 60% at 50% 0%, #1a1c2e 0%, #11131f 48%, #0d0f18 100%);
  border-top: 1px solid rgba(205, 213, 255, 0.15);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.7);
  animation: sheet-up 0.3s var(--ease);
}
.sheet::before {
  content: ''; position: absolute; left: 10%; right: 10%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166, 140, 255, 0.6), transparent);
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet__grip { width: 38px; height: 4px; border-radius: 4px; background: rgba(205, 213, 255, 0.2); margin: 0 auto 17px; }
.sheet__title { text-align: center; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 17px; }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.amounts button { height: 52px; border-radius: 14px; background: rgba(10, 12, 21, 0.8); border: 1px solid var(--line-2); font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.amounts button.on { border-color: rgba(139, 92, 255, 0.65); background: var(--red-soft); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12); }

.drop { text-align: center; padding-top: 4px; }
.drop__stage { width: 196px; height: 196px; margin: 0 auto 14px; border-radius: 34px; padding: 22px; background: var(--s2); }
.drop__stage .art { width: 100%; height: 100%; }
.drop__stage--stars { display: grid; place-items: center; }
.drop__model { font-size: 15px; color: var(--t2); margin-top: -12px; margin-bottom: 14px; }
.drop__note { margin: -6px 0 14px; color: var(--t2); font-size: 14px; }
.attrs { margin: 0 0 16px; padding: 0 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); text-align: left; }
.attrs div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.attrs div:last-child { border-bottom: 0; }
.attrs dt { color: var(--t2); }
.attrs dd { margin: 0; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; text-align: right; }
.sheet__hint { margin: 12px 4px 0; font-size: 13px; color: var(--t3); text-align: center; line-height: 1.45; }
.drop__rarity { display: inline-flex; height: 24px; align-items: center; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); }
.drop__name { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 14px; }

/* ---------------------------------------------------------------- misc */
.empty { text-align: center; color: var(--t3); padding: 36px 16px; }
.empty__icon { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 17px; display: grid; place-items: center; background: var(--s2); border: 1px solid var(--line); color: var(--t2); }
.empty__icon .ic { width: 24px; height: 24px; }
.skeleton { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--s1), var(--s2), var(--s1)); background-size: 200% 100%; animation: sk 1.3s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.toast {
  position: fixed; left: 50%; z-index: 99; bottom: calc(var(--nav-h) + var(--safe-b) + 22px);
  max-width: calc(100% - 40px); display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 14px; font-weight: 600; font-size: 14px; white-space: nowrap;
  background: rgba(29, 33, 49, 0.96); border: 1px solid var(--glass-line); box-shadow: 0 16px 36px -18px #000;
  opacity: 0; transform: translate(-50%, 10px); pointer-events: none;
  transition: opacity 0.2s, transform 0.3s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast--error { border-color: rgba(255, 110, 150, 0.45); }
.toast--error::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ff6e96; flex: none; box-shadow: 0 0 10px rgba(255, 110, 150, 0.8); }

/* ---------------------------------------------------------------- приветственная рулетка */
.ring { display: block; }
.ring__track { fill: none; stroke: var(--s3); stroke-width: 5; }
.ring__bar { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease); }
.ring__bar--done { stroke: var(--green); }
.goal { position: relative; padding: 14px; border-radius: var(--r-xl); }
.goal__top { display: flex; align-items: center; gap: 14px; }
.goal__art { width: 62px; height: 62px; border-radius: 16px; flex: none; padding: 7px; }
.goal__art .art { width: 100%; height: 100%; }
.goal__model { font-size: 13px; color: var(--t2); }
.goal--big .goal__art { width: 76px; height: 76px; border-radius: 20px; }
.goal__eyebrow { font-size: 12px; color: var(--t3); }
.goal__name { font-size: 17px; font-weight: 700; margin-top: 1px; letter-spacing: -0.01em; }
.goal__ton { display: inline-flex; align-items: center; margin-top: 4px; font-weight: 600; font-size: 15px; color: var(--ton); }
.goal__ring { position: relative; flex: none; }
.goal__ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--t3); }
.goal__ring b { color: var(--t1); font-size: 15px; font-weight: 700; }
.goal__hint { font-size: 14px; color: var(--t2); margin-top: 14px; }
.goal__hint b { color: var(--t1); font-weight: 600; }
.goal__action { margin-top: 12px; }
.goal__status { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--s2); }
.goal__status .ic { width: 19px; height: 19px; margin-top: 1px; }
.goal__status b { display: block; font-size: 14px; font-weight: 600; color: var(--t1); }
.goal__status span { font-size: 13px; color: var(--t2); }
.goal__status--pending { color: var(--amber); }
.goal__status--sent { color: var(--green); }
.goal__status--rejected { color: var(--red-hi); }
.wg-promo {
  position: relative; overflow: hidden; width: 100%; text-align: left; display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-radius: var(--r-xl);
  background:
    radial-gradient(100% 140% at 100% 0%, rgba(55, 212, 255, 0.3), transparent 58%),
    linear-gradient(125deg, #17203d 0%, #16182a 56%, #121321 100%);
  border: 1px solid rgba(85, 183, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 36px -26px rgba(55, 212, 255, 0.6);
  transition: transform 0.15s var(--ease);
}
.wg-promo:active { transform: scale(0.985); }
.wg-promo__glow { display: none; }
.wg-promo__eyebrow { font-size: 11px; font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.07em; }
.wg-promo__title { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.03em; margin-top: 3px; }
.wg-promo__sub { font-size: 13px; color: var(--t2); margin-top: 3px; display: flex; align-items: center; }
.wg { padding-top: 8px; }
.wg__head { text-align: center; }
.wg__badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--accent-2); border: 1px solid rgba(55, 212, 255, 0.3); background: rgba(55, 212, 255, 0.06); }
.wg__badge .ic { width: 15px; height: 15px; }
.wg__head h1 { font-family: var(--font-display); font-size: 25px; font-weight: 700; letter-spacing: -0.04em; margin: 14px 0 6px; }
.wg__head p { margin: 0; color: var(--t2); display: flex; align-items: center; justify-content: center; gap: 4px; }
.wg__head p b { color: var(--t1); display: inline-flex; align-items: center; font-weight: 700; }
.wg__roulette { margin-top: 22px; }
.wg-win__ton { display: inline-flex; align-items: center; font-size: 20px; font-weight: 700; color: var(--ton); margin: -8px 0 16px; }
.wg-win__cond { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line-2); color: var(--t2); font-size: 14px; }
.wg-win__cond b { color: var(--t1); font-weight: 600; }
.rules { padding: 4px 16px; border-radius: var(--r-lg); }
.rules__row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rules__row span { display: inline-flex; align-items: center; color: var(--t2); }
.rules__row b { font-weight: 600; }
.rules__note { font-size: 12px; color: var(--t3); padding: 12px 0 10px; line-height: 1.45; }

/* ================================================================ ИГРЫ */
.games-switch { margin-bottom: 16px; }

/* --- апгрейд: шкала --- */
.dial { position: relative; width: 248px; height: 248px; margin: 4px auto 18px; }
.dial svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dial__ticks line { stroke: var(--t3); stroke-width: 1.2; opacity: 0.5; }
.dial__ticks line.major { stroke: var(--t2); opacity: 0.85; stroke-width: 1.6; }
.dial__track { fill: none; stroke: var(--s2); stroke-width: 16; }
.dial__win { fill: none; stroke: var(--red); stroke-width: 16; transition: stroke-dasharray 0.45s var(--ease); }
.dial.is-win .dial__win { stroke: var(--green); }
.dial__inner { fill: var(--s1); stroke: var(--line-2); }
.dial__needle path { fill: var(--t1); }
.dial__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.dial__chance { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.dial__chance small { font-size: 20px; font-weight: 600; color: var(--t2); margin-left: 1px; }
.dial__label { font-size: 13px; color: var(--t3); margin-top: 6px; }
.dial.is-lose .dial__chance { color: var(--red-hi); }
.dial.is-win .dial__chance { color: var(--green); }

.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot { position: relative; min-width: 0; overflow: hidden; min-height: 128px; border-radius: var(--r-lg); padding: 12px; text-align: left; display: flex; flex-direction: column; transition: transform 0.15s var(--ease); }
.slot:active { transform: scale(0.98); }
.slot__label { font-size: 13px; color: var(--t3); }
.slot__body { flex: 1; display: flex; align-items: center; gap: 10px; margin-top: 8px; min-width: 0; }
.slot__art { width: 56px; height: 56px; flex: none; border-radius: 14px; padding: 6px; background: var(--s2); }
.slot__name { font-weight: 600; font-size: 14px; line-height: 1.25; }
.slot__val { display: flex; align-items: center; font-size: 14px; color: var(--t2); margin-top: 2px; }
.slot--empty .slot__body { justify-content: center; flex-direction: column; gap: 6px; color: var(--t3); font-size: 13px; }
.slot--empty .slot__body .ic { width: 26px; height: 26px; color: var(--t2); }
.slot--target { background: linear-gradient(var(--s1), var(--s1)) padding-box, var(--edge-red) border-box; }
.stack-art { display: flex; flex: none; }
.stack-art .art { width: 36px; height: 36px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 20px; padding: 4px; margin-right: -10px; }

.mults { display: flex; gap: 6px; margin: 12px 0; }
.mults button { flex: 1; height: 34px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--t2); background: var(--s1); border: 1px solid var(--line-2); transition: color 0.15s, border-color 0.15s; }
.mults button.on { color: var(--t1); border-color: var(--red); }
.upg-cta { flex-direction: column; gap: 0; height: 58px; }
.upg-cta small { font-size: 12px; font-weight: 500; opacity: 0.8; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.shake { animation: shake 0.35s; }

/* --- выбор предметов в шторке --- */
.picker__search { width: 100%; margin-bottom: 12px; }
.picker__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 50vh; overflow: auto; padding: 2px; }
.pick.on { background: linear-gradient(0deg, var(--red-soft), transparent 70%) padding-box, linear-gradient(var(--s1), var(--s1)) padding-box, linear-gradient(var(--red), var(--red)) border-box; }
.pick__check { position: absolute; top: 7px; right: 7px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--red); opacity: 0; transform: scale(0.6); transition: 0.15s var(--ease); z-index: 1; }
.pick__check .ic { width: 13px; height: 13px; }
.pick.on .pick__check { opacity: 1; transform: none; }
.pick.on .item__chance { opacity: 0; }
.picker__foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.stars-add { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.stars-add .input { height: 44px; }

/* --- PvP --- */
.pvp-pot { border-radius: var(--r-xl); padding: 16px; }
.pvp-pot__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pvp-pot__label { font-size: 13px; color: var(--t3); }
.pvp-pot__val { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; display: flex; align-items: center; line-height: 1.1; margin-top: 2px; }
.pvp-status { text-align: right; }
.pvp-status__time { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.pvp-status__time.is-hot { color: var(--red-hi); }
.pvp-status__label { font-size: 13px; color: var(--t3); }
.share { display: flex; gap: 2px; height: 8px; margin-top: 14px; border-radius: 4px; overflow: hidden; background: var(--s3); }
.share i { display: block; height: 100%; min-width: 3px; transition: flex-grow 0.5s var(--ease); }
.pvp-strip { margin: 12px calc(var(--gutter) * -1) 0; height: 104px; }
.ava-tile { flex: 0 0 80px; height: 80px; border-radius: 18px; display: grid; place-items: center; font-weight: 700; font-size: 26px; position: relative; overflow: hidden; background: var(--s2); border: 2px solid var(--pc); }
.ava-tile img { width: 100%; height: 100%; object-fit: cover; }
.pvp-strip .strip { padding: 12px; gap: 8px; }

.bet { border-radius: var(--r-xl); padding: 14px; margin-top: 12px; }
.bet__row { display: flex; gap: 8px; }
.bet__row .input { height: 46px; }
.bet__chips { display: flex; gap: 6px; margin: 10px 0 0; }
.bet__chips button { flex: 1; height: 32px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--t2); background: var(--s2); border: 1px solid var(--line); }
.bet__nft { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin: 10px 0 12px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--t2); font-size: 14px; text-align: left; }
.bet__nft .ic { width: 20px; height: 20px; }
.bet__sum { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--t2); margin-bottom: 10px; }
.bet__sum b { color: var(--t1); display: inline-flex; align-items: center; }

.player { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); }
.player__ava { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; background: var(--s2); overflow: hidden; box-shadow: 0 0 0 2px var(--s1), 0 0 0 4px var(--pc); }
.player__ava img { width: 100%; height: 100%; object-fit: cover; }
.player__name { font-weight: 500; }
.player__items { display: flex; gap: 3px; margin-top: 3px; }
.player__items .art { width: 24px; height: 24px; border-radius: 7px; padding: 2px; background: var(--s2); }
.player__val { text-align: right; font-weight: 600; }
.player__val div { display: flex; align-items: center; justify-content: flex-end; }
.player__chance { font-size: 13px; color: var(--t2); font-weight: 500; }
.player--me { background: linear-gradient(var(--s1), var(--s1)) padding-box, var(--edge-red) border-box; }

.game-card { position: relative; overflow: hidden; display: block; width: 100%; text-align: left; border-radius: var(--r-xl); padding: 16px; min-height: 142px; transition: transform 0.15s var(--ease); }
.game-card::before { content: ''; position: absolute; right: -30px; top: -50px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(closest-side, rgba(124, 92, 255, 0.2), transparent); pointer-events: none; }
.game-card:active { transform: scale(0.985); }
.game-card__title { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.03em; padding-right: 48px; }
.game-card__sub { font-size: 12.5px; color: var(--t2); margin-top: 10px; line-height: 1.4; max-width: 90%; }
.game-card__meta { position: absolute; left: 16px; bottom: 14px; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--t2); }
.game-card__art { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; color: var(--red-hi); opacity: 0.9; }
.games-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------- сгруппированные списки (как настройки Telegram) */
.group { border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); overflow: hidden; }
.group + .group { margin-top: 12px; }
.group__row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 16px; text-align: left; font-size: 15px; border-bottom: 1px solid var(--line); }
.group__row:last-child { border-bottom: 0; }
.group__row > span:first-child:not(.art) { flex: 1; color: var(--t2); }
.group__row b { font-weight: 600; display: inline-flex; align-items: center; }
.group__row--item .art { width: 40px; height: 40px; border-radius: 11px; padding: 4px; background: var(--s2); flex: none; }
.group__row--item .grow { font-weight: 500; line-height: 1.3; }
.group__row--item .dim { font-size: 12px; font-weight: 400; }
.group__row--link { justify-content: space-between; }
.group__row--link .ic { color: var(--t3); }
.group__chart { padding: 14px 16px 16px; }
.group__chart-title { font-size: 13px; color: var(--t3); }
.group__chart .bars { margin-top: 4px; }
.balance-card + .group { margin-top: 12px; }
.best__name small { display: block; font-size: 13px; color: var(--t2); font-weight: 400; }

.slot__name small { display: block; font-size: 12px; font-weight: 400; color: var(--t2); overflow: hidden; text-overflow: ellipsis; }
.wg__head h1 { margin-top: 4px; }

/* ---------------------------------------------------------------- узор и смена превью */
[data-bd], .item[data-bd] .art { position: relative; overflow: hidden; isolation: isolate; }
.pat { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.pat i {
  position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: var(--bd-p);
  -webkit-mask: var(--sym) center / contain no-repeat; mask: var(--sym) center / contain no-repeat;
}
[data-bd] > .tgs, [data-bd] > .art, .item[data-bd] .art > .tgs, [data-bd] > .art-star { position: relative; z-index: 1; }
.swap { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: inherit; opacity: 0; transition: opacity 0.6s var(--ease);
  background: radial-gradient(circle at 50% 42%, var(--bd-c), var(--bd-e) 78%); }
.swap.on { opacity: 1; }
.swap > .tgs { position: relative; z-index: 1; width: 100%; height: 100%; }

/* ---------------------------------------------------------------- страница кейса */
.case-page__head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; margin-bottom: 4px; }
.case-page__head h1 { margin: 0; text-align: center; font-size: 19px; font-weight: 700; }
.case-page__head .back { margin: 0; width: 36px; height: 36px; justify-content: center; border-radius: 50%; background: var(--s2); }
.open-bar { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.open-bar__row { display: flex; gap: 8px; }
.mult .seg__btn { font-weight: 600; }
.fast-btn { flex: none; padding: 0 14px; color: var(--t2); }
.fast-btn.on { color: var(--t1); background: var(--s3); box-shadow: inset 0 0 0 1px var(--amber); }
.fast-btn.on .ic { color: var(--amber); }

/* ---------------------------------------------------------------- искры при выигрыше */
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 5; pointer-events: none; }
.burst i { position: absolute; width: var(--s); height: var(--s); margin: calc(var(--s) / -2); border-radius: 50%; background: var(--gold);
  animation: spark 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) forwards; }
.burst i:nth-child(3n) { background: #fff; }
.burst i:nth-child(3n+1) { background: var(--green); }
@keyframes spark { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(0.3); opacity: 0; } }

/* ---------------------------------------------------------------- апгрейд: кольцо */
.up-stage { position: relative; width: min(300px, 82vw); aspect-ratio: 1; margin: 6px auto 4px; }
.up-wheel { position: absolute; inset: 0; will-change: transform; }
.up-wheel svg { display: block; width: 100%; height: 100%; }
.up-track { fill: none; stroke: var(--s2); stroke-width: 14; }
.up-arc { fill: none; stroke: #7fd8ff; stroke-width: 14; transition: stroke-dasharray 0.35s var(--ease); }
.up-stage.is-win .up-arc { stroke: var(--green); }
.up-stage.is-lose .up-arc { stroke: var(--red); }
.tk { fill: var(--t3); opacity: 0.45; transition: fill 0.25s, opacity 0.25s; }
.tk.is-major { opacity: 0.8; }
.tk.in { fill: #7fd8ff; opacity: 1; }
.up-stage.is-win .tk.in { fill: var(--green); }
.up-pointer { position: absolute; left: 50%; top: -6px; width: 26px; height: 26px; transform: translateX(-50%); transform-origin: 50% 20%; z-index: 3; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.up-pointer path { fill: var(--t1); }
.up-core { position: absolute; inset: 21%; border-radius: 50%; overflow: hidden; display: grid; }
.up-core__disc { position: relative; display: grid; place-items: center; border-radius: 50%; background: var(--s1); border: 1px solid var(--line-2); }
.up-core__disc .art { width: 68%; height: 68%; }
.up-core__disc .swap { border-radius: 50%; }
.up-chance { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); z-index: 3; min-width: 64px; text-align: center; padding: 4px 12px; border-radius: 99px;
  background: var(--s3); border: 1px solid var(--line-2); font-weight: 700; font-size: 15px; }
.up-stage.has-arc .up-chance { color: #bfeaff; }
.up-stage.is-win .up-chance { color: var(--green); }
.up-stage.is-lose .up-chance { color: var(--red-hi); }
.up-slots { margin-top: 10px; }
.up-result { text-align: center; color: var(--t2); font-size: 14px; margin: 10px 0 0; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 7px; margin-left: 6px; border-radius: 99px;
  background: var(--s2); color: var(--t2); font-size: 12px; font-weight: 600; vertical-align: 2px; letter-spacing: 0; }
.stars-chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px 0 10px; border-radius: 99px; background: var(--s2); border: 1px solid var(--line-2); }
.stars-chip .cur { margin: 0; }
.stars-chip input { width: 72px; height: 28px; border: 0; background: none; outline: none; font-weight: 600; font-size: 14px; }
.input--sm { flex: 0 1 150px; height: 32px; border-radius: 99px; font-size: 14px; padding: 0 12px; }
.up-stage + .up-slots .slot { min-height: 104px; }
.pick.on { box-shadow: 0 0 0 2px var(--red); }

/* ---------------------------------------------------------------- TON и обмен */
.tickets__icon--ton { background: rgba(0, 152, 234, 0.12); }
.tickets__icon--ton svg { width: 26px; height: 26px; }
.balance-card__ton { font-size: 15px; font-weight: 600; color: var(--t2); margin-top: 2px; display: flex; align-items: center; letter-spacing: 0; }
.balance-card .btn--secondary { width: 44px; padding: 0; justify-content: center; }
.wallet-bal { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wallet-bal > div { padding: 12px 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.wallet-bal b { font-size: 18px; display: flex; align-items: center; }
.ex-field { display: flex; align-items: center; gap: 8px; position: relative; }
.ex-field .input { padding-right: 40px; }
.ex-field__cur { position: absolute; right: 70px; top: 50%; transform: translateY(-50%); display: flex; }
.ex-field__cur .cur { width: 18px; height: 18px; margin: 0; }
.ex-out { min-height: 22px; margin: 10px 2px 12px; color: var(--t2); font-size: 14px; display: flex; align-items: center; gap: 4px; }
.ex-out b { color: var(--t1); display: inline-flex; align-items: center; }

/* ---------------------------------------------------------------- переключатель игр */
.games-switch .seg__btn { gap: 5px; padding: 0 4px; font-size: 13px; }
.games-switch .seg__btn .ic { width: 15px; height: 15px; }
@media (max-width: 360px) { .games-switch .seg__btn .ic { display: none; } }
.cur-seg .seg__btn { gap: 2px; }
.cur-seg .cur { width: 14px; height: 14px; margin: 0 2px 0 0; }
.cur-seg.is-locked { opacity: 0.45; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--s2); border: 1px solid var(--line); color: var(--t2); }
.icon-btn .ic { width: 18px; height: 18px; }
.is-shake { animation: shake 0.4s; }
.is-plus { color: var(--green); }

/* ---------------------------------------------------------------- краш */
.crash { border-radius: var(--r-xl); background: radial-gradient(120% 80% at 50% 0%, #181d3a 0%, #0f1223 46%, #0c0e19 100%); border: 1px solid var(--line); overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.crash__top { display: flex; align-items: center; gap: 8px; padding: 10px 10px 0; }
.crash__hist { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.crash__hist::-webkit-scrollbar { display: none; }
.xchip { flex: none; height: 26px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.xchip.is-lo { background: rgba(224, 51, 74, 0.14); color: #ff8a98; }
.xchip.is-mid { background: rgba(143, 182, 255, 0.12); color: #8fe8ff; }
.xchip.is-hi { background: rgba(242, 182, 64, 0.15); color: var(--gold); }
.crash__stage { position: relative; height: clamp(220px, 62vw, 320px); }
.crash__stage canvas { position: absolute; inset: 0; }
.crash__rocket { position: absolute; left: 0; top: 0; width: 30px; height: 30px; color: #fff; will-change: transform; pointer-events: none; }
.crash__rocket svg { width: 100%; height: 100%; }
.crash__center { position: absolute; left: 0; right: 44px; top: 18%; text-align: center; pointer-events: none; }
.crash__mult { font-size: clamp(44px, 14vw, 64px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6); }
.crash__mult.is-wait { color: var(--t1); }
.crash__mult.is-crashed { color: var(--red-hi); }
.crash__label { margin-top: 6px; color: var(--t2); font-size: 14px; min-height: 20px; }
.crash__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.crash__bar i { display: block; height: 100%; background: #7fd8ff; transition: width 0.1s linear; }
.crash-bet { margin-top: 10px; padding: 12px; border-radius: var(--r-lg); }
.crash-bet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.field__label { font-size: 13px; color: var(--t3); }
.crash-bet__fields { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; margin-bottom: 10px; }
.field__box { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 6px 0 12px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line-2); min-width: 0; }
.field__box:focus-within { border-color: var(--red); }
.field__box input { flex: 1; min-width: 0; width: 100%; height: 100%; border: 0; background: none; outline: none; font-weight: 600; font-size: 16px; }
.field__box input::placeholder { color: var(--t3); font-weight: 500; font-size: 14px; }
.field__cur { display: flex; }
.field__cur .cur { width: 18px; height: 18px; margin: 0; }
.field__x { color: var(--t3); font-weight: 600; }
.mini { flex: none; height: 34px; min-width: 34px; padding: 0 8px; border-radius: 10px; background: var(--s3); font-size: 13px; font-weight: 600; display: grid; place-items: center; }
.mini--ghost { background: none; color: var(--t3); min-width: 28px; padding: 0; }
.mini .ic { width: 14px; height: 14px; }
@media (max-width: 380px) { .crash-bet__fields { grid-template-columns: 1fr; } }
.btn.is-cashout { font-size: 17px; }
.crash-bets { display: flex; flex-direction: column; gap: 2px; }
.cb-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; font-size: 14px; }
.cb-row:nth-child(odd) { background: var(--s1); }
.cb-row.is-me { box-shadow: inset 2px 0 0 var(--red); }
.cb-ava { width: 28px; height: 28px; border-radius: 50%; background: var(--s3); display: grid; place-items: center; font-size: 12px; font-weight: 600; overflow: hidden; flex: none; }
.cb-ava img { width: 100%; height: 100%; object-fit: cover; }
.cb-x { color: var(--green); font-weight: 600; font-size: 13px; }
.cb-amt { display: inline-flex; align-items: center; font-weight: 600; min-width: 64px; justify-content: flex-end; }
.cb-row.is-win .cb-amt { color: var(--green); }
.cb-row.is-lost .cb-amt { color: var(--t3); text-decoration: line-through; }
.fair-row { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--s2); margin-top: 8px; font-size: 13px; }
.fair-row code { font-size: 11px; word-break: break-all; color: var(--t2); }
.fair-row .ok { color: var(--green); } .fair-row .bad { color: var(--red-hi); }
.fair-item { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--s2); font-size: 14px; }
.fair-item .ic { width: 16px; height: 16px; color: var(--t3); }

/* ---------------------------------------------------------------- мины */
.mines { padding: 14px; border-radius: var(--r-xl); background: var(--s1); border: 1px solid var(--line); }
.mines__top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; padding: 0 2px; }
.mines__label { font-size: 12px; color: var(--t3); }
.mines__mult { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: #8fe8ff; }
.mines__mult.is-win { color: var(--green); }
.mines__mult.is-lost { color: var(--red-hi); }
.mines__right { text-align: right; }
.mines__next { font-size: 16px; font-weight: 600; color: var(--t2); }
.mines__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cell { aspect-ratio: 1; border-radius: 14px; background: var(--s3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -3px 0 rgba(0, 0, 0, 0.25); display: grid; place-items: center; transition: transform 0.15s var(--ease), background 0.2s; }
.cell:not(:disabled):active, .cell.is-press { transform: scale(0.92); }
.cell:disabled { cursor: default; }
.cell__in { width: 52%; height: 52%; display: grid; place-items: center; }
.cell__in svg { width: 100%; height: 100%; }
.cell.is-gem { background: #10263a; box-shadow: inset 0 0 0 1px rgba(105, 215, 255, 0.38); color: #8fe8ff; animation: pop 0.25s var(--spring); }
.cell.is-mine { background: #2a1a1d; color: #ff8a98; }
.cell.is-boom { background: var(--red); color: #fff; animation: pop 0.3s var(--spring); }
.cell.is-dim { color: rgba(169, 196, 255, 0.35); }
.cell.is-dim, .cell.is-mine { box-shadow: none; }
@keyframes pop { 0% { transform: scale(0.7); } 100% { transform: scale(1); } }
.mines__count { display: flex; align-items: center; gap: 2px; margin-top: 10px; padding: 4px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.mines__count span { padding: 0 8px 0 6px; font-size: 13px; color: var(--t3); }
.mines__count button { flex: 1; min-width: 34px; height: 34px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--t2); }
.mines__count button.on { background: var(--s3); color: var(--t1); }
.mines__count button:disabled:not(.on) { opacity: 0.4; }
.mines__curs { display: flex; justify-content: center; margin-top: 10px; }
.mines__bar { display: flex; gap: 8px; margin-top: 10px; }
.stepper { display: flex; align-items: center; gap: 2px; height: 52px; padding: 0 6px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line-2); }
.stepper button { width: 36px; height: 36px; border-radius: 50%; background: var(--s3); display: grid; place-items: center; flex: none; }
.stepper button:disabled { opacity: 0.4; }
.stepper .ic { width: 16px; height: 16px; }
.stepper input { width: 58px; text-align: center; border: 0; background: none; outline: none; font-weight: 600; font-size: 16px; }
.stepper > span { display: flex; margin-right: 4px; }
.stepper > span .cur { width: 16px; height: 16px; margin: 0; }
.mn-h .list-row__icon.is-win { color: #8fe8ff; background: #10263a; }
.mn-h .list-row__icon.is-lost { color: #ff8a98; background: #2a1a1d; }
.mn-h b { display: inline-flex; align-items: center; white-space: nowrap; }
input[type='number'] { -moz-appearance: textfield; appearance: textfield; }
input[type='number']::-webkit-outer-spin-button, input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field__box--auto input:placeholder-shown + .mini { display: none; }
.field__box--auto input { font-size: 15px; }

/* ---------------------------------------------------------------- живой фон */
.red-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(120% 85% at 50% -12%, #1a1740 0%, #0d0c1c 42%, #070810 100%),
    #070810;
}
/* тонкая звёздная сетка, растворяется к краям */
.red-bg__tiles {
  position: absolute; inset: -10%;
  background:
    linear-gradient(rgba(139, 92, 255, 0.055) 1px, transparent 1px) 0 0 / 100% 46px,
    linear-gradient(90deg, rgba(139, 92, 255, 0.055) 1px, transparent 1px) 0 0 / 46px 100%;
  -webkit-mask: radial-gradient(90% 70% at 50% 18%, #000 10%, transparent 78%);
          mask: radial-gradient(90% 70% at 50% 18%, #000 10%, transparent 78%);
  transform: perspective(900px) rotateX(12deg) scale(1.18);
  transform-origin: 50% 0%;
  opacity: 0.8;
}
.red-bg__blob {
  position: absolute; width: 44vmin; height: 44vmin; border-radius: 50%;
  filter: blur(42px); opacity: 0.5; will-change: transform, opacity;
  mix-blend-mode: screen;
}
.red-bg .b1 { left: -8%; top: -6%; background: radial-gradient(circle, #8b5cff 0%, rgba(96, 58, 255, 0.5) 38%, rgba(70, 40, 190, 0) 70%); animation: rb-move1 18s ease-in-out infinite alternate, rb-pulse 6s ease-in-out infinite; }
.red-bg .b2 { left: 58%; top: 18%; width: 36vmin; height: 36vmin; background: radial-gradient(circle, #37d4ff 0%, rgba(35, 132, 220, 0.42) 40%, rgba(20, 80, 160, 0) 72%); animation: rb-move2 22s ease-in-out infinite alternate, rb-pulse 7s ease-in-out infinite 1s; }
.red-bg .b3 { left: 8%; top: 72%; width: 34vmin; height: 34vmin; background: radial-gradient(circle, #ff6ec7 0%, rgba(180, 50, 140, 0.34) 42%, rgba(120, 30, 100, 0) 72%); animation: rb-move3 20s ease-in-out infinite alternate, rb-pulse 8s ease-in-out infinite 2s; }
@keyframes rb-move1 { to { transform: translate(34vw, 24vh); } }
@keyframes rb-move2 { to { transform: translate(-28vw, 30vh); } }
@keyframes rb-move3 { to { transform: translate(36vw, -34vh); } }
@keyframes rb-pulse { 50% { opacity: 0.28; } }
@media (prefers-reduced-motion: reduce) { .red-bg__blob { animation: none; } }
.sub-ch.is-ok .list-row__icon { color: var(--green); background: rgba(60, 196, 124, 0.12); }
.sub-gate .list-row__icon { color: var(--red-hi); background: var(--red-soft); }
.link-btn { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; color: var(--ton); font-size: 13px; font-weight: 600; }
.link-btn .ic { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- комиссия за вывод */
.fee-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; margin-bottom: 12px; border-radius: var(--r-lg); text-align: left;
  background: linear-gradient(180deg, rgba(242, 182, 64, 0.14), rgba(242, 182, 64, 0.05)), var(--s1); border: 1px solid rgba(242, 182, 64, 0.35); }
.fee-banner__art { width: 48px; height: 48px; border-radius: 12px; flex: none; display: grid; place-items: center; padding: 4px; }
.fee-banner__art .art { width: 100%; height: 100%; }
.fee-banner__title { display: block; font-weight: 700; font-size: 15px; }
.fee-banner__sub { display: block; font-size: 13px; color: var(--t2); line-height: 1.3; margin-top: 2px; }
.fee-banner__btn { flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--gold); color: #2a1a00; font-weight: 700; font-size: 14px; }
.fee-banner__btn .cur { filter: brightness(0.35); }
.fee-box { margin: 4px 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); }
.fee-box__row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.fee-box__row b { display: inline-flex; align-items: center; font-size: 16px; }
.fee-box p { margin: 8px 0 0; font-size: 13px; color: var(--t2); line-height: 1.4; }
.item__lock--pay { background: var(--gold); border-color: transparent; color: #2a1a00; }
.goal__fee { margin-top: 8px; font-size: 12px; color: var(--t2); text-align: center; }
.goal__status--approved { color: var(--green); }
.case__alt { margin-top: 5px; font-size: 12px; color: var(--t3); display: flex; align-items: center; justify-content: center; }
.case__alt .cur { width: 12px; height: 12px; }
.pay-cur { margin-bottom: 8px; }
.pay-cur .seg__btn { font-weight: 600; gap: 4px; }
.pay-cur .cur { width: 15px; height: 15px; margin: 0; }

/* условия перед бесплатной рулеткой */
.wg-tasks { margin: 0 0 12px; padding: 14px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(240, 169, 58, 0.1), rgba(240, 169, 58, 0.03)); border: 1px solid rgba(240, 169, 58, 0.28); display: flex; flex-direction: column; gap: 8px; }
.wg-tasks__title { font-size: 18px; font-weight: 700; }
.wg-tasks__sub { font-size: 14px; color: var(--amber); margin-bottom: 2px; }
.wg-task { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(15, 10, 8, 0.6); border: 1px solid var(--line); text-align: left; font-size: 15px; font-weight: 500; }
.wg-task b { font-weight: 700; }
.wg-task__ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(240, 169, 58, 0.16); color: var(--amber); }
.wg-task__ic svg, .wg-task__go svg { width: 20px; height: 20px; }
.wg-task__go { color: var(--t3); display: flex; }
.wg-task__count { font-weight: 700; color: var(--amber); }
.wg-task.is-done { opacity: 0.7; }
.wg-task.is-done .wg-task__ic, .wg-task.is-done .wg-task__go, .wg-task.is-done .wg-task__count { color: var(--green); }
.wg-task.is-done .wg-task__ic { background: rgba(60, 196, 124, 0.14); }
.wg-tasks .btn svg { width: 18px; height: 18px; }

/* пополнение криптой */
#dep-tabs .seg__btn { gap: 6px; }
#dep-tabs .ic, #dep-tabs svg { width: 16px; height: 16px; }
#dep-tabs .cur { margin: 0; }
.cp-get { min-height: 22px; margin: 0 2px 12px; font-size: 14px; color: var(--t2); display: flex; align-items: center; gap: 4px; }
.cp-get b { color: var(--t1); display: inline-flex; align-items: center; }
.cp-wait { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); font-size: 13px; color: var(--t2); }
.cp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); flex: none; }

/* ================================================================ ArhiGame: финальная полировка */
/* крупные числа — фирменный шрифт */
.dial__chance, .pvp-pot__val, .crash__mult, .mines__mult, .summary__val, .tickets__val,
.metric__val, .invite-stats__kpis b, .balance-card__val, .pvp-status__time {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
}
.dial__chance small, .pvp-pot__val .cur, .crash__mult .cur { font-family: var(--font); }

/* сгруппированные списки — как аккуратные карточки настроек */
.group {
  border-radius: 19px;
  background: linear-gradient(180deg, rgba(23, 26, 42, 0.95), rgba(14, 16, 26, 0.98));
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
.group + .group { margin-top: 12px; }
.group__row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 11px 16px; text-align: left; font-size: 15px; border-bottom: 1px solid var(--line); }
.group__row:last-child { border-bottom: 0; }
.group__row > span:first-child:not(.art) { flex: 1; color: var(--t2); }
.group__row b { font-weight: 700; display: inline-flex; align-items: center; }
.group__row--item .art { width: 40px; height: 40px; border-radius: 11px; padding: 4px; background: var(--s2); flex: none; }
.group__row--item .grow { font-weight: 600; line-height: 1.3; }
.group__row--item .dim { font-size: 12px; font-weight: 400; }
.group__row--link { justify-content: space-between; transition: background 0.15s; }
.group__row--link:active { background: rgba(255, 255, 255, 0.035); }
.group__row--link .ic { color: var(--t3); }
.group__chart { padding: 14px 16px 16px; }
.group__chart-title { font-size: 12px; color: var(--t3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; }
.group__chart .bars { margin-top: 4px; }

/* заметные, но аккуратные акценты */
.summary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px -34px rgba(0, 0, 0, 0.9); }
.copy-field { background: linear-gradient(180deg, rgba(24, 27, 43, 0.95), rgba(13, 15, 25, 0.98)) padding-box, var(--edge) border-box; }
.copy-field code { color: var(--t2); }
.metric { background: linear-gradient(180deg, rgba(24, 27, 43, 0.9), rgba(13, 15, 25, 0.95)) padding-box, var(--edge) border-box; }
.invite-stats { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045); }
.bars__bar { background: var(--grad); }
.bars__bar--zero { background: rgba(255, 255, 255, 0.08); }
.bars__col.on .bars__bar { background: linear-gradient(180deg, #d1c4ff, #7c5cff); box-shadow: 0 0 14px rgba(124, 92, 255, 0.6); }
.bars__tip { background: #262a42; border-color: var(--line-2); }

/* игра: шкалы и панели */
.dial__win, .up-arc { filter: drop-shadow(0 0 8px rgba(124, 92, 255, 0.38)); }
.dial.is-win .dial__win, .up-stage.is-win .up-arc { filter: drop-shadow(0 0 10px rgba(62, 224, 161, 0.5)); }
.mines { background: linear-gradient(180deg, rgba(20, 23, 38, 0.96), rgba(12, 14, 23, 0.98)); border-color: var(--line); }
.bet, .pvp-pot, .crash-bet { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045); }
.slot--target { box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.12), 0 0 28px -14px rgba(124, 92, 255, 0.65); }

/* золотые и предупреждающие блоки */
.fee-banner { border-radius: 19px; background: linear-gradient(120deg, rgba(255, 198, 90, 0.14), rgba(255, 198, 90, 0.03) 60%, var(--s1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.fee-banner__btn { border-radius: 11px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.wg-tasks { border-radius: 19px; background: linear-gradient(180deg, rgba(45, 37, 62, 0.7), rgba(17, 18, 30, 0.85)); border-color: rgba(255, 184, 77, 0.24); }
.wg-task { border-radius: 14px; background: rgba(10, 11, 20, 0.55); }
.wg-task__ic { background: rgba(255, 184, 77, 0.14); }

/* аватары и участники */
.player--me { box-shadow: inset 2px 0 0 var(--red-hi), 0 0 24px -18px rgba(166, 140, 255, 0.9); }
.player__ava { box-shadow: 0 0 0 2px var(--s1), 0 0 0 4px var(--pc); }
.cb-row.is-me { box-shadow: inset 2px 0 0 var(--red-hi); }

/* аккуратные скроллбары на десктопе */
* { scrollbar-width: thin; scrollbar-color: rgba(124, 92, 255, 0.4) transparent; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124, 92, 255, 0.35); border-radius: 99px; }

/* в Telegram Desktop и обычном браузере приложение остаётся телефонной колонкой */
@media (min-width: 640px) {
  .header { max-width: 560px; margin-inline: auto; border-radius: 0 0 18px 18px; border: 1px solid var(--line); border-top: 0; }
  main { max-width: 560px; margin-inline: auto; }
  .tabbar { width: calc(100% - 20px); max-width: 540px; left: 50%; right: auto; transform: translateX(-50%); }
  .sheet-bg { justify-content: center; }
  .sheet { max-width: 560px; border-radius: 28px 28px 0 0; }
}

@media (max-width: 360px) {
  .brand-word { font-size: 12.5px; }
  .brand-mark { width: 26px; height: 26px; }
  .wallet { padding-left: 10px; }
  .wallet__val, .wallet__ton { font-size: 13px; }
  .hello__sub { font-size: 10.5px; }
}

/* Семантика проигрыша и ошибок: отдельный красный, чтобы не путать с брендовым фиолетовым */
:root { --danger: #ff6b81; --danger-hi: #ff93a3; }
.crash__mult.is-crashed,
.mines__mult.is-lost,
.up-stage.is-lose .up-chance,
.dial.is-lose .dial__chance,
.fair-row .bad,
.goal__status--rejected { color: var(--danger-hi); }
.up-stage.is-lose .up-arc { stroke: var(--danger); }
.cell.is-boom { background: var(--danger); }
.pvp-status__time.is-hot { color: var(--amber); }
