:root {
  --ink: #1c1820;
  --ink-soft: #5a5260;
  --paper: #f7f3f0;
  --paper-2: #efe8e3;
  --foam: rgba(255, 252, 249, 0.78);
  --line: rgba(28, 24, 32, 0.08);
  --mint: #7f9e90;
  --mint-deep: #5d7a6c;
  --blush: #d9a0b3;
  --blush-deep: #b97890;
  --sky: #7ea0c2;
  --sky-deep: #5c7fa3;
  --gold: #b8956a;
  --shadow: 0 30px 80px rgba(28, 24, 32, 0.12);
  --radius: 1.75rem;
  --font-script: "Great Vibes", cursive;
  --font-display: "Cormorant Infant", Georgia, serif;
  --font-body: "Sora", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html.theme-nina {
  --mint: #e11d6e;
  --mint-deep: #9d174d;
  --blush: #ff4f8b;
  --blush-deep: #e11d6e;
  --paper: #fff0f5;
  --paper-2: #ffd6e5;
  --sky: #fb7185;
  --sky-deep: #e11d6e;
}

html.theme-nino {
  --mint: #2563eb;
  --mint-deep: #1d4ed8;
  --sky: #3b82f6;
  --sky-deep: #1d4ed8;
  --paper: #eff6ff;
  --paper-2: #dbeafe;
  --blush: #60a5fa;
  --blush-deep: #3b82f6;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  padding-bottom: 6.5rem;
}

body.is-gated,
body.is-splash {
  overflow: hidden;
  height: 100dvh;
}

/* ---------- Splash Puchis ---------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 90% 70% at 50% 20%, rgba(217, 160, 179, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 50% at 10% 90%, rgba(126, 160, 194, 0.35), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(127, 158, 144, 0.28), transparent 50%),
    linear-gradient(165deg, #2a232c 0%, #3d3340 45%, #2f3a38 100%);
  transition: opacity 700ms var(--ease), visibility 700ms;
}

#splash.leaving {
  opacity: 0;
}

#splash.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#splash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.splash-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 1.5rem;
  animation: splashIn 900ms var(--ease) both;
}

.splash-title {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3.2rem, 13vw, 5.8rem);
  line-height: 0.95;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

@keyframes splashIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

body.is-splash .dock,
body.is-splash #gate {
  visibility: hidden;
}

#ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 15% 10%, rgba(217, 160, 179, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 5%, rgba(126, 160, 194, 0.32), transparent 50%),
    radial-gradient(ellipse 60% 45% at 50% 100%, rgba(127, 158, 144, 0.22), transparent 55%),
    linear-gradient(165deg, var(--paper), var(--paper-2));
  transition: background 800ms var(--ease);
}

#ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.app-root { position: relative; z-index: 2; }

.font-script { font-family: var(--font-script); }
.font-display { font-family: var(--font-display); }

/* ---------- Gate (welcome) ---------- */
#gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  padding: 1.25rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(217, 160, 179, 0.4), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 80%, rgba(126, 160, 194, 0.35), transparent 55%),
    linear-gradient(180deg, rgba(28, 24, 32, 0.15), rgba(28, 24, 32, 0.45));
  transition: opacity 450ms var(--ease), visibility 450ms;
}

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

#gate.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-hero {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 2rem 1.5rem 14rem;
  pointer-events: none;
}

.gate-hero .eyebrow {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  opacity: 0.85;
  margin-bottom: 1rem;
  animation: fadeUp 800ms var(--ease) both;
}

.gate-hero h1 {
  font-family: var(--font-script);
  font-size: clamp(3.4rem, 14vw, 6.5rem);
  font-weight: 400;
  line-height: 0.95;
  margin: 0;
  text-shadow: 0 10px 40px rgba(0,0,0,0.2);
  animation: fadeUp 900ms var(--ease) 80ms both;
}

.gate-hero p {
  max-width: 18rem;
  margin: 1.1rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
  opacity: 0.9;
  animation: fadeUp 900ms var(--ease) 160ms both;
}

