/* ==========================================================================
   SPIN-TO-WIN — UNIFIED DREAMPORT DESIGN SYSTEM & 3/4 CROPPED WHEEL
   ========================================================================== */
:root,
[data-theme="lime"] {
  --brand-primary: #4f2ee8;
  --brand-accent: #c5ff29;
  --brand-accent-hover: #d4ff5e;
  --brand-ink: #0c1104;
  --brand-glow: rgba(197, 255, 41, 0.28);
}

[data-theme="cyan"] {
  --brand-primary: #2563eb;
  --brand-accent: #00e5ff;
  --brand-accent-hover: #47eeff;
  --brand-ink: #04131a;
  --brand-glow: rgba(0, 229, 255, 0.28);
}

[data-theme="magenta"] {
  --brand-primary: #9333ea;
  --brand-accent: #ff3d9a;
  --brand-accent-hover: #ff63ae;
  --brand-ink: #ffffff;
  --brand-glow: rgba(255, 61, 154, 0.32);
}

[data-theme="emerald"] {
  --brand-primary: #0d9488;
  --brand-accent: #18f285;
  --brand-accent-hover: #4df7a1;
  --brand-ink: #04190e;
  --brand-glow: rgba(24, 242, 133, 0.28);
}

:root {
  --bg-studio: #090b10;
  --glass-bg: rgba(16, 19, 29, 0.84);
  --glass-strong: rgba(14, 17, 26, 0.94);
  --hairline: rgba(255, 255, 255, 0.1);
  --hairline-strong: rgba(255, 255, 255, 0.18);
  --text-main: #f7f9ff;
  --text-secondary: #b6c0e0;
  --text-muted: #7f89ad;
  --success: #18f285;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-studio);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
}

body {
  padding: 16px 16px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.studio-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.24;
  transition: background 0.5s ease;
}
.orb-1 { width: 480px; height: 480px; top: -140px; left: calc(50% - 460px); background: var(--brand-primary); }
.orb-2 { width: 420px; height: 420px; bottom: -140px; right: calc(50% - 460px); background: var(--brand-accent); }

/* Внешняя плашка стенда dreamport.pro (только десктоп) */
.showcase-bar {
  position: relative;
  z-index: 10;
  width: min(1000px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  margin-bottom: 12px;
  background: rgba(19, 22, 31, 0.9);
  border: 1px solid var(--hairline);
  border-radius: 100px;
  backdrop-filter: blur(16px);
  font-size: 11.5px;
  color: var(--text-muted);
}

.showcase-left, .showcase-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.showcase-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  font-size: 11px;
  transition: background 0.18s, border-color 0.18s;
}
.showcase-back:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: var(--hairline-strong);
}
.showcase-left strong { color: var(--text-main); font-weight: 700; }

