/* ============================================================
   STANDGRADE — styles
   Premium dark / blue theme, desktop-first
   ============================================================ */

/* honor the hidden attribute regardless of a class' display */
[hidden] { display: none !important; }

:root {
  /* palette */
  --bg-top: #2A2F4A;
  --bg-mid: #1B1F34;
  --bg-bottom: #070911;

  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.11);

  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);

  --text: #F2F4FF;
  --muted: #9AA3C4;
  --muted-2: #717C9E;

  --blue: #4C7BFF;
  --blue-bright: #6B9BFF;
  --blue-deep: #2E5BE0;
  --blue-ink: #23429E;

  --green: #2ED07F;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --font-display: 'Chakra Petch', 'Rajdhani', 'Segoe UI', sans-serif;
  --font-body: 'Manrope', 'Inter', 'Segoe UI', sans-serif;

  --header-h: 72px;
  --shadow-card: 0 20px 50px -20px rgba(0, 0, 0, 0.55);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 34%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle technical grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.028) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.028) 0 1px, transparent 1px 72px);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 70%);
}

/* noise / film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

::selection { background: rgba(76, 123, 255, 0.35); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; }

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}
.container--narrow { width: min(860px, calc(100% - 48px)); }

/* ---------- typography helpers ---------- */
.grad-text {
  background: linear-gradient(100deg, #8FB4FF 0%, #4C7BFF 55%, #2ED0FF 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1, h2, h3, .brand-name, .panel-title, .stat-value, .plate-code, .plate-tier {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.045em;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1.4), box-shadow 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, filter 0.22s ease;
  will-change: transform;
  white-space: nowrap;
}

.btn svg { width: 17px; height: 17px; transition: transform 0.22s ease; }

.btn:active { transform: translateY(1px) scale(0.985); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-bright) 0%, var(--blue) 48%, var(--blue-deep) 100%);
  box-shadow: 0 10px 28px -10px rgba(76, 123, 255, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 18px 38px -12px rgba(76, 123, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover svg { transform: translateX(3px); }

.btn.is-busy {
  pointer-events: none;
  position: relative;
  overflow: hidden;
}
.btn.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  background-size: 240% 100%;
  animation: sweep 0.9s linear infinite;
}
.btn.is-busy span { opacity: 0.7; }
.btn:disabled { cursor: not-allowed; }

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--border-strong);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.6);
}

.btn-light {
  color: #0B1440;
  background: #fff;
}
.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -14px rgba(255, 255, 255, 0.45);
}

.btn-sm { padding: 9px 16px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(21, 25, 43, 0.55);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: rgba(15, 17, 32, 0.82);
  border-bottom-color: var(--border);
  box-shadow: 0 12px 40px -20px rgba(0, 0, 0, 0.65);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: none;
  padding-inline: 24px;
}

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.brand-mark { width: 34px; height: 34px; flex: none; }
img.brand-mark { object-fit: contain; border-radius: 9px; }
.brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
}
.brand-accent {
  background: linear-gradient(100deg, #8FB4FF, #4C7BFF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* live counters */
.stats {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-left: 26px;
  border-left: 1px solid var(--border);
}
.stat {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  position: relative;
}
.stat-dot--green { background: var(--green); box-shadow: 0 0 0 4px rgba(46, 208, 127, 0.12); }
.stat-dot--green::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(46, 208, 127, 0.5);
  animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.stat-dot--blue { background: var(--blue); box-shadow: 0 0 0 4px rgba(76, 123, 255, 0.14); }

@keyframes ping {
  0%   { transform: scale(0.7); opacity: 0.9; }
  75%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

.stat-body { display: flex; flex-direction: column; line-height: 1.2; }
.stat-value {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 11px; color: var(--muted-2); letter-spacing: 0.08em; text-transform: uppercase; }

.stat-divider { width: 1px; height: 26px; background: var(--border); }

/* header right */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.socials { display: flex; align-items: center; gap: 8px; }

.hd-balance {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hd-balance .gcoin svg { width: 17px; height: 17px; display: block; }

.hd-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
}

.hd-btn svg { width: 17px; height: 17px; flex: none; }
.hd-btn:hover {
  color: #fff;
  border-color: rgba(107, 155, 255, 0.6);
  background: rgba(76, 123, 255, 0.16);
  box-shadow: 0 8px 20px -10px rgba(76, 123, 255, 0.6);
}
#bellBtn { padding: 0; width: 36px; justify-content: center; }

.social-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: all 0.22s ease;
}
.social-btn svg { width: 18px; height: 18px; fill: currentColor; }
.social-btn:hover {
  color: #fff;
  border-color: rgba(107, 155, 255, 0.6);
  background: rgba(76, 123, 255, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -10px rgba(76, 123, 255, 0.6);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 96px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 48px;
}

/* hero copy */
.hero-copy { position: relative; z-index: 2; }

.hero h1 {
  font-size: clamp(46px, 5.4vw, 68px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 38px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  margin-top: 44px;
  flex-wrap: wrap;
}

/* hero visual */
.hero-visual { position: relative; z-index: 2; min-height: 460px; }

.visual-glow {
  position: absolute;
  inset: 8% -4% 0 -4%;
  background:
    radial-gradient(60% 55% at 50% 45%, rgba(76, 123, 255, 0.30), transparent 70%),
    radial-gradient(45% 40% at 50% 55%, rgba(46, 208, 255, 0.12), transparent 70%);
  filter: blur(34px);
  pointer-events: none;
}

.card-tray {
  position: relative;
  width: 340px;
  height: 440px;
  margin: 0 auto;
}

.fly-card {
  position: absolute;
  width: 250px;
  animation: floatY 6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  z-index: var(--t, 1);
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}
.fly-card--back { transform: rotate(var(--r)) translate(var(--x), var(--y)); opacity: 0.72; }
.fly-card--main { transform: rotate(var(--r)) translate(var(--x), var(--y)); left: 50%; top: 50%; margin: -170px 0 0 -125px; z-index: 2; }
.fly-card--front { transform: rotate(var(--r)) translate(var(--x), var(--y)); opacity: 0.88; }

@keyframes floatY {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -14px; }
}

.fly-label {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
}

.fly-meta { margin-top: 14px; padding: 0 8px; }
.fly-meta .fly-label { text-align: left; margin-top: 0; }
.fly-chance {
  margin-top: 8px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.chance-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue-bright), var(--blue));
  box-shadow: 0 0 12px rgba(76, 123, 255, 0.8);
  transition: width 0.6s cubic-bezier(0.22, 0.9, 0.25, 1);
}

/* skin plates */
.plate {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, var(--t-a) 0%, var(--t-b) 60%, var(--t-c) 100%);
}
.plate::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(255, 255, 255, 0.32), transparent 45%),
    linear-gradient(150deg, transparent 38%, rgba(0, 0, 0, 0.22) 90%);
  opacity: 0.7;
}
.plate::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.plate-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.plate-code {
  font-size: 54px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  z-index: 1;
}
.plate-tier {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  z-index: 1;
}

