/* =====================================================================
   Розыгрыши (префикс gw-): список, карточка розыгрыша, страница розыгрыша,
   окно выигрыша и вкладка админки (gw-adm-).
   ===================================================================== */

/* Акцент по типу розыгрыша (RGB): --gw-a — основной, --gw-b — дополнительный */
.gw-k-wager { --gw-a: 168, 120, 255; --gw-b: 255, 197, 61; }
.gw-k-friends { --gw-a: 47, 217, 245; --gw-b: 61, 245, 194; }
.gw-k-join { --gw-a: 70, 240, 143; --gw-b: 70, 240, 143; }

.gw-list { display: flex; flex-direction: column; gap: 14px; }
.gw-list > .sec { margin: 10px 2px -2px; }
.gw-count { --gw-b: 61, 245, 194; gap: 6px; color: #d9ccff; background: rgba(139, 92, 246, 0.22); border-color: rgba(167, 139, 250, 0.4); }
.gw-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: rgb(var(--gw-b, 61, 245, 194)); animation: gwPing 1.8s ease-out infinite; }

/* Скелетоны */
.gw-skel-card { height: 372px; border-radius: var(--r-xl); }
.gw-skel-how { height: 186px; border-radius: var(--r-l); }
.gw-skel-hero { height: 410px; border-radius: var(--r-xl); }
.gw-skel-me { height: 230px; border-radius: var(--r-l); }

/* ---------- Карточка розыгрыша ---------- */
.gw-card {
  isolation: isolate;
  overflow: hidden;
  padding: 14px 16px 16px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(var(--gw-a), 0.34) 0%, rgba(var(--gw-a), 0) 58%),
    radial-gradient(90% 70% at 0% 100%, rgba(var(--gw-b), 0.1) 0%, rgba(var(--gw-b), 0) 70%),
    var(--grad-card);
  /* Обводка — внутренней тенью, а не border: так вырезы перфорации (.gw-perf) перекрывают её */
  border: 0;
  box-shadow:
    inset 0 0 0 1px rgba(var(--gw-a), 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    var(--sh-1),
    0 16px 42px -20px rgba(var(--gw-a), 0.6);
}
/* Медленный блик по карточке */
.gw-card::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -20%;
  bottom: -20%;
  left: -42%;
  width: 36%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: skewX(-18deg);
  animation: gwSweep 8s var(--ease) infinite;
  pointer-events: none;
}
/* Нажатие: свойство scale не конфликтует с анимацией появления (.stagger) */
.gw-card.tap, .gw-fin.tap { cursor: pointer; transition: scale var(--t-fast) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t); }
.gw-card.tap:active, .gw-fin.tap:active { scale: 0.985; }
.gw-card.tap:has(.btn:active) { scale: 1; }