.gate-card {
  position: relative;
  z-index: 2;
  width: min(420px, 100%);
  background: var(--foam);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 1.75rem 1.75rem 1.4rem 1.4rem;
  box-shadow: var(--shadow);
  padding: 1.35rem 1.25rem 1.25rem;
  animation: slideUp 700ms var(--ease) 200ms both;
}

.gate-card label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.45rem;
}

.gate-error {
  display: none;
  margin-top: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.9rem;
  background: rgba(180, 60, 80, 0.1);
  color: #8a3048;
  font-size: 0.88rem;
}

.gate-error.show { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Shell ---------- */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.topbar .script {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  line-height: 0.9;
  margin: 0.15rem 0 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--foam);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(28,24,32,0.06);
}

.chip.hidden { display: none !important; }

.phase-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(127, 158, 144, 0.2);
  animation: breathe 2.4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.5rem 1.15rem 2rem;
}

.chapter {
  display: none;
  animation: chapterIn 480ms var(--ease);
}

.chapter.visible { display: block; }

@keyframes chapterIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.panel {
  background: var(--foam);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.2rem;
  margin-bottom: 1.1rem;
  position: relative;
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -60px;
  top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,160,179,0.18), transparent 70%);
  pointer-events: none;
}

.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.45rem;
}

.headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 7vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.45rem;
}

.lede {
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 1.2rem;
  font-size: 0.98rem;
}

/* ---------- Countdown ---------- */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}

.cd-cell {
  text-align: center;
  padding: 1rem 0.35rem;
  border-radius: 1.2rem;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,0.55));
  border: 1px solid var(--line);
  transform: translateZ(0);
  transition: transform 200ms var(--ease);
}

.cd-cell:active { transform: scale(0.97); }

.cd-cell .num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.5rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cd-cell .lbl {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Forms / buttons ---------- */
input, textarea, select {
  width: 100%;
  min-height: 52px;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.88);
  padding: 0.85rem 1rem;
  font: 500 1rem/1.4 var(--font-body);
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(127, 158, 144, 0.18);
}

textarea { min-height: 110px; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.8rem 1.3rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 160ms var(--ease), box-shadow 200ms ease, filter 200ms ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn:active { transform: scale(0.96); }
.btn:focus-visible {
  outline: 3px solid rgba(127, 158, 144, 0.55);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--mint), var(--mint-deep));
  color: #fff;
  box-shadow: 0 14px 30px rgba(93, 122, 108, 0.28);
}

.btn-primary:hover { filter: brightness(1.05); }

.btn-ghost {
  background: rgba(255,255,255,0.65);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-block { width: 100%; }

/* ---------- Team vote ---------- */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.team-card {
  position: relative;
  border: none;
  cursor: pointer;
  border-radius: 1.4rem;
  min-height: 150px;
  padding: 1.1rem;
  text-align: left;
  color: #fff;
  overflow: hidden;
  transition: transform 200ms var(--ease), box-shadow 200ms ease;
}

.team-card:active { transform: scale(0.97); }

.team-card.nino {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.35), transparent 40%),
    linear-gradient(145deg, #9bb8d4, var(--sky-deep));
  box-shadow: 0 16px 36px rgba(92, 127, 163, 0.3);
}

.team-card.nina {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.35), transparent 40%),
    linear-gradient(145deg, #e2b4c4, var(--blush-deep));
  box-shadow: 0 16px 36px rgba(185, 120, 144, 0.3);
}

.team-card .team-name {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0;
}

.team-card .team-pct {
  position: absolute;
  right: 0.9rem;
  bottom: 0.7rem;
  font-family: var(--font-display);
  font-size: 2rem;
  opacity: 0.95;
}

.vote-track {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(28,24,32,0.06);
  margin: 1rem 0 0.5rem;
}

.vote-track .nino { background: var(--sky); transition: width 600ms var(--ease); }
.vote-track .nina { background: var(--blush); transition: width 600ms var(--ease); }

.vote-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Wishlist ---------- */
.wish-grid { display: grid; gap: 0.75rem; }