/* rarity tone presets */
.plate--military   { --t-a: #5B6470; --t-b: #3E4654; --t-c: #2A2F3B; }
.plate--uncommon   { --t-a: #43C98A; --t-b: #1E8F5C; --t-c: #135F3E; }
.plate--rare       { --t-a: #5B8AFF; --t-b: #2E5BE0; --t-c: #1B3A9E; }
.plate--epic       { --t-a: #A86BFF; --t-b: #7A2FE0; --t-c: #4D1B9E; }
.plate--legendary  { --t-a: #FFB054; --t-b: #F57F17; --t-c: #A8620B; }
.plate--arcane     { --t-a: #FF5B5B; --t-b: #D92E47; --t-c: #8E1B3A; }
.plate--nameless   { --t-a: #FFC93C; --t-b: #F59E0B; --t-c: #9A6B00; }

/* floating tags */
.float-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(17, 20, 36, 0.8);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  font-weight: 600;
  font-size: 12.5px;
  animation: floatY 5.5s ease-in-out infinite;
  box-shadow: var(--shadow-card);
  z-index: 4;
}
.float-tag svg { width: 13px; height: 13px; color: var(--blue-bright); }
.float-tag--up { right: 6%; top: 14%; animation-delay: 0.8s; }
.float-tag--up svg { color: var(--green); }
.float-tag--down { left: 4%; bottom: 18%; animation-delay: 1.6s; }

/* hero scroll hint */
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.hero-scroll span {
  width: 3px;
  height: 8px;
  border-radius: 3px;
  background: #fff;
  animation: scrollhint 1.8s ease-in-out infinite;
}
@keyframes scrollhint {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- sections generic ---------- */
.section { padding: 108px 0; position: relative; }
.section-head {
  max-width: 640px;
  margin: 0 auto 58px;
  text-align: center;
}
.kicker {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 1.1;
}
.section-sub { margin-top: 16px; color: var(--muted); font-size: 16.5px; }

/* ---------- panels ---------- */
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.panel:hover {
  border-color: rgba(107, 155, 255, 0.32);
}
.panel-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-title::after {
  content: "";
  flex: 1;
  height: 8px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'><path d='M0 4 Q 6 1.2 12 4 Q 18 6.8 24 4' fill='none' stroke='%236d7a94' stroke-width='1.3' stroke-linecap='round'/></svg>") repeat-x 0 0 / 24px 8px;
  opacity: 0.55;
}

/* upgrader layout */
.upgrader-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 0.95fr;
  gap: 22px;
  align-items: stretch;
}

/* weapon chips */
.weapon-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 24px; }

.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px 11px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: all 0.22s ease;
}
.chip-code {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.chip-name { font-size: 10.5px; letter-spacing: 0.03em; }
.chip:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: #fff;
  transform: translateY(-2px);
}
.chip.is-active {
  border-color: rgba(107, 155, 255, 0.65);
  background: rgba(76, 123, 255, 0.16);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(76, 123, 255, 0.7);
}

/* preview */
.preview {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}
.preview-plate { width: 110px; flex: none; border-radius: 14px; }
.preview-plate .plate-code { font-size: 26px; }
.preview-plate .plate-tier { font-size: 8px; }
.preview-info { min-width: 0; }
.preview-skin {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-tier { font-size: 13px; color: var(--muted-2); }

/* ladder */
.ladder { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.ladder-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.3s ease;
}
.ladder-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}
.ladder-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex: 1;
}
.ladder-chance { font-size: 12.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.ladder-row .ladder-marker { opacity: 0; transition: opacity 0.3s ease; color: var(--blue-bright); }
.ladder-row.is-current {
  border-color: rgba(107, 155, 255, 0.6);
  background: rgba(76, 123, 255, 0.12);
  box-shadow: 0 8px 22px -14px rgba(76, 123, 255, 0.8);
}
.ladder-row.is-current .ladder-name { color: #fff; }
.ladder-row.is-current .ladder-marker { opacity: 1; }
.ladder-row.is-current .ladder-dot { box-shadow: 0 0 0 4px rgba(76, 123, 255, 0.28); }

/* chance box */
.chance-box { margin-bottom: 20px; }
.chance-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 9px;
}
.chance-head strong {
  font-family: var(--font-display);
  font-size: 20px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.chance-bar {
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.upgrade-note { margin-top: 14px; text-align: center; font-size: 12px; color: var(--muted-2); }

/* result flash on panel */
.panel.is-busy { position: relative; }
.panel.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgba(107, 155, 255, 0.18) 50%, transparent 70%);
  background-size: 260% 100%;
  animation: sweep 1.1s linear infinite;
  pointer-events: none;
}
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* log */
.log-panel { display: flex; flex-direction: column; }
.log-list { display: flex; flex-direction: column; gap: 9px; flex: 1; overflow-y: auto; max-height: 380px; }
.log-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted-2);
  font-size: 13px;
  text-align: center;
  padding: 30px 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.log-empty svg { width: 26px; height: 26px; opacity: 0.6; }

.log-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  animation: logIn 0.4s cubic-bezier(0.2, 0.7, 0.3, 1.2);
  font-size: 13px;
}
@keyframes logIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.log-item .log-badge {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  flex: none;
}
.log-item--win .log-badge { background: rgba(46, 208, 127, 0.16); color: var(--green); border: 1px solid rgba(46, 208, 127, 0.4); }
.log-item--win .log-txt b { color: var(--green); }
.log-item--lose .log-badge { background: rgba(255, 99, 110, 0.14); color: #FF7B84; border: 1px solid rgba(255, 99, 110, 0.4); }
.log-item .log-txt { flex: 1; min-width: 0; color: var(--muted); }
.log-item .log-txt b { font-weight: 600; color: #fff; }
.log-item .log-time { font-size: 11px; color: var(--muted-2); flex: none; font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(7, 9, 17, 0.4), rgba(4, 5, 10, 0.9));
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { font-size: 13.5px; color: var(--muted-2); max-width: 300px; margin: 0 0 22px; }

.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}
.footer-col a { font-size: 14px; color: var(--muted); transition: color 0.2s ease, transform 0.2s ease; width: fit-content; }
.footer-col a:hover { color: #fff; transform: translateX(3px); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted-2);
  flex-wrap: wrap;
}
.footer-status { display: inline-flex; align-items: center; gap: 9px; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: all 0.22s ease;
}
.lang-btn svg { width: 15px; height: 15px; color: var(--blue-bright); }
.lang-btn:hover {
  border-color: rgba(107, 155, 255, 0.6);
  background: rgba(76, 123, 255, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(76, 123, 255, 0.6);
}

/* ---------- support FAB + chat ---------- */
.support-fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 80;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 38px -10px rgba(46, 91, 224, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1.4), box-shadow 0.25s ease;
}
.support-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 22px 46px -12px rgba(46, 91, 224, 0.9); }
.support-fab:active { transform: scale(0.95); }
.support-fab svg { width: 26px; height: 26px; }

.fab-icon--close { display: none; }
.support-fab.is-open .fab-icon--chat { display: none; }
.support-fab.is-open .fab-icon--close { display: block; }

.fab-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(107, 155, 255, 0.7);
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

.support-panel {
  position: fixed;
  right: 26px;
  bottom: 98px;
  z-index: 70;
  width: 372px;
  max-height: min(560px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #1B2040, #10142A);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}
.support-panel.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.support-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(76, 123, 255, 0.08);
}
.support-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px -8px rgba(76, 123, 255, 0.8);
}
.support-avatar svg { width: 20px; height: 20px; }
.support-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.support-status { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; margin-top: 3px; line-height: 1.2; }

.support-close {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.support-close svg { width: 15px; height: 15px; }
.support-close:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

.support-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
}

.msg-row { display: flex; align-items: flex-end; gap: 9px; max-width: 86%; }
.msg-row--bot { align-self: flex-start; }
.msg-row--user { align-self: flex-end; flex-direction: row-reverse; }

.msg-av {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  display: flex;
  align-items: center;
  justify-content: center;
}
.msg-av svg { width: 15px; height: 15px; opacity: 0.95; }

.msg-bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  animation: msgIn 0.32s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}
.msg-row--bot .msg-bubble {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg-row--user .msg-bubble {
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  border-bottom-right-radius: 4px;
  color: #fff;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.msg--typing .typing-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.typing-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.support-input {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.support-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.support-input input::placeholder { color: var(--muted-2); }
.support-input input:focus {
  border-color: rgba(107, 155, 255, 0.6);
  background: rgba(76, 123, 255, 0.08);
}
.support-input button {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.support-input button svg { width: 18px; height: 18px; }
.support-input button:hover { transform: translateY(-2px); filter: brightness(1.1); }
.support-input button:active { transform: scale(0.94); }

.support-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 16px 12px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.support-quick__btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(76, 123, 255, 0.1);
  color: var(--text);
  font-size: 11.5px;
  font-family: inherit;
  padding: 7px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.support-quick__btn:hover {
  border-color: rgba(107, 155, 255, 0.55);
  background: rgba(76, 123, 255, 0.2);
}

/* ---------- legal modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.modal.open { opacity: 1; pointer-events: auto; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 16, 0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-window {
  position: relative;
  width: min(740px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #1B2040, #10142A);
  box-shadow: 0 50px 110px -40px rgba(0, 0, 0, 0.9);
  transform: translateY(22px) scale(0.96);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.3, 1.05);
}
.modal.open .modal-window { transform: none; }

.modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.modal-close {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.modal-close svg { width: 15px; height: 15px; }
.modal-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 26px 30px 30px;
}

.auth-body {
  padding: 26px 30px 30px;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab:hover { color: var(--text); }
.auth-tab.is-active {
  background: linear-gradient(180deg, #5C8AFF, #2E5BE0);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 18px -6px rgba(76, 123, 255, 0.55);
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.oauth-divider::before,
.oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.oauth-row {
  display: flex;
  gap: 10px;
  margin: 0;
}

.oauth-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.oauth-ic { width: 18px; height: 18px; flex: none; }
.oauth-btn span { color: var(--text); transition: color 0.2s ease; }
.oauth-btn:hover span { color: #fff; }

.oauth-btn--vk { color: #4A76A8; }
.oauth-btn--vk:hover { border-color: #4A76A8; background: rgba(74, 118, 168, 0.14); box-shadow: 0 8px 22px -8px rgba(74, 118, 168, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.oauth-btn--ya { color: #FC3F1D; }
.oauth-btn--ya:hover { border-color: #FC3F1D; background: rgba(252, 63, 29, 0.14); box-shadow: 0 8px 22px -8px rgba(252, 63, 29, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.oauth-btn--google { color: #4285F4; }
.oauth-btn--google:hover { border-color: #4285F4; background: rgba(66, 133, 244, 0.14); box-shadow: 0 8px 22px -8px rgba(66, 133, 244, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.oauth-btn--tg { color: #229ED9; }
.oauth-btn--tg:hover { border-color: #229ED9; background: rgba(34, 158, 217, 0.14); box-shadow: 0 8px 22px -8px rgba(34, 158, 217, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08); }

.auth-form { display: none; margin-bottom: 16px; }
.auth-form.is-active { display: block; animation: docIn 0.28s ease; }

.auth-label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.auth-label__text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-field {
  position: relative;
  display: block;
}

.auth-field__ic {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  pointer-events: none;
  transition: color 0.2s ease, opacity 0.18s ease;
}

.auth-field:has(input:not(:placeholder-shown)) .auth-field__ic { opacity: 0; }

.auth-input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.auth-input::placeholder { color: var(--muted-2); }

.auth-input:hover {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
}

.auth-field:focus-within .auth-field__ic { color: var(--blue-bright); }

.auth-input:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: var(--blue);
  background: linear-gradient(180deg, rgba(76, 123, 255, 0.12), rgba(76, 123, 255, 0.04));
  animation: authFocusPulse 1.6s ease-in-out infinite;
}

.auth-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #1D2140 inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 9999s ease-out;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(76, 123, 255, 0.18);
}

.auth-err {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 90, 110, 0.4);
  background: rgba(255, 90, 110, 0.1);
  color: #FFA8B5;
  font-size: 13px;
  animation: docIn 0.25s ease;
}

.auth-exists {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -6px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(46, 208, 127, 0.35);
  background: rgba(46, 208, 127, 0.08);
  font-size: 12px;
  color: #8FE3BC;
  animation: docIn 0.25s ease;
}
.auth-exists[hidden] { display: none; }
.auth-exists__btn {
  flex: none;
  border: none;
  background: none;
  padding: 2px 0;
  color: var(--green);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}
.auth-exists__btn:hover { color: #6BEAA8; }

.auth-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ---------- auth entrance anims ---------- */
.auth-form.is-active .auth-label,
.auth-form.is-active .auth-form__submit,
.auth-form.is-active .auth-note {
  opacity: 0;
}
.auth-form.is-active .auth-label { animation: authFieldIn 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.auth-form.is-active .auth-label:nth-child(1) { animation-delay: 0.05s; }
.auth-form.is-active .auth-label:nth-child(2) { animation-delay: 0.11s; }
.auth-form.is-active .auth-label:nth-child(3) { animation-delay: 0.17s; }
.auth-form.is-active .auth-form__submit { animation: authFieldIn 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) 0.23s forwards; }
.auth-form.is-active .auth-note { animation: authFieldIn 0.5s ease 0.3s forwards; }

@keyframes authFieldIn {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}

@keyframes authFocusPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(76, 123, 255, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(76, 123, 255, 0.1); }
}

.auth-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.auth-check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-check__box {
  flex: none;
  position: relative;
  width: 19px;
  height: 19px;
  margin-top: -1px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  transition: all 0.2s ease;
}

.auth-check__box svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-check:hover .auth-check__box {
  border-color: rgba(76, 123, 255, 0.6);
  box-shadow: 0 0 10px -2px rgba(76, 123, 255, 0.45);
}

.auth-check input:checked + .auth-check__box {
  border-color: var(--blue);
  background: linear-gradient(135deg, #4C7BFF, #2E5BE0);
  box-shadow: 0 4px 14px -4px rgba(76, 123, 255, 0.75);
}

.auth-check input:checked + .auth-check__box svg {
  opacity: 1;
  transform: scale(1);
}

.auth-check input:focus-visible + .auth-check__box {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 123, 255, 0.35);
}

.auth-check:has(input:checked) { color: #fff; }

.auth-form__submit {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #5C8AFF 0%, #3F6BEF 45%, #2E5BE0 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 28px -10px rgba(76, 123, 255, 0.65);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.auth-form__submit:not(:disabled):hover { transform: translateY(-1px); }
.auth-form__submit:not(:disabled):active { transform: translateY(0); }
.auth-form__submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: none;
}
.auth-form__submit:hover::before { animation: authSheen 0.8s ease; }
@keyframes authSheen {
  from { left: -70%; }
  to   { left: 130%; }
}
.auth-form__submit:not(:disabled) {
  animation: authBtnGlow 2.6s ease-in-out infinite;
}
@keyframes authBtnGlow {
  0%, 100% { box-shadow: 0 10px 28px -10px rgba(76, 123, 255, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
  50%      { box-shadow: 0 12px 34px -8px rgba(76, 123, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
}

/* ---------- auth menu (выбор способа входа) ---------- */
.auth-menu { display: none; }
.auth-menu.is-active {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: docIn 0.28s ease;
}

.auth-menu__hint {
  margin: 0 0 4px;
  text-align: center;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.auth-menu__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-menu__btn:hover {
  border-color: rgba(76, 123, 255, 0.6);
  background: linear-gradient(180deg, rgba(76, 123, 255, 0.14), rgba(76, 123, 255, 0.05));
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -12px rgba(76, 123, 255, 0.55);
}

.auth-menu__btn--primary {
  border-color: rgba(76, 123, 255, 0.55);
  background: linear-gradient(135deg, #5C8AFF 0%, #3F6BEF 45%, #2E5BE0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 28px -10px rgba(76, 123, 255, 0.65);
  animation: authBtnGlow 2.6s ease-in-out infinite;
}

.auth-menu__btn--primary:hover {
  background: linear-gradient(135deg, #6690FF 0%, #4A78F4 45%, #3366EE 100%);
  filter: brightness(1.06);
}

.auth-menu__ic {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: 0.85;
}

.auth-menu__btn--primary .auth-menu__ic { opacity: 1; }

.auth-menu.is-active .auth-menu__hint,
.auth-menu.is-active .auth-menu__btn,
.auth-menu.is-active .oauth-divider,
.auth-menu.is-active .oauth-row {
  opacity: 0;
}
.auth-menu.is-active .auth-menu__hint { animation: authFieldIn 0.5s ease 0.03s forwards; }
.auth-menu.is-active .auth-menu__btn--primary { animation: authFieldIn 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) 0.1s forwards, authBtnGlow 2.6s ease-in-out infinite; }
.auth-menu.is-active .auth-menu__btn:not(.auth-menu__btn--primary) { animation: authFieldIn 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) 0.17s forwards; }
.auth-menu.is-active .oauth-divider { animation: authFieldIn 0.5s ease 0.22s forwards; }
.auth-menu.is-active .oauth-row { animation: authFieldIn 0.5s ease 0.28s forwards; }

/* ---------- шапка формы (назад + заголовок) ---------- */
.auth-form__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -2px 0 14px;
}

.auth-back {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-back:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.auth-back svg { width: 18px; height: 18px; }

.auth-form__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
}

.auth-menu.is-active ~ .auth-note { display: none; }

.oauth-ic--ya { width: 16px; height: 24px; }

.tg-widget { display: flex; justify-content: center; }
.tg-widget[hidden] { display: none; }
.tg-widget__fallback {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
}

.auth-form.is-succeed .auth-form__submit {
  animation: none;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px rgba(46, 208, 127, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.auth-form.is-succeed .auth-form__submit::after {
  content: "✓";
  margin-left: 8px;
  font-weight: 800;
  animation: authTick 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.4) both;
}
@keyframes authTick {
  from { transform: scale(0) rotate(-30deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 6px 5px 5px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.user-chip:hover {
  border-color: rgba(76, 123, 255, 0.6);
  background: rgba(76, 123, 255, 0.08);
  transform: translateY(-1px);
}

.user-chip__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6B9BFF, #2E5BE0);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.user-chip__name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.user-chip__exit {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-chip__exit:hover {
  border-color: rgba(255, 90, 110, 0.5);
  background: rgba(255, 90, 110, 0.12);
  color: #FF8A98;
}

.legal-doc { display: none; }
.legal-doc.active { display: block; animation: docIn 0.35s ease; }
@keyframes docIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.legal-intro { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.legal-intro b { color: var(--text); }

.legal-section {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
  margin: 24px 0 10px;
}
.legal-p { font-size: 13.5px; color: var(--muted); margin-bottom: 9px; line-height: 1.65; }
.legal-p b { color: var(--text); font-weight: 600; }

.modal-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-2);
}

@media (max-width: 560px) {
  .modal { padding: 14px; }
  .modal-body { padding: 20px; }
}

/* scrollbars */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(76, 123, 255, 0.5); }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2, 0.65, 0.25, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .stats { padding-left: 18px; gap: 14px; }
  .hero-inner { grid-template-columns: 1fr 0.9fr; gap: 20px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .upgrader-grid { grid-template-columns: 1fr 1fr; }
  .log-panel { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .stats { display: none; }
  .header-actions .socials { display: none; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta, .hero-stats { justify-content: center; }
  .hero-visual { min-height: 420px; }
  .steps { grid-template-columns: 1fr; }
  .upgrader-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { width: min(1180px, calc(100% - 32px)); }
  .float-tag { display: none; }
  .support-panel { right: 16px; left: 16px; width: auto; bottom: 90px; }
}

/* ---------- upgrader stage ---------- */
.stage-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-bottom: 22px;
}
.stage-brand .brand-mark { width: 46px; height: 46px; }
.stage-brand .brand-name { font-size: 30px; letter-spacing: 0.12em; }

.stage-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}
.tl-btn svg { width: 18px; height: 18px; flex: none; }
.tl-btn:hover {
  transform: translateY(-2px);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.tl-btn.is-active {
  color: var(--blue-bright);
}
.tl-btn.is-active svg { color: currentColor; }
.tl-btn .tl-label {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.tl-btn::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 9px;
  background: #10132A;
  border: 1px solid var(--border-strong);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.85);
}
.tl-btn::before {
  content: "";
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #10132A;
  border-left: 1px solid var(--border-strong);
  border-top: 1px solid var(--border-strong);
  transform: translateX(-50%) rotate(45deg);
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  transition: opacity 0.18s ease;
}
.tl-btn:hover::after,
.tl-btn:focus-visible::after,
.tl-btn:hover::before,
.tl-btn:focus-visible::before { opacity: 1; }
.tl-btn:hover::after,
.tl-btn:focus-visible::after { transform: translateX(-50%) translateY(0); }

.tl-vol {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  color: var(--muted);
  opacity: 0.75;
  transition: opacity 0.22s ease, background 0.22s ease;
}
.tl-vol:hover { opacity: 1; background: rgba(255, 255, 255, 0.06); }
.tl-vol svg { width: 16px; height: 16px; flex: none; color: currentColor; }
.tl-vol input[type="range"] {
  width: 84px;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.tl-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--blue-bright, #6b9bff);
  border: 2px solid #fff;
  cursor: pointer;
}
.tl-vol input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--blue-bright, #6b9bff);
  border: 2px solid #fff;
  cursor: pointer;
}

.stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}
.stage-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stage-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stage-side--right .stage-side-head { justify-content: flex-end; }
.stage-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.slot-clear {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-2);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.slot-clear:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.09);
}
.slot-clear svg { width: 16px; height: 16px; }
.slot {
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.22);
}
.slot-empty {
  margin: 0;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}
.slot-body { display: flex; align-items: center; gap: 18px; }
.slot-body .preview-plate { width: 120px; flex: none; border-radius: 16px; }
.slot-body .preview-plate .plate-code { font-size: 28px; }
.slot-body .preview-plate .plate-tier { font-size: 8px; }
.slot-body .preview-info { min-width: 0; }
.slot-body .preview-skin { font-size: 16px; }
.preview-price {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-bright);
  font-variant-numeric: tabular-nums;
}
.balance-add {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ba-label {
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.ba-range {
  -webkit-appearance: none;
  appearance: none;
  width: 108px;
  height: 16px;
  background: transparent;
  cursor: pointer;
}
.ba-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--blue-bright) var(--p, 0%), rgba(255, 255, 255, 0.12) var(--p, 0%));
}
.ba-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue-bright);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 10px rgba(76, 123, 255, 0.6);
  cursor: grab;
}
.ba-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.ba-range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--blue-bright);
}
.ba-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue-bright);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 10px rgba(76, 123, 255, 0.6);
  cursor: grab;
}
.ba-range:disabled { cursor: default; }
.ba-range:disabled::-webkit-slider-thumb { cursor: default; }
.balance-add .ba-val { flex: none; min-width: 64px; font-size: 14px; }
.ba-val {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-bright);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ba-val .gicon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.preview-price .gicon { width: 13px; height: 13px; vertical-align: -2px; }