.gw-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.gw-top .badge { height: 24px; padding: 0 9px; font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; }
.gw-b-recur { color: #f1ebff; background: rgba(var(--gw-a), 0.18); border-color: rgba(var(--gw-a), 0.42); }
.gw-b-recur .ico { display: inline-flex; }
.gw-b-recur .ico svg { width: 12px; height: 12px; stroke-width: 2.6; }
.gw-b-kind { color: rgb(var(--gw-b)); background: rgba(var(--gw-b), 0.1); border-color: rgba(var(--gw-b), 0.38); }
.gw-b-kind.off { color: var(--text-2); background: rgba(255, 255, 255, 0.06); border-color: var(--stroke-2); }

.gw-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 10px; }
.gw-info { min-width: 0; }
.gw-kicker {
  margin-bottom: 4px;
  overflow: hidden;
  font: 800 11px/1.25 var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgb(var(--gw-a));
}
.gw-name {
  font: 800 22px/1.08 var(--font-d);
  letter-spacing: -0.01em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gw-when { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.gw-when .ico { display: inline-flex; flex: none; color: rgb(var(--gw-a)); }
.gw-when .ico svg { width: 14px; height: 14px; }

/* Золотая «таблетка» фонда */
.gw-fund {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  margin-top: 11px;
  padding: 0 12px 0 13px;
  border-radius: 999px;
  white-space: nowrap;
  font: 800 12.5px/1 var(--font);
  color: #3b2200;
  background: var(--grad-gold);
  box-shadow: 0 8px 22px rgba(255, 159, 28, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.gw-fund::after {
  content: '';
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: shine 5s var(--ease) 1.2s infinite;
  pointer-events: none;
}
.gw-fund-eq { opacity: 0.65; }
.gw-fund .amt { gap: 4px; }
.gw-fund .amt b { font-size: 13.5px; color: #3b2200; }

/* Призы: три парящие 3D-иконки */
.gw-pz { position: relative; width: 132px; height: 116px; flex: none; }
.gw-pz-glow {
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--gw-a), 0.5) 0%, rgba(var(--gw-a), 0.12) 45%, transparent 70%);
  filter: blur(6px);
  animation: glow 3.4s ease-in-out infinite;
}
.gw-pz-i { position: absolute; animation: popIn 0.7s var(--spring) both; }
.gw-pz-i .art { width: 58px; height: 58px; }
.gw-pz-i > img { width: 76px; height: 76px; animation: floaty 3.8s ease-in-out infinite; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45)); }
.gw-pz .p1 { z-index: 2; left: calc(50% - 41px); top: -2px; animation-delay: 0.12s; }
.gw-pz .p1 .art { width: 82px; height: 82px; }
.gw-pz .p2 { left: -2px; bottom: 0; animation-delay: 0.22s; }
.gw-pz .p3 { right: -2px; bottom: 6px; animation-delay: 0.3s; }
.gw-pz .p2 .art img { animation-delay: -1.3s; }
.gw-pz .p3 .art img { animation-delay: -2.5s; }
.gw-pz.n1 .p1 { top: calc(50% - 41px); }
.gw-pz.n2 .p1 { left: auto; right: 0; top: 0; }
.gw-pz.n2 .p2 { left: 0; bottom: 4px; }
.gw-pz-more {
  position: absolute;
  z-index: 3;
  top: 2px;
  right: -2px;
  height: 22px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font: 800 11px/1 var(--font);
  color: #fff;
  background: rgba(8, 5, 20, 0.7);
  border: 1px solid var(--stroke-2);
}
.gw-spark {
  position: absolute;
  z-index: 3;
  width: 9px;
  height: 9px;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 2.4s ease-in-out infinite;
  pointer-events: none;
}
.gw-spark.s1 { left: 4%; top: 22%; }
.gw-spark.s2 { right: 8%; top: 2%; width: 7px; height: 7px; background: rgb(var(--gw-b)); animation-delay: 0.8s; }
.gw-spark.s3 { left: 46%; bottom: -2px; width: 6px; height: 6px; animation-delay: 1.6s; }

/* Перфорация «билета» с вырезами по краям */
.gw-perf { position: relative; height: 0; margin: 14px -16px 0; border-top: 1.5px dashed rgba(255, 255, 255, 0.1); }
.gw-perf::before, .gw-perf::after {
  content: '';
  position: absolute;
  top: -11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0b0720;
  box-shadow: inset 0 0 0 1px rgba(var(--gw-a), 0.3);
}
.gw-perf::before { left: -10px; }
.gw-perf::after { right: -10px; }

