/* =========================================================
   ВетСервис · Тайный Санта 2027
   ========================================================= */

:root {
  color-scheme: dark;
  --ink-950: #020b0f;
  --ink-900: #04141b;
  --ink-850: #061a22;
  --ink-800: #0a2430;
  --ink-700: #10333e;
  --cream: #fff6e8;
  --cream-2: #efe5d3;
  --dim: #b9bdb5;
  --dim-2: #89968f;
  --gold: #f4c96b;
  --gold-2: #ffe6a3;
  --gold-3: #c9953f;
  --red: #e94b5f;
  --red-2: #b93146;
  --red-3: #8f1d30;
  --mint: #7fe3c4;
  --ice: #a9d8ee;
  --line: rgba(244, 201, 107, .16);
  --line-2: rgba(255, 255, 255, .08);
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .07);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-hand: "Caveat", "Segoe Script", cursive;
  --ease: cubic-bezier(.16, .84, .28, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --header-h: 78px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scrollbar-color: var(--gold-3) var(--ink-900);
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--ink-900);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

::selection { background: rgba(244, 201, 107, .28); color: #fff; }

img, svg, canvas { display: block; max-width: 100%; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4 { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- background ---------- */

.bg-fallback,
.bg-aurora,
.bg-snow,
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-fallback {
  z-index: 0;
  background:
    radial-gradient(120% 80% at 80% 10%, rgba(28, 96, 93, .28), transparent 60%),
    radial-gradient(100% 70% at 15% 15%, rgba(44, 61, 118, .22), transparent 65%),
    radial-gradient(80% 60% at 50% 100%, rgba(126, 60, 40, .14), transparent 65%),
    linear-gradient(180deg, #061a22 0%, #04141b 45%, #020b0f 100%);
}

.bg-aurora { z-index: 0; width: 100%; height: 100%; opacity: .95; }
.bg-snow { z-index: 1; width: 100%; height: 100%; }

.bg-glow { z-index: 1; border-radius: 50%; opacity: .35; }
.bg-glow--one {
  inset: -20% -20% auto 45%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(233, 75, 95, .3), transparent 65%);
}
.bg-glow--two {
  inset: auto 55% -25% -20%;
  width: 55vw; height: 55vw;
  background: radial-gradient(circle, rgba(127, 227, 196, .18), transparent 65%);
}

main, .site-footer { position: relative; z-index: 3; }
.site-header { z-index: 55; }

/* ---------- loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(18, 74, 72, .5), transparent 55%),
    var(--ink-900);
  transition: opacity .7s var(--ease), visibility .7s;
  animation: loaderFailsafe .01s 5s forwards;
}
.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__inner { text-align: center; }
.loader__mark {
  position: relative;
  width: 76px; height: 76px;
  margin: 0 auto 18px;
  color: var(--gold);
  filter: drop-shadow(0 0 18px rgba(244, 201, 107, .35));
  animation: loaderPulse 2.4s ease-in-out infinite;
}
.loader__mark svg { width: 100%; height: 100%; }
.loader__spark {
  position: absolute;
  top: -6px; right: -4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 14px var(--gold);
  animation: twinkle 1.8s ease-in-out infinite;
}
.loader p {
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--gold-2);
  letter-spacing: .03em;
}
.loader__bar {
  width: 170px; height: 2px;
  margin: 16px auto 0;
  background: rgba(255, 255, 255, .1);
  border-radius: 99px;
  overflow: hidden;
}
.loader__bar i {
  display: block;
  width: 42%; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: loaderBar 1.4s ease-in-out infinite;
}

/* ---------- typography helpers ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow__line {
  display: inline-block;
  width: 32px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.eyebrow__star { font-size: .7rem; opacity: .8; }

.section {
  position: relative;
  padding-block: clamp(76px, 10vw, 136px);
  scroll-margin-top: 22px;
}
.section-head { max-width: 760px; margin-bottom: clamp(34px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .section-sub { margin-inline: auto; }
.section-title {
  margin: 18px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 6vw, 4.9rem);
  font-weight: 600;
  line-height: .94;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.section-title em {
  color: var(--gold);
  font-style: italic;
  font-weight: 500;
}
.section-sub {
  max-width: 620px;
  color: var(--dim);
  font-size: clamp(.94rem, 1.1vw, 1.06rem);
  line-height: 1.7;
  text-wrap: pretty;
}

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

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 40px);
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s;
}

/* Новогодняя гирлянда как часть нижней линии шапки */
.site-header__garland {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  z-index: 1;
  display: block;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  overflow: visible;
  pointer-events: none;
  user-select: none;
}
.vs-garland-wire { opacity: .9; }
.vs-light-socket { pointer-events: none; }
.vs-light {
  transform-box: fill-box;
  transform-origin: center;
  animation:
    vsGarlandBlink 1.1s ease-in-out infinite,
    vsGarlandCycle 3.7s linear infinite;
  filter: drop-shadow(0 0 1.4px currentColor);
}
.vs-light--red { color: #ff4d5e; animation-delay: 0s; }
.vs-light--gold { color: #f4c96b; animation-delay: .18s; }
.vs-light--blue { color: #72b8ff; animation-delay: .36s; }
.vs-light--green { color: #7ee3a4; animation-delay: .54s; }
.vs-light--white { color: #fff8df; animation-delay: .72s; }
@keyframes vsGarlandBlink {
  0%, 100% { opacity: .28; transform: scale(.82); }
  50% { opacity: 1; transform: scale(1.18); }
}
@keyframes vsGarlandCycle {
  0% { color: #ff3b4f; }
  9% { color: #ffd166; }
  18% { color: #4dabf7; }
  27% { color: #63e6a4; }
  36% { color: #f783ff; }
  45% { color: #ffffff; }
  54% { color: #ff9f1c; }
  63% { color: #7ee3a4; }
  72% { color: #845ef7; }
  81% { color: #ff5d8f; }
  90% { color: #72e0ff; }
  100% { color: #ff3b4f; }
}
@media (prefers-reduced-motion: reduce) {
  .vs-light { animation: none !important; opacity: .92; transform: none; color: #f4c96b; }
}
.site-header.is-scrolled {
  background: #04141b;
  border-bottom-color: rgba(244, 201, 107, .1);
}

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  color: var(--gold);
  border: 1px solid rgba(244, 201, 107, .35);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(244, 201, 107, .18), transparent 60%),
    rgba(6, 26, 31, .7);
  box-shadow: 0 0 24px -6px rgba(244, 201, 107, .35), inset 0 0 14px rgba(244, 201, 107, .06);
}
.brand__mark svg { width: 24px; height: 24px; display: block; }
.brand__text {
  font-weight: 800;
  font-size: .98rem;
  letter-spacing: .06em;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand__text small {
  display: block;
  margin-top: 3px;
  font-family: var(--font-hand);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: none;
  color: var(--gold);
  opacity: .82;
}
.header__actions { display: flex; align-items: center; gap: 10px; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(244, 201, 107, .16);
  border-radius: 99px;
  background: rgba(6, 26, 31, .55);
  color: var(--dim);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  white-space: nowrap;
}
.live-pill i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(127, 227, 196, .6);
  animation: livePulse 2.6s infinite;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  color: var(--cream-2);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  cursor: pointer;
  transition: background .25s, border-color .25s, color .25s, transform .25s;
}
.icon-btn:hover {
  color: var(--gold-2);
  background: rgba(244, 201, 107, .09);
  border-color: rgba(244, 201, 107, .35);
  transform: translateY(-1px);
}
.icon-btn svg { width: 20px; height: 20px; }

.sound-btn { position: relative; }
.sound-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 18px;
}
.sound-bars i {
  width: 2.5px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  animation: soundBar 1.1s ease-in-out infinite;
}
.sound-bars i:nth-child(2) { animation-delay: .15s; }
.sound-bars i:nth-child(3) { animation-delay: .3s; }
.sound-bars i:nth-child(4) { animation-delay: .45s; }
.sound-btn .sound-off-icon { display: none; }
.sound-btn.is-muted .sound-bars { display: none; }
.sound-btn.is-muted .sound-off-icon { display: block; }
.sound-btn.is-muted { color: var(--dim-2); }
.sound-btn.is-muted:hover { color: var(--gold); }

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .28s var(--ease), box-shadow .28s, background .28s, border-color .28s, filter .28s;
}
.btn svg { width: 19px; height: 19px; flex: 0 0 auto; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .55; pointer-events: none; }

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #f05a6d 0%, #d83450 50%, #b3213d 100%);
  border-color: rgba(255, 255, 255, .13);
  box-shadow:
    0 14px 34px -10px rgba(233, 75, 95, .5),
    inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, .35) 48%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn--primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 20px 46px -12px rgba(233, 75, 95, .65),
    inset 0 1px 0 rgba(255, 255, 255, .32);
}
.btn--primary:hover::before { transform: translateX(120%); }

.btn--ghost {
  color: var(--cream-2);
  background: rgba(255, 255, 255, .035);
  border-color: rgba(244, 201, 107, .23);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.btn--ghost:hover {
  color: var(--gold-2);
  border-color: rgba(244, 201, 107, .5);
  background: rgba(244, 201, 107, .07);
  transform: translateY(-2px);
}

.btn--gold {
  color: #14352d;
  background: linear-gradient(135deg, #ffe6a3, #f4c96b 55%, #d6a84f);
  border-color: rgba(255, 255, 255, .28);
  box-shadow: 0 12px 30px -10px rgba(244, 201, 107, .45);
}
.btn--gold:hover { transform: translateY(-2px); filter: brightness(1.04); }

.btn--danger {
  color: #fff;
  background: linear-gradient(135deg, #d94a5c, #a51f35);
  border-color: rgba(255, 255, 255, .1);
}
.btn--danger:hover { filter: brightness(1.08); transform: translateY(-1px); }

.btn--small { min-height: 42px; padding: 0 18px; font-size: .8rem; }
.btn--lg { min-height: 58px; padding: 0 32px; font-size: 1rem; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + clamp(28px, 6vh, 66px)) 0 clamp(40px, 8vh, 80px);
  overflow: clip;
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
}
.hero__copy { position: relative; z-index: 2; }

.hero__title {
  margin: 24px 0 26px;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7.6vw, 7rem);
  font-weight: 600;
  line-height: .8;
  letter-spacing: -.025em;
}
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: .1em;
}
.hero__title .line__in {
  display: block;
  transform: translateY(112%) rotate(2.5deg);
  transform-origin: left bottom;
  animation: lineUp 1.05s var(--ease) .12s forwards;
}
.hero__title .line:nth-child(2) .line__in { animation-delay: .24s; }
.hero__title .line:nth-child(3) .line__in {
  animation-delay: .36s;
  font-size: .44em;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--cream-2);
}
.hero__title .accent {
  color: var(--gold);
  font-style: italic;
  font-weight: 500;
  text-shadow: 0 0 60px rgba(244, 201, 107, .25);
}
.hero__lead {
  max-width: 520px;
  color: var(--dim);
  font-size: clamp(.96rem, 1.15vw, 1.1rem);
  line-height: 1.7;
  text-wrap: pretty;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim-2);
}
.meta-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.countdown {
  margin-top: 34px;
  max-width: 390px;
}
.countdown__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--dim-2);
}
.countdown__label i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.countdown__grid { display: flex; gap: 7px; }
.cd-cell {
  flex: 1;
  min-width: 0;
  padding: 9px 4px 8px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  text-align: center;
}
.cd-cell strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 600;
  line-height: 1;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.cd-cell span {
  display: block;
  margin-top: 4px;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.hero__art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.globe-scene {
  position: relative;
  width: min(100%, 585px);
  padding: 8px;
}
.globe-scene__halo {
  position: absolute;
  left: 50%; top: 47%;
  width: 78%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(127, 227, 196, .16), transparent 55%),
    radial-gradient(circle, rgba(244, 201, 107, .13), transparent 68%);
  filter: blur(34px);
  pointer-events: none;
  animation: haloPulse 7s ease-in-out infinite;
}
.globe {
  position: relative;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 40px 65px rgba(0, 0, 0, .55));
  user-select: none;
}
.globe-float {
  transform-box: fill-box;
  transform-origin: center;
  animation: globeFloat 8s ease-in-out infinite;
}
.globe-scene.is-shaken .globe { animation: globeShake 2s var(--ease-spring); }
.globe-scene.is-shaken .gsnow { animation-duration: 2s; }
.globe-scene.is-shaken .globe-scene__halo { opacity: .9; }

.globe-shake {
  position: absolute;
  right: 1%;
  bottom: 8%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(244, 201, 107, .3);
  border-radius: 999px;
  background: rgba(4, 20, 26, .72);
  color: var(--gold-2);
  font-family: var(--font-hand);
  font-size: 1.08rem;
  cursor: pointer;
  transform: rotate(-3deg);
  transition: background .25s, border-color .25s, transform .25s;
}
.globe-shake:hover {
  background: rgba(244, 201, 107, .1);
  border-color: rgba(244, 201, 107, .55);
  transform: rotate(-1deg) translateY(-2px);
}
.globe-shake__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: twinkle 2.2s ease-in-out infinite;
}

.hero-sticker {
  position: absolute;
  top: 6%;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px 12px 16px;
  border-radius: 4px 14px 14px 14px;
  background: linear-gradient(160deg, #fff8e9, #efdfc2);
  color: #6b4b2e;
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .55);
  transform: rotate(7deg);
  font-family: var(--font-hand);
  font-size: 1.05rem;
  line-height: .95;
}
.hero-sticker svg { width: 18px; height: 18px; color: var(--red-2); }
.hero-sticker__pin {
  position: absolute;
  top: -7px; left: 18px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8b8b, #b93146 70%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
}
.hero-sticker__text { white-space: nowrap; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(185, 189, 181, .62);
  transition: color .3s;
}
.scroll-hint:hover { color: var(--gold); }
.scroll-hint span {
  width: 1px; height: 34px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollHint 2.4s ease-in-out infinite;
}

/* ---------- how ---------- */

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.how-card {
  position: relative;
  padding: 30px 26px 28px;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(244, 201, 107, .07), transparent 55%),
    linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
}
.how-card::after {
  content: "";
  position: absolute;
  top: 0; left: 22px; right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 201, 107, .45), transparent);
  opacity: .5;
}
.how-card:hover {
  transform: translateY(-5px);
  border-color: rgba(244, 201, 107, .26);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}
.how-card__num {
  position: absolute;
  top: 12px; right: 20px;
  font-family: var(--font-display);
  font-size: 4.4rem;
  font-weight: 600;
  line-height: 1;
  color: rgba(244, 201, 107, .09);
  pointer-events: none;
}
.how-card__icon {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  margin-bottom: 22px;
  border: 1px solid rgba(244, 201, 107, .25);
  border-radius: 16px;
  background: rgba(244, 201, 107, .07);
  color: var(--gold);
}
.how-card__icon svg { width: 28px; height: 28px; }
.how-card h3 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.1;
}
.how-card p {
  color: var(--dim);
  font-size: .88rem;
  line-height: 1.65;
  text-wrap: pretty;
}

/* ---------- pick ---------- */

.pick { position: relative; }
.pick-glow {
  position: absolute;
  left: 50%; top: 38%;
  width: min(1000px, 120vw);
  height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(21, 91, 82, .3), rgba(244, 201, 107, .035) 45%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

.pick-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.pick-counter {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 18px;
  border: 1px solid rgba(244, 201, 107, .17);
  border-radius: 18px;
  background: rgba(6, 25, 30, .55);
  min-width: 320px;
}
.pick-counter__paw {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--gold);
  background: rgba(244, 201, 107, .08);
  border: 1px solid rgba(244, 201, 107, .2);
}
.pick-counter__paw svg { width: 20px; height: 20px; }
.pick-counter strong {
  display: block;
  font-size: .9rem;
  letter-spacing: .02em;
  white-space: nowrap;
}
.pick-counter span { display: block; font-size: .68rem; color: var(--dim-2); }
.pick-counter__bar {
  flex: 1;
  min-width: 60px;
  height: 3px;
  margin-left: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.pick-counter__bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--gold));
  transition: width .8s var(--ease);
}
.pick-status__note {
  font-family: var(--font-hand);
  font-size: 1.18rem;
  color: var(--gold-2);
  opacity: .85;
  transform: rotate(-1.5deg);
}

.names-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.name-card {
  position: relative;
  flex: 0 1 calc(25% - 12px);
  min-width: 0;
  max-width: 280px;
  min-height: 252px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 24px 16px 20px;
  color: var(--cream);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  background:
    radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 65%),
    linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012));
  cursor: pointer;
  transform: none;
  opacity: 1;
  animation: cardEnter .75s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 55ms);
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s, opacity .4s, filter .4s;
}
.name-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(70% 50% at 50% 0%, rgba(255, 255, 255, .12), transparent 60%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.name-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow:
    0 26px 55px -26px color-mix(in srgb, var(--accent) 60%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .1);
}
.name-card:hover::before { opacity: 1; }
.name-card:active { transform: translateY(-2px) scale(.99); }

