/* ═══════════════════════════════════════════════════════════════════════════
   Bóveda · Registro Estelar
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #04050d;
  --ink: #eef0ff;
  --mut: #a5adcf;
  --dim: #6f7699;
  --line: rgba(180, 195, 255, .14);
  --line2: rgba(180, 195, 255, .26);
  --panel: rgba(11, 14, 31, .78);
  --gold: #f3dcab;
  --gold2: #d6b06a;
  --ok: #8fe3b4;
  --warn: #ffcf86;
  --star: 255, 236, 200;
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r: 20px;
  --nav: 68px;
  --tab: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  color: var(--ink); font: 400 16px/1.5 var(--sans); font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: rgba(243, 220, 171, .35); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ── Cielo de fondo ───────────────────────────────────────────────────────── */
#sky-bg, #sky-stars, #sky-ov {
  position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; display: block;
}
#sky-bg { z-index: 0; background: var(--bg); }
#sky-stars { z-index: 1; }
#sky-ov { z-index: 2; pointer-events: none; }
body[data-view="sky"] #sky-ov { pointer-events: auto; touch-action: none; cursor: grab; }
body[data-view="sky"] #sky-ov:active { cursor: grabbing; }
body[data-view="sky"] { overflow: hidden; }

body::before {
  content: ''; position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(120% 95% at 50% 35%, transparent 50%, rgba(2, 3, 10, .6));
}
.veil {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(4, 5, 13, .9), rgba(4, 5, 13, .97));
  transition: opacity .3s linear;
}

/* ── Vistas ───────────────────────────────────────────────────────────────── */
.view { display: none; position: relative; z-index: 10; transition: opacity .9s; }
body[data-view="star"] #view-star,
body[data-view="catalog"] #view-catalog { display: block; animation: viewIn .8s var(--ease) backwards; }
body[data-view="sky"] #view-sky { display: block; position: fixed; inset: 0; pointer-events: none; animation: viewIn .8s var(--ease) backwards; }
body.intro-on .view, body.booting .view { animation: none !important; opacity: 0; pointer-events: none; }
body.intro-on .nav, body.intro-on .tabbar, body.booting .nav, body.booting .tabbar { opacity: 0; pointer-events: none; }
@keyframes viewIn { from { opacity: 0; } }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.wrap.narrow { width: min(720px, 100% - 40px); }
.block { padding: clamp(64px, 11vh, 120px) 0; }
h2 { font: 400 clamp(34px, 5.2vw, 56px)/1.04 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.eyebrow { font: 600 11px/1.2 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold2); margin-bottom: 16px; }
.lead { font-size: clamp(16px, 1.8vw, 18px); line-height: 1.6; color: var(--mut); max-width: 640px; margin-top: 16px; }

.rv { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease) var(--d, 0ms), transform 1s var(--ease) var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }

/* ── Botones y piezas pequeñas ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); color: var(--ink);
  font: 600 14px/1 var(--sans); letter-spacing: .01em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
}
.btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(205, 215, 255, .45); transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 12.5px; }
.btn-gold { background: linear-gradient(180deg, #f7e6bd, #d9b672); color: #1a1405; border-color: transparent; box-shadow: 0 10px 34px -10px rgba(240, 200, 120, .6); }
.btn-gold:hover { background: linear-gradient(180deg, #fcefd1, #e3c486); border-color: transparent; }
.btn.locked { color: var(--dim); border-style: dashed; background: transparent; cursor: not-allowed; }
.btn.locked:hover { transform: none; background: transparent; border-color: var(--line2); color: var(--mut); }

.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .06); font-size: 20px; line-height: 1; cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, .14); }

.chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line2); background: rgba(9, 12, 28, .6); color: var(--ink);
  font: 500 13px/1.35 var(--sans); text-align: left;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ok); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(143, 227, 180, .65); } 100% { box-shadow: 0 0 0 9px rgba(143, 227, 180, 0); } }

.dot {
  --s: 12px; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  background: radial-gradient(circle, #fff 0, rgb(var(--c)) 45%, rgba(var(--c), 0) 72%);
  box-shadow: 0 0 calc(var(--s) * .9) calc(var(--s) * .2) rgba(var(--c), .5);
}
.tag {
  font: 600 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px;
  color: #a5e6c4; background: rgba(143, 227, 180, .09); border: 1px solid rgba(143, 227, 180, .25);
}
.tag.gold { color: var(--gold); background: rgba(243, 220, 171, .1); border-color: rgba(243, 220, 171, .42); }
dt { font: 600 9.5px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.mono { font-family: var(--mono) !important; }

/* ── Navegación ───────────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 4vw, 40px); border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, opacity .9s;
}
.nav.solid { background: rgba(5, 6, 16, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand svg { width: 28px; height: 28px; color: var(--gold); flex: none; }
.brand b { font: 500 24px/1 var(--serif); letter-spacing: .04em; }
.brand small { font: 600 9.5px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--mut); padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line2); white-space: nowrap; }
.nav-links { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(9, 12, 28, .55); border: 1px solid var(--line); }
.nav-links a { padding: 9px 16px; border-radius: 999px; color: var(--mut); text-decoration: none; font: 600 13px/1 var(--sans); transition: color .25s, background .25s; white-space: nowrap; }
.nav-links a:hover { color: #fff; }
.nav-links a.on { background: rgba(255, 255, 255, .11); color: #fff; }
.tabbar { display: none; }

/* ── Portada ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: calc(var(--nav) + clamp(18px, 6vh, 70px)) 20px 96px;
}
.orb { --c: var(--star); position: relative; flex: none; width: clamp(110px, 20vh, 180px); aspect-ratio: 1; margin-bottom: clamp(4px, 1.6vh, 18px); pointer-events: none; }
.orb i { position: absolute; left: 50%; top: 50%; display: block; }
.orb .halo {
  width: 330%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(var(--c), .36) 0, rgba(var(--c), .14) 17%, rgba(var(--c), .045) 36%, transparent 60%);
  animation: breathe 7s ease-in-out infinite;
}
.orb .core {
  width: 8%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: #fff;
  box-shadow: 0 0 10px 3px #fff, 0 0 30px 11px rgba(var(--c), .95), 0 0 84px 30px rgba(var(--c), .5);
}
.orb .spike {
  height: 1.5px; width: 230%; opacity: .85; transform: translate(-50%, -50%) rotate(var(--a));
  background: linear-gradient(90deg, transparent 8%, rgba(var(--c), .7) 45%, #fff 50%, rgba(var(--c), .7) 55%, transparent 92%);
  animation: spike 5.5s ease-in-out infinite;
}
.orb .s1 { --a: 0deg; } .orb .s2 { --a: 90deg; animation-delay: -2.7s; }
.orb .s3 { --a: 45deg; width: 100%; opacity: .45; } .orb .s4 { --a: 135deg; width: 100%; opacity: .45; animation-delay: -1.4s; }
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.13); opacity: .8; } }
@keyframes spike { 50% { transform: translate(-50%, -50%) rotate(var(--a)) scaleX(1.14); } }

.star-name {
  font: italic 300 clamp(58px, 13vw, 136px)/.94 var(--serif); letter-spacing: -.015em; text-wrap: balance;
  padding: 0 .1em .1em; margin-bottom: .08em;
  background: linear-gradient(180deg, #fff 28%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Oscurece un poco el cielo detrás del texto para que siempre se lea bien. */