.wish-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 1.3rem;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,0.6));
  border: 1px solid var(--line);
  transition: transform 180ms var(--ease), opacity 180ms ease;
}

.wish-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 1rem;
  background: #f0ece8;
  display: block;
}

.wish-body h4 {
  margin: 0.15rem 0 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.wish-store {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mint-deep);
}

.wish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.wish-actions a {
  text-decoration: none;
}

.wish-item:active { transform: scale(0.985); }

.wish-item.reserved {
  opacity: 0.55;
  filter: grayscale(0.2);
}

.wish-emoji {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  background: rgba(127, 158, 144, 0.12);
}

.wish-item h4 {
  margin: 0;
  font-size: 1rem;
}

.wish-item p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.btn-mini {
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
}

/* ---------- Feed / quiz ---------- */
.feed { display: grid; gap: 0.75rem; }

.feed-card {
  padding: 1rem 1.1rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  animation: chapterIn 400ms var(--ease) both;
}

.quiz-option {
  width: 100%;
  text-align: left;
  padding: 1rem 1.05rem;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font: 500 0.95rem/1.4 var(--font-body);
  margin-bottom: 0.55rem;
  transition: border-color 160ms ease, transform 160ms var(--ease), background 160ms ease;
}

.quiz-option:hover,
.quiz-option.selected {
  border-color: var(--mint);
  background: rgba(127, 158, 144, 0.1);
  transform: translateX(3px);
}

/* ---------- Live / Fiesta ---------- */
.stat-big {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 16vw, 5rem);
  line-height: 0.9;
  margin: 0.2rem 0;
  text-align: center;
}

.party-hub .lede {
  margin-bottom: 1.1rem;
}

.arrive-card,
.hype-card {
  border-radius: 1.4rem;
  padding: 1.1rem 1rem 1.15rem;
  margin-bottom: 1rem;
  background: rgba(255, 252, 249, 0.72);
  border: 1px solid rgba(28, 24, 32, 0.08);
  box-shadow: 0 18px 40px rgba(28, 24, 32, 0.06);
}

.arrive-card.is-checked {
  background: linear-gradient(160deg, rgba(126,160,194,0.16), rgba(217,160,179,0.14));
  border-color: rgba(126, 160, 194, 0.35);
}

.arrive-stats {
  text-align: center;
  margin-bottom: 0.65rem;
}

.arrive-label {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.btn-arrive {
  font-size: 1.05rem;
  min-height: 3.2rem;
}

.btn-arrive.is-done {
  background: var(--ink);
  opacity: 0.85;
}

.arrive-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.85rem;
  min-height: 0.5rem;
}

.arrive-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(28, 24, 32, 0.06);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}

.hype-card.is-hot {
  border-color: rgba(251, 113, 133, 0.45);
  box-shadow: 0 18px 50px rgba(225, 29, 110, 0.12);
}

.hype-card.is-full {
  border-color: rgba(59, 130, 246, 0.45);
  background: linear-gradient(160deg, rgba(59,130,246,0.12), rgba(255,79,139,0.12));
}

.hype-head {
  text-align: center;
  margin-bottom: 0.55rem;
}

.hype-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.45rem 0 0.85rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.hype-hint {
  text-align: center;
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.hype-wrap {
  display: grid;
  place-items: center;
  padding: 0.5rem 0 0.25rem;
}

.btn-hype {
  width: min(100%, 240px);
  height: min(60vw, 240px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.1;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.5), transparent 42%),
    linear-gradient(145deg, #ff4f8b, #3b82f6);
  box-shadow:
    0 25px 50px rgba(59, 130, 246, 0.28),
    0 12px 30px rgba(255, 79, 139, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.45);
  animation: hypePulse 1.4s ease-in-out infinite;
  transition: transform 100ms var(--ease);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.btn-hype small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-top: 0.15rem;
}

.btn-hype:active,
.btn-hype.is-hit {
  transform: scale(0.9);
  animation: none;
}

.hype-combo {
  position: absolute;
  top: 12%;
  right: 18%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  animation: comboPop 500ms var(--ease) forwards;
  pointer-events: none;
}

@keyframes comboPop {
  0% { opacity: 0; transform: translateY(6px) scale(0.8); }
  30% { opacity: 1; transform: translateY(0) scale(1.15); }
  100% { opacity: 0; transform: translateY(-18px) scale(1); }
}

@keyframes hypePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.hype-meter {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(28,24,32,0.06);
  overflow: hidden;
  margin: 1rem 0 0.4rem;
}

.hype-meter-lg {
  height: 18px;
  margin: 0.65rem 0 0.15rem;
}

.hype-meter > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4f8b, #a78bfa, #3b82f6);
  transition: width 280ms var(--ease);
}

.emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.emoji-btn {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.45rem;
  cursor: pointer;
  transition: transform 150ms var(--ease);
}

.emoji-btn:active { transform: scale(0.9) rotate(-8deg); }

/* ---------- Photos ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

@media (min-width: 640px) {
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.photo-grid figure {
  margin: 0;
  border-radius: 1.1rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.photo-grid figcaption {
  padding: 0.55rem 0.7rem 0.7rem;
  font-size: 0.75rem;
}

/* ---------- Dock ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  gap: 0.25rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(28, 24, 32, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(28,24,32,0.28);
  max-width: calc(100vw - 1.5rem);
}

body.is-gated .dock { opacity: 0; pointer-events: none; }

.dock button {
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.62);
  font: 600 0.78rem/1 var(--font-body);
  padding: 0.85rem 1.05rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 46px;
  transition: background 180ms ease, color 180ms ease;
}

.dock button.active {
  background: transparent;
  color: var(--ink);
}

/* ---------- Overlay / confetti / emoji rain ---------- */
#emoji-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 50;
}

.flying-emoji {
  position: absolute;
  bottom: -2rem;
  font-size: 1.9rem;
  animation: floatUp 2.7s ease-out forwards;
  will-change: transform, opacity;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.15));
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.6) rotate(-10deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(-110vh) scale(1.25) rotate(18deg); opacity: 0; }
}

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

#reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #2a2030 0%, #0c0a10 70%);
  text-align: center;
  color: #fff;
  padding: 1.5rem;
  overflow: hidden;
}

#reveal-overlay.active { display: flex; }

#reveal-overlay.is-countdown {
  animation: revealPulseBg 1s ease-in-out infinite;
}

#reveal-overlay.is-boom.reveal-nino {
  background: radial-gradient(circle at 50% 35%, #60a5fa 0%, #1e3a8a 45%, #0f172a 100%);
}

#reveal-overlay.is-boom.reveal-nina {
  background: radial-gradient(circle at 50% 35%, #fb7185 0%, #9d174d 45%, #1f0a14 100%);
}

@keyframes revealPulseBg {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

.reveal-wash {
  position: absolute;
  inset: -20%;
  opacity: 0;
  pointer-events: none;
  background: conic-gradient(from 120deg, transparent, rgba(255,255,255,0.18), transparent 40%);
  animation: none;
}

#reveal-overlay.is-boom .reveal-wash {
  opacity: 1;
  animation: washSpin 6s linear infinite;
}

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

.reveal-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

#reveal-overlay.is-flash .reveal-flash {
  animation: revealFlash 700ms ease-out forwards;
}

@keyframes revealFlash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.reveal-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}

#reveal-overlay.is-countdown .reveal-rings { opacity: 1; }

.reveal-rings span {
  position: absolute;
  width: min(70vw, 280px);
  height: min(70vw, 280px);
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  animation: ringOut 1.2s ease-out infinite;
}

.reveal-rings span:nth-child(2) { animation-delay: 0.25s; }
.reveal-rings span:nth-child(3) { animation-delay: 0.5s; }

#reveal-overlay.reveal-nino .reveal-rings span { border-color: rgba(147, 197, 253, 0.55); }
#reveal-overlay.reveal-nina .reveal-rings span { border-color: rgba(251, 113, 133, 0.55); }

