:root {
  --bg: #0b0c0f;
  --surface: #14161b;
  --surface-2: #1c1f26;
  --surface-3: #252932;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f3f4f6;
  --muted: #8b909a;
  --primary-bg: #f3f4f6;
  --primary-fg: #0b0c0f;
  --gold: #f2c14e;
  --gold-2: #fff1b8;
  --ok: #3ecf8e;
  --bad: #ff5a5f;
  --st: #cf6a32;
  --sv: #ffd700;
  --shadow: 0 12px 34px rgba(0, 0, 0, .4);

  --r-CONSUMER: #b0c3d9;
  --r-INDUSTRIAL: #5e98d9;
  --r-MIL_SPEC: #4b69ff;
  --r-RESTRICTED: #8847ff;
  --r-CLASSIFIED: #d32ce6;
  --r-COVERT: #eb4b4b;
  --r-CONTRABAND: #e4ae39;
  --r-KNIFE: #e4ae39;
  --r-GLOVES: #e4ae39;

  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --tabbar-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

:root[data-theme="light"] {
  --bg: #f2f3f6;
  --surface: #ffffff;
  --surface-2: #eceef2;
  --surface-3: #e2e5ea;
  --line: rgba(0, 0, 0, .07);
  --line-strong: rgba(0, 0, 0, .16);
  --text: #111317;
  --muted: #6b707a;
  --primary-bg: #111317;
  --primary-fg: #ffffff;
  --shadow: 0 12px 34px rgba(20, 24, 32, .14);
}

.r-CONSUMER   { --rc: var(--r-CONSUMER); }
.r-INDUSTRIAL { --rc: var(--r-INDUSTRIAL); }
.r-MIL_SPEC   { --rc: var(--r-MIL_SPEC); }
.r-RESTRICTED { --rc: var(--r-RESTRICTED); }
.r-CLASSIFIED { --rc: var(--r-CLASSIFIED); }
.r-COVERT     { --rc: var(--r-COVERT); }
.r-CONTRABAND { --rc: var(--r-CONTRABAND); }
.r-KNIFE      { --rc: var(--r-KNIFE); }
.r-GLOVES     { --rc: var(--r-GLOVES); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  user-select: none;
  -webkit-user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: inherit; }
button:disabled { cursor: default; }
svg { display: block; }
img { display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0; }
input { font: inherit; color: inherit; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.break { word-break: break-all; }
.sep { color: var(--muted); font-weight: 400; }
.center { text-align: center; }
.pad { padding: 28px 12px; }
.bad { color: var(--bad); }

/* ---------- монета, ценники, метки ---------- */

.coin {
  display: inline-block;
  width: .95em;
  height: .95em;
  border-radius: 50%;
  flex: none;
  background: radial-gradient(circle at 34% 30%, #fff1b8 0 12%, #f2c14e 45%, #b8860b 100%);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .16), inset 0 0 0 3px rgba(255, 255, 255, .18);
}
.amount { display: inline-flex; align-items: center; gap: .3em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 3px 8px 3px 7px;
  border-radius: 7px;
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 700;
}
.mark { display: inline-block; margin-right: 4px; padding: 0 4px; border-radius: 4px; font-size: 9.5px; font-weight: 800; line-height: 15px; vertical-align: 1px; color: #fff; }
.mark.st { background: var(--st); }
.mark.sv { background: var(--sv); color: #231a00; }
.tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
}
.tag.hot { background: linear-gradient(135deg, #ff7a3d, #ff2d55); box-shadow: 0 4px 12px rgba(255, 60, 60, .35); }
.tag.new { background: linear-gradient(135deg, #3ecf8e, #1fa6a0); }
.badge {
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--surface-2);
  color: var(--muted);
}

/* ---------- каркас ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.logo { display: flex; align-items: center; gap: 8px; margin-right: auto; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.back-btn { display: grid; place-items: center; width: 36px; height: 36px; margin-right: 10px; border-radius: 50%; background: var(--surface); color: var(--text); }
.back-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.back-btn:active { transform: scale(.94); }
/* на внутренних экранах место нужно кнопке «Назад» — прячем подпись логотипа */
.back-btn:not([hidden]) + .logo span { display: none; }
.logo-mark { width: 26px; height: 26px; filter: drop-shadow(0 4px 10px rgba(242, 193, 78, .35)); }
.logo-mark rect { fill: var(--gold); }
.logo-mark path { fill: none; stroke: #111; stroke-width: 2; stroke-linejoin: round; }
.top-right { display: flex; align-items: center; gap: 8px; }
.lvl { position: relative; width: 36px; height: 36px; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.lvl svg { position: absolute; inset: 0; width: 36px; height: 36px; transform: rotate(-90deg); }
.lvl-track { fill: var(--surface); stroke: var(--surface-3); stroke-width: 3; }
.lvl-bar { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.lvl span { position: relative; }
.balance {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  background: var(--surface);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.balance.up { animation: flash-up .7s; }
.balance.down { animation: flash-down .7s; }
@keyframes flash-up { 30% { box-shadow: 0 0 0 2px var(--ok); } }
@keyframes flash-down { 30% { box-shadow: 0 0 0 2px var(--line-strong); } }

main { max-width: 600px; margin: 0 auto; }
.page { padding: 4px 16px 24px; animation: page-in .22s ease-out; }
body.has-tabs .page { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 20px); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
body.booting .tabbar { opacity: 0; }

.page-title { margin: 6px 0 10px; }
.lead { margin-bottom: 16px; font-size: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.footnote { margin-top: 24px; text-align: center; font-size: 12px; color: var(--muted); }

.loader {
  width: 28px;
  height: 28px;
  margin: 30vh auto 0;
  border-radius: 50%;
  border: 2.5px solid var(--line-strong);
  border-top-color: var(--text);
  animation: spin .8s linear infinite;
}
.loader.small { margin: 28px auto; width: 22px; height: 22px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  transition: transform .25s ease, opacity .25s;
}
body:not(.has-tabs) .tabbar { transform: translateY(110%); }
body.busy .tabbar { pointer-events: none; opacity: .5; }
.tabbar button {
  flex: 1;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--muted);
  transition: color .15s;
}
.tabbar svg, .row svg, .icon-btn svg, .bb-icon svg, .search svg, .slot-arrow svg, .btn svg, .empty-icon svg, .perk-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabbar svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--text); }
.tabbar button.on svg { color: var(--gold); }

/* ---------- кнопки, чипы, поиск ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
  text-align: center;
  transition: transform .12s, opacity .15s;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; }
.btn.primary { background: var(--primary-bg); color: var(--primary-fg); }
.btn.big { height: 54px; font-size: 16px; }
.btn.ghost { background: var(--surface-2); }
.btn.sm { width: auto; height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.link { color: var(--gold); font-size: 13px; font-weight: 650; }

.chips { display: flex; gap: 6px; margin: 12px 0; }
.scroll-x { overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
.scroll-x::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.chip.on { background: var(--primary-bg); color: var(--primary-fg); }
.chip.small { height: 28px; padding: 0 11px; font-size: 12.5px; }
.chips.sorts { margin-top: -4px; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  margin-top: 14px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
}
.search svg { width: 18px; height: 18px; flex: none; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: none;
  color: var(--text);
  font-size: 15px;
  user-select: text;
  -webkit-user-select: text;
}
.search input::-webkit-search-cancel-button { filter: grayscale(1); }

/* ---------- лобби ---------- */

.promo {
  position: relative;
  height: 200px;
  margin-top: 4px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: linear-gradient(135deg, #1d1506 0%, #140f22 55%, #0c1524 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 14px 34px rgba(0, 0, 0, .35);
}
.promo-bg {
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(38% 45% at 78% 50%, rgba(242, 193, 78, .38), transparent 70%),
    radial-gradient(30% 40% at 12% 95%, rgba(255, 94, 168, .25), transparent 70%),
    radial-gradient(30% 40% at 20% 0%, rgba(90, 200, 255, .18), transparent 70%);
  animation: promo-glow 7s ease-in-out infinite alternate;
}
.promo-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 60% 20%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 85% 70%, #fff1b8 50%, transparent 51%),
    radial-gradient(1px 1px at 40% 80%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 45%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 10% 60%, #fff1b8 50%, transparent 51%);
  animation: twinkle 3s ease-in-out infinite alternate;
}
@keyframes promo-glow { to { transform: translate(-4%, 3%) scale(1.08); } }
@keyframes twinkle { from { opacity: .25; } to { opacity: .9; } }
.promo-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 18px 16px 30px 18px;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity .6s ease, transform .6s ease;
  pointer-events: none;
}
.promo-slide.on { opacity: 1; transform: none; pointer-events: auto; }
.promo-text { position: relative; z-index: 2; max-width: 60%; }
.promo-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.promo-title { margin: 6px 0 14px; font-size: 22px; line-height: 1.15; font-weight: 850; letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.promo-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff1b8, #f2c14e);
  color: #1d1500;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(242, 193, 78, .35);
  transition: transform .12s;
}
.promo-cta:active { transform: scale(.96); }
.promo-cta .coin { box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .25); }
.promo-img {
  position: absolute;
  right: -14px;
  top: 50%;
  z-index: 1;
  width: 56%;
  height: 160px;
  transform: translateY(-56%) rotate(-14deg);
}
.promo-img::before {
  content: "";
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 45%, transparent), transparent);
  filter: blur(10px);
}
.promo-img img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .6)); animation: float 4s ease-in-out infinite; }
.promo-slide.on .promo-img { animation: slide-in .7s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes slide-in { from { transform: translateY(-56%) rotate(-30deg) scale(.7); opacity: 0; } }
.promo-dots { position: absolute; left: 18px; bottom: 14px; z-index: 3; display: flex; gap: 5px; }
.promo-dots button { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .3); transition: width .3s, background .3s; }
.promo-dots button.on { width: 18px; background: var(--gold); }

.perks { display: flex; gap: 8px; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.perks::-webkit-scrollbar { display: none; }
.perk {
  flex: 0 0 150px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 12px;
  border-radius: 16px;
  background: var(--surface);
  scroll-snap-align: start;
}
.perk b { font-size: 14.5px; letter-spacing: -.01em; }
.perk > span:last-child { font-size: 12px; line-height: 1.35; color: var(--muted); }
.perk-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 4px; border-radius: 12px; color: #fff; }
.perk-icon svg { width: 20px; height: 20px; stroke-width: 2; }
.perk:nth-child(1) .perk-icon { background: linear-gradient(135deg, #fff1b8, #f2c14e); color: #1d1500; }
.perk:nth-child(2) .perk-icon { background: linear-gradient(135deg, #ff7ad9, #8847ff); }
.perk:nth-child(3) .perk-icon { background: linear-gradient(135deg, #6ff2b4, #1fa6a0); }
.perk:nth-child(4) .perk-icon { background: linear-gradient(135deg, #ffb36b, #ff2d55); }
.perk:nth-child(5) .perk-icon { background: linear-gradient(135deg, #7ad7ff, #4b69ff); }
.perk:nth-child(6) .perk-icon { background: linear-gradient(135deg, #fff1b8, #ff9f1c); color: #1d1500; }

.bonus-banner, .bonus-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
  padding: 12px 12px 12px 14px;
  border-radius: 16px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 14%, var(--surface)), var(--surface) 60%);
  text-align: left;
}
.bb-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
.bb-icon svg { width: 22px; height: 22px; }
.bb-text, .bonus-text { flex: 1; display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.bb-text b, .bonus-text b { font-size: 15px; }
.bb-text > span, .bonus-text > span { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.bb-cta { padding: 8px 14px; border-radius: 10px; background: var(--gold); color: #1d1500; font-size: 14px; font-weight: 800; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-4deg) scale(1.05); } 90% { transform: rotate(4deg) scale(1.05); } }

.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px 10px;
  border-radius: 16px;
  background:
    radial-gradient(80% 55% at 50% 38%, rgba(255, 255, 255, .07), transparent 70%),
    var(--surface);
  text-align: center;
  overflow: hidden;
  min-width: 0;
  transition: transform .15s;
}
.case-card:active { transform: scale(.96); }
.case-img { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.case-img img { width: 96%; height: 96%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); transition: transform .3s; }
.case-card:hover .case-img img { transform: translateY(-3px) scale(1.03); }
.case-name { width: 100%; font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-card .price-tag { align-self: center; }

/* ---------- страница кейса ---------- */

.case-page .stage { position: relative; margin-top: 2px; }
.hero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; text-align: center; }
.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  width: 260px;
  height: 220px;
  transform: translateX(-50%);
  z-index: -1;
  background: radial-gradient(closest-side, rgba(242, 193, 78, .22), transparent);
  animation: glow 3.5s ease-in-out infinite;
}
@keyframes glow { 50% { opacity: .55; transform: translateX(-50%) scale(1.1); } }
.hero-img { width: 230px; height: 190px; display: grid; place-items: center; animation: float 4s ease-in-out infinite; }
.hero-img img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .5)); }
@keyframes float { 50% { transform: translateY(-7px); } }
.hero h1 { font-size: 26px; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--muted); }

/* ---------- рулетка ---------- */

.rolls { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.rl {
  position: relative;
  height: 150px;
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.rl-compact { height: 92px; }
.rl-track { display: flex; gap: 6px; height: 100%; padding: 10px 0; will-change: transform; }
.rl-card {
  position: relative;
  flex: 0 0 124px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 8px 10px;
  border-radius: 13px;
  background:
    radial-gradient(110% 70% at 50% 100%, color-mix(in srgb, var(--rc) 32%, transparent), transparent 70%),
    var(--surface-2);
  transition: transform .3s, box-shadow .3s, opacity .3s;
}
.rl-compact .rl-card { flex-basis: 84px; padding: 4px 6px 8px; }
.rl-card::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--rc); }
.rl-art { flex: 1; display: grid; place-items: center; min-height: 0; }
.rl-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.rl-name { font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-compact .rl-name { display: none; }
.rl-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold);
  z-index: 2;
}
.rl-marker::before, .rl-marker::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 7px solid transparent; }
.rl-marker::before { top: 0; border-top-color: var(--gold); }
.rl-marker::after { bottom: 0; border-bottom-color: var(--gold); }
.rl.done .rl-card:not(.win) { opacity: .3; }
.rl.done .rl-marker { opacity: 0; transition: opacity .3s; }
.rl-card.win { transform: scale(1.05); box-shadow: 0 0 0 1.5px var(--rc), 0 0 30px color-mix(in srgb, var(--rc) 55%, transparent); }

/* ---------- панель открытия ---------- */

.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px -16px -24px;
  padding: 18px 16px calc(12px + var(--safe-bottom));
  background: linear-gradient(to top, var(--bg) 72%, transparent);
}
.action-row { display: flex; gap: 8px; }
.seg { flex: 1; display: flex; padding: 3px; border-radius: 13px; background: var(--surface); }
.seg button { flex: 1; height: 38px; border-radius: 10px; font-weight: 700; color: var(--muted); text-align: center; transition: background .15s, color .15s; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.icon-btn { flex: none; display: grid; place-items: center; width: 44px; border-radius: 13px; background: var(--surface); color: var(--muted); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.on { color: var(--gold); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 50%, transparent); }
body.busy .seg, body.busy .icon-btn { opacity: .5; pointer-events: none; }

/* ---------- карточки предметов ---------- */

.item-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 7px 8px 10px;
  border-radius: 14px;
  background:
    radial-gradient(120% 60% at 50% 45%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%),
    var(--surface);
  overflow: hidden;
  min-width: 0;
  transition: transform .15s, box-shadow .15s;
}
.item::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: var(--rc); }
.item[data-inv], .item[data-item], .item[data-pick], .item[data-target] { cursor: pointer; }
.item:active { transform: scale(.97); }
.item.selected { box-shadow: inset 0 0 0 2px var(--gold); }
.item.selected::before {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #1d1500;
  font-size: 12px;
  font-weight: 900;
}
.item-top { display: flex; justify-content: space-between; align-items: center; min-height: 17px; }
.item-img { display: grid; place-items: center; aspect-ratio: 4 / 3; margin: 2px 0 4px; }
.item-img img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.item-weapon { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-skin { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.best-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 12px 10px;
  border-radius: 16px;
  background: radial-gradient(60% 120% at 15% 50%, color-mix(in srgb, var(--rc) 28%, transparent), transparent 70%), var(--surface);
  overflow: hidden;
}
.best-card::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; border-radius: 2px; background: var(--rc); }
.bc-img { width: 130px; height: 88px; flex: none; }
.bc-img img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)); }
.bc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bc-name { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-text .price-tag { margin-top: 4px; }

/* ---------- большой предмет (дроп, превью) ---------- */

.hero-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 4px;
  text-align: center;
  isolation: isolate;
}
.hero-item-img {
  position: relative;
  width: 100%;
  height: 190px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: radial-gradient(60% 65% at 50% 55%, color-mix(in srgb, var(--rc) 34%, transparent), transparent 75%), var(--surface);
  overflow: hidden;
}
.hero-item-img img { position: relative; z-index: 1; max-width: 82%; max-height: 170px; object-fit: contain; filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .45)); animation: pop .55s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes pop { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
.hero-item.rays .hero-item-img::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 22%, transparent) 0deg 10deg, transparent 10deg 20deg);
  animation: rays 14s linear infinite;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
}
@keyframes rays { to { transform: rotate(360deg); } }
.hero-item.legendary .hero-item-img { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--gold) 60%, transparent), 0 0 40px rgba(242, 193, 78, .25); }
.hero-item.legendary .hero-item-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 241, 184, .22) 50%, transparent 70%);
  animation: shine 2.4s ease-in-out infinite;
}
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.rarity-label { margin-top: 12px; color: var(--rc); font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.hero-item-weapon { margin-top: 2px; color: var(--muted); font-size: 13px; }
.hero-item-name { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.detail-price { margin-top: 10px; text-align: center; font-size: 24px; font-weight: 850; }
.detail-price .amount { gap: .35em; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 14px 0 8px; }
.detail-grid > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; border-radius: 14px; background: var(--surface); }
.detail-grid b { font-size: 14px; text-align: center; }
.drop-meta { margin-top: 6px; text-align: center; font-size: 13px; }

.float { width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); text-align: left; }
.float-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 9px; font-size: 13px; font-weight: 650; }
.float-bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #3ecf8e 0 7%, #9bd35a 7% 15%, #e3c345 15% 38%, #f08a3c 38% 45%, #e0513c 45% 100%);
}
.float-bar i { position: absolute; top: -4px; width: 3px; height: 14px; margin-left: -1.5px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 2px var(--surface); }