/* wheel */
.stage-center { position: relative; display: flex; flex-direction: column; align-items: center; }
.wheel-frame { position: relative; width: 232px; height: 232px; }
.wheel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: radial-gradient(circle at 50% 26%, #2A3150 0%, #10152B 72%);
  box-shadow: 0 32px 80px -34px rgba(0, 0, 0, 0.85), 0 0 60px -30px rgba(76, 123, 255, 0.55);
}
.wheel-fill {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--blue-bright) 0deg 0deg, rgba(76, 123, 255, 0) 0deg 360deg);
}
.wheel::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: radial-gradient(circle at 50% 28%, #343B5A 0%, #12162A 74%);
  box-shadow: inset 0 20px 44px -22px rgba(0, 0, 0, 0.9);
}
.wheel-center {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #DCE4FF;
  pointer-events: none;
  opacity: 0.92;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 14px rgba(76, 123, 255, 0.45));
}
.wheel-center svg { width: 54px; height: 56px; display: block; }
.wheel-pct { position: relative; z-index: 2; transform: translateY(-2%); }
.wheel-needle {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  will-change: transform;
}
.wheel-needle__pin {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 8px rgba(76, 123, 255, 0.35));
}
.wheel-needle__pin svg { width: 100%; height: 100%; display: block; }