/* Обратный отсчёт */
.gw-cdw {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding: 6px 6px 6px 12px;
  border-radius: 17px;
  background: var(--well);
  border: 1px solid var(--stroke);
}
.gw-cdw-l { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font: 800 10.5px/1.2 var(--font); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; color: var(--text-3); }
.gw-cdw-l .ico { display: inline-flex; color: rgb(var(--gw-b)); }
.gw-cdw-l .ico svg { width: 17px; height: 17px; }
.gw-cd { position: relative; display: flex; gap: 5px; }
.gw-cd-c {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 48px;
  height: 36px;
  padding: 0 8px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--stroke-2);
  box-shadow: var(--hl);
}
.gw-cd-num { display: inline-flex; font: 800 16px/1 var(--font-d); font-variant-numeric: tabular-nums; color: #fff; }
.gw-cd-c small { margin-left: 1px; transform: translateY(1px); font-size: 10.5px; font-weight: 800; color: var(--text-3); }
.gw-cd-s .gw-cd-num { color: rgb(var(--gw-b)); }
.gw-dg { position: relative; display: inline-block; width: 0.78em; height: 1.15em; overflow: hidden; text-align: center; }
.gw-dg i { display: block; font-style: normal; line-height: 1.15em; }
.gw-dg i.in { animation: gwDigitIn 0.45s var(--ease) both; }
.gw-dg i.out { position: absolute; inset: 0; animation: gwDigitOut 0.45s var(--ease) both; }
.gw-cd.done .gw-cd-c { display: none; }
.gw-cd.done::after {
  content: attr(data-done);
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 11px;
  font: 800 12.5px/1 var(--font);
  color: rgb(var(--gw-b));
  background: rgba(var(--gw-b), 0.1);
  border: 1px solid rgba(var(--gw-b), 0.3);
  animation: pulse 1.6s ease-in-out infinite;
}

/* Статистика */
.gw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; overflow: hidden; border-radius: 17px; background: var(--well); border: 1px solid var(--stroke); }
.gw-stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gw-stat { min-width: 0; padding: 10px 11px 9px; transition: background var(--t) var(--ease); }
.gw-stat + .gw-stat { border-left: 1px solid var(--stroke); }
.gw-stat b { display: inline-block; font: 800 17px/1.15 var(--font-d); font-variant-numeric: tabular-nums; }
.gw-stat small { display: block; margin-top: 3px; font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--text-3); }
.gw-stat.mine:not(.zero) { background: linear-gradient(180deg, rgba(255, 197, 61, 0.12), rgba(255, 197, 61, 0.02)); }
.gw-stat.mine:not(.zero) b { color: var(--gold); text-shadow: 0 0 16px rgba(255, 197, 61, 0.45); }

/* Подсказка о заработанных, но не активированных билетах */
.gw-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #ffe2a0;
  background: rgba(255, 197, 61, 0.08);
  border: 1px dashed rgba(255, 197, 61, 0.38);
  animation: fadeUp 0.45s var(--ease) both;
}
.gw-hint:empty { display: none; }
.gw-hint img { width: 26px; height: 26px; flex: none; animation: wiggle 2.4s ease-in-out infinite; }

