/* ============================================
   PASAPORTE EXPLORADOR — Oceano Oculto
   Sistema visual — basado en manual de marca
   Mobile first
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

/* ── Variables de marca ───────────────────── */
:root {
  /* Primarios */
  --teal:        #4a9a8a;
  --teal-dark:   #357a6c;
  --teal-light:  #eaf4f2;
  --navy:        #1a2b3c;

  /* Neutros */
  --gray:        #6b7280;
  --gray-light:  #f4f6f5;
  --border:      #e0e8e6;
  --white:       #ffffff;

  /* Semánticos */
  --green:       #2d7a50;
  --yellow:      #b58a00;
  --gold:        #d4a017;
  --gold-light:  #fef9ec;
  --gold-border: #e8d48a;
  --whatsapp:    #25d366;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(74,154,138,0.08);
  --shadow-hover: 0 8px 32px rgba(74,154,138,0.16);

  /* Radii */
  --radius-xl:   24px;
  --radius-lg:   16px;
  --radius-md:   14px;
  --radius-sm:   12px;
  --radius-pill: 50px;

  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--gray-light);
  color: var(--navy);
  min-height: 100dvh;
  overflow-x: hidden;
}

img   { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input  { font-family: inherit; }
a      { text-decoration: none; color: inherit; }

/* ── Layout ───────────────────────────────── */
.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--white);
  position: relative;
}

.page {
  padding: 28px 20px 48px;
  animation: pageFadeIn 0.28s ease;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Tipografía ───────────────────────────── */
h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

h2 {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

p {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--gray);
}

.text-light {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--gray);
}

.label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
}

/* Divisor de marca */
.brand-divider {
  width: 40px;
  height: 3px;
  background: var(--teal);
  border-radius: 2px;
  margin: 1.5rem 0;
}

.brand-divider.centered { margin: 1.5rem auto; }

/* ── Botones ──────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.82rem 2rem;
  border-radius: var(--radius-pill);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
  width: 100%;
  box-shadow: 0 4px 16px rgba(74,154,138,0.25);
}

.btn-primary:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(74,154,138,0.35);
}

.btn-secondary {
  background: var(--white);
  color: var(--teal);
  border: 2px solid var(--teal);
  width: 100%;
}

.btn-secondary:hover {
  background: var(--teal-light);
  transform: translateY(-1px);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  width: 100%;
  box-shadow: 0 4px 16px rgba(37,211,102,0.25);
}

.btn-whatsapp:hover {
  background: #1fb855;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.55rem 1.4rem;
  font-size: 0.8rem;
}

.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Cards ────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-inner {
  padding: 20px;
}

.dato-box {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--navy);
}

/* ── Inputs ───────────────────────────────── */
.input-group {
  margin-bottom: 14px;
}

.input-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 7px;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
}

.input-field:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(74,154,138,0.1);
}

.input-field::placeholder {
  color: #b0bbb9;
  font-weight: 400;
}

.input-field.error {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.08);
}

.input-with-prefix {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  background: var(--white);
}

.input-with-prefix:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(74,154,138,0.1);
}

.input-prefix {
  padding: 14px 14px 14px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray);
  background: var(--gray-light);
  border-right: 1.5px solid var(--border);
  white-space: nowrap;
}

.input-prefix-field {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
}

.input-prefix-field::placeholder { color: #b0bbb9; font-weight: 400; }

.input-note {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 6px;
  line-height: 1.5;
}

/* Select */
.select-field {
  width: 100%;
  padding: 14px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a9a8a' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.select-field:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(74,154,138,0.1);
}

/* ── Header de página ─────────────────────── */
.page-header {
  margin-bottom: 28px;
}

.page-header .label { margin-bottom: 8px; display: block; }

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 20px;
  padding: 0;
}

/* ── Stepper de onboarding ────────────────── */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.step {
  display: flex;
  align-items: center;
  flex: 1;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gray);
  flex-shrink: 0;
  transition: var(--transition);
  z-index: 1;
}

.step-dot.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(74,154,138,0.15);
}

.step-dot.done {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: var(--transition);
}

.step-line.done { background: var(--teal); }

/* ── Passport card header ─────────────────── */
.passport-card {
  background: var(--teal);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(74,154,138,0.3);
}

.passport-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.passport-card::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.passport-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.explorer-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.explorer-info { flex: 1; min-width: 0; }

.explorer-number {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}

.explorer-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 10px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.04em;
}

.passport-brand {
  text-align: right;
  flex-shrink: 0;
}

.passport-brand-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2px;
}

.passport-brand-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  line-height: 1.3;
}

