/* ==========================================================================
   LH GIVEAWAY — TMA DESIGN SYSTEM
   Фирменный стиль LeanHustle (leanhustle.net): ночной фиолетовый фон со
   световыми пятнами, Unbounded для акцентных заголовков, Onest для текста,
   карточки с градиентом и фиолетовым свечением.

   Все шрифты содержат кириллицу — латиница, цифры и русский текст
   рендерятся одной гарнитурой (никакого разнобоя в одной строке).
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Палитра бренда */
  --bg: #070310;
  --bg-2: #120622;
  --ink: #f4f0fb;
  --dim: #a69eb8;
  --faint: #716a86;
  --accent: #b484ff;
  --accent-2: #ff7ad9;
  --accent-ink: #e9dcff;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.13);
  --hair: rgba(232, 222, 255, 0.12);
  --surface: rgba(20, 13, 31, 0.74);
  --surface-hi: rgba(31, 21, 46, 0.82);
  --card-grad: linear-gradient(160deg, #2c1748, #170f24);
  --violet-grad: linear-gradient(135deg, #7b3cff 0%, #b44cff 55%, #f06ad6 100%);
  --glow: 0 22px 50px -30px rgba(170, 80, 255, 0.85);
  --ok: #6fe3a1;
  --wait: #ffc46b;
  --danger: #ff7a8a;

  /* Совместимость с инлайн-стилями и старыми переменными */
  --base: var(--bg);
  --ink-dim: var(--dim);
  --ink-faint: var(--faint);
  --tile: var(--surface);
  --surface-2: var(--line-2);

  /* Типографика */
  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
  --font-ui: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --r-card: 22px;
  --r-btn: 16px;

  --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

/* Атмосфера: световые пятна, сетка и лёгкий шум, как на сайте */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 38% at 12% 0%, rgba(123, 60, 255, 0.34), transparent 70%),
    radial-gradient(48% 30% at 100% 6%, rgba(240, 106, 214, 0.18), transparent 70%),
    radial-gradient(70% 40% at 50% 108%, rgba(123, 60, 255, 0.16), transparent 70%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(232, 222, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 222, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(80% 55% at 50% 0%, #000 30%, transparent 85%);
  mask-image: radial-gradient(80% 55% at 50% 0%, #000 30%, transparent 85%);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  user-select: none;
  appearance: none;
  -webkit-appearance: none;
}

[hidden] {
  display: none !important;
}

button, a, input, select, textarea, [role="button"], .captcha-marker {
  pointer-events: auto !important;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 14px) 16px calc(var(--safe-bottom) + 28px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.x1f5a1d0 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* Плавное появление блоков */
@keyframes riseIn {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: none; }
}

.x1f5a1d0 > *,
#resultsView > * {
  animation: riseIn 0.5s var(--ease) both;
}
.x1f5a1d0 > *:nth-child(2), #resultsView > *:nth-child(2) { animation-delay: 0.05s; }
.x1f5a1d0 > *:nth-child(3), #resultsView > *:nth-child(3) { animation-delay: 0.1s; }
.x1f5a1d0 > *:nth-child(4) { animation-delay: 0.15s; }
.x1f5a1d0 > *:nth-child(5) { animation-delay: 0.2s; }
.x1f5a1d0 > *:nth-child(6) { animation-delay: 0.25s; }

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

/* Общая подложка карточек */
.countdown-card,
.x98f7acf,
.captcha,
.winner-list {
  position: relative;
  width: 100%;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* Подписи разделов в стиле бренда: мелкие, разреженные, заглавные */
.xcbf4483 span,
#countdownHeading,
.requirement-section-title,
.prize-kicker,
.brand-chip,
.audit-tech-head > span:first-child {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero-box {
  position: relative;
  width: 100%;
  min-height: 212px;
  border-radius: 26px;
  padding: 20px 18px 20px 20px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(90% 70% at 0% 0%, rgba(180, 132, 255, 0.35), transparent 60%),
    radial-gradient(70% 60% at 100% 100%, rgba(240, 106, 214, 0.28), transparent 65%),
    linear-gradient(150deg, #4f1fb0 0%, #34127a 48%, #1b0a3a 100%);
  border: 1px solid rgba(232, 222, 255, 0.14);
  box-shadow:
    0 26px 60px -30px rgba(170, 80, 255, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Тонкая сетка внутри баннера */
.hero-box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(115deg, #000 10%, transparent 70%);
  mask-image: linear-gradient(115deg, #000 10%, transparent 70%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  max-width: calc(100% - 138px);
  min-width: 0;
  text-align: left;
}

.hero-copy h1,
#title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.94);
  /* Переносим только по словам; слово рвётся лишь если оно длиннее всей строки */
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: manual;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.hero-copy p,
#description {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(244, 240, 251, 0.78);
}

.prize-kicker {
  margin: 16px 0 0;
  color: rgba(233, 220, 255, 0.66);
}

#description.is-prize {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: break-word;
  color: #fff;
  background: linear-gradient(180deg, #ffffff 30%, #dcc6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 18px rgba(30, 6, 70, 0.45));
}

#description.is-prize.is-long {
  font-size: 18px;
  line-height: 1.12;
}

.hero-mascot,
.results-mascot {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.hero-mascot.ready,
.results-mascot.ready {
  opacity: 1;
}

.hero-mascot {
  position: absolute;
  right: -6px;
  bottom: -2px;
  z-index: 2;
  width: 160px;
  height: 172px;
  filter: drop-shadow(0 14px 22px rgba(12, 2, 30, 0.55));
}

.hero-mascot svg,
.results-mascot svg,
.hero-mascot img,
.results-mascot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--accent-ink);
  background: rgba(180, 132, 255, 0.1);
  border: 1px solid rgba(180, 132, 255, 0.28);
}

.prize-kicker {
  white-space: nowrap;
}

/* Узкие телефоны (320–360px) */
@media (max-width: 360px) {
  .stage { padding-left: 12px; padding-right: 12px; }
  .hero-box { min-height: 184px; padding: 18px 12px 18px 16px; }
  .hero-copy { max-width: calc(100% - 104px); }
  .hero-mascot { width: 124px; height: 136px; right: -14px; }
  .hero-copy h1, #title { font-size: 12.5px; }
  .prize-kicker { margin-top: 12px; letter-spacing: 0.1em; }
  #description.is-prize { font-size: 20px; }
  #description.is-prize.is-long { font-size: 15px; }

  .x5672275 b { font-size: 23px; }

  .x98f7acf, .x98f7acf.has-header, .optional-card { padding-left: 12px; padding-right: 12px; }
  .requirement-section-title { letter-spacing: 0.08em; }
  .requirement-channel-row { gap: 8px; }
  .requirement-channel-info { gap: 9px; font-size: 14px; }
  .channel-icon-badge { width: 32px; height: 32px; border-radius: 10px; }
  .requirement-channel-actions { gap: 6px; }
  .requirement-channel-btn,
  .requirement-channel-status.is-joined { height: 32px; padding: 0 11px; font-size: 12px; }
  .requirement-check-btn { width: 32px; height: 32px; }

  .primary, .cta { font-size: 12.5px; letter-spacing: 0.04em; }

  /* Заголовок «Необязательная подписка» уже говорит то же, что и бейдж */
  .requirement-optional-badge { display: none; }
}

/* Совсем узкие экраны: отдаём место названию канала */
@media (max-width: 340px) {
  .channel-icon-badge { display: none; }
}

.hint, #hint {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(180, 132, 255, 0.1);
  border: 1px solid rgba(180, 132, 255, 0.25);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

/* ==========================================================================
   COUNTDOWN
   ========================================================================== */

.countdown-card {
  padding: 15px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xcbf4483 {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
}

.xcbf4483 span, #countdownHeading {
  color: var(--faint);
}

.xcbf4483 time, #countdownDate {
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.xdc2cfcb {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.x5672275 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 4px;
  min-width: 0;
}

.x5672275 + .x5672275 {
  border-left: 1px solid var(--hair);
}

.x5672275 b {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.x5672275 span {
  font-size: 11px;
  font-weight: 500;
  color: var(--dim);
  line-height: 1;
}

.xfddf480 b {
  background: var(--violet-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   УСЛОВИЯ (КАНАЛЫ И ЗАДАНИЯ)
   ========================================================================== */

.x98f7acf {
  padding: 6px 14px;
}

.x98f7acf.has-header,
.optional-card {
  padding: 12px 14px 6px;
}

.requirement-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 2px;
}

.requirement-section-title {
  color: var(--faint);
}

.requirement-optional-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  color: #ffc7ef;
  background: rgba(255, 122, 217, 0.1);
  border: 1px solid rgba(255, 122, 217, 0.28);
}

.x3476362 {
  display: flex;
  flex-direction: column;
}

.requirement-channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
}

.requirement-channel-row:last-child {
  border-bottom: none;
}

.requirement-channel-info {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.requirement-channel-info span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #d9c4ff;
  background:
    linear-gradient(160deg, rgba(123, 60, 255, 0.35), rgba(240, 106, 214, 0.16)),
    var(--bg-2);
  border: 1px solid rgba(180, 132, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.requirement-channel-row.is-optional .channel-icon-badge {
  color: #ffc7ef;
  background:
    linear-gradient(160deg, rgba(240, 106, 214, 0.26), rgba(123, 60, 255, 0.12)),
    var(--bg-2);
  border-color: rgba(255, 122, 217, 0.26);
}

.requirement-channel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Кнопка-пилюля как «Открыть ↗» на сайте */
.requirement-channel-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s var(--ease), background 0.15s, border-color 0.15s;
}

.requirement-channel-btn:active {
  transform: scale(0.96);
  background: rgba(180, 132, 255, 0.16);
  border-color: rgba(180, 132, 255, 0.4);
}

.requirement-channel-btn.is-visited {
  color: var(--ok);
  background: rgba(111, 227, 161, 0.1);
  border-color: rgba(111, 227, 161, 0.3);
}

.requirement-check-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  transition: transform 0.15s var(--ease), background 0.15s, border-color 0.15s, color 0.15s;
}

.requirement-check-btn:active {
  transform: scale(0.9);
  background: rgba(180, 132, 255, 0.18);
  border-color: rgba(180, 132, 255, 0.45);
}

.requirement-check-btn.is-spinning svg {
  animation: reqSpin 0.65s linear infinite;
}

.requirement-check-btn.is-shake {
  animation: reqShake 0.35s ease;
  color: var(--danger);
  border-color: rgba(255, 122, 138, 0.45);
}

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

@keyframes reqShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.requirement-channel-status.is-joined {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ok);
  background: rgba(111, 227, 161, 0.1);
  border: 1px solid rgba(111, 227, 161, 0.3);
}

.requirement-channel-status.is-joined svg {
  color: var(--ok);
  flex-shrink: 0;
}

/* ==========================================================================
   КАПЧА
   ========================================================================== */

.captcha {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  touch-action: none !important;
}

.x62b45c7, #captchaPreview {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 18px;
  overflow: hidden;
  background-color: #0d0618;
  background-image:
    radial-gradient(rgba(232, 222, 255, 0.1) 1px, transparent 1px),
    radial-gradient(70% 80% at 50% 50%, rgba(123, 60, 255, 0.18), transparent 70%);
  background-size: 16px 16px, 100% 100%;
  border: 1px solid var(--line-2);
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: grab;
}

.x62b45c7:active, #captchaPreview:active {
  cursor: grabbing;
}

.x62b45c7 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Светлый круг-цель */
#captchaPuzzleSlot {
  border: 2px dashed rgba(255, 255, 255, 0.6) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.03), inset 0 0 16px rgba(255, 255, 255, 0.08) !important;
}

/* Фиолетовая метка */
.captcha-marker {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate3d(-50%, -50%, 0) !important;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--violet-grad);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 22px -6px rgba(180, 70, 255, 0.9);
  pointer-events: none;
  z-index: 2;
  will-change: left;
  touch-action: none !important;
}