@keyframes ringOut {
  0% { transform: scale(0.45); opacity: 0.85; }
  100% { transform: scale(1.55); opacity: 0; }
}

.reveal-stage {
  position: relative;
  z-index: 3;
  width: min(100%, 36rem);
}

.reveal-kicker {
  margin: 0 0 0.6rem;
  font: 600 0.85rem/1 var(--font-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 280ms ease, transform 280ms ease;
}

#reveal-overlay.is-countdown .reveal-kicker,
#reveal-overlay.is-suspense .reveal-kicker {
  opacity: 1;
  transform: none;
}

.reveal-count {
  font-family: var(--font-display);
  font-size: clamp(6rem, 28vw, 10rem);
  line-height: 0.9;
  font-weight: 600;
  text-shadow: 0 10px 40px rgba(0,0,0,0.35);
  animation: countBeat 0.9s ease-in-out infinite;
  transition: color 200ms ease, transform 180ms ease;
}

#reveal-overlay.is-urgent .reveal-count {
  animation: countUrgent 0.45s ease-in-out infinite;
  color: #ffe4a8;
}

#reveal-overlay.reveal-nino.is-countdown .reveal-count { color: #bfdbfe; }
#reveal-overlay.reveal-nina.is-countdown .reveal-count { color: #fecdd3; }

@keyframes countBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes countUrgent {
  0%, 100% { transform: scale(1) rotate(-1deg); }
  50% { transform: scale(1.18) rotate(1deg); }
}

.reveal-result-wrap {
  animation: popIn 900ms cubic-bezier(.16,1.2,.3,1) both;
}

.reveal-eyebrow {
  margin: 0 0 0.35rem;
  font: 600 0.78rem/1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
}

.reveal-headline {
  font-family: var(--font-script);
  font-size: clamp(3.8rem, 16vw, 7rem);
  line-height: 1.05;
  margin: 0.1rem 0 0.45rem;
  text-shadow:
    0 0 40px rgba(255,255,255,0.35),
    0 12px 40px rgba(0,0,0,0.35);
  animation: headlineGlow 1.8s ease-in-out infinite alternate;
}

.reveal-sub {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.5vw, 1.85rem);
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.04em;
}

#reveal-overlay.reveal-nino .reveal-headline { color: #eff6ff; }
#reveal-overlay.reveal-nina .reveal-headline { color: #fff1f5; }

@keyframes headlineGlow {
  from { filter: drop-shadow(0 0 0 rgba(255,255,255,0)); transform: scale(1); }
  to { filter: drop-shadow(0 0 18px rgba(255,255,255,0.45)); transform: scale(1.02); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.45) translateY(24px); }
  to { opacity: 1; transform: none; }
}

#reveal-overlay.is-shake {
  animation: revealShake 420ms ease-in-out;
}

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

@media (prefers-reduced-motion: reduce) {
  #reveal-overlay.is-countdown,
  .reveal-count,
  .reveal-rings span,
  .reveal-wash,
  .reveal-headline,
  #reveal-overlay.is-shake {
    animation: none !important;
  }
}

/* ---------- Admin / toast / footer ---------- */
.admin-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16,12,20,0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.admin-drawer.open { display: flex; }

.admin-panel {
  width: min(560px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 1.6rem 1.6rem 0 0;
  background: #fff;
  padding: 1.25rem 1.25rem 2rem;
}

.toast {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%) translateY(-140%);
  z-index: 110;
  background: var(--ink);
  color: #fff;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  font-size: 0.9rem;
  transition: transform 280ms var(--ease);
  max-width: calc(100vw - 2rem);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.toast.show { transform: translateX(-50%) translateY(0); }

.site-foot {
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
  padding: 0.5rem 1rem 0;
}

.site-foot a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-box {
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1rem;
  margin-bottom: 0.85rem;
  background: var(--paper);
}

.admin-box h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.admin-wish-row {
  display: flex;
  gap: 0.5rem;
}

.admin-wish-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-wish-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.admin-wish-thumb {
  width: 48px;
  height: 48px;
  border-radius: 0.7rem;
  object-fit: cover;
  background: #f0ece8;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.admin-wish-thumb.emoji {
  font-size: 1.3rem;
}

.wish-preview {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--line);
}