/* ---------- апгрейд ---------- */

.dial-wrap { position: relative; width: 250px; height: 250px; margin: 6px auto 4px; }
.dial { width: 100%; height: 100%; overflow: visible; }
.dial-track { fill: none; stroke: var(--surface-2); stroke-width: 16; }
.dial-ticks { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-dasharray: 1 10.7; }
.dial-arc { fill: none; stroke: url(#arc-g); stroke-width: 16; stroke-linecap: round; transition: stroke-dasharray .45s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 8px rgba(242, 193, 78, .45)); }
.dial-needle { transform-box: view-box; transform-origin: 50% 50%; }
.dial-needle path { fill: var(--text); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.dial-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.dial-pct { font-size: 36px; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.dial-sub { color: var(--muted); font-size: 13px; font-weight: 650; }
.dial-wrap.win .dial-arc { stroke: var(--ok); filter: drop-shadow(0 0 14px var(--ok)); }
.dial-wrap.win .dial-pct { color: var(--ok); }
.dial-wrap.lose .dial-arc { stroke: var(--bad); filter: none; }
.dial-wrap.lose { animation: shake .45s; }
.dial-wrap.lose .dial-pct { color: var(--bad); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.slots { display: flex; align-items: stretch; gap: 8px; margin: 8px 0 10px; }
.slot {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 132px;
  padding: 10px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px dashed var(--line-strong);
  text-align: center;
  cursor: pointer;
}
.slot:has(.slot-thumb) { border-style: solid; border-color: transparent; }
.slot-empty { font-weight: 800; font-size: 15px; }
.slot-label { width: 100%; font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-price { font-size: 13px; font-weight: 800; }
.slot-stack { display: flex; justify-content: center; margin-bottom: 4px; }
.slot-thumb {
  width: 54px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 35%, transparent), transparent), var(--surface-2);
}
.slot-stack .slot-thumb + .slot-thumb { margin-left: -16px; }
.slot-thumb img { width: 92%; height: 40px; object-fit: contain; }
.slot-thumb.big img { height: 60px; }
.slot-thumb.big { width: 96px; height: 66px; margin-bottom: 4px; }
.slot-arrow { align-self: center; display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--gold); transform: rotate(90deg); }
.slot-arrow svg { width: 18px; height: 18px; stroke-width: 2.4; }

.tabs2 { display: flex; gap: 4px; margin: 20px 0 4px; padding: 3px; border-radius: 13px; background: var(--surface); }
.tabs2 button { flex: 1; height: 38px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); text-align: center; }
.tabs2 button.on { background: var(--surface-3); color: var(--text); }

/* ---------- инвентарь ---------- */

.summary { display: flex; align-items: center; gap: 18px; padding: 14px 14px 14px 16px; border-radius: 16px; background: var(--surface); }
.summary > div { display: flex; flex-direction: column; gap: 2px; }
.summary .btn { margin-left: auto; }
.summary-v { font-size: 18px; font-weight: 800; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 12px; text-align: center; }
.empty .btn { margin-top: 14px; max-width: 240px; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 20px; background: var(--surface); color: var(--muted); }
.empty-icon svg { width: 30px; height: 30px; }

/* ---------- профиль ---------- */

.profile-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 14px; }
.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--gold);
  font-size: 22px;
  font-weight: 700;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-lvl { position: absolute; right: -4px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--gold); color: #1d1500; font-size: 11.5px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.p-name { font-size: 19px; font-weight: 800; }