.name-card__avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  box-shadow: 0 12px 22px rgba(0, 0, 0, .35);
  transition: transform .45s var(--ease-spring);
}
.name-card:hover .name-card__avatar { transform: translateY(-4px) rotate(-2.5deg) scale(1.04); }
.name-card__avatar svg { width: 100%; height: 100%; }
.name-card__name {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.01em;
}
.name-card__species {
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 80%, white);
  opacity: .8;
}
.name-card__badges {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.name-card__badge {
  position: static;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 1px solid rgba(244, 201, 107, .25);
  border-radius: 99px;
  background: rgba(4, 20, 26, .82);
  color: var(--gold-2);
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.name-card__lock {
  position: absolute;
  top: 14px; left: 14px;
  display: none;
  color: var(--dim-2);
}
.name-card__lock svg { width: 15px; height: 15px; }
.name-card.is-selected {
  border-color: rgba(244, 201, 107, .8);
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(244, 201, 107, .2), transparent 65%),
    linear-gradient(160deg, rgba(244, 201, 107, .08), rgba(255, 255, 255, .02));
  box-shadow:
    0 0 0 1px rgba(244, 201, 107, .4) inset,
    0 30px 70px -30px rgba(244, 201, 107, .45);
  transform: translateY(-4px);
}
.name-card.is-selected .name-card__badge { display: inline-flex; }
.name-card.is-revealed { opacity: .55; }
.name-card.is-revealed:hover { transform: translateY(-2px); }
.name-card.is-revealed .name-card__lock { display: block; }
.name-card.is-revealed .name-card__badge { display: inline-flex; }
.name-card.is-mine { border-color: rgba(244, 201, 107, .32); }
.name-card:disabled { cursor: not-allowed; }
.name-card.is-blocked { opacity: .38; }
.name-card.is-blocked:hover { transform: none; }
.name-card.is-blocked .name-card__lock { display: block; }
.name-card__badge:empty { display: none !important; }
.name-card__you {
  display: none;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(127, 227, 196, .38);
  border-radius: 99px;
  background: rgba(4, 20, 26, .86);
  color: var(--mint);
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: none;
}
.name-card__you:not([hidden]) { display: inline-flex; }
.name-card__you[hidden] { display: none !important; }
.name-card.is-mine .name-card__badge { display: inline-flex; color: var(--mint); border-color: rgba(127, 227, 196, .3); }
.name-card.is-mine .name-card__lock { display: none; }
.name-card.is-mine .name-card__avatar { box-shadow: 0 12px 26px rgba(244, 201, 107, .22); }

.pick-hint {
  margin-top: 26px;
  text-align: center;
  color: var(--dim-2);
  font-size: .82rem;
}
.pick-footnote {
  max-width: 560px;
  margin: 24px auto 0;
  text-align: center;
  color: rgba(185, 189, 181, .48);
  font-size: .72rem;
  line-height: 1.6;
}

.my-result {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 700px;
  margin: 28px auto 0;
  padding: 14px 18px;
  border: 1px solid rgba(244, 201, 107, .28);
  border-radius: 18px;
  background: linear-gradient(100deg, rgba(244, 201, 107, .11), rgba(255, 255, 255, .025));
  animation: popIn .5s var(--ease);
}
.my-result__avatar { width: 48px; height: 48px; flex: 0 0 auto; }
.my-result__avatar svg { width: 100%; height: 100%; }
.my-result__copy { flex: 1; min-width: 0; }
.my-result__copy strong { display: block; font-size: .86rem; }
.my-result__copy span { display: block; margin-top: 2px; font-size: .74rem; color: var(--dim-2); }

.pick-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 720px;
  margin: 28px auto 0;
  padding: 16px 18px;
  border: 1px solid rgba(244, 201, 107, .3);
  border-radius: 22px;
  background: rgba(5, 22, 28, .82);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: popIn .45s var(--ease);
}
.pick-action__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pick-action__avatar { width: 52px; height: 52px; flex: 0 0 auto; }
.pick-action__avatar svg { width: 100%; height: 100%; }
.pick-action__who span {
  display: block;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim-2);
}
.pick-action__who strong {
  display: block;
  margin-top: 1px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
}
.pick-action__buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- rules ---------- */

