:root {
  color-scheme: dark;
}

/* Pequeños toques “místicos” encima de Tailwind */
html,
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", "Apple Color Emoji",
    "Segoe UI Emoji";
  /* Base muy oscura, morado profundo + halos violeta */
  background:
    radial-gradient(980px 620px at 50% 118%, rgba(122, 76, 255, 0.42), transparent 58%),
    radial-gradient(720px 480px at 12% 88%, rgba(98, 54, 230, 0.35), transparent 55%),
    radial-gradient(720px 480px at 92% 90%, rgba(155, 120, 255, 0.22), transparent 58%),
    radial-gradient(900px 560px at 50% -8%, rgba(56, 31, 134, 0.55), transparent 52%),
    linear-gradient(185deg, #0a0612 0%, #120a1e 38%, #1a0f2e 72%, #0f0818 100%) !important;
}

body.app-surface {
  color: rgba(237, 230, 255, 0.94);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(2px 2px at 12% 18%, rgba(200, 190, 255, 0.35) 35%, transparent 40%),
    radial-gradient(2px 2px at 64% 32%, rgba(180, 170, 255, 0.28) 35%, transparent 40%),
    radial-gradient(2px 2px at 78% 70%, rgba(160, 150, 240, 0.22) 35%, transparent 40%),
    radial-gradient(1px 1px at 28% 82%, rgba(220, 210, 255, 0.2) 35%, transparent 40%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.12), transparent 30%, rgba(80, 40, 120, 0.08) 55%, transparent 75%, rgba(0, 0, 0, 0.1));
  opacity: 0.65;
  mix-blend-mode: screen;
}

.whatsPrivacyHint {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(170, 160, 210, 0.62);
}

.maestroRow {
  display: flex;
  justify-content: flex-end;
}

.maestroTag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(155, 120, 255, 0.35);
  background: rgba(28, 18, 48, 0.85);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.maestroAvatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(207, 165, 58, 0.55);
}

.maestroText {
  line-height: 1.1;
}

.maestroName {
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(240, 235, 255, 0.95);
}

.maestroSub {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(190, 180, 230, 0.75);
}

.palmFrame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(140, 100, 255, 0.35);
  background: radial-gradient(520px 320px at 50% 70%, rgba(122, 76, 255, 0.28), transparent 65%),
    rgba(18, 10, 32, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.palmPreview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
}

.palmOverlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.palmStageOverlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 12px;
  pointer-events: none;
}

.palmStageOverlay .palmStageTitle {
  width: 100%;
  text-align: center;
  background: rgba(22, 14, 40, 0.88);
  border: 1px solid rgba(140, 100, 255, 0.35);
  border-radius: 999px;
  padding: 10px 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.palmChecklistOverlay {
  width: 100%;
  margin-top: 10px;
  grid-template-columns: 1fr 1fr;
}

.palmScanLine {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 14px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(232, 200, 106, 0.95), rgba(122, 76, 255, 0.95), transparent);
  box-shadow: 0 0 16px rgba(122, 76, 255, 0.55), 0 0 26px rgba(232, 200, 106, 0.45);
  opacity: 0.95;
  transform: translateY(0px);
  pointer-events: none;
}

.palmScanLine.isScanning {
  animation: palmScan 3s ease-in-out forwards;
}

@keyframes palmScan {
  0% { transform: translateY(6px); }
  50% { transform: translateY(calc(100% + 250px)); }
  100% { transform: translateY(6px); }
}

.palmOverlay svg {
  width: min(78%, 320px);
  height: auto;
  opacity: 0.9;
}

.palmHint {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  text-align: center;
  font-size: 12px;
  color: rgba(220, 210, 250, 0.92);
  background: rgba(18, 10, 35, 0.82);
  border: 1px solid rgba(140, 100, 255, 0.3);
  border-radius: 999px;
  padding: 8px 10px;
  backdrop-filter: blur(10px);
}

.fileBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.02rem 1.05rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(140, 100, 255, 0.4);
  background: rgba(32, 20, 55, 0.88);
  color: rgba(235, 228, 255, 0.95);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
}

.fileBtn:hover {
  background: rgba(42, 28, 72, 0.95);
}

.palmStage {
  margin-top: 12px;
  border-radius: 18px;
  border: 1px solid rgba(140, 100, 255, 0.28);
  background: rgba(22, 14, 42, 0.72);
  padding: 12px 12px;
}

.palmStageTitle {
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(200, 185, 255, 0.92);
}

.palmChecklist {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.palmChecklist li {
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 8, 28, 0.75);
  color: rgba(215, 205, 245, 0.88);
  font-weight: 700;
}

