/* ── Font ── */
@font-face {
  font-family: 'Aileron';
  src: url('../../fonts/akzidenz-grotesk-similar/aileron/Aileron-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aileron';
  src: url('../../fonts/akzidenz-grotesk-similar/aileron/Aileron-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Aileron';
  src: url('../../fonts/akzidenz-grotesk-similar/aileron/Aileron-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aileron';
  src: url('../../fonts/akzidenz-grotesk-similar/aileron/Aileron-SemiBoldItalic.otf') format('opentype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Aileron';
  src: url('../../fonts/akzidenz-grotesk-similar/aileron/Aileron-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aileron';
  src: url('../../fonts/akzidenz-grotesk-similar/aileron/Aileron-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Aileron';
  src: url('../../fonts/akzidenz-grotesk-similar/aileron/Aileron-Black.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aileron';
  src: url('../../fonts/akzidenz-grotesk-similar/aileron/Aileron-BlackItalic.otf') format('opentype');
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

/* ── Variables ── */
:root {
  --bg: #07080e;
  --surface: #10131c;
  --surface2: #181d2a;
  --text: #e8eaf0;
  --text-muted: #8892a4;
  --accent: #E31B23;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 8px;
  --font: 'Aileron', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  font-kerning: normal;
  font-optical-sizing: auto;
  letter-spacing: 0.01em;   /* dark-bg compensation: light type reads lighter */
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ── Buttons ── */
.btn-explorar {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
  border-radius: 50px;
  transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1),
              box-shadow 0.15s cubic-bezier(0.25, 1, 0.5, 1);
}
.btn-explorar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(227, 27, 35, 0.45);
}
.btn-explorar:active { transform: translateY(0); box-shadow: none; }

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Secondary action: 2D lite view — quieter than the amber primary */
.btn-explorar--ghost {
  background: var(--surface-mid, #181d2a);
  color: var(--text);
  border: 1px solid rgba(232, 234, 240, 0.14);
}
.btn-explorar--ghost:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  border-color: rgba(232, 234, 240, 0.28);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(16, 19, 28, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s;
}
.nav-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

/* ── Intro Page ── */
body.intro-page { overflow-x: hidden; }

/* Dispatch dateline — single brand element, not repeated section grammar */
.dispatch-header {
  display: flex;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(227, 27, 35, 0.28);
  margin-bottom: 18px;
}

.dispatch-meta-text {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.intro-main {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 28px 64px;
}

.intro-content {
  max-width: 540px;
  animation: intro-enter-content 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Display — Aileron 800 at expedition scale */
.intro-title {
  margin-bottom: 12px;
  line-height: 1.0;
}

/* Wordmark image — replaces the "Universo 3B" / "Tiendas 3B" text lockup
   wherever it functions as a logo, sized against the type scale it replaces. */
.brand-logo {
  display: block;
  width: auto;
}

.brand-logo--hero {
  height: clamp(2.4rem, 5.2vw, 3.8rem);
}

.brand-logo--nav {
  height: 1.4em;
  vertical-align: middle;
}

/* Lead — clear step above body (1.125 vs 1rem = major second) */
.intro-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
  max-width: 55ch;
}

.intro-story {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.intro-story p {
  font-size: 1rem;
  color: #b0b8c8;
  line-height: 1.7;
  max-width: 68ch;
  text-wrap: pretty;
}
.intro-story strong { color: var(--accent); font-weight: 700; }

.intro-hint {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.intro-hint a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.intro-hint a:hover { color: #f04850; }

/* ── AR Entry (index.html) ── */
.ar-entry {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.ar-entry-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FF7515;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Scan indicator dot before the label */
.ar-entry-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF7515;
  box-shadow: 0 0 8px rgba(255, 117, 21, 0.8);
  animation: ar-dot-blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes ar-dot-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(255, 117, 21, 0.8); }
  50%       { opacity: 0.4; box-shadow: 0 0 4px rgba(255, 117, 21, 0.3); }
}

/* Single AR entry button — amber pill matching #start-btn / .btn-explorar shape */
.btn-ar {
  display: inline-block;
  padding: 12px 36px;
  background: #FF7515;
  color: #07080e;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
  border-radius: 50px;
  transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1),
              box-shadow 0.15s cubic-bezier(0.25, 1, 0.5, 1);
}
.btn-ar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 117, 21, 0.45);
}
.btn-ar:active { transform: translateY(0); box-shadow: none; }

/* ── Orbit Visual ── */
.intro-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: intro-enter-visual 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

/* CSS starfield — 25 scattered radial-gradient dots */
.intro-visual::before {
  content: '';
  position: absolute;
  inset: -60px;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,0.60) 0%, transparent 100%),
    radial-gradient(1px   1px   at 78% 8%,  rgba(255,255,255,0.40) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 43% 88%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px   1px   at 8%  62%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(2px   2px   at 68% 32%, rgba(255,255,255,0.28) 0%, transparent 100%),
    radial-gradient(1px   1px   at 28% 52%, rgba(255,255,255,0.50) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 88% 72%, rgba(255,255,255,0.38) 0%, transparent 100%),
    radial-gradient(1px   1px   at 52% 12%, rgba(255,255,255,0.60) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 4%  88%, rgba(255,255,255,0.30) 0%, transparent 100%),
    radial-gradient(1px   1px   at 62% 95%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 22% 4%,  rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px   1px   at 85% 48%, rgba(255,255,255,0.32) 0%, transparent 100%),
    radial-gradient(1px   1px   at 38% 68%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 72% 22%, rgba(255,255,255,0.28) 0%, transparent 100%),
    radial-gradient(1px   1px   at 18% 40%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px   1px   at 95% 82%, rgba(255,255,255,0.38) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 48% 28%, rgba(255,255,255,0.48) 0%, transparent 100%),
    radial-gradient(1px   1px   at 6%  96%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1px   1px   at 58% 58%, rgba(255,255,255,0.22) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 32% 80%, rgba(255,255,255,0.50) 0%, transparent 100%),
    radial-gradient(1px   1px   at 88% 15%, rgba(255,255,255,0.42) 0%, transparent 100%),
    radial-gradient(1px   1px   at 75% 60%, rgba(255,255,255,0.28) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 15% 75%, rgba(255,255,255,0.48) 0%, transparent 100%),
    radial-gradient(2px   2px   at 55% 45%, rgba(255,255,255,0.18) 0%, transparent 100%),
    radial-gradient(1px   1px   at 92% 35%, rgba(255,255,255,0.42) 0%, transparent 100%);
  background-size: 100% 100%;
}

.orbit-ring {
  position: relative;
  width: 380px;
  height: 380px;
  animation: ring-orbit 28s linear infinite;
}

/* Faint outer ring for depth */
.orbit-ring::after {
  content: '';
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.03);
  animation: ring-orbit 44s linear infinite reverse;
}

.orbit-border {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.planet-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color);
  box-shadow: 0 0 18px 2px var(--color);
  top: 0;
  left: 50%;
  margin-left: -8px;
  transform-origin: 8px 190px;
  transform: rotate(var(--angle));
}

.center-planet {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color, #3FA34D);
  box-shadow:
    0 0 32px var(--color, #3FA34D),
    0 0 64px rgba(63, 163, 77, 0.22),
    0 0 100px rgba(63, 163, 77, 0.10);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: counter-orbit 28s linear infinite;
}

@keyframes ring-orbit    { to { transform: rotate(360deg); } }
@keyframes counter-orbit { to { transform: translate(-50%, -50%) rotate(-360deg); } }

/* ── Entry Animations ── */
@keyframes intro-enter-content {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes intro-enter-visual {
  from { opacity: 0; transform: scale(0.90); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Galaxy Pages ── */
body.galaxy-page {
  overflow: hidden;
  position: fixed;
  inset: 0;
  opacity: 0;
  animation: planeta-fadein 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

#canvas-container {
  position: fixed;
  inset: 0;
}

canvas#canvas-2d {
  position: fixed;
  inset: 0;
  display: block;
  touch-action: none;
}

.galaxy-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(to bottom, rgba(7,8,14,0.85) 0%, transparent 100%);
}

.nav-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.galaxy-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: rgba(136, 146, 164, 0.6);
  pointer-events: none;
  white-space: nowrap;
}
/* Un solo hint según puntero. Vive aquí y no en gaceta.css porque
   galaxia-3d.html solo carga style.css. */
.hint-touch { display: none; }
@media (pointer: coarse) {
  .hint-touch { display: inline; }
  .hint-mouse { display: none; }
}


/* ── HUD ── */
.hud {
  position: fixed;
  background: rgba(16, 19, 28, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  max-width: 240px;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.1s;
}
.hud-nombre {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}
.hud-categoria {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--accent);
  margin-bottom: 7px;
}
.hud-esencia {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── CSS2D Planet Labels (galaxy-3d) ── */
.planet-label {
  color: rgba(232, 234, 240, 0.75);
  font-size: 0.79rem;
  font-family: var(--font);
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

/* ── WebGL Fallback ── */
.webgl-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 100vh;
  text-align: center;
  padding: 24px;
}
.webgl-fallback p {
  font-size: 1.0625rem;
  color: var(--text-muted);
}

/* ── Planet Page ── */
body.planeta-page {
  min-height: 100vh;
  overflow-y: auto;
  opacity: 0;
  animation: planeta-fadein 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

@keyframes planeta-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.planeta-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 24px;
  background: rgba(7, 8, 14, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  gap: 16px;
  text-align: center;
  padding: 24px;
}
.not-found h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.not-found p { color: var(--text-muted); }

.planeta-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 56px);
}

.planeta-viewer {
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow: hidden;
  isolation: isolate;
}
.planeta-viewer model-viewer {
  display: block;
  width: 100%;
  height: 100%;
  background-color: transparent;
}

.planeta-info {
  padding: 40px 48px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
}

.planeta-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(227, 27, 35, 0.10);
  border: 1px solid rgba(227, 27, 35, 0.20);
  border-radius: 50px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* Planet name — fluid from 1.75rem (tablet) to 3rem (desktop) */
.planeta-name {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
  text-wrap: balance;
}

/* Esencia — italic + amber color, no side-stripe border */
.planeta-esencia {
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  padding: 16px 0;
  margin-bottom: 20px;
  line-height: 1.6;
}

.planeta-desc {
  font-size: 1rem;
  color: #b0b8c8;
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 68ch;
  text-wrap: pretty;
}

.info-section {
  margin-bottom: 28px;
}
/* Weight contrast replaces uppercase/tracking grammar (Eyebrow Restraint Rule) */
.info-section h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.marcas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.marcas-list li {
  padding: 5px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--text);
}

.info-section blockquote {
  font-size: 0.875rem;
  color: #c0c8d8;
  font-style: italic;
  padding: 10px 0;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Ficha planetaria: pares etiqueta-valor en dos columnas. La etiqueta se mide
   por su contenido para que los tres valores arranquen alineados. */
.ficha-datos {
  display: grid;
  grid-template-columns: minmax(0, max-content) 1fr;
  gap: 8px 20px;
  margin-bottom: 28px;
}
.ficha-datos dt {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
}
.ficha-datos dd {
  font-size: 0.9375rem;
  color: #b0b8c8;
  line-height: 1.6;
  text-wrap: pretty;
}

/* Objetivo de la misión: un escalón tonal, sin sombra en reposo (DESIGN.md). */
.mision-objetivo {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: #c0c8d8;
  line-height: 1.7;
  max-width: 68ch;
  text-wrap: pretty;
}

.paleta-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.swatch {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: default;
  transition: transform 0.15s;
}
.swatch:hover { transform: scale(1.2); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .intro-main {
    grid-template-columns: 1fr;
    padding: 24px 24px 48px;
    gap: 28px;
  }
  .intro-visual { order: -1; }

  /* Mobile is the AR surface — lift the AR button into the first fold,
     above the (crawl-redundant) story prose and the desktop-first galaxy CTA.
     Default stretch lets text blocks wrap; the pill pins to natural width. */
  .intro-content {
    display: flex;
    flex-direction: column;
    min-width: 0;   /* let the 1fr grid track stay at viewport width, not min-content */
  }
  .dispatch-header { order: 1; }
  .intro-title     { order: 2; }
  .intro-subtitle  { order: 3; margin-bottom: 16px; }
  .ar-entry {
    order: 4;
    margin-top: 4px;
    padding-top: 0;
    border-top: none;
  }
  .intro-actions   { order: 5; align-self: stretch; margin-top: 8px; }
  .intro-actions .btn-explorar { flex: 1 1 0; text-align: center; }
  .intro-hint      { order: 6; }
  .intro-story {
    order: 7;
    margin-top: 24px;
    margin-bottom: 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }
  .orbit-ring { width: 250px; height: 250px; }
  .orbit-ring::after { inset: -14px; }
  .planet-dot {
    width: 12px;
    height: 12px;
    margin-left: -6px;
    transform-origin: 6px 125px;
  }
  .center-planet { width: 44px; height: 44px; }

  .planeta-layout { grid-template-columns: 1fr; }
  .planeta-viewer {
    position: relative;
    top: 0;
    height: 55vw;
    min-height: 280px;
  }
  .planeta-info {
    padding: 28px 20px 48px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  /* En pantalla angosta la etiqueta se lleva media línea y estrangula el valor:
     mejor apilar etiqueta sobre valor. */
  .ficha-datos { grid-template-columns: 1fr; gap: 2px; }
  .ficha-datos dd { margin-bottom: 12px; }

  .galaxy-nav { padding: 10px 14px; }
  .nav-title { display: none; }
  .galaxy-hint { font-size: 0.6875rem; }
  .intro-main { padding: 24px 20px 40px; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .orbit-ring          { animation: none; }
  .orbit-ring::after   { animation: none; }
  .center-planet       { animation: none; transform: translate(-50%, -50%); }
  .intro-content       { animation: none; opacity: 1; transform: none; }
  .intro-visual        { animation: none; opacity: 1; transform: none; }
  .ar-entry-label::before     { animation: none; opacity: 1; }
}

.ar-cta {
  border: 2px solid var(--planet-accent, #FF7515);
}
/* model-viewer no posiciona slots custom: sin esto el botón queda en flujo
   normal, pegado al borde superior del visor en celular. */
.planeta-viewer [slot="ar-button"] {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}
.ar-error {
  background: #181d2a;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

/* ---- Tema del planeta: su color gobierna su propia página (DESIGN.md) ---- */
/* --planet-accent lo pone planeta.js; --planet-ink se deriva aquí.
   Dos tokens porque el color crudo reprueba AA en galaxis (2.18:1) y mística
   (4.28:1) sobre el void; al 70% + blanco los 10 pasan. Crudo = bordes y
   puntos; ink = todo texto. */
.planeta-page {
  --planet-ink: color-mix(in srgb, var(--planet-accent, #FF7515) 70%, white);
  /* Atmósfera: el panel de texto se tiñe con el planeta (gate 2026-08-31).
     Tinte al 24 % y no color pleno: Lactia, Nubosa, Golosia y Prisma son claros
     y obligarían a invertir toda la tinta; con 24 % la ink pasa AA en los 10 y
     las pastillas blancas de los logos siguen contrastando. El visor 3D queda
     en void. La tinta secundaria sube a #b0b8c8 (la de .planeta-desc) porque
     #8892a4 reprueba sobre Lactia teñida. */
  --planet-surface: color-mix(in srgb, var(--planet-accent, #FF7515) 24%, #07080e);
  --planet-card: color-mix(in srgb, var(--planet-accent, #FF7515) 12%, #10131c);
  --planet-muted: #b0b8c8;
}
.planeta-page .planeta-info {
  background: var(--planet-surface);
}
.planeta-page .planeta-header {
  display: flex;
  justify-content: space-between;
}
.planeta-page .planeta-badge {
  color: var(--planet-ink);
  background: color-mix(in srgb, var(--planet-accent, #FF7515) 10%, transparent);
  border-color: color-mix(in srgb, var(--planet-accent, #FF7515) 20%, transparent);
}
.planeta-page .planeta-esencia {
  color: var(--planet-ink);
}
.planeta-page .info-section h3 {
  color: var(--planet-ink);
}
.planeta-page .marcas-list li {
  background: color-mix(in srgb, var(--planet-accent, #FF7515) 6%, transparent);
  border-color: color-mix(in srgb, var(--planet-accent, #FF7515) 25%, transparent);
}
.planeta-page .ficha-datos dt {
  color: var(--planet-ink);
}
.planeta-page .mision-objetivo {
  background: var(--planet-card);
  border-color: color-mix(in srgb, var(--planet-accent, #FF7515) 25%, transparent);
}
.planeta-page .info-section blockquote {
  color: var(--planet-ink);
  border-left: 1px solid color-mix(in srgb, var(--planet-accent, #FF7515) 30%, transparent);
  padding-left: 12px;
}
.planeta-page .btn-explorar {
  background: var(--planet-ink);
  color: #07080e;
}
.planeta-page .btn-explorar:hover {
  box-shadow: 0 8px 28px color-mix(in srgb, var(--planet-accent, #FF7515) 45%, transparent);
}

/* ---- Pasaporte galáctico ---- */
.pasaporte-layout {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 20px 48px;
}
.pasaporte-counter { color: #8892a4; margin: 8px 0 20px; }
.pasaporte-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.pp-stamp {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #10131c;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px;
  color: #8892a4;
}
.pp-stamp-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #181d2a;
  flex: none;
}
.pp-stamp--visited { color: #e8eaf0; }
.pp-stamp--visited .pp-stamp-dot { background: var(--stamp-color, #FF7515); }
.pasaporte-logro {
  margin-top: 28px;
  text-align: center;
  background: #181d2a;
  border: 1px solid #FF7515;
  border-radius: 14px;
  padding: 28px 20px;
}
.pasaporte-logro-badge {
  font-size: 44px;
  color: #FF7515;
  animation: logro-pulse 1.6s ease-in-out infinite;
}
@keyframes logro-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .pasaporte-logro-badge { animation: none; }
}

/* ── Estrella fugaz: el lavado hacia la carta ──
   De oro tenue a blanco, como si entraras en la estrella. Los planetas usan
   hyperspace() (canvas); esto es CSS puro porque no dibuja nada, solo tiñe.
   1200ms contra los 1300 de hyperspace: hermanos, no gemelos. */
.estrella-wash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  animation: estrella-wash 1200ms linear forwards;
}

@keyframes estrella-wash {
  0%   { background-color: rgba(255, 215, 0, 0); }
  58%  { background-color: rgba(255, 215, 0, 0.55); }
  100% { background-color: #fff; }
}

/* El aviso de la estrella: superficie del sistema, borde de luz emitida.
   #FFD700 es starlight gold, permitido aqui (es la luz de la estrella). */
.estrella-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: #181d2a;
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: #e8eaf0;
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  animation: toast-entra 300ms ease-out;
}
.estrella-toast:hover {
  border-color: rgba(255, 215, 0, 0.85);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.25);
}
@keyframes toast-entra {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .estrella-toast { animation: none; }
}

/* Este override vive DESPUÉS de la regla base .estrella-wash a propósito: con
   especificidad empatada, gana la última en orden de aparición — puesto antes
   (como en el bloque reduced-motion compartido de arriba), el shorthand
   `animation` de la regla base resetea animation-duration a 1200ms y el
   override sería código muerto. */
@media (prefers-reduced-motion: reduce) {
  /* Corto, no ausente: la carta no puede depender de tener animaciones. */
  .estrella-wash { animation-duration: 150ms; }
}