.level-card { padding: 14px 16px; border-radius: 18px; background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 13%, var(--surface)), var(--surface) 65%); }
.lc-top { display: flex; justify-content: space-between; align-items: baseline; }
.lc-level { font-size: 17px; font-weight: 850; }
.lc-bar { height: 8px; margin: 10px 0 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.lc-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f2c14e, #fff1b8); box-shadow: 0 0 10px rgba(242, 193, 78, .5); }
.balance-card { margin-top: 10px; padding: 14px 16px; border-radius: 18px; background: var(--surface); }
.balance-big { font-size: 30px; font-weight: 850; letter-spacing: -.02em; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.stat { padding: 12px; border-radius: 14px; background: var(--surface); min-width: 0; }
.stat-v { font-weight: 800; font-size: 15px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.list { margin-top: 22px; border-radius: 16px; background: var(--surface); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px; text-align: left; font-weight: 600; cursor: pointer; }
.row + .row { border-top: 1px solid var(--line); }
.row > span:nth-child(2) { flex: 1; }
.row-icon { color: var(--muted); }
.row-icon svg { width: 21px; height: 21px; }
.row > svg { width: 18px; height: 18px; color: var(--muted); }

.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: var(--surface-3);
  transition: background .2s;
  cursor: pointer;
}
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(18px); }

/* ---------- история ---------- */

.history { display: flex; flex-direction: column; gap: 6px; }
.h-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 14px; background: var(--surface); overflow: hidden; }
.h-row::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--rc); }
.h-row.lost { opacity: .7; }
.h-row.lost::before { background: var(--bad); }
.h-img { flex: none; width: 62px; height: 44px; display: grid; place-items: center; }
.h-img img { width: 100%; height: 44px; object-fit: contain; }
.h-main { flex: 1; min-width: 0; }
.h-name { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-main .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-price { font-size: 13px; font-weight: 700; }

/* ---------- шторка ---------- */

.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .6); opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
.backdrop.open { opacity: 1; visibility: visible; transition: opacity .25s; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  max-width: 600px;
  max-height: 90vh;
  margin: 0 auto;
  padding: 8px 16px calc(16px + var(--safe-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow-y: auto;
  transform: translateY(105%);
  visibility: hidden;
  transition: transform .36s cubic-bezier(.2, .8, .2, 1), visibility 0s .36s;
}
.sheet.open { transform: none; visibility: visible; transition: transform .36s cubic-bezier(.2, .8, .2, 1); }
.sheet.gold { box-shadow: 0 -2px 0 color-mix(in srgb, var(--gold) 70%, transparent), 0 -20px 60px rgba(242, 193, 78, .25); }
.sheet-handle { width: 38px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: var(--line-strong); }
.sheet-title { margin-bottom: 6px; text-align: center; font-size: 17px; font-weight: 800; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.sheet-actions.one { grid-template-columns: 1fr; }
.sheet-actions.three { grid-template-columns: 1fr 1fr; }
.sheet-actions.three .btn.primary { grid-column: 1 / -1; order: -1; }

.win-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.win-total { margin-top: 10px; text-align: center; }
.item.reveal { animation: reveal .5s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: var(--d, 0ms); }
@keyframes reveal { from { opacity: 0; transform: scale(.85) translateY(10px); } }

/* ---------- тосты, конфетти, вспышка ---------- */

.toasts { position: fixed; left: 0; right: 0; top: calc(64px + var(--safe-top)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast {
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--primary-bg);
  color: var(--primary-fg);
  font-size: 14px;
  font-weight: 650;
  text-align: center;
  box-shadow: var(--shadow);
  animation: toast-in .25s ease-out;
  transition: opacity .3s, transform .3s;
}
.toast.error { background: var(--bad); color: #fff; }
.toast.gold { background: linear-gradient(135deg, #fff1b8, #f2c14e); color: #1d1500; }
.toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.confetti { position: fixed; inset: 0; z-index: 70; width: 100vw; height: 100vh; pointer-events: none; }
.flash { position: fixed; inset: 0; z-index: 65; pointer-events: none; animation: flash 1.1s ease-out forwards; }
.flash-gold { background: radial-gradient(circle at 50% 40%, rgba(255, 241, 184, .85), rgba(242, 193, 78, .45) 40%, transparent 75%); }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }

@media (min-width: 480px) {
  .case-grid { grid-template-columns: repeat(4, 1fr); }
  .item-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-img, .hero-glow, .promo-bg, .promo-bg::after, .promo-img img, .bb-cta, .hero-item.rays .hero-item-img::before, .hero-item.legendary .hero-item-img::after { animation: none; }
}

/* ---------- вход по номеру ---------- */

body.gated .topbar, body.gated .tabbar { display: none; }
body.gated .toasts { top: calc(16px + var(--safe-top)); }

.login {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  max-width: 600px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 20px calc(18px + var(--safe-bottom));
  overflow: hidden;
  animation: page-in .3s ease-out;
}
.login-bg {
  position: absolute;
  inset: -10% -30% 30%;
  z-index: -1;
  background:
    radial-gradient(40% 36% at 50% 38%, rgba(242, 193, 78, .30), transparent 70%),
    radial-gradient(30% 30% at 12% 20%, rgba(136, 71, 255, .22), transparent 70%),
    radial-gradient(30% 30% at 90% 30%, rgba(90, 200, 255, .16), transparent 70%);
  animation: promo-glow 8s ease-in-out infinite alternate;
}
.login-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 22% 34%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 80% 58%, #fff1b8 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 8%, #fff1b8 50%, transparent 51%);
  animation: twinkle 3s ease-in-out infinite alternate;
}
:root[data-theme="light"] .login-bg { opacity: .55; }

.login-fan { position: relative; height: 200px; margin: auto 0 4px; }
.lf-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
}
.lf-item::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: var(--rc);
  filter: blur(34px);
  opacity: .45;
}
.lf-item img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .55)); animation: float 4s ease-in-out infinite; }
.lf-0 { transform: translate(-108%, -44%) rotate(-14deg) scale(.86); }
.lf-1 { z-index: 2; width: 180px; height: 180px; transform: translate(-50%, -54%); }
.lf-2 { transform: translate(8%, -44%) rotate(12deg) scale(.92); }
.lf-0 img { animation-delay: -1.3s; }
.lf-2 img { animation-delay: -2.6s; }