.palmChecklist li.isActive {
  border-color: rgba(155, 120, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(122, 76, 255, 0.2);
  color: rgba(230, 220, 255, 0.98);
}

.palmChecklist li.isDone {
  border-color: rgba(207, 165, 58, 0.55);
  color: rgba(240, 215, 140, 0.98);
}

.palmChecklist li.isDone::before {
  content: "✓ ";
}

.card {
  -webkit-font-smoothing: antialiased;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(22, 12, 38, 0.72);
  box-shadow: 0 26px 85px rgba(0, 0, 0, 0.45);
}

.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 1.5rem;
  background:
    radial-gradient(720px 380px at 12% 8%, rgba(180, 140, 255, 0.18), transparent 55%),
    radial-gradient(560px 400px at 92% 18%, rgba(122, 76, 255, 0.12), transparent 58%),
    radial-gradient(520px 420px at 50% 112%, rgba(0, 0, 0, 0.35), transparent 64%),
    linear-gradient(180deg, rgba(60, 35, 100, 0.35), rgba(15, 8, 28, 0.5));
  pointer-events: none;
  z-index: 0;
}

.card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 24px;
  pointer-events: none;
  border: 1px solid rgba(207, 165, 58, 0.22);
  opacity: 0.75;
}

.card > * {
  position: relative;
  z-index: 1;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(207, 165, 58, 0.4);
  background: rgba(28, 16, 48, 0.82);
  backdrop-filter: blur(10px);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: rgba(230, 205, 140, 0.88);
}

.kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(232, 200, 106, 1), rgba(184, 135, 45, 1));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.seal {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(155, 120, 255, 0.35);
  background:
    radial-gradient(18px 18px at 35% 28%, rgba(200, 185, 255, 0.35), rgba(255,255,255,0) 70%),
    radial-gradient(22px 18px at 65% 72%, rgba(207, 165, 58, 0.22), rgba(255,255,255,0) 68%),
    linear-gradient(180deg, rgba(45, 28, 78, 0.95), rgba(18, 10, 35, 0.85));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

.glassNote {
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 10, 35, 0.65);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  padding: 1rem 1.05rem;
}

.heroArt {
  border-radius: 1.5rem;
  border: 1px solid rgba(140, 100, 255, 0.25);
  background: rgba(12, 6, 24, 0.55);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  padding: 0.5rem 0.5rem;
}

.heroArt svg {
  display: block;
  width: 100%;
  height: auto;
}

.heroImg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.1rem;
  object-fit: cover;
  aspect-ratio: 16 / 7;
}