.x7203e86 {
  position: relative;
  width: 100%;
  height: 46px;
  border-radius: 999px;
  background: #0d0618;
  border: 1px solid var(--line-2);
  overflow: visible;
  display: flex;
  align-items: center;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: pointer;
}

.x7203e86.is-resetting {
  animation: captchaShake 0.4s ease;
}

@keyframes captchaShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.captcha-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(123, 60, 255, 0.15), rgba(180, 76, 255, 0.35));
  pointer-events: none;
  will-change: width;
}

.captcha-thumb {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--violet-grad);
  box-shadow: 0 8px 20px -8px rgba(180, 70, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 2;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  will-change: left;
}

.x7203e86:active .captcha-thumb {
  transform: translateY(-50%) scale(1.05);
}

.x7203e86 input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   КНОПКИ
   ========================================================================== */

.interaction {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

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

.primary, .cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border-radius: var(--r-btn);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--violet-grad);
  border: none;
  box-shadow:
    0 18px 40px -18px rgba(180, 70, 255, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s;
}

.primary:active, .cta:active,
body[data-state="success"] #action2:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 10px 26px -16px rgba(180, 70, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.primary:focus-visible, .cta:focus-visible, .secondary:focus-visible, .ticket-draw-hash:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.primary:disabled, .cta:disabled {
  cursor: not-allowed;
  filter: saturate(0.45) brightness(0.8);
  box-shadow: none;
}