.rules { padding-top: 0; }
.rules-panel {
  position: relative;
  padding: clamp(26px, 4.5vw, 50px);
  border: 1px solid rgba(244, 201, 107, .16);
  border-radius: 30px;
  background:
    radial-gradient(100% 100% at 0% 0%, rgba(244, 201, 107, .08), transparent 55%),
    linear-gradient(150deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  overflow: hidden;
}
.rules-panel::after {
  content: "";
  position: absolute;
  right: -80px; bottom: -120px;
  width: 320px; height: 320px;
  border: 1px solid rgba(244, 201, 107, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(244, 201, 107, .02), 0 0 0 80px rgba(244, 201, 107, .015);
  pointer-events: none;
}
.rules-panel__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 8px 20px;
  margin-bottom: 30px;
}
.rules-panel__tag {
  flex: 0 0 auto;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--gold);
}
.rules-panel__head h2 {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1;
  text-align: left;
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.rule { display: flex; gap: 12px; align-items: flex-start; }
.rule__icon {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  flex: 0 0 auto;
  border: 1px solid rgba(244, 201, 107, .25);
  border-radius: 50%;
  color: var(--gold);
  font-size: .7rem;
}
.rule strong { display: block; margin-bottom: 5px; font-size: .88rem; }
.rule p { color: var(--dim-2); font-size: .78rem; line-height: 1.6; }
.rules-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: var(--dim-2);
  font-size: .7rem;
  letter-spacing: .04em;
}
.rules-panel__paw { font-size: 1.1rem; opacity: .7; }