.wish-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.8rem;
}

.wish-preview p {
  margin: 0.2rem 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.admin-wish-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.hidden { display: none !important; }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transform: scale(0);
  animation: ripple 600ms ease-out forwards;
  pointer-events: none;
}

@keyframes ripple {
  to { transform: scale(2.8); opacity: 0; }
}

/* ---------- Dinámica / UX viva ---------- */
#fx-burst-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 55;
}

.fx-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: fxPop 650ms var(--ease) forwards;
  will-change: transform, opacity;
}

@keyframes fxPop {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

.journey {
  display: flex;
  gap: 0.45rem;
  padding: 0.35rem 1.25rem 0.75rem;
  max-width: 720px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.journey-step {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 0.55rem 0.4rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.45);
  border: 1px solid var(--line);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-soft);
  line-height: 1.2;
  transition: background 250ms var(--ease), color 250ms var(--ease), transform 200ms var(--ease);
}

.journey-step.active {
  background: var(--ink);
  color: #fff;
  transform: scale(1.03);
  box-shadow: 0 10px 24px rgba(28,24,32,0.18);
}

.journey-step.done {
  background: rgba(127, 158, 144, 0.18);
  color: var(--mint-deep);
}

.live-ticker {
  max-width: 720px;
  margin: 0 auto 0.75rem;
  padding: 0 1.25rem;
}

.live-ticker-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(28, 24, 32, 0.88);
  color: #fff;
  font-size: 0.82rem;
  box-shadow: 0 12px 28px rgba(28,24,32,0.18);
  overflow: hidden;
}

.live-ticker-inner .pulse {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #7ddea8;
  box-shadow: 0 0 0 4px rgba(125, 222, 168, 0.25);
  flex-shrink: 0;
  animation: breathe 1.8s ease-in-out infinite;
}

.live-ticker-inner .msg {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: tickerIn 380ms var(--ease);
}

@keyframes tickerIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.top-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--foam);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(28,24,32,0.06);
  transition: transform 160ms var(--ease);
}

.icon-btn:active,
.icon-btn.is-press,
.btn.is-press,
.team-card.is-press,
.emoji-btn.is-press,
.dock button.is-press {
  transform: scale(0.94);
}

.chapter.visible .panel {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}

.chapter.visible .panel.in-view {
  opacity: 1;
  transform: none;
}

.chapter {
  display: none;
}

.chapter.visible {
  display: block;
  animation: chapterSlide 480ms var(--ease);
}

.chapter.visible.from-left { animation-name: chapterFromLeft; }
.chapter.visible.from-right { animation-name: chapterFromRight; }

@keyframes chapterSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes chapterFromLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: none; }
}

@keyframes chapterFromRight {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: none; }
}

.app-root.entering {
  animation: appEnter 700ms var(--ease) both;
}