.wheel-frame.is-rolling { animation: wheelGlow 0.9s ease infinite; }
@keyframes wheelGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(76, 123, 255, 0)); }
  50% { filter: drop-shadow(0 0 24px rgba(76, 123, 255, 0.85)); }
}

.wheel-chance {
  margin-top: 18px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
}
.wheel-pct {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6), 0 0 20px rgba(76, 123, 255, 0.6);
}
.wheel-pct.is-win { color: var(--blue-bright); }
.wheel-pct.is-lose { color: #9AA6BD; }

.stage-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 1000px;
  margin: 0 auto 34px;
}
.stage-actions .balance-add { flex: 1 1 0; justify-content: flex-start; white-space: nowrap; }
.stage-actions .btn-lg { flex: 0 0 auto; min-width: 200px; }
#upgradeBtn { text-transform: uppercase; }
.stage-actions .presets { flex: 1 1 0; justify-content: flex-end; flex-wrap: nowrap; }
.presets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.presets-title {
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.preset-btn {
  appearance: none;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: #E7ECFA;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}
.preset-btn:hover {
  border-color: rgba(76, 123, 255, 0.55);
  color: #fff;
  background: rgba(76, 123, 255, 0.16);
  box-shadow: 0 0 18px -6px rgba(76, 123, 255, 0.6);
}

/* library */
.library-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 14px;
  align-items: start;
}
.inv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tabs {
  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
}
.tab {
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.22s ease;
}
.tab:hover { color: #fff; }
.tab.is-active {
  background: linear-gradient(135deg, var(--blue-bright) 0%, var(--blue-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 20px -12px rgba(76, 123, 255, 0.9);
}
.tab-ic { display: block; width: 17px; height: 17px; }
.balance {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.balance strong { color: #fff; font-family: var(--font-display); font-size: 16px; }

.inv-grid, .items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
}
.items-grid { max-height: 600px; overflow-y: auto; padding-right: 5px; }
.inv-grid { max-height: 380px; overflow-y: auto; padding-right: 5px; padding-bottom: 2px; }

.skin-card {
  display: block;
  position: relative;
  width: 100%;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  transition: all 0.22s ease;
}
.skin-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: rgba(0, 0, 0, 0.34);
}
.skin-card.is-selected {
  border-color: rgba(107, 155, 255, 0.75);
  background: rgba(76, 123, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(76, 123, 255, 0.16);
}
.skin-plate { border-radius: 10px; }
.skin-plate .plate-code { font-size: 30px; }
.skin-plate .plate-tier { font-size: 7.5px; padding: 3px 8px; letter-spacing: 0.18em; }
.skin-meta { margin-top: 9px; line-height: 1.35; }
.skin-name {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skin-price { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.buy-btn {
  margin-top: 9px;
  width: 100%;
  padding: 7px 0;
  border-radius: 9px;
  border: 1px solid rgba(46, 208, 127, 0.5);
  background: rgba(46, 208, 127, 0.13);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  transition: all 0.2s ease;
}
.buy-btn:hover { background: rgba(46, 208, 127, 0.24); }
.buy-btn:disabled { cursor: not-allowed; opacity: 0.45; background: transparent; border-color: var(--border); color: var(--muted-2); }
.skin-owned {
  margin-top: 9px;
  width: 100%;
  padding: 7px 0;
  border-radius: 9px;
  font-size: 11.5px;
  text-align: center;
  color: var(--muted-2);
  border: 1px dashed var(--border-strong);
}
.buy-btn, .skin-owned { display: block; line-height: 1.1; }
.skin-count {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(76, 123, 255, 0.18);
  border: 1px solid rgba(76, 123, 255, 0.45);
  color: #cfe0ff;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}

/* profile inventory: Sell / Withdraw buttons at the bottom of each card */
.pf-acts {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inv-act {
  appearance: none;
  width: 100%;
  padding: 7px 0;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.18s ease;
}
.inv-act--sell {
  border: 1px solid rgba(46, 208, 127, 0.55);
  background: rgba(46, 208, 127, 0.16);
  color: var(--green);
}
.inv-act--sell:hover { background: rgba(46, 208, 127, 0.3); }
.inv-act--wd {
  border: 1px solid rgba(76, 123, 255, 0.55);
  background: rgba(76, 123, 255, 0.16);
  color: #8fb4ff;
}
.inv-act--wd:hover { background: rgba(76, 123, 255, 0.3); }

.inv-empty {
  color: var(--muted-2);
  text-align: center;
  padding: 36px 0;
  font-size: 13.5px;
}
.inv-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted-2);
  text-align: center;
}

/* filters */
.filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filter input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #fff;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}
.filter input:focus { border-color: rgba(107, 155, 255, 0.6); }
.filter input::placeholder { color: var(--muted-2); }
.filter input[type="search"] { flex: 1; min-width: 160px; }
.filter-price { display: flex; align-items: center; gap: 6px; color: var(--muted-2); }
.filter-price input { width: 84px; }

/* guide modal */
.filter-cat {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background:
    rgba(0, 0, 0, 0.3)
    url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23717C9E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted-2);
  padding: 9px 34px 9px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.filter-cat:focus-visible,
.filter-cat:focus {
  border-color: rgba(107, 155, 255, 0.6);
}
.filter-cat option {
  background: #1B1F34;
  color: var(--muted-2);
}
/* guide modal */
.modal-window--sm { width: min(560px, 100%); }
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 30px 30px;
  overflow-y: auto;
}
.guide-step { display: flex; gap: 15px; align-items: flex-start; }
.guide-n {
  flex: none;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-bright) 0%, var(--blue-deep) 100%);
  box-shadow: 0 8px 20px -12px rgba(76, 123, 255, 0.9);
}
.guide-step p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.guide-step p b { color: #fff; font-weight: 600; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px) scale(0.96);
  z-index: 130;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(64, 76, 138, 0.42), rgba(34, 42, 78, 0.42));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  max-width: min(440px, calc(100vw - 48px));
}
.toast .toast-ico {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blue-bright, #6b8aff);
  background: rgba(107, 138, 255, 0.14);
  border: 1px solid rgba(107, 138, 255, 0.35);
}
.toast .toast-ico svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.toast .toast-txt { min-width: 0; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.toast.is-green { border-color: rgba(46, 208, 127, 0.5); }
.toast.is-green .toast-ico {
  color: var(--green, #2ED07F);
  background: rgba(46, 208, 127, 0.15);
  border-color: rgba(46, 208, 127, 0.4);
}
.toast.is-red { border-color: rgba(255, 123, 132, 0.55); }
.toast.is-red .toast-ico {
  color: #FF7B84;
  background: rgba(255, 123, 132, 0.15);
  border-color: rgba(255, 123, 132, 0.4);
}

@media (max-width: 920px) {
  .stage { grid-template-columns: 1fr; gap: 20px; justify-items: center; }
  .stage-side--left, .stage-side--right { width: 100%; max-width: 460px; }
  .library-grid { grid-template-columns: 1fr; }
}

.skin-card.is-broke {
  opacity: 0.55;
  cursor: not-allowed;
}
.skin-card.is-broke:hover {
  transform: none;
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.25);
}
.skin-card.is-broke .buy-btn {
  background: transparent;
  border-color: var(--border);
  color: var(--muted-2);
}

/* gold currency icon */
.gicon {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 2px;
  flex: none;
}
.gcoin {
  display: inline-flex;
  align-items: center;
  margin-right: 2px;
  vertical-align: -2px;
}
.gcoin svg { width: 15px; height: 15px; }
.balance .gcoin svg { width: 16px; height: 16px; }

/* upgrade fx */
.fx {
  position: absolute;
  z-index: 14;
  left: 50%;
  top: 116px;
  transform: translate(-50%, -50%);
  width: 176px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.fx-card,
.fx .plate.skin-plate {
  width: 150px;
  height: 150px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.fx-card {
  display: flex;
  align-items: center;
  justify-content: center;
}
.fx-code {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55);
}
.fx-name {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.fx-show .fx-card { animation: fxPop 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.35) both; }
@keyframes fxPop {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.fx-win .fx-card {
  animation: fxVanish 1.7s ease both;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.8), 0 0 26px -8px rgba(76, 123, 255, 0.35);
}
@keyframes fxVanish {
  0% { transform: scale(0.92); opacity: 0; }
  16% { transform: scale(1); opacity: 1; }
  60% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1) translateY(-14px); opacity: 0; }
}

/* win: green circle + checkmark (instead of a card appearing) */
.stage-center.is-winning .wheel-pct { opacity: 0; visibility: hidden; }
.stage-center.is-winning .wheel-fill {
  background: conic-gradient(from 180deg, #2ED07F 0deg 360deg, rgba(46, 208, 127, 0) 360deg) !important;
}
.stage-center.is-winning .wheel {
  box-shadow: 0 32px 80px -34px rgba(0, 0, 0, 0.85), 0 0 60px -24px rgba(46, 208, 127, 0.65);
  animation: winGlow 0.5s ease 2;
}
@keyframes winGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(46, 208, 127, 0)); }
  40% { transform: scale(1.035); filter: drop-shadow(0 0 26px rgba(46, 208, 127, 0.85)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(46, 208, 127, 0)); }
}
.fx-win.is-winning .win-check {
  width: 118px;
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
  animation: checkPop 0.5s cubic-bezier(0.2, 0.9, 0.35, 1.4) both;
}
.fx-win.is-winning .win-check svg {
  width: 118px;
  height: 118px;
  display: block;
}
@keyframes checkPop {
  0% { transform: scale(0.5) rotate(-14deg); opacity: 0; }
  60% { transform: scale(1.12) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.fx-lose {
  position: relative;
  left: 0;
  top: 0;
  transform: none;
  width: 176px;
  height: 150px;
}
.fx-lose .fx-shard {
  position: absolute;
  left: 13px;
  top: 0;
  width: 150px;
  height: 150px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.75);
  animation: shardFly 0.9s cubic-bezier(0.25, 0.7, 0.3, 1) both;
}
@keyframes shardFly {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

.footer-note { font-size: 12px; color: var(--muted-2); }

.skin-card.is-cheap { opacity: 0.5; }
.skin-card.is-cheap:hover {
  transform: none;
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: none;
}

/* real skin images */
.skin-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.plate.skin-plate .plate-code,
.preview-plate.has-img .plate-code {
  position: absolute;
  left: 10px;
  bottom: 9px;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(9, 12, 22, 0.55);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.plate.skin-plate .plate-tier,
.preview-plate.has-img .plate-tier {
  position: absolute;
  right: 10px;
  top: 9px;
  font-size: 8px;
  letter-spacing: 0.16em;
  padding: 3px 8px;
}

/* hide code/tier badges on real-skin plates */
.preview-plate.has-img .plate-code,
.preview-plate.has-img .plate-tier { display: none !important; }

.fx-card { position: relative; overflow: hidden; }
.fx-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.fx-card .fx-code {
  position: absolute;
  left: 10px;
  bottom: 9px;
  z-index: 1;
  font-size: 18px;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(9, 12, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* tighter spacing between upgrader and library */
.upgrader { padding-bottom: 12px; }
.section#library { padding-top: 16px; }
.stage { margin-bottom: 22px; }
.stage-actions { margin-bottom: 4px; }

/* header always edge-to-edge, corners flush */
.header-inner { width: 100%; }
@media (max-width: 560px) {
  .header-inner { padding-inline: 16px; }
}

/* ============================================================
   PROFILE MODAL
   ============================================================ */
.modal-window--lg { width: min(900px, 100%); }
.modal-window--xs { width: min(420px, 100%); }

.profile-body { overflow-y: auto; padding: 22px 32px 28px 26px; scrollbar-gutter: stable; }

/* top: identity + actions */
.prof-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.prof-ident {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.prof-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 30px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  box-shadow: 0 12px 30px -12px rgba(76, 123, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  overflow: hidden;
}
.prof-avatar img { width: 100%; height: 100%; object-fit: cover; }
.prof-ident-meta { min-width: 0; }
.prof-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.prof-name strong {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prof-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
}
.prof-flag svg { width: 13px; height: 13px; }
.prof-flag--admin {
  color: #ffd76a;
  background: rgba(255, 190, 60, 0.12);
  border: 1px solid rgba(255, 190, 60, 0.35);
}
.prof-so2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--text-mute);
  font-size: 13px;
}
.prof-so2 svg { width: 15px; height: 15px; color: var(--blue-light); }
.prof-so2 b { color: var(--text); font-weight: 600; }
.prof-actions { display: flex; gap: 8px; }
.ilib-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--text-mute);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: 0.2s ease;
}
.ilib-btn svg { width: 20px; height: 20px; }
.ilib-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.ilib-btn--danger:hover { color: #ff5d6c; border-color: rgba(255, 93, 108, 0.45); background: rgba(255, 93, 108, 0.1); }

/* balance */
.prof-bal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
}
.prof-bal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.prof-bal-lbl { color: var(--text-mute); font-size: 13.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.prof-bal-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--gold, #ffd76a);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
}
.prof-bal-num .gicon { width: 22px; height: 22px; flex: none; margin-right: 0; vertical-align: -5px; }
.prof-bal .btn {
  margin-left: auto;
  width: 100%;
  justify-content: center;
  padding: 9px 14px;
}

/* stats row */
.prof-stats {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
.prof-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
}
.prof-stat .stat-label { color: var(--text-mute); font-size: 12.5px; letter-spacing: 0.03em; }
.prof-stat strong {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--text);
}
.prof-stat .stat-sub { color: var(--text-mute); font-size: 12px; }
.prof-stat--best { grid-row: span 1; }
.best-drop { margin-top: auto; display: flex; justify-content: center; }
.best-drop--empty { color: var(--muted-2); font-size: 13px; padding: 6px 0; }
.best-drop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 8px 0;
  width: 100%;
}
.best-drop-item .plate { width: 88px; height: 88px; flex: 0 0 auto; border-radius: 16px; }
.best-drop-item .plate img { width: 100%; height: 100%; object-fit: cover; }
.best-drop-item .bd-meta { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.best-drop-item .bd-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.best-drop-item .bd-sub {
  font-size: 12px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.best-drop-item .bd-price { color: var(--gold, #ffd76a); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.best-drop-item .bd-price svg { width: 12px; height: 12px; }
.best-drop-item .bd-chance {
  color: var(--blue-light);
  font-weight: 600;
}

/* promo */
.prof-promo {
  margin-top: 18px;
  padding: 18px 14px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
}
.prof-promo-lbl { display: block; color: var(--text-mute); font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 8px; }
.prof-promo-row { display: flex; gap: 10px; }
.prof-promo-input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.prof-promo-msg { margin-top: 10px; font-size: 13px; }
.prof-promo-msg.is-ok { color: #5ef08d; }
.prof-promo-msg.is-err { color: #ff5d6c; }

/* bottom: tabs + content */
.prof-bottom { margin-top: 20px; }
.prof-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.prof-tabs__sw { display: flex; gap: 6px; flex-wrap: wrap; }
.prof-tab {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-mute);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: 0.2s ease;
}
.prof-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.prof-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  box-shadow: 0 8px 20px -8px rgba(76, 123, 255, 0.7);
}
.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #ff5d6c, #d63a4b);
  box-shadow: 0 10px 24px -10px rgba(255, 93, 108, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-danger:hover { transform: translateY(-2px); filter: brightness(1.07); }

.prof-content {
  margin-top: 14px;
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 12px;
  scrollbar-gutter: stable;
}
.prof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.pf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}
.pf-card .plate { width: 100%; aspect-ratio: 1.5; border-radius: 10px; overflow: hidden; }
.pf-card .plate img { width: 100%; height: 100%; object-fit: cover; }
.pf-plate-wrap { position: relative; }
.pf-card .pf-name { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.25; }
.pf-card .pf-price { font-size: 12px; color: var(--gold, #ffd76a); display: flex; align-items: center; gap: 4px; justify-content: center; }
.pf-card .pf-price svg { width: 11px; height: 11px; }
.pf-card .pf-count {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.pf-empty {
  grid-column: 1 / -1;
  width: 100%;
  text-align: center;
  color: var(--text-mute);
  font-size: 14px;
  padding: 40px 0;
}

/* history rows */
.pf-hist { display: flex; flex-direction: column; gap: 8px; }
.pf-hoc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.025);
}
.pf-hoc .plate { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 9px; overflow: hidden; }
.pf-hoc .plate img { width: 100%; height: 100%; object-fit: cover; }
.pf-hoc .ph-meta { flex: 1; min-width: 0; }
.pf-hoc .ph-title { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-hoc .ph-sub { font-size: 12px; color: var(--text-mute); }
.pf-hoc .ph-right { text-align: right; flex: 0 0 auto; }
.pf-hoc .ph-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}
.pf-hoc .ph-badge.win { color: #5ef08d; background: rgba(94, 240, 141, 0.12); border: 1px solid rgba(94, 240, 141, 0.3); }
.pf-hoc .ph-badge.lose { color: #ff5d6c; background: rgba(255, 93, 108, 0.12); border: 1px solid rgba(255, 93, 108, 0.3); }
.pf-hoc .ph-badge.neutral { color: var(--blue-light); background: rgba(76, 123, 255, 0.12); border: 1px solid rgba(76, 123, 255, 0.3); }
.pf-hoc .ph-amount { font-size: 12.5px; font-weight: 700; color: var(--gold, #ffd76a); margin-top: 3px; }

/* history: lost roll shows the skin darkened with a red cross */
.pf-hoc .skin-plate { position: relative; }
.pf-hoc .skin-plate.is-lost::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: rgba(10, 8, 16, 0.55);
}
.pf-hoc .skin-plate.is-lost img.is-dim { filter: grayscale(0.85) brightness(0.5); }
.pf-hoc .plate-x {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.pf-hoc .plate-x svg { display: block; }

/* confirm modal */
.confirm-body { padding: 26px 28px 22px; text-align: center; }
.confirm-ico {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffd76a;
  background: rgba(255, 190, 60, 0.12);
  border: 1px solid rgba(255, 190, 60, 0.3);
}
.confirm-ico svg { width: 28px; height: 28px; }
.confirm-text { color: var(--text); font-size: 15.5px; line-height: 1.45; margin-bottom: 20px; }
.confirm-actions { display: flex; flex-direction: column; gap: 10px; }

/* avatar picker */
.avatar-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.avatar-preview {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  box-shadow: 0 10px 24px -10px rgba(76, 123, 255, 0.6);
  overflow: hidden;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-pick-btn { position: relative; }
.avatar-pick-btn svg { width: 16px; height: 16px; }
.avatar-remove:hover { border-color: rgba(255, 93, 108, 0.45); color: #ff5d6c; }

/* history lost-upgrade placeholder plate */
.plate--lose {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.75);
  background: linear-gradient(135deg, rgba(255, 93, 108, 0.22), rgba(120, 110, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(255, 93, 108, 0.25);
}
.plate--lose svg { width: 26px; height: 26px; }

@media (max-width: 760px) {
  .prof-stats { grid-template-columns: 1fr 1fr; }
  .prof-stat--best { grid-column: span 2; }
}
@media (max-width: 520px) {
  .prof-stats { grid-template-columns: 1fr; }
  .prof-stat--best { grid-column: span 1; }
  .prof-top { flex-direction: column; }
}

/* ============================================================
   NOTIFICATIONS BADGE + SUPPORT CHAT (staff)
   ============================================================ */
.hd-btn { position: relative; }
.hd-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff5d6c, #d63a4b);
  box-shadow: 0 4px 10px -3px rgba(255, 93, 108, 0.7);
  pointer-events: none;
}
.support-quick__btn.is-call {
  background: linear-gradient(135deg, rgba(76, 123, 255, 0.18), rgba(76, 123, 255, 0.05));
  border: 1px solid rgba(76, 123, 255, 0.4);
  color: var(--blue-light);
}

/* admin tickets list inside support panel */
.support-threads {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
}
.support-threads__head {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.support-threads__none { color: var(--text-mute); font-size: 13.5px; text-align: center; padding: 18px 0; }
.support-thread {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: 0.18s ease;
}
.support-thread:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(76, 123, 255, 0.4); }
.support-thread.is-unread { border-color: rgba(76, 123, 255, 0.5); box-shadow: 0 0 0 1px rgba(76, 123, 255, 0.25); }
.st-av {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-weight: 700; color: #fff;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
}
.st-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-last { font-size: 12px; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff;
  border-radius: 999px;
  background: #ff5d6c;
}
.support-back { margin-bottom: 8px; }
.support-back__btn { background: none; border: none; color: var(--blue-light); font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 0; }
.support-back__btn:hover { text-decoration: underline; }

/* ============================================================
   NOTIFICATIONS MODAL
   ============================================================ */
.notify-body { display: flex; flex-direction: column; gap: 10px; }
.notify-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 16px;
  color: var(--text-mute);
  text-align: center;
}
.notify-empty svg { width: 46px; height: 46px; opacity: 0.5; }
.notify-empty p { margin: 0; font-size: 14.5px; }
.notify-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: 0.18s ease;
}
.notify-item:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(76, 123, 255, 0.4); }
.notify-item--cta { border-color: rgba(76, 123, 255, 0.4); }
.notify-item__av {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px; color: #fff;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
}
.notify-item__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notify-item__title { font-weight: 600; font-size: 14px; }
.notify-item__last { font-size: 12.5px; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notify-item__badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff;
  border-radius: 999px;
  background: #ff5d6c;
  flex: 0 0 auto;
}

/* ============================================================
   MAIN PAGE LAYOUT + LIVE DROP SIDEBAR
   ============================================================ */
main#top {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}
main#top > .site-main { min-width: 0; }

/* live drop feed (glassmorphism sidebar) */
.live-drop {
  position: sticky;
  top: var(--header-h);
  margin: 0;
  width: 300px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-h));
  padding: 0;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.live-drop-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 14px;
  flex: 0 0 auto;
}
.ld-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--blue-bright, #4C7BFF);
}
.ld-icon svg { width: 100%; height: 100%; }
@keyframes ldPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.live-drop-head .ld-title {
  margin-bottom: 0;
  font-size: 13px;
  letter-spacing: 0.18em;
}
.live-drop-head .ld-title::after { display: none; }
.live-drop-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}
.live-drop-list::-webkit-scrollbar { width: 4px; }
.live-drop-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 999px; }
.ld-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease, opacity 0.3s ease, transform 0.3s ease;
}
.ld-item:last-child { border-bottom: none; }
.ld-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
@keyframes ldTopGlow {
  0%, 100% { box-shadow: 0 10px 26px -12px rgba(76, 123, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
  50% { box-shadow: 0 12px 32px -8px rgba(76, 123, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
}
.ld-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 12px 2px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(76, 123, 255, 0.45);
  background: linear-gradient(135deg, rgba(76, 123, 255, 0.16), rgba(178, 45, 253, 0.1));
  box-shadow: 0 10px 26px -12px rgba(76, 123, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: ldTopGlow 3.4s ease-in-out infinite;
}
.ld-top .ld-plate { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 9px; }
.live-drop-list > .ld-top .ld-plate { width: 40px; height: 40px; }
.ld-top .ld-name { font-size: 12.5px; }
.ld-top .ld-user {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.25);
}
.ld-top-crown {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 8px rgba(255, 215, 106, 0.55));
  animation: ldCrownSpin 8s linear infinite;
}
@keyframes ldCrownSpin {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
.ld-item .ld-plate {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
}
.ld-item .ld-plate img { width: 100%; height: 100%; object-fit: cover; }
.ld-plate-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(135deg, rgba(76, 123, 255, 0.22), rgba(76, 123, 255, 0.05));
}
.ld-meta { flex: 1; min-width: 0; }
.ld-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ld-user {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  margin-top: 2px;
  padding: 1px 3px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--text-mute);
  background: rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}
.ld-item:hover .ld-user {
  opacity: 1;
  transform: translateY(0);
}
.ld-user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--blue-light, #8fb4ff);
}
.ld-ava {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(76, 123, 255, 0.35), rgba(76, 123, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
}
.ld-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ld-right { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.ld-price { font-size: 12px; font-weight: 700; color: var(--gold, #ffd76a); display: inline-flex; align-items: center; gap: 3px; }
.ld-price svg { width: 10px; height: 10px; }
.ld-chance {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-light, #8FB4FF);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(76, 123, 255, 0.12);
  border: 1px solid rgba(76, 123, 255, 0.3);
}
.ld-empty {
  color: var(--text-mute);
  font-size: 13px;
  text-align: center;
  padding: 30px 6px;
}

/* ============================================================
   PROFILE FULL-SCREEN PAGE
   ============================================================ */
.profile-page { display: none; }
#liveDropProfileAside { display: none !important; }
body.profile-open .profile-page { display: block; }
body.profile-open .site-main { display: none; }
body.profile-open #liveDropMain { display: none; }
body.profile-open main#top { grid-template-columns: 300px minmax(0, 1fr); }
body.profile-open #liveDropProfileAside { display: flex !important; }

.profile-page__inner {
  padding: 34px 20px 60px;
  width: min(1480px, 100%);
  margin: 0 auto;
}
.profile-page__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.profile-page__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.profile-back { margin-left: 0; }

.profile-page__cols {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 280px;
  gap: 26px;
  align-items: start;
}
.prof-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.prof-col--left .prof-ident { align-items: flex-start; }
.prof-avatar--lg {
  width: 96px;
  height: 96px;
  font-size: 42px;
  border-radius: 24px;
}
.prof-col--left .prof-actions { margin-left: 4px; }

.prof-col-title {
  margin-bottom: 12px;
  font-size: 13px;
  letter-spacing: 0.18em;
}
.prof-best-box {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
}
.prof-best-box .prof-col-title {
  display: block;
  text-align: center;
  width: 100%;
}

.prof-stat--side {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
}
.prof-stat--side .stat-label { margin: 0; }
.prof-stat--side strong { font-size: 20px; }

/* withdrawn stat card with crate art */
.prof-stat-card {
  position: relative;
  padding: 18px 16px;
  min-height: 150px;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.psc-body {
  position: relative;
  z-index: 3;
  padding-right: 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}
.psc-label {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  text-transform: none;
  margin-bottom: 7px;
}
.psc-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 1;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--muted);
  margin: 1px 0;
}
.psc-item b { font-weight: inherit; }
.psc-item + .psc-item { margin-top: 4px; }
.psc-item--gold { color: rgba(255, 215, 106, 0.9); }
.psc-item--gold b { color: rgba(255, 215, 106, 0.9); }
.psc-item--gold .gicon { width: 13px; height: 13px; }
.psc-item-gray { color: var(--muted-2); }
.psc-item-gray b { color: var(--muted-2); }
.psc-art {
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  height: 110px;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}
.psc-glow {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 215px;
  height: 135px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 176, 84, 0.6), rgba(255, 176, 84, 0) 55%);
  filter: blur(12px);
  pointer-events: none;
  z-index: 1;
}
.prof-stat-card--gold .psc-art { width: 150px; height: 150px; right: -22px; }
.prof-stat-card--gold .psc-glow { width: 210px; height: 210px; right: -26px; }
.prof-stat-card--upgrades .psc-art { width: 265px; height: 149px; right: -70px; top: 52%; }
.prof-stat-card--upgrades .psc-glow { width: 300px; height: 170px; right: -50px; top: 52%; }

.prof-content--page {
  max-height: none;
  max-height: 52vh;
  overflow-y: auto;
}


/* responsive: stack live-drop sidebar and profile columns */
@media (max-width: 1100px) {
  main#top { grid-template-columns: 1fr; }
  .live-drop { display: none; }
  .profile-page__cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .profile-page__cols { grid-template-columns: 1fr; }
  .prof-col--left .prof-ident { flex-wrap: wrap; }
}
/* ======= TOP-UP / PAY MODAL ======= */
.pay-body { display: flex; flex-direction: column; gap: 16px; padding: 22px 22px 24px; }

.pay-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.pay-tab {
  flex: 1;
  padding: 11px 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.pay-tab:hover { color: var(--text); }
.pay-tab.is-active {
  background: linear-gradient(180deg, rgba(76, 123, 255, 0.22), rgba(76, 123, 255, 0.1));
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28) inset;
}

.pay-panel { display: flex; flex-direction: column; gap: 14px; }

.pay-methods {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.pay-square {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(240px, 100%);
  flex: 0 1 auto;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.pay-square:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.pay-square.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(76, 123, 255, 0.2) inset, 0 10px 24px -12px rgba(76, 123, 255, 0.45);
}
.pay-square--muted { opacity: 0.6; }
.pay-square--muted:hover { opacity: 0.85; }

.pay-square__pic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.pay-square__pic--coins { background: linear-gradient(180deg, #ffffff, #eef1ff); }
.pay-square--muted .pay-square__pic { filter: saturate(0.5); opacity: 0.9; }

.pay-square__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  box-sizing: border-box;
  padding: 8px;
}

.pay-square__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(12, 14, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.pay-coins { display: flex; align-items: center; }
.pay-coin {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgba(0, 0, 0, 0.35);
}
.pay-coin + .pay-coin { margin-left: -7px; }

.pay-ccy-lbl, .pay-promo-lbl {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
}

select.pay-ccy {
  width: 100%;
  padding: 12px 38px 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%238a8fa8' stroke-width='1.8' stroke-linecap='round'/></svg>")
    right 14px center / 12px 8px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
select.pay-ccy:hover { border-color: var(--border-strong); }
select.pay-ccy:focus {
  outline: none;
  border-color: var(--blue);
  background-color: rgba(76, 123, 255, 0.08);
}
select.pay-ccy option { background: #1B2040; color: var(--text); }

.pay-promo-row { display: flex; gap: 10px; }
.pay-promo-row .auth-input { flex: 1; text-transform: uppercase; }
.pay-promo-row .btn { flex-shrink: 0; }

.pay-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted-2);
  text-align: center;
}

.pay-hint {
  margin: -8px 0 0;
  font-size: 13px;
  line-height: 1.45;
}
.pay-hint--err { color: var(--danger, #ff5d5d); }
.pay-hint--ok { color: var(--green, #2ED07F); }

.pay-info {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-2);
  text-align: center;
}

.pay-wait-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 36px 20px 34px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  text-align: center;
}

.pay-wait-card p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.pay-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--blue-bright);
  box-shadow: 0 0 18px rgba(76, 123, 255, 0.35);
  animation: paySpin 0.8s linear infinite;
}

@keyframes paySpin { to { transform: rotate(360deg); } }

.pay-wait-open { margin-top: 14px; }

.pay-wait-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.pay-wait-row .btn-quiet { width: 100%; }

.btn-quiet {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--muted-2);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.btn-quiet:hover {
  border-color: rgba(76, 123, 255, 0.6);
  color: var(--text);
  background: linear-gradient(180deg, rgba(76, 123, 255, 0.12), rgba(76, 123, 255, 0.04));
}