/* ---------- footer ---------- */

.site-footer {
  padding: 34px 0 max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: rgba(2, 10, 14, .35);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 11px; }
.footer__brand .brand__mark { width: 38px; height: 38px; margin: 0; }
.footer__brand .brand__mark svg { width: 20px; height: 20px; }
.footer__brand strong {
  display: block;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.footer__brand > div > span { display: block; margin-top: 2px; font-size: .68rem; color: var(--dim-2); }
.footer__note {
  font-family: var(--font-hand);
  font-size: 1.08rem;
  color: rgba(244, 201, 107, .55);
  transform: rotate(-1deg);
}
.admin-paw {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  opacity: .32;
  cursor: pointer;
  transition: opacity .3s, border-color .3s, background .3s, transform .3s;
}
.admin-paw svg { width: 21px; height: 21px; }
.admin-paw:hover {
  opacity: 1;
  border-color: rgba(244, 201, 107, .35);
  background: rgba(244, 201, 107, .07);
  transform: rotate(-8deg) scale(1.05);
}

/* ---------- theater ---------- */

.theater {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(14px, env(safe-area-inset-top)) clamp(14px, 4vw, 34px) max(18px, env(safe-area-inset-bottom));
}
.theater[hidden] { display: none; }
.theater__backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 26%, rgba(12, 67, 64, .68), transparent 46%),
    radial-gradient(circle at 20% 80%, rgba(126, 50, 58, .14), transparent 45%),
    linear-gradient(180deg, rgba(3, 16, 21, .97), rgba(1, 8, 12, .99));
  animation: fadeIn .4s;
}
.confetti {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
}
.theater__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 780px);
  min-height: min(100%, 860px);
  padding: 4px 0 16px;
}
.theater__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.theater__brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: rgba(244, 201, 107, .72);
}
.theater__brand i { font-style: normal; color: var(--gold); }
.theater__close { width: 40px; height: 40px; }
.theater__close:hover { transform: rotate(90deg); }
.stage { text-align: center; animation: stageIn .55s var(--ease); }
.stage[hidden] { display: none; }

.giver-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  padding: 5px 14px 5px 5px;
  border: 1px solid rgba(244, 201, 107, .25);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: var(--cream-2);
  font-size: .76rem;
  font-weight: 700;
}
.giver-chip .giver-avatar { width: 32px; height: 32px; }
.giver-chip .giver-avatar svg { width: 100%; height: 100%; }
.giver-chip small { color: var(--dim-2); font-weight: 500; }

.stage__title {
  margin: 16px auto 8px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.8vw, 3.55rem);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.015em;
}
.stage__title em { color: var(--gold); font-style: italic; font-weight: 500; }
.stage__sub {
  max-width: 430px;
  margin: 0 auto;
  color: var(--dim-2);
  font-size: .84rem;
  line-height: 1.55;
}