/* Progreso mensual dentro del passport card */
.mission-progress {
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  position: relative;
  z-index: 1;
}

.mission-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.mission-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

.mission-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
}

.progress-track {
  height: 5px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--white);
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

.progress-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: var(--transition);
}

.progress-dot.done {
  background: var(--white);
  box-shadow: 0 0 6px rgba(255,255,255,0.5);
}

/* ── Section ──────────────────────────────── */
.section {
  margin-bottom: 28px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-count {
  font-size: 0.75rem;
  color: var(--gray);
  font-weight: 600;
}

/* ── Creature cards ───────────────────────── */
.creatures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.creature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 14px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.creature-card:not(.locked):hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--teal);
}

.creature-card.locked {
  background: var(--gray-light);
  border-color: var(--border);
  cursor: default;
  box-shadow: none;
}

.creature-card.golden {
  background: var(--gold-light);
  border-color: var(--gold-border);
  box-shadow: 0 4px 24px rgba(212,160,23,0.15);
}

.creature-card.golden:hover {
  box-shadow: 0 8px 32px rgba(212,160,23,0.25);
  border-color: var(--gold);
}

.creature-emoji {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 10px;
  display: block;
  transition: var(--transition);
}

.creature-card.locked .creature-emoji {
  filter: grayscale(1) opacity(0.2);
}

.creature-card:not(.locked):hover .creature-emoji {
  transform: scale(1.1);
}

.creature-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.3;
}

.creature-card.locked .creature-name { color: var(--gray); }

.creature-ecosystem {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}

.creature-card.locked .creature-ecosystem { color: var(--gray); }

.golden-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  background: rgba(212,160,23,0.12);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lock-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.lock-date {
  font-size: 0.65rem;
  color: var(--gray);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Criatura secreta ─────────────────────── */
.secret-card {
  background: var(--teal-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-card);
}

.secret-silhouette {
  font-size: 52px;
  filter: blur(7px) brightness(0.6) saturate(0);
  flex-shrink: 0;
}

.secret-info { flex: 1; }

.secret-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  margin-top: 4px;
}

.secret-desc {
  font-size: 0.78rem;
  color: var(--gray);
  line-height: 1.6;
}

.secret-dots {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.secret-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
}

.secret-dot.done {
  background: var(--teal);
}

/* ── Entry / Landing ──────────────────────── */
.entry-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.entry-hero {
  background: var(--teal);
  padding: 56px 28px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.entry-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.entry-hero::after {
  content: '';
  position: absolute;
  bottom: -50px; left: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.entry-creature {
  font-size: 72px;
  display: block;
  margin: 0 auto 20px;
  animation: float 3.5s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.entry-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.entry-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.entry-subtitle {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  max-width: 300px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.entry-form {
  flex: 1;
  padding: 28px 20px 40px;
  background: var(--white);
}

.entry-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.entry-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.entry-divider-text {
  font-size: 0.72rem;
  color: var(--gray);
  font-weight: 600;
}

/* ── Código del explorador (reglamento) ──── */
.codigo-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.codigo-item.accepted {
  background: var(--teal-light);
  border-color: var(--teal);
}

.codigo-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
  transition: var(--transition);
}

.codigo-item.accepted .codigo-check {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.codigo-emoji {
  font-size: 22px;
  flex-shrink: 0;
}

.codigo-text { flex: 1; }

.codigo-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}

.codigo-desc {
  font-size: 0.78rem;
  color: var(--gray);
  line-height: 1.5;
}

/* ── Pantalla de bienvenida / número asignado ─── */
.welcome-screen {
  text-align: center;
  padding: 48px 28px;
}

.welcome-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--teal-light);
  border: 3px solid var(--teal);
  margin: 0 auto 24px;
}

.welcome-number-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal);
}

/* ── Descuento post-quiz ──────────────────── */
.discount-card {
  background: var(--teal);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(74,154,138,0.3);
}

.discount-card::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

.discount-pct {
  font-size: 4rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}

.discount-pct span {
  font-size: 2rem;
}

.discount-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 16px;
}

.discount-code-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 0 auto;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.discount-code-wrap:hover {
  background: rgba(255,255,255,0.22);
}

.discount-code {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.1em;
}

.discount-copy {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
}

.next-taller-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}

.next-taller-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.next-taller-info { flex: 1; }
.next-taller-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}
.next-taller-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2px;
}
.next-taller-date {
  font-size: 0.78rem;
  color: var(--gray);
}

/* ── Reveal de criatura ───────────────────── */
.creature-reveal {
  position: fixed;
  inset: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 40px 28px;
  text-align: center;
  animation: revealIn 0.35s ease;
}