.md-status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(24, 242, 133, 0.1);
  border: 1px solid rgba(24, 242, 133, 0.28);
  color: #3ef095;
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s;
}
.theme-dot[data-set-theme="lime"] { background: linear-gradient(135deg, #2b1d8c 35%, #c5ff29 100%); }
.theme-dot[data-set-theme="cyan"] { background: linear-gradient(135deg, #1d4ed8 35%, #00e5ff 100%); }
.theme-dot[data-set-theme="magenta"] { background: linear-gradient(135deg, #7e22ce 35%, #ff3d9a 100%); }
.theme-dot[data-set-theme="emerald"] { background: linear-gradient(135deg, #0f766e 35%, #18f285 100%); }
.theme-dot.active, .theme-dot:hover { transform: scale(1.18); border-color: #ffffff; }

/* ==========================================================================
   ГЛАВНЫЙ КОНТЕЙНЕР С ЕДИНОЙ НОЧНОЙ АТМОСФЕРОЙ ЖК (1 В 1 С DROP И RUNNER)
   ========================================================================== */
.spin-widget-shell {
  position: relative;
  z-index: 5;
  width: min(1000px, 100%);
  background: linear-gradient(180deg, #070b19 0%, #0e112b 54%, #15143d 100%);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    0 36px 100px rgba(0, 0, 0, 0.85),
    0 0 0 5px #141720,
    0 0 0 6px rgba(255, 255, 255, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.spin-widget-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.city-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.city-horizon-glow {
  position: absolute;
  left: 50%;
  top: 28%;
  transform: translateX(-50%);
  width: 85%;
  height: 55%;
  background: radial-gradient(circle, var(--brand-glow) 0%, rgba(0,0,0,0) 70%);
  opacity: 0.72;
}

.city-skyline-svg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 250px;
  opacity: 0.88;
}

#confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 35;
}

/* ==========================================================================
   ЕДИНЫЙ ПРОЗРАЧНЫЙ ТОПБАР (1 В 1 С DROP И RUNNER)
   ========================================================================== */
.app-topbar {
  position: relative;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 8px;
}

.brand-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 10px;
  background: rgba(17, 20, 31, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 0.18s, background 0.18s;
}
.brand-placeholder:hover {
  background: rgba(25, 29, 44, 0.88);
  border-color: var(--brand-accent);
}

.brand-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-accent);
  box-shadow: 0 0 8px var(--brand-accent);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.attempts-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  background: rgba(17, 20, 31, 0.78);
  border: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-accent);
  backdrop-filter: blur(12px);
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  background: rgba(17, 20, 31, 0.78);
  color: rgba(255, 255, 255, 0.86);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 0.18s, border-color 0.18s;
}
.icon-btn:hover {
  background: rgba(28, 33, 50, 0.88);
  border-color: var(--hairline-strong);
}

/* ==========================================================================
   СЦЕНА (ДЕСКТОП 2 КОЛОНКИ / МОБИЛЬНЫЙ СТРОГИЙ ВЕРТИКАЛЬНЫЙ СТЕК)
   ========================================================================== */
.spin-stage-grid {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 420px 1fr;
  grid-template-areas:
    "badge wheel"
    "cards wheel";
  gap: 14px 36px;
  align-items: center;
  padding: 12px 36px 34px;
}

.promo-tag-row {
  grid-area: badge;
  display: flex;
  align-items: center;
  align-self: end;
}

.promo-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(15, 18, 28, 0.78);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(10px);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--brand-accent);
}
.promo-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-accent);
}

/* СЦЕНА КОЛЕСА С КОМПОЗИЦИЕЙ НА 3/4 ВЫСОТЫ */
.wheel-hero-stage {
  grid-area: wheel;
  position: relative;
  width: 100%;
  height: 416px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.wheel-crop-mask {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000000 0%, #000000 72%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, #000000 0%, #000000 72%, rgba(0, 0, 0, 0) 100%);
}

.wheel-canvas-sizer {
  width: 520px;
  height: 520px;
  flex-shrink: 0;
  position: relative;
}

#wheel-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

/* Плавающие бейджи поверх сцены колеса (1 в 1 как в Drop и Runner) */
.floating-chip {
  position: absolute;
  z-index: 12;
  padding: 5px 11px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: rgba(14, 17, 27, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  pointer-events: none;
}
.chip-left {
  top: 16px;
  left: 12px;
  border-left: 2.5px solid var(--brand-accent);
}
.chip-right {
  bottom: 44px;
  right: 12px;
  border-left: 2.5px solid var(--success);
}

/* ==========================================================================
   СТЕК КАРТОЧЕК И КНОПОК (1 В 1 С DROP И RUNNER)
   ========================================================================== */
.content-stack {
  grid-area: cards;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 14;
  align-self: start;
}

.inner-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-copy-box {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 18px 20px;
  text-align: left;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #ffffff;
  margin-bottom: 8px;
}
.hero-title .accent-word {
  color: var(--brand-accent);
}

.hero-subtitle {
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--text-secondary);
}

.rules-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.rule-card {
  appearance: none;
  background: var(--glass-bg);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(16px);
  border-radius: 14px;
  padding: 12px 13px;
  text-align: left;
  color: var(--text-main);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.14s;
}
.rule-card:hover {
  border-color: var(--hairline-strong);
  background: rgba(22, 26, 40, 0.9);
}
.rule-card:active { transform: scale(0.985); }

.rule-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
}
.rule-icon.good { background: rgba(24, 242, 133, 0.12); color: var(--success); }
.rule-icon.accent { background: rgba(197, 255, 41, 0.12); color: var(--brand-accent); }

.rule-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
  color: #ffffff;
}
.rule-text span {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
  display: block;
}

.start-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-primary {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 11px;
  background: var(--brand-accent);
  color: var(--brand-ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 28px var(--brand-glow);
  transition: background 0.16s ease, transform 0.14s ease;
}
.btn-primary:hover { background: var(--brand-accent-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.65; cursor: wait; }

.btn-secondary {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: 11px;
  background: rgba(17, 20, 31, 0.78);
  backdrop-filter: blur(14px);
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.btn-secondary:hover {
  background: rgba(28, 33, 50, 0.88);
  border-color: rgba(255, 255, 255, 0.28);
}

/* ==========================================================================
   КАРТОЧКА РЕЗУЛЬТАТА ПОСЛЕ ОСТАНОВКИ КОЛЕСА (#state-post-spin)
   ========================================================================== */
.win-card {
  background: var(--glass-strong);
  border: 1px solid var(--hairline-strong);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.win-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(24, 242, 133, 0.12);
  border: 1px solid rgba(24, 242, 133, 0.3);
  color: #3ef095;
  font-size: 11px;
  font-weight: 700;
}

.win-points-pill {
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--brand-accent);
}

.win-headline-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.win-big-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--brand-accent);
}

.win-prize-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.win-prize-desc {
  font-size: 12px;
  line-height: 1.44;
  color: var(--text-secondary);
}

.locked-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border-radius: 9px;
  background: #0b0d15;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  font-size: 12px;
  color: var(--text-secondary);
}
.locked-code-row strong {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brand-accent);
}