.wheel-wrap {
  position: relative;
  width: min(82vw, 450px);
  margin: 24px auto 0;
  aspect-ratio: 1;
  isolation: isolate;
}
.wheel-glow {
  position: absolute;
  inset: -14%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(127, 227, 196, .16), transparent 58%),
    radial-gradient(circle, rgba(244, 201, 107, .16), transparent 70%);
  filter: blur(26px);
  opacity: .55;
  animation: haloPulse 6s ease-in-out infinite;
  transition: opacity .5s;
}
.wheel-ring {
  position: absolute;
  inset: -9px;
  z-index: 2;
  border: 1px solid rgba(244, 201, 107, .28);
  border-radius: 50%;
  box-shadow:
    0 0 0 5px rgba(4, 20, 26, .55),
    0 0 60px rgba(244, 201, 107, .08),
    inset 0 0 28px rgba(244, 201, 107, .12);
  pointer-events: none;
}
#wheel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 28px 45px rgba(0, 0, 0, .55));
}
.wheel-pointer {
  position: absolute;
  top: -25px;
  left: 50%;
  z-index: 5;
  width: 46px;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55));
  transform-origin: 50% 100%;
}
.wheel-pointer svg { width: 100%; height: auto; }
.wheel-wrap.is-landed .wheel-pointer { animation: pointerBounce .6s var(--ease-spring); }
.wheel-cap {
  position: absolute;
  top: 50%; left: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 21%;
  aspect-ratio: 1;
  border: 3px solid var(--gold-3);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, #175a4c, #082420 65%);
  color: var(--gold);
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 7px rgba(3, 15, 19, .82),
    0 12px 30px rgba(0, 0, 0, .55),
    inset 0 2px 8px rgba(255, 255, 255, .12);
}
.wheel-cap svg { width: 52%; height: 52%; }
.wheel-wrap.is-spinning .wheel-glow { opacity: 1; animation-duration: 1.2s; }
.wheel-wrap.is-spinning .wheel-ring { box-shadow: 0 0 0 5px rgba(4, 20, 26, .55), 0 0 80px rgba(244, 201, 107, .22); }

.btn--spin { margin-top: 22px; min-height: 58px; padding: 0 38px; font-size: 1rem; }
.btn--spin svg { animation: spinIcon 4s linear infinite; }
.stage__status {
  min-height: 26px;
  margin-top: 14px;
  font-family: var(--font-hand);
  font-size: 1.18rem;
  color: var(--gold-2);
  opacity: .9;
}

/* ---------- result ---------- */