/* Кнопка участия */
.gw-cta { margin-top: 12px; }
.gw-join { height: 52px; border-radius: 17px; }
.gw-join.btn-lg { height: 56px; }
.gw-plus {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 8px 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.gw-plus img { width: 20px; height: 20px; margin: -2px 0; }
.gw-join.on {
  color: var(--mint);
  background: linear-gradient(135deg, rgba(61, 245, 194, 0.16), rgba(47, 217, 245, 0.07));
  border: 1px solid rgba(61, 245, 194, 0.42);
  box-shadow: 0 8px 24px rgba(61, 245, 194, 0.14), var(--hl);
}
.gw-join.on .ico svg { stroke-width: 3; animation: pop 0.5s var(--spring) both; }
.gw-wait { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: currentColor; animation: spin 0.8s linear infinite; }

/* Билетики, разлетающиеся при участии */
.gw-burst { position: fixed; z-index: 130; width: 0; height: 0; pointer-events: none; }
.gw-burst img {
  position: absolute;
  left: -15px;
  top: -15px;
  width: 30px;
  height: 30px;
  opacity: 0;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
  animation: gwBurst 1s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

/* ---------- «Как получить билеты» ---------- */
.gw-how { padding: 16px; }
.gw-how-h { display: flex; align-items: center; gap: 10px; }
.gw-how-hic { width: 32px; height: 32px; animation: floatyRot 4.2s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4)); }
.gw-how-h h2 { font: 800 15px/1.2 var(--font-d); text-transform: uppercase; letter-spacing: 0.02em; }
.gw-how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.gw-how-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gw-how-grid.n1 { grid-template-columns: minmax(0, 1fr); }
.gw-how-t {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  padding: 12px 10px 10px;
  border-radius: 18px;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: linear-gradient(170deg, rgba(var(--gw-a), 0.2) 0%, rgba(14, 8, 32, 0.55) 72%);
  border: 1px solid rgba(var(--gw-a), 0.26);
  box-shadow: var(--hl);
  transition: scale var(--t-fast) var(--ease), border-color var(--t);
}
button.gw-how-t { cursor: pointer; }
button.gw-how-t:active { scale: 0.96; }
.gw-how-ic { position: absolute; top: 7px; right: 7px; width: 30px; height: 30px; animation: floaty 3.6s ease-in-out infinite; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)); }
.gw-how-t:nth-child(2) .gw-how-ic { animation-delay: -1.2s; }
.gw-how-t:nth-child(3) .gw-how-ic { animation-delay: -2.4s; }
.gw-how-n { margin-top: 2px; font: 800 20px/1 var(--font-d); color: rgb(var(--gw-b)); text-shadow: 0 0 18px rgba(var(--gw-b), 0.35); }
.gw-how-n .ico { display: inline-flex; }
.gw-how-n .ico svg { width: 22px; height: 22px; stroke-width: 3; }
.gw-how-x { font-size: 11.5px; font-weight: 700; line-height: 1.3; color: var(--text-2); }
.gw-how-x .amt { gap: 3px; vertical-align: -1px; }
.gw-how-x .amt b { color: #fff; }
.gw-how-tag { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 4px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(var(--gw-a)); }
.gw-how-tag .ico { display: inline-flex; }
.gw-how-tag .ico svg { width: 11px; height: 11px; }

.gw-empty { padding: 4px; }

/* ---------- Завершённые розыгрыши и победители ---------- */
.gw-fin { padding: 13px 14px 14px; border-radius: var(--r-l); }
.gw-fin.won { border-color: rgba(255, 197, 61, 0.45); box-shadow: var(--sh-1), var(--hl), 0 0 30px -10px rgba(255, 197, 61, 0.5); }
.gw-fin-head { display: flex; align-items: center; gap: 10px; }
.gw-fin-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gw-fin-t b { font: 800 14px/1.2 var(--font-d); }
.gw-fin-t small { font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.gw-fin-won img { width: 15px; height: 15px; }
.gw-fin-go { display: inline-flex; color: var(--text-3); }
.gw-fin-go svg { width: 18px; height: 18px; }
.gw-wins { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.gw-win {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 8px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--stroke);
}
.gw-win.me { background: linear-gradient(90deg, rgba(255, 197, 61, 0.16), rgba(255, 197, 61, 0.04)); border-color: rgba(255, 197, 61, 0.42); }
.gw-medal { width: 28px; height: 28px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35)); }
.gw-win-who { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gw-win-who b, .gw-win-who small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gw-win-who b { font-size: 13.5px; font-weight: 800; }
.gw-win-who small { font-size: 11px; font-weight: 700; color: var(--text-3); }
.gw-win.me .gw-win-who small { color: var(--gold); }
.gw-win-prize { display: flex; align-items: center; gap: 6px; min-width: 0; }
.gw-win-prize .art-sm { width: 36px; height: 36px; }
.gw-win-pz { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.gw-win-pz small { max-width: 96px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; font-weight: 700; color: var(--text-2); }
.gw-win-pz .amt { font-size: 12.5px; }
.gw-nowin {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--stroke-2);
}

/* ---------- Окно выигрыша ---------- */
.modal.gw-won-modal {
  overflow: visible;
  margin-top: 80px;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(255, 197, 61, 0.22), transparent 70%),
    linear-gradient(160deg, #3d2380 0%, #201248 52%, #150b33 100%);
  border-color: rgba(255, 210, 120, 0.4);
}
.gw-won { display: grid; justify-items: center; gap: 6px; text-align: center; }
.gw-won-stage { position: relative; display: grid; place-items: center; width: 200px; height: 156px; margin: -100px auto 0; }
.gw-won-rays {
  position: absolute;
  inset: -34px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 90, 0.3) 0deg 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%);
  mask: radial-gradient(circle, #000 18%, transparent 68%);
  animation: spin 16s linear infinite;
}
.gw-won-art { position: relative; animation: popIn 0.7s var(--spring) both; }
.gw-won-art .art-xl { width: 164px; height: 164px; }
.gw-won-title {
  font: 800 24px/1.1 var(--font-d);
  text-transform: uppercase;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: popIn 0.6s var(--spring) 0.15s both;
}
.gw-won-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--text-2); }
.gw-won-medal { width: 22px; height: 22px; }
.gw-won-name { margin-top: 4px; font: 800 17px/1.2 var(--font); }
.gw-won-val .amt { font-size: 20px; }
.gw-won .btn { margin-top: 8px; }