.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: var(--r-btn);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  transition: transform 0.15s var(--ease), background 0.15s;
}

.secondary:active {
  background: rgba(180, 132, 255, 0.14);
  transform: scale(0.985);
}

.secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* «Ты участвуешь» — статус, а не кнопка */
body[data-state="success"] #action:disabled,
body[data-state="success"] #action:disabled:active,
body[data-state="success"] #action:disabled:focus {
  min-height: 52px;
  cursor: default;
  color: var(--ok);
  background: rgba(111, 227, 161, 0.08);
  border: 1px solid rgba(111, 227, 161, 0.32);
  box-shadow: none;
  filter: none;
  transform: none;
  outline: none;
  font-size: 12.5px;
  pointer-events: none !important;
}

body[data-state="success"] #action2 {
  min-height: 56px;
  color: #fff;
  background: var(--violet-grad);
  border: none;
  box-shadow:
    0 18px 40px -18px rgba(180, 70, 255, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-size: 13.5px;
  font-weight: 700;
}

/* ==========================================================================
   ГАРАНТИЯ ЧЕСТНОСТИ (НИЖНЯЯ ПЛАШКА)
   ========================================================================== */

.ticket-draw-hash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  margin: 12px auto 4px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background 0.2s var(--ease), border-color 0.2s, transform 0.15s;
}