@keyframes appEnter {
  from { opacity: 0; transform: scale(1.04) translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.cd-cell .num {
  display: inline-block;
  transition: transform 140ms var(--ease), opacity 140ms var(--ease);
}

.cd-cell .num.is-flip {
  transform: translateY(8px) scale(0.9);
  opacity: 0.35;
}

.team-card.just-voted {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.25), 0 16px 36px rgba(28,24,32,0.22);
  animation: votePop 700ms var(--ease);
}

.team-card:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@keyframes votePop {
  0% { transform: scale(1); }
  35% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.wish-item {
  animation: wishIn 420ms var(--ease) both;
}

.wish-item:nth-child(1) { animation-delay: 40ms; }
.wish-item:nth-child(2) { animation-delay: 80ms; }
.wish-item:nth-child(3) { animation-delay: 120ms; }
.wish-item:nth-child(4) { animation-delay: 160ms; }
.wish-item:nth-child(5) { animation-delay: 200ms; }

@keyframes wishIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.wish-item.just-reserved {
  animation: reservedFlash 700ms var(--ease);
}

@keyframes reservedFlash {
  0%, 100% { box-shadow: none; }
  40% { box-shadow: 0 0 0 4px rgba(127, 158, 144, 0.35); }
}

.floating-react {
  position: fixed;
  right: 0.9rem;
  bottom: calc(4.8rem + env(safe-area-inset-bottom));
  z-index: 35;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
}

body:not(.is-gated) .floating-react.show {
  display: flex;
}

.floating-react .emoji-btn {
  width: 3rem;
  height: 3rem;
  box-shadow: 0 10px 24px rgba(28,24,32,0.14);
  animation: floatIn 420ms var(--ease) both;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateX(16px) scale(0.8); }
  to { opacity: 1; transform: none; }
}

.phase-note {
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin: 0.15rem 1.25rem 0.95rem;
  line-height: 1.45;
}

.journey-step.locked {
  opacity: 0.45;
}

.journey-step.locked::after {
  content: " 🔒";
  font-size: 0.65em;
}

.chapter .step {
  display: none;
}

.chapter.visible .step.active {
  display: block;
  opacity: 1;
  transform: none;
  animation: chapterIn 420ms var(--ease);
}

.admin-fase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.admin-fase-btn {
  text-align: left !important;
  line-height: 1.25;
  padding: 0.75rem 0.85rem !important;
  border: 1px solid var(--line);
  min-height: 4.2rem;
  white-space: normal;
}

.admin-fase-btn small {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-weight: 400;
}

.admin-fase-btn.is-on {
  border-color: var(--mint-deep);
  background: color-mix(in srgb, var(--mint) 18%, #fff);
  color: var(--ink);
  font-weight: 600;
}

.waiting-card {
  position: relative;
  margin-top: 1.1rem;
  padding: 1.35rem 1rem 1.2rem;
  border-radius: 1.2rem;
  background: linear-gradient(135deg, rgba(126,160,194,0.16), rgba(217,160,179,0.18));
  border: 1px solid rgba(255,255,255,0.35);
  text-align: center;
  overflow: hidden;
}

.waiting-pulse {
  position: absolute;
  left: 50%;
  top: 0.55rem;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.55);
  animation: waitingPulse 1.4s ease-out infinite;
}

@keyframes waitingPulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.55); }
  70% { box-shadow: 0 0 0 16px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.dock-steps {
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  min-width: min(420px, calc(100vw - 1.5rem));
}

.dock-steps .step-indicator {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 3.5rem;
  text-align: center;
  opacity: 0.9;
}

.btn-ghost-dock,
.btn-next-dock {
  border: none;
  cursor: pointer;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font: 600 0.82rem/1 var(--font-body);
}

.btn-ghost-dock {
  background: transparent;
  color: rgba(255,255,255,0.75);
}

.btn-next-dock {
  background: #fff;
  color: var(--ink);
  flex: 1;
}

.btn-ghost-dock:disabled,
.btn-next-dock:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.progress-ring-wrap {
  position: relative;
  width: min(100%, 240px);
  height: min(60vw, 240px);
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.progress-ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.progress-ring circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.progress-ring .track { stroke: rgba(28,24,32,0.08); }
.progress-ring .value {
  stroke: url(#hypeGradient);
  stroke: var(--mint);
  transition: stroke-dashoffset 400ms var(--ease);
}

.btn-hype {
  position: relative;
  z-index: 1;
  width: 78%;
  height: 78%;
}

.shake-soft {
  animation: shakeSoft 420ms var(--ease);
}

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

.dock .pill {
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0.35rem;
  width: calc((100% - 0.7rem - 0.5rem) / 3);
  border-radius: 999px;
  background: #fff;
  transition: transform 320ms var(--ease);
  z-index: 0;
  pointer-events: none;
}

.dock button {
  position: relative;
  z-index: 1;
  flex: 1;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .panel { opacity: 1; transform: none; }
}