/* ---------- Страница розыгрыша ---------- */
.gw-dhead { display: flex; align-items: center; gap: 12px; margin: 8px 2px 14px; }
.gw-dhead h1 { flex: 1; min-width: 0; font: 800 20px/1.1 var(--font-d); text-transform: uppercase; letter-spacing: 0.01em; }
.gw-detail { display: flex; flex-direction: column; gap: 12px; }
.gw-dhero .gw-kicker { margin: 10px 0 0; }
.gw-dhero-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gw-dhero-row .gw-when, .gw-dhero-row .gw-fund { margin-top: 0; }

/* Пьедестал: 2 — 1 — 3 */
.gw-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; margin-top: 16px; }
.gw-podium.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 300px; margin-inline: auto; }
.gw-podium.n1 { grid-template-columns: minmax(0, 1fr); max-width: 170px; margin-inline: auto; }
.gw-podium .empty { grid-column: 1 / -1; padding: 12px; }
.gw-pd { --pc: 196, 206, 230; display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.gw-pd.p1 { --pc: 255, 197, 61; }
.gw-pd.p3 { --pc: 236, 150, 92; }
.gw-pd-art { animation: popIn 0.7s var(--spring) 0.2s both; }
.gw-pd.p1 .gw-pd-art { animation-delay: 0.35s; }
.gw-pd.p3 .gw-pd-art { animation-delay: 0.45s; }
.gw-pd .art-lg { width: 96px; height: 96px; }
.gw-pd .art-md { width: 70px; height: 70px; }
.gw-pd.p2 .art img { animation-delay: -1.2s; }
.gw-pd.p3 .art img { animation-delay: -2.3s; }
.gw-pd-name { width: 100%; margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 800; }
.gw-pd .amt { margin-top: 1px; font-size: 12.5px; }
.gw-pd-base {
  width: 100%;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding-top: 8px;
  border-radius: 16px 16px 6px 6px;
  background: linear-gradient(180deg, rgba(var(--pc), 0.32) 0%, rgba(var(--pc), 0.05) 100%);
  border: 1px solid rgba(var(--pc), 0.45);
  border-bottom-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 -8px 26px -12px rgba(var(--pc), 0.65);
  transform-origin: bottom;
  animation: gwRise 0.8s var(--spring) both;
}
.gw-pd.p1 .gw-pd-base { height: 78px; animation-delay: 0.1s; }
.gw-pd.p2 .gw-pd-base { height: 60px; }
.gw-pd.p3 .gw-pd-base { height: 48px; animation-delay: 0.2s; }
.gw-pd-medal { width: 26px; height: 26px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.4)); }
.gw-pd.p1 .gw-pd-medal { width: 32px; height: 32px; }
.gw-pd-who, .gw-pd-place { max-width: 100%; padding: 0 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10.5px; font-weight: 800; color: rgb(var(--pc)); }
.gw-pd-place { font-size: 9.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.gw-pd.me .gw-pd-who { color: #fff; }
.gw-pd.me .gw-pd-base { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 2px rgba(255, 197, 61, 0.6), 0 -8px 26px -10px rgba(255, 197, 61, 0.8); }

.gw-h3 { font: 800 14px/1.2 var(--font-d); text-transform: uppercase; letter-spacing: 0.02em; }
.gw-sec-h { display: flex; align-items: center; gap: 10px; }
.gw-sec-h img { width: 30px; height: 30px; animation: floaty 3.8s ease-in-out infinite; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)); }
.gw-sec-h h3 { font: 800 14px/1.2 var(--font-d); text-transform: uppercase; letter-spacing: 0.02em; }
.gw-wcard .gw-wins { margin-top: 12px; }