.stage--result { width: 100%; display: flex; justify-content: center; }
.result-card {
  position: relative;
  width: min(100%, 525px);
  margin: 10px auto 0;
  padding: clamp(28px, 4.5vw, 42px) clamp(20px, 4vw, 40px) clamp(24px, 3.5vw, 34px);
  color: #17312a;
  text-align: center;
  border-radius: 28px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, .9), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(214, 168, 79, .16), transparent 55%),
    linear-gradient(160deg, #fff9ed 0%, #f6e8cf 60%, #eedbb9 100%);
  box-shadow:
    0 45px 110px -30px rgba(0, 0, 0, .8),
    inset 0 0 0 1px rgba(255, 255, 255, .65),
    inset 0 0 0 9px rgba(244, 201, 107, .22);
  animation: cardIn .9s var(--ease) both;
  overflow: hidden;
}
.result-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(154, 107, 37, .22);
  border-radius: 22px;
  pointer-events: none;
}
.result-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(154, 107, 37, .1) .6px, transparent .6px);
  background-size: 9px 9px;
  opacity: .28;
  pointer-events: none;
}
.result-card > * { position: relative; z-index: 1; }
.result-card__ribbon {
  position: absolute;
  top: -2px; left: 50%;
  z-index: 2;
  width: 52px; height: 86px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #e35a6b, #b93146 70%, #8f1d30);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  filter: drop-shadow(0 8px 10px rgba(143, 29, 48, .35));
}
.result-stamp {
  position: absolute;
  top: 86px; right: 18px;
  z-index: 2;
  padding: 4px 8px;
  border: 1.5px solid rgba(185, 49, 70, .45);
  border-radius: 4px;
  color: rgba(185, 49, 70, .62);
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  transform: rotate(11deg);
  opacity: .85;
}
.result-label {
  margin-top: 52px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #9a6b25;
}
.result-avatar {
  position: relative;
  width: clamp(116px, 22vw, 158px);
  aspect-ratio: 1;
  margin: 16px auto 10px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 32%, #1d6154, #092722);
  box-shadow:
    0 0 0 3px #e0b45c,
    0 0 0 9px rgba(224, 180, 92, .18),
    0 18px 36px rgba(10, 42, 39, .28);
  animation: avatarPop .8s var(--ease-spring) .15s both;
}
.result-avatar svg { width: 100%; height: 100%; }
.result-prefix {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: #7d6c50;
}
.result-name {
  margin: 1px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(3.3rem, 9vw, 5.2rem);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.02em;
  color: #a51f35;
  animation: nameIn .8s var(--ease) .25s both;
}
.result-message {
  max-width: 330px;
  margin: 0 auto 18px;
  color: #6b5a3f;
  font-size: .82rem;
  line-height: 1.55;
}
.result-code {
  max-width: 360px;
  margin: 0 auto 20px;
  padding: 11px 14px 10px;
  border: 1.5px dashed rgba(154, 107, 37, .45);
  border-radius: 14px;
  background: rgba(255, 255, 255, .32);
}
.result-code__label {
  display: block;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: #9a6b25;
}
.result-code__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
}
.result-code__row strong {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: .26em;
  color: #17312a;
  margin-left: .26em;
  font-variant-numeric: tabular-nums;
}
.copy-btn {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  padding: 0;
  border: 1px solid rgba(154, 107, 37, .3);
  border-radius: 50%;
  background: rgba(255, 255, 255, .3);
  color: #9a6b25;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { background: #17312a; color: #ffe6a3; transform: scale(1.06); }
.result-code p {
  margin-top: 2px;
  font-size: .62rem;
  line-height: 1.45;
  color: #7d6c50;
}
.result-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
}
.result-card .btn--ghost {
  color: #17312a;
  border-color: rgba(23, 49, 42, .25);
  background: rgba(23, 49, 42, .045);
  box-shadow: none;
}
.result-card .btn--ghost:hover { background: rgba(23, 49, 42, .09); color: #0c231d; }
.result-card .btn--primary {
  background: linear-gradient(135deg, #1e5a4d, #103b32);
  box-shadow: 0 14px 30px -12px rgba(16, 59, 50, .55), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.result-card__paw {
  position: absolute;
  right: 16px; bottom: 10px;
  font-size: 1.25rem;
  opacity: .2;
  transform: rotate(-14deg);
}

/* ---------- modals ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(1, 8, 12, .8);
  animation: fadeIn .3s;
}
.modal__card {
  position: relative;
  width: min(100%, 440px);
  max-height: 92dvh;
  overflow-y: auto;
  padding: clamp(26px, 5vw, 36px) clamp(20px, 4vw, 30px);
  border: 1px solid rgba(244, 201, 107, .22);
  border-radius: 26px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(29, 96, 84, .3), transparent 60%),
    linear-gradient(160deg, #08232b, #04161d 75%);
  box-shadow: 0 45px 100px -30px #000, inset 0 1px 0 rgba(255, 255, 255, .08);
  text-align: center;
  animation: modalIn .4s var(--ease-spring);
}
.modal__card--admin { width: min(100%, 720px); text-align: left; }
.modal__close {
  position: absolute;
  top: 12px; right: 14px;
  z-index: 3;
  width: 36px; height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  color: var(--dim);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.modal__close:hover { background: rgba(255, 255, 255, .1); color: var(--cream); }
.modal__icon {
  display: grid;
  place-items: center;
  width: 66px; height: 66px;
  margin: 0 auto 14px;
  border: 1px solid rgba(244, 201, 107, .25);
  border-radius: 50%;
  background: rgba(244, 201, 107, .07);
  color: var(--gold);
}
.modal__icon svg { width: 34px; height: 34px; }
.modal h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1;
}
.modal__sub {
  margin: 9px auto 20px;
  max-width: 360px;
  color: var(--dim);
  font-size: .82rem;
  line-height: 1.6;
}
.modal__note {
  margin-top: 16px;
  color: rgba(185, 189, 181, .55);
  font-size: .7rem;
  line-height: 1.5;
}
.code-form { display: flex; flex-direction: column; gap: 10px; }
.code-input {
  width: 100%;
  height: 58px;
  padding: 0 .4em 0 calc(.4em + 4px);
  border: 1px solid rgba(244, 201, 107, .28);
  border-radius: 14px;
  background: rgba(0, 0, 0, .25);
  color: var(--cream);
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: .38em;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.code-input::placeholder { color: rgba(255, 246, 232, .2); letter-spacing: .3em; }
.code-input:focus {
  border-color: rgba(244, 201, 107, .75);
  box-shadow: 0 0 0 4px rgba(244, 201, 107, .1);
}
.code-input--text {
  height: 52px;
  padding: 0 14px;
  text-align: left;
  font-size: .95rem;
  letter-spacing: .05em;
}
.code-form .btn { width: 100%; margin-top: 2px; }
.form-error {
  min-height: 18px;
  margin-top: 2px;
  color: #ff8b8b;
  font-size: .76rem;
  text-align: center;
}
.modal__card--admin .form-error { text-align: left; }
.admin-login { text-align: center; }
.admin-login .code-form { max-width: 320px; margin: 0 auto; }

.admin-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
}
.admin-panel__eyebrow {
  display: block;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
.admin-panel__head h2 { margin-top: 4px; }
.admin-draw {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px dashed rgba(244, 201, 107, .3);
  border-radius: 8px;
  color: var(--gold-2);
  font-family: ui-monospace, monospace;
  font-size: .66rem;
  letter-spacing: .08em;
}
.admin-meta { margin: 4px 0 14px; color: var(--dim-2); font-size: .72rem; }
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: min(46vh, 420px);
  overflow-y: auto;
  padding-right: 4px;
}
.admin-list::-webkit-scrollbar { width: 5px; }
.admin-list::-webkit-scrollbar-thumb { background: rgba(244, 201, 107, .25); border-radius: 99px; }
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
  font-size: .8rem;
}
.admin-person { display: flex; align-items: center; gap: 7px; min-width: 0; }
.admin-person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-person .mini-avatar { width: 26px; height: 26px; flex: 0 0 auto; }
.admin-person .mini-avatar svg { width: 100%; height: 100%; }
.admin-arrow { color: var(--gold-3); font-size: .8rem; text-align: center; }
.admin-code {
  padding: 3px 7px;
  border: 1px dashed rgba(244, 201, 107, .25);
  border-radius: 6px;
  color: var(--gold-2);
  font-family: ui-monospace, monospace;
  font-size: .7rem;
  letter-spacing: .08em;
  cursor: pointer;
  background: transparent;
}
.admin-code:hover { background: rgba(244, 201, 107, .1); }
.admin-code--empty { color: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .08); cursor: default; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.admin-warning {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(233, 75, 95, .28);
  border-radius: 10px;
  background: rgba(233, 75, 95, .07);
  color: #ffb1b9;
  font-size: .76rem;
  line-height: 1.5;
}
.admin-confirm { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  border: 1px solid rgba(244, 201, 107, .28);
  border-radius: 999px;
  background: rgba(5, 23, 29, .96);
  color: var(--cream);
  font-size: .8rem;
  line-height: 1.3;
  box-shadow: 0 20px 50px -20px #000;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { border-color: rgba(233, 75, 95, .45); color: #ffc1c6; }
.toast.is-success { border-color: rgba(127, 227, 196, .35); }
.toast__icon { color: var(--gold); font-size: .9rem; }

.noscript {
  position: fixed;
  left: 50%; bottom: 24px;
  z-index: 500;
  transform: translateX(-50%);
  width: min(90%, 420px);
  padding: 14px 18px;
  border-radius: 14px;
  background: #7e1f31;
  color: #fff;
  font-size: .85rem;
  text-align: center;
}

/* ---------- svg scene animation ---------- */

.branch { transform-box: fill-box; transform-origin: bottom center; animation: branchSway 9s ease-in-out infinite; }
.branch--right { animation-delay: -3s; }
.pet--cat { transform-box: fill-box; transform-origin: bottom center; animation: petBob 4.8s ease-in-out infinite; }
.pet--dog { transform-box: fill-box; transform-origin: bottom center; animation: petBob 5.6s ease-in-out infinite -1.4s; }
.pet--bunny { transform-box: fill-box; transform-origin: bottom center; animation: petBob 6.2s ease-in-out infinite -2.2s; }
.cat-hat { transform-box: fill-box; transform-origin: 50% 100%; animation: hatWobble 5.4s ease-in-out infinite; }
.tree-star { transform-box: fill-box; transform-origin: center; animation: starTwinkle 3.4s ease-in-out infinite; }
.string-lights circle { animation: lightBlink 3s ease-in-out infinite; }
.string-lights circle:nth-child(2n) { animation-delay: -.7s; }
.string-lights circle:nth-child(3n) { animation-delay: -1.4s; }
.globe-sparkles { transform-box: fill-box; transform-origin: center; animation: twinkle 4.6s ease-in-out infinite; }
.gsnow { animation: globeSnow 7s linear infinite; }
.gsnow:nth-child(2) { animation-delay: -1.2s; animation-duration: 8.4s; }
.gsnow:nth-child(3) { animation-delay: -3.1s; animation-duration: 6.8s; }
.gsnow:nth-child(4) { animation-delay: -4.5s; animation-duration: 9.2s; }
.gsnow:nth-child(5) { animation-delay: -2.2s; animation-duration: 7.7s; }
.gsnow:nth-child(6) { animation-delay: -5.3s; animation-duration: 6.4s; }
.gsnow:nth-child(7) { animation-delay: -3.8s; animation-duration: 8.9s; }
.gsnow:nth-child(8) { animation-delay: -6.1s; animation-duration: 7.3s; }
.gsnow:nth-child(9) { animation-delay: -.6s; animation-duration: 9.6s; }
.gsnow:nth-child(10) { animation-delay: -4.9s; animation-duration: 6.9s; }
.gsnow:nth-child(11) { animation-delay: -2.7s; animation-duration: 8.1s; }
.gsnow:nth-child(12) { animation-delay: -5.8s; animation-duration: 7.5s; }
.aurora-svg { animation: auroraBreathe 9s ease-in-out infinite; }
.globe-sparkles path { animation: twinkle 3.8s ease-in-out infinite; }
.globe-sparkles path:nth-child(2) { animation-delay: -1.5s; }

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-onload {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp .9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

/* ---------- keyframes ---------- */

@keyframes lineUp { to { transform: translateY(0) rotate(0); } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes loaderFailsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes loaderPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .8; } }
@keyframes loaderBar { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }
@keyframes twinkle { 0%,100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(127,227,196,.5); } 70% { box-shadow: 0 0 0 7px rgba(127,227,196,0); } 100% { box-shadow: 0 0 0 0 rgba(127,227,196,0); } }
@keyframes soundBar { 0%,100% { transform: scaleY(.55); } 50% { transform: scaleY(1.35); } }
@keyframes haloPulse { 0%,100% { opacity: .5; transform: translate(-50%,-50%) scale(.96); } 50% { opacity: .8; transform: translate(-50%,-50%) scale(1.04); } }
@keyframes globeFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes globeShake {
  0% { transform: rotate(0) scale(1); }
  8% { transform: rotate(-2.4deg) scale(1.014); }
  18% { transform: rotate(2.3deg) scale(1.01); }
  28% { transform: rotate(-2deg) scale(1.008); }
  38% { transform: rotate(1.8deg) scale(1.006); }
  48% { transform: rotate(-1.5deg) scale(1.004); }
  58% { transform: rotate(1.2deg) scale(1.003); }
  68% { transform: rotate(-.9deg) scale(1.002); }
  78% { transform: rotate(.6deg) scale(1.001); }
  88% { transform: rotate(-.3deg) scale(1.001); }
  100% { transform: rotate(0) scale(1); }
}
@keyframes globeSnow {
  0% { transform: translate(0, -40px); opacity: 0; }
  12% { opacity: .95; }
  80% { opacity: .8; }
  100% { transform: translate(18px, 100px); opacity: 0; }
}
@keyframes branchSway { 0%,100% { transform: rotate(0); } 50% { transform: rotate(1.2deg); } }
@keyframes petBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes hatWobble { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-2.4deg); } }
@keyframes starTwinkle { 0%,100% { opacity: .75; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes lightBlink { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes auroraBreathe { 0%,100% { opacity: .55; } 50% { opacity: .82; } }
@keyframes soundBar { 0%,100% { transform: scaleY(.55); } 50% { transform: scaleY(1.35); } }
@keyframes scrollHint { 0%,100% { transform: scaleY(.45); opacity: .4; transform-origin: top; } 50% { transform: scaleY(1); opacity: 1; transform-origin: top; } }
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes stageIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes cardIn {
  0% { opacity: 0; transform: perspective(1100px) rotateY(-24deg) translateY(26px) scale(.94); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: perspective(1100px) rotateY(0) translateY(0) scale(1); }
}
@keyframes avatarPop { 0% { opacity: 0; transform: scale(.7) rotate(-8deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes nameIn { 0% { opacity: 0; transform: translateY(14px) letter-spacing: .08em; } 100% { opacity: 1; transform: none; } }
@keyframes pointerBounce { 0%,100% { transform: translateX(-50%) rotate(0); } 30% { transform: translateX(-50%) rotate(-12deg); } 65% { transform: translateX(-50%) rotate(4deg); } }
@keyframes spinIcon { to { transform: rotate(-360deg); } }

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { display: flex; flex-direction: column; align-items: center; }
  .hero__lead { margin-inline: auto; }
  .hero__actions, .hero__meta { justify-content: center; }
  .countdown { margin-inline: auto; }
  .hero__art { margin-top: 6px; }
  .globe-scene { width: min(100%, 500px); }
  .hero-sticker { right: 4%; }
  .hero__title { font-size: clamp(3.4rem, 10vw, 6rem); }
  .hero__title .line:nth-child(3) .line__in { font-size: .42em; }
  .how-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .how-card { padding: 26px 24px; }
  .how-card__num { font-size: 3.6rem; }
  .name-card { flex-basis: calc(33.333% - 11px); }
  .rules-grid { grid-template-columns: 1fr; gap: 18px; }
  .rules-panel__head { align-items: flex-start; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; }
  .rules-panel__head h2 { text-align: left; }
}

@media (max-width: 760px) {
  .hero__inner { display: flex; flex-direction: column; gap: 14px; }
  .hero__copy { display: contents; }
  .hero__copy > .eyebrow { order: 1; justify-content: center; }
  .hero__title { order: 2; margin-top: 12px; }
  .hero__lead { order: 3; margin-top: 4px; }
  .hero__actions { order: 4; margin-top: 18px; width: 100%; }
  .hero__art { order: 5; margin-top: 4px; }
  .hero__meta { order: 6; margin-top: 6px; }
  .countdown { order: 7; margin-top: 18px; width: 100%; max-width: 410px; }
  .hero__title { font-size: clamp(3rem, 13vw, 4.6rem); text-align: center; }
  .hero__title .line__in { transform-origin: center bottom; }
  .hero__title .line:nth-child(3) .line__in { font-size: .47em; }
  .hero__actions { justify-content: center; }
  .hero__actions .btn { flex: 1 1 auto; min-width: 0; }
  .globe-scene { width: min(88vw, 390px); }
  .hero-sticker { display: none; }
  .globe-shake { bottom: 5%; right: 0; font-size: 1rem; padding: 7px 12px; }
  .scroll-hint { display: none; }
  .section { padding-block: 70px; }
  .section-head { margin-bottom: 32px; }
  .section-title { margin-top: 14px; }
  .names-grid { gap: 10px; }
  .name-card {
    flex-basis: calc(50% - 5px);
    min-height: 214px;
    padding: 18px 12px 15px;
    gap: 8px;
    border-radius: 20px;
  }
  .name-card__avatar { width: 88px; height: 88px; }
  .name-card__name { font-size: 1.58rem; }
  .name-card__species { font-size: .52rem; }
  .pick-status { align-items: stretch; gap: 12px; }
  .pick-counter { min-width: 0; width: 100%; }
  .pick-status__note { text-align: center; }
  .pick-action { flex-direction: column; align-items: stretch; gap: 14px; }
  .pick-action__who { justify-content: center; }
  .pick-action__who > div:last-child { text-align: left; }
  .pick-action__buttons { flex-direction: column; align-items: stretch; }
  .pick-action__buttons .btn { width: 100%; }
  .my-result { flex-wrap: wrap; }
  .my-result__copy { flex-basis: calc(100% - 68px); }
  .my-result .btn { width: 100%; }
  .rules-panel { border-radius: 24px; }
  .rules-panel__foot { align-items: flex-start; }
  .footer__inner { flex-direction: column; text-align: center; gap: 14px; }
  .footer__brand { flex-direction: column; gap: 8px; }
  .footer__note { order: 3; }
  .admin-paw { position: absolute; right: 18px; bottom: 22px; opacity: .22; }
  .site-footer { position: relative; }
  .theater { padding: 10px 12px 18px; }
  .theater__inner { min-height: calc(100dvh - 20px); justify-content: flex-start; padding-top: 2px; }
  .theater__top { margin-bottom: 0; }
  .theater__brand { font-size: .54rem; letter-spacing: .12em; }
  .giver-chip { margin-top: 8px; font-size: .7rem; }
  .stage__title { margin-top: 12px; font-size: clamp(2rem, 8.5vw, 2.7rem); }
  .stage__sub { font-size: .78rem; }
  .wheel-wrap { width: min(86vw, 390px); margin-top: 18px; }
  .wheel-pointer { top: -18px; width: 38px; }
  .btn--spin { min-height: 54px; margin-top: 16px; }
  .stage__status { font-size: 1.05rem; margin-top: 10px; }
  .stage--result { padding-top: 8px; }
  .result-card { margin-top: 4px; border-radius: 24px; padding: 26px 18px 22px; }
  .result-label { margin-top: 64px; }
  .result-stamp { top: 14px; right: 14px; }
  .result-avatar { width: 118px; margin-top: 12px; }
  .result-name { font-size: clamp(3rem, 14vw, 4rem); }
  .result-message { font-size: .78rem; }
  .result-actions .btn { flex: 1 1 auto; }
  .modal__card { border-radius: 22px; }
  .admin-row { grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); gap: 6px; font-size: .74rem; }
  .admin-row .admin-code { grid-column: 3; justify-self: end; margin-top: -2px; }
  .admin-person .mini-avatar { width: 22px; height: 22px; }
  .admin-list { max-height: 40vh; }
}

@media (max-width: 420px) {
  .container { width: calc(100% - 28px); }
  .brand { gap: 9px; }
  .brand__mark { width: 38px; height: 38px; }
  .brand__mark svg { width: 21px; height: 21px; }
  .brand__text { font-size: .88rem; }
  .brand__text small { font-size: .9rem; }
  .icon-btn { width: 40px; height: 40px; }
  .hero__title { font-size: clamp(2.9rem, 14vw, 3.8rem); }
  .hero__title .line:nth-child(3) .line__in { font-size: .45em; }
  .hero__lead { font-size: .9rem; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .globe-scene { width: min(94vw, 360px); }
  .countdown__grid { gap: 5px; }
  .cd-cell { padding: 8px 2px 7px; border-radius: 11px; }
  .cd-cell span { font-size: .5rem; }
  .name-card { min-height: 196px; }
  .name-card__avatar { width: 78px; height: 78px; }
  .name-card__name { font-size: 1.42rem; }
  .pick-counter { flex-wrap: wrap; }
  .pick-counter__bar { order: 4; flex-basis: 100%; margin-left: 0; }
  .result-card { padding: 24px 14px 20px; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
  .result-stamp { top: 12px; right: 12px; font-size: .48rem; }
  .result-code__row strong { font-size: 1.75rem; }
  .modal { padding: 10px; }
  .modal__card { padding: 24px 16px; }
  .theater__brand { max-width: 210px; line-height: 1.4; }
  .wheel-wrap { width: min(88vw, 350px); }
}

@media (max-height: 700px) and (min-width: 761px) {
  .hero { padding-top: calc(var(--header-h) + 18px); }
  .hero__title { font-size: clamp(3.1rem, 6.4vw, 5.4rem); }
  .countdown { margin-top: 22px; }
  .globe-scene { width: min(100%, 440px); }
  .theater__inner { min-height: auto; }
  .wheel-wrap { width: min(62vh, 400px); }
  .stage__title { font-size: 2.2rem; }
}

@media (hover: none) {
  .name-card:hover { transform: none; }
  .name-card:hover .name-card__avatar { transform: none; }
  .how-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, .reveal-onload { opacity: 1; transform: none; }
  .hero__title .line__in { transform: none; }
  .name-card { opacity: 1; transform: none; }
  .loader { animation: none; }
}