.signTile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 1.15rem;
  padding: 0.95rem 0.9rem;
  background: rgba(28, 16, 48, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(230, 210, 160, 0.95);
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.signTile:hover {
  background: rgba(38, 22, 62, 0.88);
  transform: translateY(-1px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

.signTile.isSelected {
  border-color: rgba(207, 165, 58, 0.65);
  box-shadow: 0 0 0 4px rgba(207, 165, 58, 0.18);
}

.waIcon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.waIcon svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 1.1rem;
  padding: 1.02rem 1.05rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  background:
    linear-gradient(180deg, rgba(255,248,230,0.45), rgba(255,200,120,0.1)),
    linear-gradient(165deg, #e8c86a 0%, #c89428 45%, #8a6212 100%);
  color: rgba(22, 14, 4, 0.98);
  border: 1px solid rgba(220, 175, 80, 0.55);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.4);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.btn-primary:hover {
  filter: brightness(1.05) saturate(1.1);
  transform: translateY(-1px);
  box-shadow: 0 24px 75px rgba(0, 0, 0, 0.45);
}

.btn-primary:hover,
.btn-primary:active {
  box-shadow:
    0 24px 75px rgba(0, 0, 0, 0.45),
    0 0 0 6px rgba(207, 165, 58, 0.14),
    0 0 26px rgba(240, 218, 155, 0.28);
}

.btnPulse {
  position: relative;
}

.btnPulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 1.2rem;
  border: 1px solid rgba(207, 165, 58, 0.35);
  opacity: 0.0;
  animation: pulseRing 1.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulseRing {
  0% { transform: scale(0.98); opacity: 0.0; }
  40% { opacity: 0.55; }
  100% { transform: scale(1.04); opacity: 0.0; }
}

.btn-primary:active {
  transform: translateY(0px);
}

.btn-primary:focus-visible {
  outline: 3px solid rgba(207, 165, 58, 0.30);
  outline-offset: 3px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.1rem;
  padding: 1.02rem 1.05rem;
  font-weight: 650;
  background: rgba(38, 24, 62, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(230, 222, 255, 0.92);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn-ghost:hover {
  background: rgba(48, 32, 78, 0.88);
  transform: translateY(-1px);
}

.btn-ghost:focus-visible {
  outline: 3px solid rgba(155, 120, 255, 0.35);
  outline-offset: 3px;
}

.input {
  width: 100%;
  border-radius: 1.1rem;
  padding: 1.02rem 1.05rem;
  background: rgba(14, 8, 28, 0.88);
  border: 1px solid rgba(140, 100, 255, 0.28);
  color: rgba(240, 235, 255, 0.95);
  outline: none;
  transition: box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.input::placeholder {
  color: rgba(180, 170, 210, 0.55);
}

.input:focus {
  border-color: rgba(207, 165, 58, 0.55);
  box-shadow: 0 0 0 4px rgba(207, 165, 58, 0.14);
  background: rgba(20, 12, 38, 0.95);
}

.choice {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  width: 100%;
  border-radius: 1.35rem;
  padding: 1.05rem 1.05rem;
  background: rgba(28, 16, 48, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.choice:hover {
  background: rgba(38, 22, 65, 0.88);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.choice.isSelected {
  border-color: rgba(207, 165, 58, 0.55);
  box-shadow: 0 0 0 4px rgba(207, 165, 58, 0.14);
}

.choiceIcon {
  font-size: 1.4rem;
}

.choiceText {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: rgba(235, 228, 255, 0.95);
}

.spinner {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(207, 165, 58, 0.95);
  animation: spin 900ms linear infinite;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  background: rgba(22, 12, 40, 0.85);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.selectWheel {
  width: 100%;
  border-radius: 1.1rem;
  padding: 1.02rem 1.05rem;
  background-color: rgba(14, 8, 28, 0.88);
  border: 1px solid rgba(140, 100, 255, 0.28);
  color: rgba(240, 235, 255, 0.95);
  outline: none;
  transition: box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(200, 190, 230, 0.65) 50%),
    linear-gradient(135deg, rgba(200, 190, 230, 0.65) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.selectWheel:focus {
  border-color: rgba(207, 165, 58, 0.55);
  box-shadow: 0 0 0 4px rgba(207, 165, 58, 0.14);
  background-color: rgba(20, 12, 38, 0.95);
}

/* Botones legales (footer) */
.legalLink {
  font-size: 11px;
  color: rgba(180, 165, 220, 0.72);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legalLink:hover {
  color: rgba(220, 210, 255, 0.92);
}

/* Modal legal */
.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 2, 14, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 22px;
  z-index: 50;
}

.modalCard {
  width: min(720px, 100%);
  max-height: min(78vh, 640px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(140, 100, 255, 0.35);
  background: rgba(22, 12, 40, 0.94);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  padding: 18px 18px;
  color: rgba(235, 228, 255, 0.92);
}

.modalClose {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(38, 24, 62, 0.85);
  color: rgba(235, 228, 255, 0.92);
  font-weight: 700;
}

.modalClose:focus-visible {
  outline: 3px solid rgba(207, 165, 58, 0.30);
  outline-offset: 3px;
}

/* Fade suave entre pasos */
.step {
  animation: fadeInStep 320ms ease-out both;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0px);
  }
}

/* Revelación con retraso sutil por elemento */
.stepReveal > * {
  animation: revealUp 520ms cubic-bezier(.2,.9,.2,1) both;
}
.stepReveal > *:nth-child(1) { animation-delay: 0ms; }
.stepReveal > *:nth-child(2) { animation-delay: 50ms; }
.stepReveal > *:nth-child(3) { animation-delay: 90ms; }
.stepReveal > *:nth-child(4) { animation-delay: 130ms; }
.stepReveal > *:nth-child(5) { animation-delay: 170ms; }

@keyframes revealUp {
  from { opacity: 0; transform: translateY(8px); filter: blur(1px); }
  to { opacity: 1; transform: translateY(0px); filter: blur(0px); }
}

/* Pantalla final — cierre (sin números visibles) */
.closingScreen {
  padding: 0.35rem 0 0.25rem;
}

.closingHeadline {
  margin: 0;
  font-size: clamp(1.45rem, 5vw, 1.95rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.02em;
  color: #e8c86a;
  text-shadow: 0 2px 32px rgba(212, 164, 42, 0.35);
}

.closingBody {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.72;
  color: rgba(210, 200, 235, 0.88);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.btnClosing {
  padding: 1.2rem 1rem;
  min-height: 3.35rem;
}

.btnClosingLabel {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  max-width: 18rem;
}

@media (min-width: 400px) {
  .btnClosingLabel {
    font-size: 0.86rem;
    letter-spacing: 0.07em;
    max-width: none;
  }
}

.whatsMicroHint {
  margin: 0;
  padding: 0 0.35rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(190, 180, 225, 0.72);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
  .btn-primary,
  .btn-ghost,
  .choice {
    transition: none;
  }
}