@keyframes revealIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.reveal-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
}

.reveal-creature {
  font-size: 96px;
  line-height: 1;
  animation: revealBounce 0.9s cubic-bezier(0.34,1.56,0.64,1) 0.15s both;
  margin-bottom: 28px;
}

.reveal-creature.golden-reveal {
  animation: revealBounce 0.9s cubic-bezier(0.34,1.56,0.64,1) 0.15s both,
             goldPulse 2.5s ease-in-out 1.2s infinite;
}

@keyframes revealBounce {
  from { transform: scale(0) rotate(-8deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);  opacity: 1; }
}

@keyframes goldPulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(212,160,23,0.3)); }
  50%       { filter: drop-shadow(0 0 50px rgba(212,160,23,0.7)); }
}

.reveal-name {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  animation: fadeUp 0.5s ease 0.7s both;
}

.reveal-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 280px;
  animation: fadeUp 0.5s ease 0.85s both;
}

.reveal-badge {
  margin-top: 14px;
  animation: fadeUp 0.5s ease 1s both;
}

.reveal-actions {
  width: 100%;
  max-width: 320px;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeUp 0.5s ease 1.1s both;
}

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

/* ── Quiz ─────────────────────────────────── */
.quiz-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 40px;
  background: var(--white);
}

.quiz-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.quiz-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.quiz-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray);
  white-space: nowrap;
}

.quiz-question {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.5;
  margin-bottom: 28px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  width: 100%;
  padding: 15px 18px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  cursor: pointer;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--teal);
  background: var(--teal-light);
  transform: translateX(3px);
}

.quiz-option.correct {
  border-color: var(--green);
  background: rgba(45,122,80,0.06);
  color: var(--green);
}

.quiz-option.wrong {
  border-color: #c0392b;
  background: rgba(192,57,43,0.05);
  color: #c0392b;
}

.option-letter {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: var(--transition);
}

.quiz-option.correct .option-letter { background: var(--green); border-color: var(--green); color: white; }
.quiz-option.wrong   .option-letter { background: #c0392b; border-color: #c0392b; color: white; }

/* ── Explorer select cards ────────────────── */
.explorer-select-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  text-align: left;
}

.explorer-select-card:hover {
  border-color: var(--teal);
  background: var(--teal-light);
  transform: translateX(3px);
}

/* ── Toast ────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(70px);
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  white-space: nowrap;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 200;
}

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

/* ── Skeleton loading ─────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-light) 25%, var(--border) 50%, var(--gray-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Divider ──────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ── Custom select (bottom sheet) ────────────*/
.custom-select-trigger {
  width: 100%;
  padding: 14px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.custom-select-trigger:focus,
.custom-select-trigger.open {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(74,154,138,0.1);
  outline: none;
}

.custom-select-trigger .placeholder { color: #b0bbb9; font-weight: 400; }
.custom-select-trigger .selected-val { color: var(--navy); font-weight: 600; }

.custom-select-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--teal);
}

.custom-select-trigger.open .custom-select-arrow {
  transform: rotate(180deg);
}

/* Bottom sheet overlay */
.cs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,43,60,0.4);
  z-index: 300;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Bottom sheet panel */
.cs-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  z-index: 301;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.34,1.2,0.64,1);
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100%); }
  to   { transform: translateX(-50%) translateY(0); }
}

.cs-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 4px;
  flex-shrink: 0;
}

.cs-sheet-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 8px 20px 12px;
  flex-shrink: 0;
}

.cs-options {
  overflow-y: auto;
  padding: 0 12px 32px;
  -webkit-overflow-scrolling: touch;
}

.cs-option {
  width: 100%;
  padding: 14px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cs-option:hover, .cs-option:active {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.cs-option.selected {
  font-weight: 700;
  color: var(--teal);
}

.cs-option.selected::after {
  content: '✓';
  font-size: 0.9rem;
  color: var(--teal);
}

.cs-divider {
  height: 1px;
  background: var(--border);
  margin: 0 4px;
}

/* Chips para opciones cortas (fuente, edad) */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); }

.chip.selected {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

/* ── Welcome card ─────────────────────────── */
.welcome-card {
  background: var(--teal);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  margin: 0 0 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(74,154,138,0.3);
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: -50px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

.welcome-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.welcome-card-brand {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

.welcome-card-year {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.12);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.welcome-card-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.welcome-card-number-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.welcome-card-number-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.welcome-card-number {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
}

/* ── Responsive desktop ───────────────────── */
@media (min-width: 768px) {
  .app {
    margin: 32px auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.12);
    min-height: auto;
  }

  .entry-page, .quiz-page { min-height: auto; }
}