.ticket-draw-hash:active {
  transform: scale(0.97);
  background: rgba(180, 132, 255, 0.12);
  border-color: rgba(180, 132, 255, 0.4);
}

.ticket-draw-hash svg {
  color: var(--accent);
  flex-shrink: 0;
}

.proof-badge-shield {
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}

.proof-badge-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.proof-badge-divider {
  color: rgba(255, 255, 255, 0.2);
  font-size: 10px;
}

.proof-badge-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--accent-ink);
}

.proof-badge-info {
  display: grid;
  place-items: center;
  color: var(--faint);
}

#ticketDrawHash {
  margin-top: auto;
  width: 100%;
  padding: 22px 0 2px;
  background: none;
  border: none;
  border-radius: 0;
  color: var(--faint);
}

#ticketDrawHash:active {
  background: none;
  transform: none;
}

#ticketDrawHash .proof-badge-label {
  font-weight: 500;
  color: var(--dim);
}

#ticketDrawHash .proof-badge-code,
#ticketDrawHash .proof-badge-info,
#ticketDrawHash .proof-badge-shield,
#ticketDrawHash svg {
  color: var(--faint);
}

/* ==========================================================================
   ИТОГИ
   ========================================================================== */

#resultsView, .xa09529b {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.results-header {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
}

.results-header .ticket-proof-close {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--accent-ink);
}

