/* ==========================================================================
   Member-facing pages: landing + entry
   ========================================================================== */

body.landing, body.entry {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--night-900);
  color: #fff;
  overflow-x: hidden;
}

/* Responsive background — smaller file on phones / small screens */
.hero-bg {
  position: fixed; inset: 0;
  z-index: 0;
  background-image: url('/img/bg-1400.jpg');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  transform: scale(1.02);
}
@media (min-width: 1400px), (min-resolution: 2dppx) and (min-width: 800px) {
  .hero-bg { background-image: url('/img/bg-2400.jpg'); }
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 17, 42, .78) 0%, rgba(7, 17, 42, .2) 30%, rgba(7, 17, 42, 0) 50%, rgba(7, 17, 42, .35) 70%, rgba(7, 17, 42, .9) 100%);
}
@media (max-aspect-ratio: 3/4) {
  .hero-bg { background-position: 80% 50%; }
}
.hero-bg.blurred { filter: blur(6px) saturate(1.1); transform: scale(1.08); }
.hero-bg.blurred::after { background: rgba(7, 17, 42, .62); }

/* ------------------------------------------------------------------ Topbar */
.topbar {
  position: relative;
  z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 12px;
}
.topbar-logo { height: 24px; width: auto; opacity: .95; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; text-decoration: none; font-weight: 500;
  padding: 8px 14px 8px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  transition: background .2s;
}
.back-link:hover { background: rgba(255, 255, 255, .22); }

.chip-glass {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff8a80; display: inline-block;
}
.dot.live { background: #69f0ae; box-shadow: 0 0 0 0 rgba(105, 240, 174, .7); animation: pulse 1.8s infinite; }
.dot.soon { background: var(--gold-400); }
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(105, 240, 174, 0); }
  100% { box-shadow: 0 0 0 0 rgba(105, 240, 174, 0); }
}