/* Призы с 4-го места */
.gw-more-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.gw-more-i {
  display: grid;
  grid-template-columns: 26px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 6px 10px 6px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--stroke);
}
.gw-more-i.me { background: rgba(255, 197, 61, 0.08); border-color: rgba(255, 197, 61, 0.45); }
.gw-more-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; font: 800 12px/1 var(--font-d); color: var(--text-2); background: rgba(255, 255, 255, 0.07); }
.gw-more-t { min-width: 0; display: flex; flex-direction: column; }
.gw-more-t b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.gw-more-t small { font-size: 11px; font-weight: 700; color: var(--text-3); }

/* Карточка игрока */
.gw-me { padding: 14px 16px 16px; }
.gw-me-head { display: flex; align-items: center; gap: 12px; }
.gw-me-ic { position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; }
.gw-me-ic::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--gw-b), 0.35), transparent 70%); animation: glow 3s ease-in-out infinite; }
.gw-me-ic img { position: relative; width: 100%; height: 100%; animation: floatyRot 4s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.gw-me-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gw-me-txt small { font: 800 10.5px/1.2 var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.gw-me-n { font: 800 30px/1.1 var(--font-d); font-variant-numeric: tabular-nums; color: var(--gold); text-shadow: 0 0 22px rgba(255, 197, 61, 0.35); }
.gw-in { color: var(--mint); background: rgba(61, 245, 194, 0.12); border-color: rgba(61, 245, 194, 0.4); }
.gw-me-head .badge .ico { display: inline-flex; }
.gw-me-body { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.gw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--well);
  border: 1px solid var(--stroke);
  transition: opacity var(--t);
}
.gw-row > b { flex: none; font: 800 14px/1 var(--font-d); color: rgb(var(--gw-b)); }
.gw-row > span .amt b { color: #fff; }
.gw-row.dim { opacity: 0.55; }
.gw-row.dim > b { color: var(--text-2); }
.gw-next { display: flex; flex-direction: column; gap: 7px; padding: 2px 2px 0; }
.gw-next small { font-size: 12px; font-weight: 700; color: var(--text-2); }
.gw-next small .amt b { color: #fff; }
.gw-next-f { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.gw-bar { height: 9px; overflow: hidden; border-radius: 9px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--stroke); }
.gw-bar i {
  position: relative;
  overflow: hidden;
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--grad-gold);
  box-shadow: 0 0 14px rgba(255, 197, 61, 0.55);
  transition: width 1s var(--ease);
}
.gw-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent); transform: translateX(-100%); animation: gwShimmer 2.2s ease-in-out infinite; }
.gw-chance { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gw-chance.one { grid-template-columns: 1fr; }
.gw-ch { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px 12px; border-radius: 14px; background: linear-gradient(160deg, rgba(var(--gw-a), 0.16), rgba(var(--gw-a), 0.04)); border: 1px solid rgba(var(--gw-a), 0.3); }
.gw-ch small { font-size: 11px; font-weight: 700; color: var(--text-2); }
.gw-ch b { font: 800 19px/1.1 var(--font-d); font-variant-numeric: tabular-nums; }
.gw-note { font-size: 11px; font-weight: 600; line-height: 1.4; color: var(--text-3); }
.gw-res { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--well); border: 1px solid var(--stroke); }
.gw-res > img { width: 40px; height: 40px; flex: none; animation: floaty 3.6s ease-in-out infinite; }
.gw-res.won { background: linear-gradient(120deg, rgba(255, 197, 61, 0.18), rgba(255, 197, 61, 0.04)); border-color: rgba(255, 197, 61, 0.45); }
.gw-res-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gw-res-t small { font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.gw-res-t b { font-size: 15px; color: #fff; }

/* Честность */
.gw-fair { display: flex; flex-direction: column; gap: 10px; }
.gw-p { font-size: 12.5px; font-weight: 600; line-height: 1.45; color: var(--text-2); }
.gw-fair-f { display: flex; flex-direction: column; gap: 5px; }
.gw-fair-f > small { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.gw-hash {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 12px;
  text-align: left;
  color: var(--text-2);
  background: var(--well);
  border: 1px solid var(--stroke-2);
  transition: scale var(--t-fast) var(--ease), border-color var(--t);
}
button.gw-hash:active { scale: 0.98; border-color: rgba(167, 139, 250, 0.6); }
.gw-hash .mono { flex: 1; min-width: 0; font-size: 11px; line-height: 1.35; }
.gw-hash .ico { display: inline-flex; flex: none; color: var(--text-3); }
.gw-hash .ico svg { width: 16px; height: 16px; }
.gw-hash.off { font-size: 12px; font-weight: 700; color: var(--text-3); border-style: dashed; }

/* Правила */
.gw-rule-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.gw-rule { display: flex; align-items: center; gap: 12px; }
.gw-rule p { font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--text-2); }

/* ---------- Вкладка админки ---------- */
.gw-adm { display: flex; flex-direction: column; gap: 12px; }
.gw-adm-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gw-adm-h h2 { font: 800 15px/1.2 var(--font-d); text-transform: uppercase; letter-spacing: 0.02em; }
.gw-adm-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gw-adm-rules .field > span { font-size: 11px; line-height: 1.25; min-height: 28px; }
.gw-adm-item { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.gw-adm-top { display: flex; align-items: flex-start; gap: 10px; }
.gw-adm-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gw-adm-t b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 800 14px/1.25 var(--font-d); }
.gw-adm-t small { font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.gw-adm-st.on { color: var(--mint); background: rgba(61, 245, 194, 0.12); border-color: rgba(61, 245, 194, 0.38); }
.gw-adm-st.wait { color: var(--gold); background: rgba(255, 197, 61, 0.12); border-color: rgba(255, 197, 61, 0.38); }
.gw-adm-prizes { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.gw-adm-prizes .art-sm { width: 38px; height: 38px; }
.gw-adm-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gw-adm-kpi { min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--well); border: 1px solid var(--stroke); }
.gw-adm-kpi small { display: block; font-size: 10.5px; font-weight: 700; color: var(--text-3); }
.gw-adm-kpi b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; font-weight: 800; }
.gw-adm-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.gw-adm-acts .btn { flex: 1 1 auto; }
.gw-adm-wins { display: flex; flex-direction: column; gap: 5px; }
.gw-adm-win { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.gw-adm-win img { width: 22px; height: 22px; flex: none; }
.gw-adm-win span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gw-adm-seed { font-size: 10.5px; color: var(--text-3); }
.gw-adm-form { display: flex; flex-direction: column; gap: 14px; }
.gw-adm-titles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gw-adm-plist { display: flex; flex-direction: column; gap: 6px; }
.gw-adm-p {
  display: grid;
  grid-template-columns: 26px 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  animation: fadeUp 0.35s var(--ease) both;
}
.gw-adm-p .art-sm { width: 40px; height: 40px; }
.gw-adm-p-t { min-width: 0; display: flex; flex-direction: column; }
.gw-adm-p-t b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.gw-adm-p-t .amt { font-size: 12px; }
.gw-adm-p-btns { display: flex; gap: 4px; }
.gw-adm-p-btns .icon-btn { width: 32px; height: 32px; border-radius: 10px; }
.gw-adm-p-btns .icon-btn svg { width: 16px; height: 16px; }
.gw-adm-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.gw-adm-quick .chip { height: 32px; padding: 0 11px; }
.gw-adm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 56dvh; overflow-y: auto; padding: 2px; }
.gw-adm-grid .tile { animation: fadeUp 0.35s var(--ease) both; }
.gw-adm-nothing { grid-column: 1 / -1; padding: 16px; text-align: center; }
.gw-adm-off { opacity: 0.5; }
.gw-adm-ppl { display: flex; flex-direction: column; }
.gw-adm-ppl .li b { font-size: 13px; }
.gw-adm-ppl .li small { color: var(--text-3); font-size: 11px; }

/* ---------- Анимации ---------- */
@keyframes gwPing { 0% { box-shadow: 0 0 0 0 rgba(var(--gw-b, 61, 245, 194), 0.7); } 80%, 100% { box-shadow: 0 0 0 8px rgba(var(--gw-b, 61, 245, 194), 0); } }
@keyframes gwSweep { 0% { transform: translateX(0) skewX(-18deg); } 45%, 100% { transform: translateX(560%) skewX(-18deg); } }
@keyframes gwDigitIn { from { transform: translateY(-75%); opacity: 0; filter: blur(2px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes gwDigitOut { from { transform: none; opacity: 1; } to { transform: translateY(75%); opacity: 0; filter: blur(2px); } }
@keyframes gwBurst {
  0% { opacity: 0; transform: translate(0, 0) scale(0.3) rotate(0deg); }
  15% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot)); }
}
@keyframes gwRise { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gwShimmer { to { transform: translateX(100%); } }

/* ---------- Узкие экраны ---------- */
@media (max-width: 419px) {
  .gw-cdw-l span { display: none; }
}
@media (max-width: 370px) {
  .gw-card { padding: 13px 13px 14px; }
  .gw-perf { margin-inline: -13px; }
  .gw-name { font-size: 19px; }
  .gw-pz { width: 112px; height: 100px; }
  .gw-pz .p1 { left: calc(50% - 35px); }
  .gw-pz .p1 .art { width: 70px; height: 70px; }
  .gw-pz-i .art { width: 48px; height: 48px; }
  .gw-pz.n1 .p1 { top: calc(50% - 35px); }
  .gw-cd-c { min-width: 42px; padding: 0 6px; }
  .gw-cd-num { font-size: 15px; }
  .gw-stat { padding: 9px 8px; }
  .gw-stat b { font-size: 15px; }
  .gw-how-grid { gap: 6px; }
  .gw-how-t { padding: 10px 8px 9px; }
  .gw-how-n { font-size: 17px; }
  .gw-how-ic { width: 24px; height: 24px; }
  .gw-win-pz small { display: none; }
  .gw-pd .art-lg { width: 80px; height: 80px; }
  .gw-pd .art-md { width: 58px; height: 58px; }
  .gw-adm-rules, .gw-adm-titles { grid-template-columns: 1fr; }
  .gw-adm-rules .field > span { min-height: 0; }
}