.unlock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.unlock-input, .unlock-select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0b0d15;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 16px;
  outline: none;
  transition: border-color 0.18s;
}
.unlock-input::placeholder { color: rgba(182, 192, 224, 0.45); font-size: 13.5px; }
.unlock-input:focus, .unlock-select:focus { border-color: var(--brand-accent); }

.status-pills-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}
.status-pill-opt { cursor: pointer; }
.status-pill-opt input { display: none; }
.status-pill-opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  border-radius: 8px;
  background: #0b0d15;
  border: 1px solid rgba(255, 255, 255, 0.11);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.status-pill-opt input:checked + span {
  border-color: var(--brand-accent);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10.5px;
  line-height: 1.36;
  color: var(--text-muted);
  margin-bottom: 10px;
  cursor: pointer;
}
.consent-row input {
  margin-top: 2px;
  width: 14px;
  height: 14px;
  accent-color: var(--brand-accent);
  flex-shrink: 0;
}

.promo-kv-rows {
  display: grid;
  grid-template-columns: 98px 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0b0d15;
  border: 1px solid var(--hairline);
  margin-bottom: 10px;
  font-size: 12.5px;
}
.promo-kv-label { color: var(--text-muted); }
.promo-code-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.05em;
  color: #ffffff;
}
.btn-inline-copy {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.btn-inline-copy:hover { border-color: var(--brand-accent); color: var(--brand-accent); }
.promo-expiry-val { grid-column: span 2; font-weight: 600; color: #ffffff; }

.result-footer-links {
  display: flex;
  justify-content: space-between;
  padding-top: 2px;
}
.text-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-btn:hover { color: #ffffff; }

/* ==========================================================================
   ЕДИНАЯ ВЫДВИЖНАЯ ШТОРКА (РЕЙТИНГ ЖК / ШАНСЫ И ЛИМИТЫ / ПРАВИЛА)
   ========================================================================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 7, 14, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: end center;
}

.sheet-panel {
  width: min(760px, 100%);
  max-height: 85dvh;
  background: #141822;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: 20px 22px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.85);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sheet-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sheet-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 3px;
  border-radius: 10px;
  background: #0c0f17;
  border: 1px solid var(--hairline);
}
.sheet-tab {
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.sheet-tab.active {
  background: var(--brand-accent);
  color: var(--brand-ink);
}

.sheet-body {
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}
.sheet-body::-webkit-scrollbar { display: none; }

.sub-tabs-row { display: inline-flex; gap: 6px; margin-bottom: 10px; }
.sub-pill-btn {
  padding: 5px 11px; border-radius: 7px; border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04); color: var(--text-secondary);
  font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.sub-pill-btn.active { border-color: var(--brand-accent); color: var(--brand-accent); }

.lb-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.lb-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border-radius: 11px;
  background: rgba(11, 14, 22, 0.85); border: 1px solid rgba(255, 255, 255, 0.07);
}
.lb-row.is-user { border-color: var(--brand-accent); background: rgba(255, 255, 255, 0.06); }
.lb-rank {
  width: 26px; height: 26px; border-radius: 7px; background: rgba(255, 255, 255, 0.07);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 11.5px; font-weight: 800;
}
.lb-rank.top-1 { background: #ffd54f; color: #1a1200; }
.lb-rank.top-2 { background: #dce3f5; color: #0f172a; }
.lb-rank.top-3 { background: #f59e0b; color: #1a0f00; }
.lb-info { flex: 1; min-width: 0; }
.lb-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-sub { font-size: 11px; color: var(--text-muted); }
.lb-score { font-family: var(--font-display); font-size: 12.5px; font-weight: 800; color: var(--brand-accent); font-variant-numeric: tabular-nums; }

.ref-box {
  background: rgba(11, 14, 22, 0.85); border: 1px solid var(--hairline);
  border-radius: 14px; padding: 14px;
}
.ref-box h4 { font-family: var(--font-display); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.ref-box p { font-size: 11.5px; color: var(--text-muted); line-height: 1.45; margin-bottom: 10px; }
.ref-input-row { display: flex; gap: 7px; }
.ref-input-row input {
  flex: 1; height: 36px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--hairline); background: #090b12; color: var(--text-secondary); font-size: 12px;
}

.odds-summary { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.odds-table-wrap { overflow-x: auto; }
.odds-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.odds-table th {
  text-align: left; padding: 8px 8px; color: var(--text-muted);
  font-weight: 600; font-size: 11px; border-bottom: 1px solid var(--hairline);
}
.odds-table th.num, .odds-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.odds-table td { padding: 10px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); color: #dce3fa; }
.odds-prize-name { font-weight: 700; color: #ffffff; margin-bottom: 2px; }
.odds-prize-desc { font-size: 11px; color: var(--text-muted); }
.odds-footnote { margin-top: 12px; font-size: 11px; color: var(--text-muted); line-height: 1.5; }

.rules-list {
  padding-left: 18px; display: flex; flex-direction: column;
  gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary);
}

/* ==========================================================================
   МОДАЛКИ: ОПЦИОНАЛЬНАЯ КАПЧА И FLASH-CALL
   ========================================================================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(6, 8, 15, 0.86); backdrop-filter: blur(12px);
  display: grid; place-items: center; padding: 18px;
}

.modal-card {
  position: relative; width: min(396px, 100%);
  background: #161a26; border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px; padding: 24px 20px 20px; text-align: center;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.8);
}
.modal-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; color: var(--text-muted); font-size: 22px; cursor: pointer;
}

.captcha-card {
  background: #f5f6fb; border-radius: 12px; padding: 11px 12px;
  display: grid; grid-template-columns: 142px 1fr; gap: 11px;
  align-items: center; margin: 14px 0 16px; text-align: left;
}
#captcha-canvas {
  width: 142px; height: 52px; border-radius: 8px;
  background: #eceff8; border: 1px solid #d8dff0; display: block; cursor: pointer;
}
.captcha-right { display: flex; flex-direction: column; gap: 6px; }
.captcha-input {
  width: 100%; height: 38px; padding: 0 11px; border-radius: 8px;
  border: 1px solid #cbd3ea; background: #ffffff; color: #121629;
  font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: 0.06em; outline: none;
}
.captcha-input::placeholder { color: #8c96b5; font-size: 12.5px; font-weight: 500; letter-spacing: 0; }
.captcha-links { display: flex; align-items: center; justify-content: space-between; }
.captcha-link-btn {
  background: none; border: none; color: #5b6487; font-family: var(--font-sans);
  font-size: 11px; font-weight: 600; cursor: pointer; text-decoration: underline;
}
.captcha-link-btn.demo-fill { color: #3b36c4; font-weight: 700; }

.incoming-preview {
  padding: 9px 12px; border-radius: 10px; background: #0d1018;
  border: 1px dashed rgba(255, 255, 255, 0.18); font-size: 12.5px; margin: 14px 0;
}
.incoming-preview mark {
  background: rgba(197, 255, 41, 0.18); color: var(--brand-accent);
  padding: 2px 6px; border-radius: 5px; font-weight: 800;
}
.otp-row { display: flex; justify-content: center; gap: 10px; margin-bottom: 12px; }
.otp-digit {
  width: 48px; height: 52px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0e1119; color: #ffffff; text-align: center;
  font-family: var(--font-display); font-size: 20px; font-weight: 800; outline: none;
}
.otp-digit:focus { border-color: var(--brand-accent); }
.demo-autofill-btn {
  margin-bottom: 14px; padding: 6px 12px; border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.05);
  color: var(--brand-accent); font-size: 11.5px; font-weight: 600; cursor: pointer;
}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 95;
  padding: 10px 18px; border-radius: 10px; background: #ffffff; color: #0d1018;
  font-size: 12.5px; font-weight: 700; box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55); white-space: nowrap;
}

.hidden { display: none !important; }

/* ==========================================================================
   МОБИЛЬНЫЙ ПОЛНОЭКРАННЫЙ РЕЖИМ (<= 820px) — 1 В 1 С DROP И RUNNER + 3/4 КОЛЕСА
   ========================================================================== */
@media (max-width: 820px) {
  html, body {
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    padding: 0;
  }

  .showcase-bar,
  .studio-ambient {
    display: none !important;
  }

  .spin-widget-shell {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .app-topbar {
    padding: max(14px, env(safe-area-inset-top)) 18px 8px;
    flex-shrink: 0;
  }

  /* Строгая трёхзонная колонка: 1) бейдж вверху, 2) крупное колесо 3/4 в центре, 3) карточки внизу */
  .spin-stage-grid {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    padding: 4px 20px max(18px, env(safe-area-inset-bottom));
  }

  .promo-tag-row {
    width: 100%;
    justify-content: center;
    align-self: center;
    flex-shrink: 0;
    margin-bottom: 6px;
  }

  /* Сцена колеса занимает всё живое окно между бейджем и стеклянной карточкой */
  .wheel-hero-stage {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -18px;
    transition: flex 0.3s ease, max-height 0.3s ease;
  }

  /* Крупное колесо диаметром ~480px с плавным растворением нижней 1/4 перед карточкой */
  .wheel-crop-mask {
    width: 100vw;
    height: 100%;
    margin-left: calc(50% - 50vw);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
    -webkit-mask-image: linear-gradient(180deg, #000000 0%, #000000 74%, rgba(0, 0, 0, 0) 99%);
    mask-image: linear-gradient(180deg, #000000 0%, #000000 74%, rgba(0, 0, 0, 0) 99%);
  }

  .wheel-canvas-sizer {
    width: clamp(330px, min(110vw, 52dvh), 496px);
    height: clamp(330px, min(110vw, 52dvh), 496px);
  }

  .chip-left { top: 14px; left: 2px; }
  .chip-right { bottom: 32px; right: 2px; }

  /* После остановки колеса аккуратно поджимаем сцену, оставляя сектор-победитель и хаб */
  .spin-widget-shell.is-post-spin .wheel-hero-stage {
    flex: 0 0 clamp(148px, 22dvh, 210px);
    margin-bottom: -10px;
  }
  .spin-widget-shell.is-post-spin .floating-chip {
    display: none;
  }

  .content-stack {
    width: 100%;
    flex-shrink: 0;
    gap: 9px;
  }

  .inner-stack { gap: 9px; }

  .hero-copy-box {
    padding: 16px 18px;
  }

  .hero-title {
    font-size: 25px;
    line-height: 1.06;
    margin-bottom: 6px;
  }

  .hero-subtitle {
    font-size: 13px;
    line-height: 1.46;
  }

  .win-card {
    max-height: 62dvh;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .win-card::-webkit-scrollbar { display: none; }

  .captcha-card {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .captcha-right { width: 100%; }
}

/* Адаптация под невысокие экраны (iPhone SE / <= 730px) */
@media (max-width: 820px) and (max-height: 730px) {
  .wheel-canvas-sizer { width: 42dvh; height: 42dvh; }
  .hero-copy-box { padding: 12px 14px; }
  .hero-title { font-size: 22px; }
  .hero-subtitle { font-size: 12px; }
  .rule-card { padding: 10px 11px; gap: 5px; }
  .btn-primary { height: 44px; }
  .btn-secondary { height: 40px; }
}