/* ------------------------------------------------------------------ Landing */
.hero {
  position: relative;
  z-index: 2;
  min-height: calc(100dvh - 60px);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 8px 16px max(28px, env(safe-area-inset-bottom));
  text-align: center;
}
.hero-head { max-width: 760px; animation: rise .9s var(--ease) both; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(198, 40, 40, .85);
  color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(198, 40, 40, .4);
}
.eyebrow .material-symbols-rounded { font-size: 18px; }
.hero-title {
  margin: 10px 0 4px;
  font-family: var(--font-display);
  font-size: clamp(56px, 11vw, 120px);
  line-height: .95;
  letter-spacing: .01em;
  background: linear-gradient(180deg, #fff 0%, #fff7e0 45%, #f6c453 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .45));
}
.hero-sub {
  margin: 0 auto;
  max-width: 560px;
  font-size: clamp(14px, 2.2vw, 17px);
  font-weight: 300;
  color: rgba(255, 255, 255, .9);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.glass {
  background: rgba(12, 27, 61, .48);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.hero-cta {
  width: min(460px, 100%);
  padding: 22px 22px 18px;
  border-radius: var(--radius-xl);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: rise 1s .15s var(--ease) both;
}
.cta-btn { width: 100%; box-shadow: 0 10px 30px rgba(246, 196, 83, .35); }
.cta-btn:hover { box-shadow: 0 14px 38px rgba(246, 196, 83, .5); }
.cta-note { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .85); }
.cta-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255, 255, 255, .85);
  font-size: 13.5px;
  text-decoration: none;
}
.cta-link:hover { color: #fff; text-decoration: underline; }
.cta-link .material-symbols-rounded { font-size: 18px; }

.countdown { width: 100%; }
.countdown-label { margin: 0 0 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-400); font-weight: 600; }
.countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown-grid div {
  padding: 10px 4px 8px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .12);
}
.countdown-grid strong { display: block; font-size: 26px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown-grid span { font-size: 11px; color: rgba(255, 255, 255, .7); text-transform: uppercase; letter-spacing: .08em; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

@media (max-height: 640px) and (orientation: landscape) {
  .hero { justify-content: flex-start; }
  .hero-title { font-size: 56px; }
}

/* -------------------------------------------------------------------- Entry */
.entry-main {
  position: relative;
  z-index: 2;
  display: flex; justify-content: center;
  padding: 12px 16px 48px;
}
.entry-card {
  width: min(520px, 100%);
  padding: 28px clamp(18px, 4vw, 32px) 24px;
  color: var(--on-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--elev-4);
  position: relative;
  overflow: hidden;
  animation: rise .6s var(--ease) both;
}
.entry-card::before {     /* candy-cane ribbon */
  content: '';
  position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: repeating-linear-gradient(-45deg, var(--red-600) 0 14px, #fff 14px 28px, var(--green-500) 28px 42px, #fff 42px 56px);
}
.entry-card-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.entry-card-head h1 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; }
.entry-card-head p { margin: 4px 0 0; color: var(--on-surface-muted); font-size: 14px; }
.entry-badge {
  flex: none;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: #fff;
  box-shadow: 0 8px 20px rgba(198, 40, 40, .35);
}
.entry-badge .material-symbols-rounded { font-size: 30px; }

.phase-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px; font-weight: 500;
}
.phase-banner.ok { background: var(--green-50); color: var(--green-700); }
.phase-banner.info { background: var(--gold-100); color: #7a5200; }
.phase-banner.warn { background: var(--red-50); color: var(--red-700); }

.live-note {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 14px 0 0;
  font-size: 12px; color: var(--on-surface-muted);
}

/* Result */
.result-card { padding: 0; }
.result-media { position: relative; aspect-ratio: 16 / 9; background: var(--night-800); }
.result-media video { width: 100%; height: 100%; object-fit: cover; }
.result-media::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(180deg, transparent, #fff);
}
.result-body { padding: 4px clamp(18px, 4vw, 32px) 28px; text-align: center; }
.result-hi { margin: 0; font-size: 20px; }
.result-lead { margin: 6px 0 10px; color: var(--on-surface-muted); }
.result-santa {
  display: inline-block;
  padding: 10px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--red-600), var(--red-700));
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(30px, 7vw, 42px);
  line-height: 1.15;
  box-shadow: 0 12px 30px rgba(198, 40, 40, .35);
  animation: pop-in .6s .2s var(--ease) both;
}
.result-thanks { margin: 20px auto 0; max-width: 420px; color: var(--on-surface-muted); font-size: 14.5px; }
.result-actions { margin-top: 20px; display: flex; justify-content: center; }

/* Confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1200; overflow: hidden; }
.confetti i {
  position: absolute; top: -12px;
  width: 9px; height: 14px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: .8; }
}

/* ------------------------------------------------------- Music toggle */
.music-toggle {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 900;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(12, 27, 61, .55);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s;
}
.music-toggle:hover { transform: scale(1.06); background: rgba(198, 40, 40, .75); }
.music-toggle:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 2px; }
.music-toggle .material-symbols-rounded { font-size: 22px; }
.music-toggle.playing .material-symbols-rounded { display: none; }
.music-bars { display: none; align-items: flex-end; gap: 3px; height: 18px; }
.music-toggle.playing .music-bars { display: flex; }
.music-bars i {
  width: 3px; height: 100%;
  border-radius: 2px;
  background: var(--gold-400);
  animation: music-bar .9s ease-in-out infinite;
  transform-origin: bottom;
}
.music-bars i:nth-child(2) { animation-delay: -.3s; }
.music-bars i:nth-child(3) { animation-delay: -.6s; }
@keyframes music-bar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.music-toggle.waiting { animation: music-hint 2.4s ease-in-out infinite; }
@keyframes music-hint {
  0%, 100% { box-shadow: 0 8px 24px rgba(0, 0, 0, .3), 0 0 0 0 rgba(246, 196, 83, .5); }
  50% { box-shadow: 0 8px 24px rgba(0, 0, 0, .3), 0 0 0 8px rgba(246, 196, 83, 0); }
}