.login-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.login-mark { width: 44px; height: 44px; margin-bottom: 6px; }
.login-head h1 { font-size: 28px; font-weight: 850; letter-spacing: -.03em; }

.login-perks { display: grid; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.login-perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
  font-weight: 600;
}
.lp-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #fff1b8, #f2c14e); color: #1d1500; }
.lp-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.login-foot { display: grid; gap: 12px; margin-top: auto; padding-top: 24px; }
.btn.login-btn { position: relative; overflow: hidden; background: linear-gradient(135deg, #fff1b8, #f2c14e 55%, #e4ae39); color: #1d1500; box-shadow: 0 12px 30px rgba(242, 193, 78, .3); }
.login-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  animation: shine 2.8s ease-in-out infinite;
}
.login-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linejoin: round; }
.login-btn.waiting span { opacity: .6; }
.login-btn.waiting::after { animation-duration: .9s; }
.login-dev { color: var(--gold); opacity: .8; }
.login-note { padding: 14px; border-radius: 14px; background: var(--surface); line-height: 1.45; }

@media (max-height: 640px) {
  .login-fan { height: 150px; }
  .lf-item { width: 116px; height: 116px; }
  .lf-1 { width: 140px; height: 140px; }
  .login-perks { margin-top: 16px; }
}

/* телефон в профиле */
.row.static { cursor: default; }
.phone-val { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.ok-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }

/* ---------- бренд CS DROP ---------- */

.brand { white-space: nowrap; letter-spacing: -.01em; }
.brand b { color: var(--gold); font-weight: inherit; }

/* плюс на балансе в шапке — вход в кошелёк */
.bal-plus { display: none; place-items: center; width: 22px; height: 22px; margin-right: -8px; border-radius: 50%; background: var(--gold); color: #1d1500; }
.bal-plus svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.balance.can-pay .bal-plus { display: grid; }

/* ---------- кошелёк ---------- */

.wallet-card {
  position: relative;
  overflow: hidden;
  margin-top: 4px;
  padding: 16px 18px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(242, 193, 78, .35), transparent 70%),
    radial-gradient(50% 80% at 0% 100%, rgba(136, 71, 255, .25), transparent 70%),
    linear-gradient(135deg, #1d1506, #140f22 60%, #0c1524);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 14px 34px rgba(0, 0, 0, .3);
}
.wallet-card .muted { color: rgba(255, 255, 255, .6); }
.wc-top { display: flex; align-items: center; justify-content: space-between; }
.wc-amount { margin: 4px 0 12px; font-size: 32px; font-weight: 850; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wc-meta { display: flex; gap: 16px; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.wc-meta b { color: #fff; font-weight: 700; }

/* знак СБП: четыре цветных лепестка */
.sbp-logo { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 26px; height: 26px; padding: 4px; flex: none; border-radius: 8px; background: #fff; transform: rotate(45deg) scale(.86); }
.sbp-logo i { border-radius: 2px; }
.sbp-logo i:nth-child(1) { background: #5b57a2; }
.sbp-logo i:nth-child(2) { background: #d90751; }
.sbp-logo i:nth-child(3) { background: #0fa8d6; }
.sbp-logo i:nth-child(4) { background: #fab718; }

.test-note { margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); font-size: 12.5px; font-weight: 700; text-align: center; }
.tabs2 .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #1d1500; font-size: 11px; }
.wallet-pane { margin-top: 12px; animation: page-in .2s ease-out; }

.amount-box { display: flex; align-items: center; gap: 8px; height: 68px; padding: 0 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); cursor: text; }
.amount-box:focus-within { box-shadow: inset 0 0 0 1.5px var(--gold); }
.amount-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 30px; font-weight: 850; letter-spacing: -.02em; font-variant-numeric: tabular-nums; user-select: text; -webkit-user-select: text; }
.amount-input::placeholder { color: var(--muted); }
.amount-cur { font-size: 26px; font-weight: 800; color: var(--muted); }
.chips.wrap { flex-wrap: wrap; }
.presets .chip { flex: 1 0 calc(33.333% - 6px); text-align: center; }
.amount-box .chip { background: var(--surface-2); }
.chip.ghost { background: none; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }

.method { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 55%, transparent); }
.method-text { flex: 1; display: flex; flex-direction: column; }
.req-mark { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: #fff; }
.req-mark.ok { background: var(--ok); }
.req-mark svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.sum-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 2px 12px; }
.sum-row b { text-align: right; }
.wallet-note { margin-top: 10px; line-height: 1.45; }
.field-label { margin: 14px 2px 0; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.banks { margin-top: 8px; }

.reqs { margin-bottom: 12px; border-radius: 16px; background: var(--surface); overflow: hidden; }
.req { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; font-size: 14px; font-weight: 600; }
.req + .req { border-top: 1px solid var(--line); }
.req > span:nth-of-type(1) { flex: 1; }
.req .muted { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.pay-wait { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--gold) 10%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent); }
.pay-wait .spinner { color: var(--gold); flex: none; }
.pw-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.pay-list { display: flex; flex-direction: column; gap: 6px; }
.pay-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: var(--surface); }
.pay-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; }
.pay-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pay-icon.in { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pay-icon.out { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.pay-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pay-main b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-side .plus { color: var(--ok); }
.pay-status { padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pay-status.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pay-status.wait { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.pay-status.bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }

.admin-card { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; padding: 14px; border-radius: 16px; background: var(--surface); }
.ac-top { display: flex; align-items: center; justify-content: space-between; font-size: 20px; }
.ac-line { font-size: 14px; font-weight: 600; }
.admin-card .sheet-actions { margin-top: 10px; }

.balance-card .sheet-actions { margin-top: 12px; }

/* ---------- админка ---------- */

.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 4px; }
.adm-head .page-title { margin: 0; }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: live 1.6s ease-out infinite; }
.live.off i { background: var(--bad); animation: none; }
@keyframes live { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } to { box-shadow: 0 0 0 7px transparent; } }

.adm-chips { margin: 12px -16px 0; }
.adm-chips.sorts { margin-top: 8px; }
.adm-hero { display: flex; flex-direction: column; margin-top: 12px; padding: 16px 18px; border-radius: 20px; background: var(--surface); }
.adm-hero-v { margin: 2px 0 4px; font-size: 34px; font-weight: 850; letter-spacing: -.02em; }
.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; border-radius: 16px; background: var(--surface); text-align: left; }
.tile-v { font-size: 20px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.tile:active { transform: scale(.98); }
.adm-alert { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 14px; text-align: left; font-size: 13.5px; font-weight: 700;
  background: color-mix(in srgb, var(--gold) 12%, var(--surface)); color: var(--gold); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent); }
.adm-alert span { flex: 1; }
:root[data-theme="light"] .adm-alert { color: #8a5d00; }
.adm-alert svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.adm-total { margin: 12px 2px 8px; }
.adm-more { margin-top: 10px; }
.adm-hint { margin-top: 14px; }
.adm-row { width: 100%; text-align: left; }
.adm-row b .muted { font-weight: 600; }
.adm-ava { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--surface-3); font-weight: 800; }
.pay-row.fresh, .admin-card.fresh { animation: fresh 2.6s ease-out; }
@keyframes fresh { 0%, 35% { background: color-mix(in srgb, var(--gold) 22%, var(--surface)); } to { background: var(--surface); } }
.section-head.first { margin-top: 12px; }
.ac-user { text-align: left; }

.adm-sum { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 4px 0 14px; font-size: 28px; font-weight: 850; letter-spacing: -.02em; }
.kv { margin-top: 10px; border-radius: 16px; background: var(--surface); overflow: hidden; }
.kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 14px; }
.kv > div + div { border-top: 1px solid var(--line); }
.kv > div > span { flex: none; color: var(--muted); }
.kv b { min-width: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.kv .link { font-size: 14px; text-align: right; }
.selectable { user-select: text; -webkit-user-select: text; }