.hero::before {
  content: ''; position: absolute; left: 50%; top: 58%; width: min(900px, 150%); height: 62%; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(4, 5, 13, .72), rgba(4, 5, 13, .5) 55%, transparent);
}
.hero > :not(.scroll-cue) { position: relative; z-index: 1; }
.hero-sub { font-size: clamp(16px, 2.2vw, 19px); color: #c3c9e6; max-width: 520px; text-shadow: 0 1px 12px var(--bg); }
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-desig { font: 400 12px/1.6 var(--mono); letter-spacing: .06em; color: #8990b4; margin-top: 10px; text-shadow: 0 1px 10px var(--bg); }
.hero .chip { margin-top: 26px; max-width: 100%; }
.live.down .pulse { background: var(--warn); animation: none; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; width: 30px; height: 48px; transform: translateX(-50%); background: none; border: 0; cursor: pointer; }
.scroll-cue span { position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: linear-gradient(180deg, transparent, var(--gold)); animation: cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 40% { opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ── Dedicatoria y canción ────────────────────────────────────────────────── */
.letter p { font: 400 clamp(22px, 3.2vw, 31px)/1.48 var(--serif); color: #eceeff; margin-bottom: .85em; text-wrap: pretty; }
.letter p:first-child::first-letter { float: left; font: italic 400 3.3em/.8 var(--serif); padding: .1em .1em 0 0; color: var(--gold); }
.sign { font: italic 400 clamp(26px, 3.6vw, 34px)/1.2 var(--serif); color: var(--gold); text-align: right; margin-top: 26px; }
.meta { font: 400 12px var(--mono); letter-spacing: .08em; color: var(--dim); text-align: right; margin-top: 8px; text-transform: uppercase; }
#cancion h2 { font-style: italic; font-weight: 300; }
.spotify { margin-top: 30px; padding: 10px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 90px -30px rgba(var(--star), .28); }
.spotify iframe { display: block; width: 100%; border: 0; border-radius: 14px; }

/* ── ¿Dónde está ahora? ───────────────────────────────────────────────────── */
.where { display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); gap: clamp(18px, 4vw, 44px); align-items: center; margin-top: 38px; }
.dome-card { padding: 22px 22px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
#dome { width: 100%; height: auto; display: block; overflow: visible; }
.cap { font-size: 12.5px; line-height: 1.5; color: var(--dim); margin-top: 12px; text-align: center; }
.d-edge { stroke: rgba(243, 220, 171, .55); stroke-width: 1.2; }
.d-ring { fill: none; stroke: rgba(180, 195, 255, .17); stroke-width: .8; }
.d-card { fill: var(--gold); font: 600 12px var(--sans); text-anchor: middle; }
.d-lbl { fill: var(--dim); font: 500 7px var(--mono); }
.d-path { fill: none; stroke: rgba(243, 220, 171, .65); stroke-width: 1.3; stroke-dasharray: 1.5 4.5; stroke-linecap: round; }
.d-star { fill: #fff; filter: drop-shadow(0 0 5px rgb(var(--star))); }
.d-glow { fill: rgba(var(--star), .3); transform-box: fill-box; transform-origin: center; animation: domePulse 2.6s ease-in-out infinite; }
#dome-star.below .d-star { fill: none; stroke: var(--mut); stroke-width: 1.2; filter: none; }
#dome-star.below .d-glow { display: none; }
@keyframes domePulse { 50% { transform: scale(1.5); opacity: .35; } }

.stat-row { display: grid; gap: 12px; margin-bottom: 12px; }
.stat-row.two { grid-template-columns: 1fr 1fr; }
.stat-row.three { grid-template-columns: repeat(3, 1fr); }
.stat { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.stat .k { font: 600 10.5px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--mut); }
.stat .v { font: 400 clamp(34px, 5vw, 50px)/1 var(--serif); color: #fff; font-variant-numeric: tabular-nums; }
.stat.sm .v { font: 500 clamp(15px, 2.1vw, 20px)/1.25 var(--mono); }
.stat .s { font-size: 13px; line-height: 1.4; color: var(--mut); }
.tonight { margin: 18px 0; padding: 16px 18px; border-left: 2px solid var(--gold2); border-radius: 0 12px 12px 0; background: linear-gradient(90deg, rgba(243, 220, 171, .09), transparent); color: #dfe3ff; line-height: 1.55; }
.tonight b { color: var(--gold); font-weight: 600; }
.loc-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13.5px; color: var(--mut); }

/* ── Ficha astronómica ────────────────────────────────────────────────────── */
.light { font: 300 clamp(26px, 4.3vw, 46px)/1.22 var(--serif); max-width: 920px; margin: 28px 0 44px; color: #e3e7ff; text-wrap: balance; }
.light b { font-weight: 500; color: var(--gold); }
.light em { color: #fff; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); }
.fact { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 26px 24px; background: #090b1b; }
.fact .k { font: 600 10.5px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold2); }
.fact .v { font: 400 clamp(24px, 2.8vw, 32px)/1.12 var(--serif); overflow-wrap: anywhere; }
.fact .v.mono { font: 500 clamp(15px, 1.7vw, 18px)/1.5 var(--mono); }
.fact .s { font-size: 13px; line-height: 1.45; color: var(--mut); overflow-wrap: anywhere; }
.swatch { display: inline-block; width: .56em; height: .56em; border-radius: 50%; margin-right: .42em; vertical-align: .1em; background: rgb(var(--star)); box-shadow: 0 0 14px rgb(var(--star)); }

/* ── Recuerdos ────────────────────────────────────────────────────────────── */
.mems { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 38px; }
.mem { position: relative; overflow: hidden; padding: 30px 26px 28px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.mem::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(243, 220, 171, .6), transparent); }
.mem-n { position: absolute; right: 18px; top: 8px; font: italic 300 66px/1 var(--serif); color: rgba(243, 220, 171, .24); }
.mem h3 { font: 500 27px/1.12 var(--serif); max-width: 80%; margin-bottom: 8px; }
.mem-date { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold2); margin-bottom: 12px; }
.mem p:last-child { color: #cfd4f2; line-height: 1.62; }

/* ── Certificado ──────────────────────────────────────────────────────────── */
.cert { max-width: 900px; margin: 38px auto 0; padding: 12px; border-radius: 8px; color: #2b2214; background: radial-gradient(130% 100% at 50% 0, #fcf7ea, #f2e6cb 60%, #e7d7b1); box-shadow: 0 50px 120px -30px #000, 0 0 90px -30px rgba(243, 220, 171, .35); }
.cert-in { position: relative; text-align: center; font-family: var(--serif); border: 1px solid #b6975a; outline: 1px solid rgba(182, 151, 90, .45); outline-offset: -7px; padding: clamp(30px, 5vw, 58px) clamp(18px, 5vw, 64px) clamp(26px, 4vw, 44px); }
.cert-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font: 600 10.5px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: #8a6c33; }
.cert-brand svg { width: 26px; height: 26px; flex: none; }
.cert-kicker { font: 500 clamp(21px, 3.3vw, 33px)/1.1 var(--serif); letter-spacing: .15em; text-transform: uppercase; color: #3a2d16; margin: 20px 0 22px; }
.cert-line { font: 400 clamp(16px, 2vw, 19px)/1.5 var(--serif); color: #5b4a2c; }
.cert-desig { font: 500 clamp(12.5px, 1.6vw, 15px)/1.5 var(--mono); letter-spacing: .05em; margin: 8px 0; }
.cert-name { font: italic 400 clamp(46px, 9vw, 94px)/1 var(--serif); color: #1d160a; margin: 16px 0; }
.cert-data { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0 24px; padding: 16px 0; border-block: 1px solid rgba(182, 151, 90, .6); }
.cert-data dt { color: #8a6c33; margin-bottom: 6px; }
.cert-data dd { font: 500 clamp(11.5px, 1.45vw, 14.5px)/1.3 var(--mono); }
.cert-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cert-foot > div:not(.cert-seal) { flex: 1; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.cert-foot > div:last-child { text-align: right; }
.cert-foot span { font: 600 9.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #8a6c33; }
.cert-foot b { font: 500 clamp(14px, 1.9vw, 18px)/1.2 var(--serif); }
.cert-seal { width: 70px; flex: none; color: #a8843f; }
.cert-seal svg { display: block; }
.cert-qr { position: absolute; right: 24px; top: 24px; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 5px; font: 600 7.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #8a6c33; }
.cert-qr svg { width: 100%; height: auto; display: block; }
.cert-qr rect { fill: transparent; }
.cert-qr path { fill: #2b2214; }
.cert-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }

.foot { padding: 46px 0 60px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.6; color: var(--dim); text-align: center; }
.foot-brand { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin-bottom: 10px; }
.foot-brand b { font: 500 20px var(--serif); letter-spacing: .04em; text-transform: none; color: var(--ink); }
.foot p { max-width: 620px; margin-inline: auto; }

/* ── Cielo en vivo ────────────────────────────────────────────────────────── */
.hud-top { position: absolute; left: 0; right: 0; top: calc(var(--nav) + 8px); display: flex; justify-content: center; padding: 0 12px; }
.hud-chip { pointer-events: auto; display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 999px; font-size: 13px; color: #d5daf5; background: rgba(8, 10, 24, .74); border: 1px solid var(--line); }
.hud-chip b { color: #fff; font: 500 13px var(--mono); }
.hud-pick {
  pointer-events: auto; position: absolute; left: 50%; top: calc(var(--nav) + 58px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 24px);
  padding: 10px 10px 10px 16px; border-radius: 18px; background: rgba(8, 10, 24, .9); border: 1px solid var(--line2);
  box-shadow: 0 20px 60px -20px #000; animation: viewIn .4s;
}
.hud-pick.mine { border-color: rgba(243, 220, 171, .55); }
.hud-pick.mine strong { color: var(--gold); font-style: italic; }
.hud-pick-txt { display: flex; flex-direction: column; min-width: 0; }
.hud-pick-txt strong { font: 500 21px/1.15 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-pick-txt span { font-size: 12px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-bottom { position: absolute; left: 0; right: 0; bottom: calc(var(--tab) + 14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 10px; }
.hud-bottom > * { pointer-events: auto; }
.hud-bar, .hud-time { display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 999px; background: rgba(8, 10, 24, .82); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hud-bar { flex-wrap: wrap; justify-content: center; max-width: 100%; }
.hud-time { padding-right: 16px; font: 500 12px var(--mono); color: var(--mut); }
.hud-time.off { display: none; }
.hud-time input { width: min(44vw, 260px); accent-color: var(--gold2); }
.hud-time span { min-width: 82px; text-align: right; }
.hb { height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid transparent; background: rgba(255, 255, 255, .07); font: 600 13px/1 var(--sans); white-space: nowrap; cursor: pointer; transition: background .2s, border-color .2s; }
.hb:hover { background: rgba(255, 255, 255, .14); }
.hb.toggle.on { background: rgba(159, 185, 255, .2); border-color: rgba(159, 185, 255, .5); }
.hb.gold { background: linear-gradient(180deg, #f7e6bd, #d9b672); color: #1a1405; }
.seg { display: flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .07); }
.seg button { height: 32px; padding: 0 13px; border: 0; border-radius: 999px; background: none; color: var(--mut); font: 600 13px/1 var(--sans); cursor: pointer; }
.seg button.on { background: #fff; color: #0a0c1a; }
.zoom { display: flex; gap: 4px; }
.zoom .hb { width: 38px; padding: 0; font-size: 19px; }
.hud-hint { pointer-events: none !important; font-size: 12px; color: var(--dim); text-align: center; text-shadow: 0 1px 8px #000; }

/* ── Catálogo ─────────────────────────────────────────────────────────────── */
#view-catalog { padding: calc(var(--nav) + clamp(28px, 6vh, 64px)) 0 110px; }
.cat-head h1 { font: 300 clamp(40px, 7.2vw, 86px)/1 var(--serif); letter-spacing: -.01em; }
.cat-head h1 span { font-style: italic; color: var(--gold); }
.notice { display: flex; align-items: center; gap: 14px; margin: 30px 0; padding: 16px 20px; border-radius: 16px; color: #ffe3b3; border: 1px dashed rgba(255, 207, 134, .5); background: linear-gradient(90deg, rgba(255, 207, 134, .11), rgba(255, 207, 134, .03)); }
.notice svg { width: 24px; height: 24px; flex: none; }
.notice strong { display: block; font-size: 15px; font-weight: 700; }
.notice span { font-size: 13.5px; color: #d9c59f; }
.owned .eyebrow { margin-bottom: 12px; }
.owned-card { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 18px; color: var(--ink); text-decoration: none; border: 1px solid rgba(243, 220, 171, .42); background: linear-gradient(100deg, rgba(243, 220, 171, .15), rgba(243, 220, 171, .03) 60%); transition: transform .3s var(--ease), border-color .3s; }
.owned-card:hover { transform: translateY(-2px); border-color: rgba(243, 220, 171, .8); }
.owned-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.owned-txt strong { font: italic 500 30px/1 var(--serif); color: var(--gold); }
.owned-txt span { font-size: 13px; color: var(--mut); }
.owned-go { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--sans); color: var(--gold); white-space: nowrap; }
.owned-go svg { width: 16px; height: 16px; }

.toolbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 36px 0 12px; }
.toolbar .search { grid-column: 1 / -1; }
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 14px; background: rgba(11, 14, 31, .92); border: 1px solid var(--line2); transition: border-color .2s; }
.search:focus-within { border-color: var(--gold2); }
.search svg { width: 18px; height: 18px; flex: none; color: var(--mut); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--ink); font: 500 15px var(--sans); }
.search input::placeholder { color: var(--dim); }
select {
  width: 100%; min-width: 0; height: 48px; padding: 0 38px 0 14px; border-radius: 14px; appearance: none; -webkit-appearance: none; cursor: pointer;
  color: var(--ink); font: 500 14px var(--sans); border: 1px solid var(--line2); text-overflow: ellipsis;
  background: rgba(11, 14, 31, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23a5adcf' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center / 11px;
}
select option { background: #0b0e20; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips .chip { cursor: pointer; font-size: 12.5px; color: var(--mut); transition: color .2s, border-color .2s, background .2s; }
.chips .chip:hover { color: #fff; }
.chips .chip.on { color: #fff; border-color: rgba(159, 185, 255, .6); background: rgba(159, 185, 255, .17); }
.chips .chip i:not(.pulse) { width: 9px; height: 9px; border-radius: 50%; background: rgb(var(--c)); box-shadow: 0 0 8px rgb(var(--c)); }
.chips-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line2); }
.count { margin: 24px 0 14px; font-size: 14px; color: var(--mut); }
.count b { color: #fff; }
.loading { color: var(--gold2); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; min-width: 0; padding: 18px; border-radius: 18px; cursor: pointer; background: rgba(10, 13, 29, .9); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s, background .3s; animation: viewIn .5s backwards; }
.card:hover { transform: translateY(-3px); border-color: rgba(190, 205, 255, .42); background: rgba(16, 20, 42, .96); }
.card-top { display: flex; align-items: center; justify-content: space-between; height: 32px; padding-left: 4px; }
.card h3 { font: 500 25px/1.15 var(--serif); margin-top: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { font-size: 12.5px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; padding-top: 13px; border-top: 1px solid var(--line); }
.card dd { margin-top: 4px; font: 500 13.5px var(--mono); color: #e4e8ff; }
.card .btn { width: 100%; margin-top: auto; }
.card.mine { border-color: rgba(243, 220, 171, .5); background: linear-gradient(160deg, rgba(243, 220, 171, .15), rgba(10, 13, 29, .92) 55%); }
.card.mine h3 { font-style: italic; color: var(--gold); }
.more { height: 1px; }

/* ── Ficha de estrella ────────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(2, 3, 10, .62); opacity: 0; pointer-events: none; transition: opacity .4s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 80; top: 0; right: 0; bottom: 0; width: min(440px, 100%); padding: 26px 26px 40px; overflow-y: auto; overscroll-behavior: contain; background: #090b1b; border-left: 1px solid var(--line2); transform: translateX(104%); transition: transform .5s var(--ease); visibility: hidden; }
.sheet.open { transform: none; visibility: visible; }
.sheet-x { position: absolute; right: 16px; top: 16px; z-index: 2; }
.sheet-head { position: relative; overflow: hidden; text-align: center; margin: -26px -26px 0; padding: 30px 26px 6px; }
.orb.sm { width: 72px; margin: 22px auto 30px; }
.sheet h2 { font: italic 400 clamp(36px, 9vw, 46px)/1 var(--serif); margin: 14px 0 10px; overflow-wrap: anywhere; }
.desig { font: 500 12px/1.6 var(--mono); letter-spacing: .04em; color: var(--mut); }
.sheet-live { display: flex; align-items: center; gap: 10px; margin: 22px 0 8px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; color: #d9defa; background: rgba(255, 255, 255, .045); border: 1px solid var(--line); }
.sheet-stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.sheet-stats dt { flex: none; }
.sheet-stats dd { text-align: right; font: 500 14px/1.35 var(--sans); }
.sheet-actions { display: grid; gap: 10px; margin-top: 24px; }
.sheet-note { text-align: center; font-size: 12.5px; color: var(--warn); margin-top: 12px; }

/* ── Revelación ───────────────────────────────────────────────────────────── */
.intro { position: fixed; inset: 0; z-index: 90; text-align: center; transition: opacity .9s; }
.intro.out { opacity: 0; pointer-events: none; }
.intro::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.4s; background: radial-gradient(90% 70% at 50% 50%, rgba(4, 5, 13, .3), rgba(4, 5, 13, .82)); }
.intro.gate::before { opacity: 1; }
.intro-skip { position: absolute; z-index: 2; right: 16px; top: calc(14px + env(safe-area-inset-top)); padding: 12px; background: none; border: 0; color: var(--mut); font: 600 11px var(--sans); letter-spacing: .22em; text-transform: uppercase; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .6s, color .2s; }
.intro-skip:hover { color: #fff; }
.intro.story .intro-skip, .intro.reveal .intro-skip { opacity: .85; pointer-events: auto; }
.intro-gate { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .9s; }
.intro.gate .intro-gate { opacity: 1; pointer-events: auto; }
.intro-gate svg { width: 54px; color: var(--gold); margin-bottom: 26px; animation: fadeUp 1.2s var(--ease) both; }
.intro-gate .eyebrow { animation: fadeUp 1.2s .15s var(--ease) both; }
.intro-gate h1 { font: italic 300 clamp(50px, 11vw, 108px)/1 var(--serif); margin-bottom: 18px; text-wrap: balance; animation: fadeUp 1.4s .3s var(--ease) both; }
.intro-gate-sub { font-size: 17px; color: var(--mut); margin-bottom: 36px; animation: fadeUp 1.2s .6s var(--ease) both; }
.intro-gate .btn { animation: fadeUp 1.2s .9s var(--ease) backwards; }
.intro-line { position: absolute; left: 50%; top: 50%; width: min(86vw, 780px); transform: translate(-50%, -38%); font: 300 clamp(28px, 5.2vw, 52px)/1.2 var(--serif); text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, .95); opacity: 0; filter: blur(10px); pointer-events: none; transition: opacity 1s, filter 1s, transform 1.6s var(--ease); }
.intro-line.show { opacity: 1; filter: none; transform: translate(-50%, -50%); }
.intro-reveal { position: absolute; left: 0; right: 0; top: 46%; padding: 0 20px; display: flex; flex-direction: column; align-items: center; opacity: 0; pointer-events: none; }
.intro.reveal .intro-reveal { opacity: 1; pointer-events: auto; }
#i-name { background: none; color: #fbeed0; text-shadow: 0 0 46px rgba(243, 220, 171, .5); }
#i-name .w { display: inline-block; white-space: nowrap; }
#i-name .w span { display: inline-block; opacity: 0; }
.intro.reveal .intro-reveal .eyebrow { animation: fadeUp 1s .2s var(--ease) both; }
.intro.reveal #i-name .w span { animation: letter 1.2s calc(.7s + var(--n) * 75ms) var(--ease) both; }
.intro.reveal #i-desig { animation: fadeUp 1s 1.9s var(--ease) both; }
.intro.reveal #i-enter { margin-top: 28px; animation: fadeUp 1s 2.5s var(--ease) backwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } }
@keyframes letter { from { opacity: 0; transform: translateY(.35em); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

/* ── Avisos ───────────────────────────────────────────────────────────────── */
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(var(--tab) + 22px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(92vw, 470px); padding: 14px 18px; border-radius: 16px; background: #13162c; border: 1px solid rgba(255, 207, 134, .5); box-shadow: 0 20px 60px -10px #000; opacity: 0; pointer-events: none; transform: translate(-50%, 30px); transition: transform .5s var(--ease), opacity .4s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 22px; height: 22px; flex: none; color: var(--warn); }
.toast strong { display: block; font-size: 14px; }
.toast span { display: block; font-size: 12.5px; line-height: 1.4; color: var(--mut); }
.fatal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--mut); }

/* ── Por qué esta estrella ────────────────────────────────────────────────── */
.cycle { display: flex; align-items: center; gap: clamp(16px, 3vw, 30px); margin: 34px 0 18px; padding: clamp(22px, 3.4vw, 34px) clamp(22px, 4vw, 40px); border-radius: var(--r); border: 1px solid rgba(243, 220, 171, .34); background: linear-gradient(100deg, rgba(243, 220, 171, .13), rgba(var(--star), .07) 55%, transparent); }
.cycle-n { font: 300 clamp(64px, 11vw, 124px)/.9 var(--serif); font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff 25%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .04em; }
.cycle-t { font: 400 clamp(19px, 2.4vw, 26px)/1.3 var(--serif); color: #dfe3ff; max-width: 420px; }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reason { position: relative; overflow: hidden; padding: 30px 28px 28px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.reason-n { position: absolute; right: 22px; top: 14px; font: italic 300 46px/1 var(--serif); color: rgba(243, 220, 171, .3); }
.reason h3 { font: italic 400 clamp(28px, 3.4vw, 36px)/1.1 var(--serif); color: var(--gold); margin-bottom: 12px; max-width: 82%; }
.reason p { color: #cfd4f2; line-height: 1.65; }

/* ── Registros del catálogo ───────────────────────────────────────────────── */
.tag.taken { color: #c9b8ff; background: rgba(170, 140, 255, .12); border-color: rgba(170, 140, 255, .35); }
.tag.hist { color: var(--mut); background: rgba(255, 255, 255, .05); border-color: var(--line2); }
.card.taken h3 { font-style: italic; }
.card-note { margin-top: auto; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--dim); border-top: 1px dashed var(--line); }
.sheet-note.soft { color: var(--mut); }
.recent-title { margin-top: 26px; }
.recent { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: rgba(10, 13, 29, .7); overflow: hidden; }
.recent li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; cursor: pointer; border-top: 1px solid var(--line); font-size: 13px; color: var(--mut); transition: background .2s; }
.recent li:first-child { border-top: 0; }
.recent li:hover { background: rgba(255, 255, 255, .05); }
.recent strong { font: italic 500 20px/1.1 var(--serif); color: var(--ink); white-space: nowrap; }
.recent span:not(.dot) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent time { font: 500 11.5px var(--mono); color: var(--dim); white-space: nowrap; }

/* ── Certificado virtual ──────────────────────────────────────────────────── */
body.modal-open { overflow: hidden; }
.studio { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 16px; background: rgba(2, 3, 10, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.studio.open { opacity: 1; visibility: visible; }
.studio-box { width: min(980px, 100%); max-height: 100%; display: flex; flex-direction: column; background: #0a0c1d; border: 1px solid var(--line2); border-radius: 24px; box-shadow: 0 40px 120px -20px #000; transform: translateY(18px); transition: transform .45s var(--ease); overflow: hidden; }
.studio.open .studio-box { transform: none; }
.studio-box header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.studio-box header .eyebrow { margin-bottom: 6px; }
.studio-box h3 { font: 400 30px/1 var(--serif); }
.studio-body { display: grid; grid-template-columns: minmax(0, 1fr) 290px; grid-auto-rows: max-content; gap: 24px; padding: 24px; overflow-y: auto; }
.studio-preview { display: grid; place-items: center; min-height: 280px; padding: 18px; border-radius: 16px; background: repeating-conic-gradient(rgba(255, 255, 255, .025) 0 25%, transparent 0 50%) 0 0 / 22px 22px, #06070f; }
#st-canvas { display: block; border-radius: 8px; box-shadow: 0 20px 60px -10px #000; }
#st-canvas[data-format="v"] { height: min(62vh, 640px); width: auto; }
#st-canvas[data-format="h"] { width: 100%; height: auto; }
.studio-opts { display: flex; flex-direction: column; gap: 14px; }
.opt { display: flex; flex-direction: column; gap: 8px; }
.opt > span { font: 600 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--mut); }
.opt .seg { align-self: flex-start; }
.opt small { font: 500 11.5px var(--mono); color: var(--dim); }
.studio-opts .btn { width: 100%; }
.studio-note { font-size: 12.5px; line-height: 1.55; color: var(--dim); }

/* ── Pantallas chicas ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .where { grid-template-columns: 1fr; }
  .studio-body { grid-template-columns: 1fr; }
  #st-canvas[data-format="v"] { height: min(46vh, 440px); }
  .dome-card { max-width: 420px; width: 100%; margin-inline: auto; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:last-child { grid-column: 1 / -1; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .reasons { grid-template-columns: 1fr; }
  .nav-buy { display: none; }
}
@media (max-width: 760px) {
  :root { --nav: 58px; --tab: 62px; }
  body { padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom)); }
  .nav-links { display: none; }
  .brand b { font-size: 22px; }
  .tabbar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); height: calc(var(--tab) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(6, 8, 20, .93); border-top: 1px solid var(--line); transition: opacity .9s; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--dim); text-decoration: none; font: 600 10.5px/1 var(--sans); letter-spacing: .03em; }
  .tabbar a.on { color: var(--gold); }
  .tabbar svg { width: 22px; height: 22px; }
  .hero { padding-bottom: 84px; }
  .scroll-cue { bottom: 14px; height: 38px; }
  .zoom, .hud-hint { display: none; }
  .hud-bar { border-radius: 24px; gap: 6px; }
  .hb { height: 36px; padding: 0 12px; font-size: 12.5px; }
  .seg button { height: 30px; padding: 0 11px; font-size: 12.5px; }
  .hud-chip { font-size: 12px; padding: 8px 13px; }
  .sheet { top: auto; left: 0; width: 100%; max-height: 88vh; max-height: 88svh; border-left: 0; border-top: 1px solid var(--line2); border-radius: 24px 24px 0 0; transform: translateY(104%); }
}
@media (max-width: 560px) {
  .stat-row.three { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat { padding: 14px; }
  .stat.sm .v { font-size: 14px; }
  .facts { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 14px; }
  .card h3 { font-size: 21px; }
  .card dl { grid-template-columns: 1fr; gap: 10px; }
  .cycle { flex-direction: column; align-items: flex-start; gap: 10px; }
  .recent li { flex-wrap: wrap; gap: 4px 10px; }
  .recent span:not(.dot) { flex-basis: 100%; order: 3; padding-left: 21px; }
  .recent time { margin-left: auto; }
  .studio { padding: 0; align-items: end; }
  .studio-box { border-radius: 24px 24px 0 0; max-height: 94vh; max-height: 94svh; }
  .studio-body { padding: 16px; gap: 16px; }
  .owned-card { flex-wrap: wrap; padding: 16px; }
  .owned-go { width: 100%; justify-content: flex-end; }
  .cert-data { grid-template-columns: 1fr 1fr; }
  .cert-qr { position: static; margin: 22px auto 0; }
  .cert-seal { width: 54px; }
  .brand small { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ── Impresión: solo el certificado ───────────────────────────────────────── */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  html, body { background: #fff; padding: 0; }
  body::before { display: none; }
  body > *:not(#view-star), #view-star > *:not(#certificado), #certificado .eyebrow, #certificado h2, .cert-actions { display: none !important; }
  #view-star { display: block !important; animation: none !important; opacity: 1 !important; }
  #certificado { padding: 0; }
  .wrap { width: 100%; }
  .cert { margin: 0; max-width: none; box-shadow: none; opacity: 1 !important; transform: none !important; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