.results-mascot {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Свечение за маскотом */
.results-mascot::before {
  content: "";
  position: absolute;
  inset: 10% 6% 0;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(180, 76, 255, 0.55), transparent);
  filter: blur(8px);
}

.results-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 4px;
  text-align: center;
}

#resultsGiveawayTitle {
  margin: 0;
  max-width: 100%;
  padding: 0 6px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-align: center;
  overflow-wrap: anywhere;
  background: linear-gradient(180deg, #ffffff 35%, #d8c2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#resultsPrizeText {
  margin: 0;
  max-width: 100%;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dim);
  text-align: center;
  overflow-wrap: anywhere;
}

.winner-list {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.winner-row-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hair);
}

.winner-row-card:last-child {
  border-bottom: none;
}

.winner-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  flex-shrink: 0;
}

.winner-row-card:nth-child(1) .winner-pos {
  font-size: 18px;
  background: linear-gradient(160deg, rgba(255, 196, 107, 0.28), rgba(255, 196, 107, 0.06));
  border-color: rgba(255, 196, 107, 0.4);
}

.winner-row-card:nth-child(2) .winner-pos {
  font-size: 18px;
  background: linear-gradient(160deg, rgba(220, 220, 240, 0.22), rgba(220, 220, 240, 0.05));
  border-color: rgba(220, 220, 240, 0.32);
}

.winner-row-card:nth-child(3) .winner-pos {
  font-size: 18px;
  background: linear-gradient(160deg, rgba(232, 150, 100, 0.24), rgba(232, 150, 100, 0.05));
  border-color: rgba(232, 150, 100, 0.34);
}

.winner-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.winner-details > div:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.winner-details a {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

.winner-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--faint);
}

.results-loading-card {
  padding: 24px 16px;
  text-align: center;
  color: var(--dim);
  font-size: 14px;
  font-weight: 500;
}

/* ==========================================================================
   ШТОРКА «ГАРАНТИЯ ЧЕСТНОСТИ»
   ========================================================================== */

.ticket-draw-audit, #ticketDrawAudit {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  width: 100%;
  max-width: 440px;
  max-height: 88dvh;
  margin: auto auto 0;
  padding: 26px 18px calc(var(--safe-bottom) + 20px);
  overflow-y: auto;
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(80% 40% at 50% 0%, rgba(123, 60, 255, 0.22), transparent 70%),
    #0c0617;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
}

/* Ручка шторки */
.ticket-draw-audit::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 38px;
  height: 4px;
  margin-left: -19px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.ticket-draw-audit::backdrop {
  background: rgba(4, 1, 10, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.xf6c75a1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair);
}

.audit-head-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audit-shield-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  background: var(--violet-grad);
  box-shadow: 0 10px 24px -10px rgba(180, 70, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.audit-head-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.audit-subtitle {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--dim);
}

.ticket-proof-close, #closeAuditBtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  transition: background 0.15s, color 0.15s;
}

.ticket-proof-close:active {
  background: rgba(180, 132, 255, 0.16);
  color: var(--ink);
}

.audit-intro-badge {
  margin-bottom: 12px;
  padding: 14px 15px;
  border-radius: 18px;
  background: var(--card-grad);
  border: 1px solid rgba(180, 132, 255, 0.24);
  box-shadow: var(--glow);
}

.audit-intro-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-ink);
}

.audit-intro-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--dim);
}

.audit-intro-desc b {
  color: var(--ink);
}

.audit-explainer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.audit-step-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.audit-step-num {
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--violet-grad);
}

.audit-step-content {
  flex: 1;
  min-width: 0;
}

.audit-step-content b {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}

.audit-step-content p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--dim);
}

.audit-tech-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(7, 3, 16, 0.7);
  border: 1px solid var(--line);
}

.audit-tech-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hair);
  color: var(--faint);
}

.audit-copy-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--accent-ink);
  background: rgba(180, 132, 255, 0.1);
  border: 1px solid rgba(180, 132, 255, 0.28);
}

.audit-tech-head > span:first-child {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.audit-copy-all-btn:active {
  background: rgba(180, 132, 255, 0.2);
}

.audit-tech-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.audit-tech-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--dim);
}

.audit-tech-row code {
  display: block;
  padding: 9px 11px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  word-break: break-all;
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.audit-tech-row code:active {
  border-color: rgba(180, 132, 255, 0.5);
  background: rgba(180, 132, 255, 0.08);
}

.audit-accordion-wrap {
  margin-bottom: 8px;
}

.audit-details {
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
}

.audit-details summary {
  padding: 13px 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.audit-details summary::-webkit-details-marker {
  display: none;
}

.audit-details summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-right: 2px solid var(--dim);
  border-bottom: 2px solid var(--dim);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s var(--ease);
  flex-shrink: 0;
}

.audit-details[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.audit-guide-content {
  padding: 2px 15px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--dim);
  border-top: 1px solid var(--hair);
}

.audit-guide-content ol {
  margin: 10px 0 8px 18px;
}

.audit-guide-content li {
  margin-bottom: 5px;
}

.audit-guide-content b {
  color: var(--ink);
}

.audit-guide-content a {
  color: var(--accent);
  text-decoration: underline;
}

.audit-verifier-card {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(180, 132, 255, 0.24);
  transition: background 0.25s, border-color 0.25s;
}

.audit-guide-content .audit-verifier-card {
  margin-bottom: 0;
  padding: 12px 0 2px;
  background: transparent;
  border: none;
}

.audit-verifier-card.is-success {
  background: rgba(111, 227, 161, 0.06);
  border-color: rgba(111, 227, 161, 0.35);
}

.audit-verifier-card.is-pending {
  background: rgba(255, 196, 107, 0.05);
  border-color: rgba(255, 196, 107, 0.3);
}

.audit-verifier-card.is-failed {
  background: rgba(255, 122, 138, 0.06);
  border-color: rgba(255, 122, 138, 0.35);
}

.audit-verifier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.audit-verifier-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.audit-verifier-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
}

.audit-verifier-badge.is-success {
  color: var(--ok);
  background: rgba(111, 227, 161, 0.12);
  border-color: rgba(111, 227, 161, 0.3);
}

.audit-verifier-badge.is-pending {
  color: var(--wait);
  background: rgba(255, 196, 107, 0.12);
  border-color: rgba(255, 196, 107, 0.3);
}

.audit-verifier-message {
  margin-bottom: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--dim);
}

.audit-verifier-message b {
  color: var(--ink);
}

.audit-verifier-message code {
  font-family: var(--font-mono) !important;
}

.audit-verify-btn {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: rgba(180, 132, 255, 0.1);
  border: 1px solid rgba(180, 132, 255, 0.4);
  transition: background 0.15s, transform 0.15s;
}

.audit-verify-btn:active {
  transform: scale(0.98);
  background: rgba(180, 132, 255, 0.22);
}

.audit-action-btn {
  width: 100%;
  margin-top: 10px;
}

/* ==========================================================================
   УВЕДОМЛЕНИЯ
   ========================================================================== */

.custom-toast {
  position: fixed;
  z-index: 99999;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  transform: translate3d(-50%, -150%, 0);
  width: min(392px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  border-radius: 20px;
  background: rgba(20, 11, 34, 0.92);
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.2s ease;
}

.custom-toast.is-visible {
  transform: translate3d(-50%, 0, 0);
  opacity: 1;
  pointer-events: auto;
}

.custom-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--danger);
  background: rgba(255, 122, 138, 0.12);
  border: 1px solid rgba(255, 122, 138, 0.25);
}

.custom-toast.is-warning .custom-toast-icon {
  color: var(--wait);
  background: rgba(255, 196, 107, 0.12);
  border-color: rgba(255, 196, 107, 0.25);
}

.custom-toast.is-success .custom-toast-icon {
  color: var(--ok);
  background: rgba(111, 227, 161, 0.12);
  border-color: rgba(111, 227, 161, 0.25);
}

.custom-toast-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.custom-toast-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.custom-toast-desc {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--dim);
}

.custom-toast-close {
  padding: 6px;
  color: var(--faint);
}
