:root {
  --bg: #07020d;
  --violet: #a24dff;
  --violet-soft: rgba(162, 77, 255, 0.35);
  --gold: #e8c27a;
  --text: #efe6ff;
  --muted: #a99bbf;
  --panel: rgba(16, 6, 28, 0.86);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; overscroll-behavior: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }

/* Ingreso */
.overlay { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center;
  justify-content: center; background: radial-gradient(circle at 50% 42%, #22073d 0%, #0b0314 55%, #050109 100%);
  transition: opacity 0.9s ease; padding: 24px; text-align: center; }
.overlay.fade { opacity: 0; pointer-events: none; }
.portal { position: relative; width: min(62vw, 300px); aspect-ratio: 1; margin-bottom: 18px; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gold);
  box-shadow: 0 0 18px var(--violet-soft), inset 0 0 18px var(--violet-soft); }
.r1 { animation: spin 14s linear infinite; border-style: dashed; }
.r2 { inset: 12%; border-color: var(--violet); animation: spin 9s linear infinite reverse; }
.r3 { inset: 26%; border-width: 1px; animation: spin 6s linear infinite; border-style: dotted; }
.core-glow { position: absolute; inset: 38%; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #c98bff 30%, rgba(162, 77, 255, 0) 72%); animation: pulse 2.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.25); opacity: 0.75; } }
.kicker { letter-spacing: 0.35em; font-size: 11px; color: var(--muted); margin: 0; }
h1 { font-size: clamp(30px, 9vw, 52px); letter-spacing: 0.12em; margin: 6px 0 2px; font-weight: 300; }
.sub { color: var(--gold); letter-spacing: 0.2em; margin: 0 0 18px; font-size: 13px; text-transform: uppercase; }
.load { color: var(--muted); font-size: 12px; min-height: 16px; margin: 0 0 14px; }
.btn-main { display: inline-block; background: linear-gradient(180deg, #b36bff, #6a1fb8); color: #fff; border: 1px solid var(--gold);
  padding: 14px 34px; border-radius: 40px; font-size: 15px; letter-spacing: 0.2em; cursor: pointer; text-decoration: none;
  box-shadow: 0 0 24px var(--violet-soft); }
.btn-main:disabled { opacity: 0.4; cursor: default; }
.btn-link { background: none; border: none; color: var(--muted); margin-top: 14px; font-size: 13px; text-decoration: underline; cursor: pointer; }
.btn-link:disabled { opacity: 0.4; }
.sound-opt { display: block; margin-top: 14px; font-size: 13px; color: var(--muted); }

/* HUD */
#hud { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: linear-gradient(180deg, rgba(7, 2, 13, 0.85), rgba(7, 2, 13, 0)); }
.brand { font-size: 11px; letter-spacing: 0.25em; color: var(--muted); }
.place { flex: 1; text-align: center; font-size: 12px; letter-spacing: 0.22em; color: var(--gold); }
#hud nav { display: flex; gap: 8px; }
#hud nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold); background: var(--panel);
  color: var(--gold); cursor: pointer; display: grid; place-items: center; padding: 0; box-shadow: 0 0 12px var(--violet-soft); }
.hint { position: fixed; left: 50%; bottom: calc(168px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9;
  font-size: 12px; color: var(--muted); background: var(--panel); padding: 7px 14px; border-radius: 20px; white-space: nowrap; }
.fps { position: fixed; top: 60px; left: 10px; z-index: 11; font: 11px monospace; color: #9f9; background: rgba(0, 0, 0, 0.6); padding: 4px 6px; }

/* Ficha y ayuda */
.modal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(4, 1, 8, 0.6); backdrop-filter: blur(3px); }
.card-box { position: relative; width: min(100%, 460px); max-height: 88vh; overflow: auto; background: var(--panel);
  border: 1px solid var(--violet-soft); border-bottom: none; border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(22px + env(safe-area-inset-bottom)); text-align: center; animation: up 0.28s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.close { position: absolute; top: 8px; right: 12px; background: none; border: none; color: var(--text); font-size: 28px; cursor: pointer; }
#cardImg { width: 62%; max-width: 240px; aspect-ratio: 1; object-fit: cover; border-radius: 7.1%; box-shadow: 0 0 24px var(--violet-soft); }
.card-order { margin: 12px 0 0; font-size: 11px; letter-spacing: 0.3em; }
#cardName { margin: 4px 0 8px; font-weight: 400; letter-spacing: 0.08em; }
.card-story { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 0 0 12px; }
.traits { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.traits li { font-size: 11px; border: 1px solid var(--violet-soft); border-radius: 12px; padding: 4px 10px; color: var(--text); }
.help-list { text-align: left; color: var(--muted); line-height: 1.6; font-size: 14px; padding-left: 18px; }
.place { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.byline { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: 0.18em; color: var(--muted); text-decoration: none; text-transform: uppercase; }
.byline img { height: 18px; width: auto; opacity: 0.9; }
@media (max-width: 480px) { .brand { display: none; } .place { align-items: flex-start; text-align: left; } }

/* Marcas: The Collector System (logo pendiente, cae al texto) y Ramiro Albán */
.tcs-mark { display: flex; flex-direction: column; align-items: center; gap: 6px; letter-spacing: 0.35em; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.tcs-mark img { height: 44px; width: auto; }
.brand { display: inline-flex; align-items: center; gap: 6px; }
.brand img { height: 20px; width: auto; }
.intro-by { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 26px; color: var(--muted); text-decoration: none;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; }
.intro-by img { height: 54px; width: auto; opacity: 0.95; }

/* Íconos de línea dorada */
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#soundBtn .x { display: none; }
#soundBtn.muted .x { display: inline; }
#soundBtn.muted .w { display: none; }
#soundBtn.muted { color: var(--muted); border-color: var(--violet-soft); }

/* Dock: casa arriba y las cinco órdenes en una curva debajo, envolviéndola */
#dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: env(safe-area-inset-bottom); z-index: 10;
  width: min(100%, 420px); height: 240px; pointer-events: none; }
#dock::before { content: ""; position: absolute; inset: -30px -40px 0; background: radial-gradient(ellipse at 50% 100%, rgba(7, 2, 13, 0.92) 40%, rgba(7, 2, 13, 0) 72%); }
#dock button { pointer-events: auto; position: absolute; border-radius: 50%; cursor: pointer; padding: 0; }
#dock .home { left: 50%; bottom: 82px; width: 64px; height: 64px; transform: translateX(-50%); border: 1.5px solid var(--gold); background: var(--panel);
  color: var(--gold); display: grid; place-items: center; box-shadow: 0 0 20px var(--violet-soft), inset 0 0 12px rgba(232, 194, 122, 0.25); }
#dock .home .ico { width: 30px; height: 30px; }
#orders button { width: 58px; height: 58px; transform: translateX(-50%); border: 1.5px solid var(--c); background: var(--panel); color: var(--text);
  font-size: 9.5px; letter-spacing: 0.1em; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent); }
#orders button:nth-child(1) { left: 10%; bottom: 70px; }
#orders button:nth-child(2) { left: 29%; bottom: 30px; }
#orders button:nth-child(3) { left: 50%; bottom: 12px; }
#orders button:nth-child(4) { left: 71%; bottom: 30px; }
#orders button:nth-child(5) { left: 90%; bottom: 70px; }
#orders button.active { background: color-mix(in srgb, var(--c) 40%, #10061c); box-shadow: 0 0 22px var(--c); }

@media (max-width: 480px) { .brand { display: none; } }

.credits { font-size: 11px; color: var(--muted); line-height: 1.4; margin-top: 14px; }

/* Visor de estatua */
.statue-box { padding-top: 14px; }
#statueCanvas { display: block; width: 100%; height: min(52vh, 440px); touch-action: none; cursor: grab;
  background: radial-gradient(circle at 50% 55%, rgba(162, 77, 255, 0.28), rgba(7, 2, 13, 0) 65%); }
.statue-hint { margin: 4px 0 12px; font-size: 12px; color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; }
#statueEnter { font-size: 12px; padding: 12px 22px; }

/* Orbe del Origen (reemplaza la casita) con medidor de energía de 5 segmentos */
#dock .orb { width: 72px; height: 72px; bottom: 80px; background: none; border: none; box-shadow: none; overflow: visible; }
.orb-core { position: absolute; inset: 9px; border-radius: 50%; background: var(--orb, radial-gradient(circle at 35% 30%, #fff3c4, #c9a04f 45%, #5c2a90 100%)) center / cover;
  box-shadow: 0 0 18px rgba(176, 92, 255, 0.7), inset -6px -8px 14px rgba(20, 0, 40, 0.65), inset 4px 4px 10px rgba(255, 240, 200, 0.35); animation: orbspin 18s linear infinite; }
@keyframes orbspin { to { background-position: 200px 0; } }
#gauge { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(0deg); }
#gauge path { fill: none; stroke-width: 6; stroke-linecap: round; }
#gauge .track { stroke: rgba(169, 155, 191, 0.28); }
#gauge .track:has(+ .seg.unlocked) { stroke: rgba(232, 194, 122, 0.45); }
#gauge .seg { stroke: var(--gold); stroke-dasharray: 0 1; filter: drop-shadow(0 0 3px currentColor); }
.orb.orb-hit .orb-core { animation: orbspin 18s linear infinite, orbhit 0.6s ease; }
@keyframes orbhit { 40% { transform: scale(1.18); box-shadow: 0 0 34px #fff, 0 0 60px #b05cff; } }
.orb.charging .orb-core { box-shadow: 0 0 30px #ffd27a, 0 0 50px #b05cff; }
.ui-spark { position: fixed; z-index: 40; width: 18px; height: 18px; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fff 0%, var(--c) 45%, transparent 70%); box-shadow: 0 0 18px var(--c);
  transition: left 0.85s cubic-bezier(.5, 0, .3, 1), top 0.85s cubic-bezier(.6, -0.4, .4, 1), opacity 0.85s, transform 0.85s; }
.toast { position: fixed; left: 50%; top: calc(76px + env(safe-area-inset-top)); transform: translate(-50%, -10px); z-index: 25; max-width: min(92vw, 420px);
  text-align: center; font-size: 13px; line-height: 1.4; color: var(--text); background: var(--panel); border: 1px solid var(--gold);
  padding: 10px 16px; border-radius: 16px; opacity: 0; pointer-events: none; transition: opacity 0.35s, transform 0.35s; box-shadow: 0 0 18px var(--violet-soft); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.big { font-size: 16px; letter-spacing: 0.2em; color: var(--gold); }

/* Momento wow */
.wow { align-items: center; background: radial-gradient(circle at 50% 40%, rgba(255, 220, 160, 0.25), rgba(4, 1, 8, 0.85) 70%); }
.wow-box { border-radius: 22px; border: 1px solid var(--gold); box-shadow: 0 0 60px rgba(232, 194, 122, 0.35); animation: wowin 0.8s cubic-bezier(.2, .9, .2, 1); }
@keyframes wowin { from { transform: scale(0.85); opacity: 0; } }
.wow-media { width: 70%; max-width: 260px; max-height: 34vh; object-fit: cover; border-radius: 14px; border: 1px solid var(--gold); margin: 8px auto 0; display: block; }
.wow-media.hidden { display: none; }
.wow-quote { font-size: 16px; line-height: 1.45; margin: 14px 6px 6px; color: var(--text); font-style: italic; }
.wow-sign { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; margin: 0 0 14px; }
.wow-sign img { height: 30px; }
.wow-reward { display: flex; flex-direction: column; gap: 3px; border: 1px dashed var(--gold); border-radius: 14px; padding: 10px; margin: 0 0 14px; }
.wow-reward span { font-size: 10px; letter-spacing: 0.3em; color: var(--muted); text-transform: uppercase; }
.wow-reward strong { font-size: 20px; letter-spacing: 0.18em; color: var(--gold); }
.wow-reward small { color: var(--muted); font-size: 11px; }

/* Intro: The Awakening Portal (portal ovalado dorado, rayos, grilla en perspectiva y motas de luz) */
#intro { justify-content: flex-start; padding-top: calc(28px + env(safe-area-inset-top)); overflow: hidden;
  background: radial-gradient(ellipse at 50% 38%, #3a0f66 0%, #14052a 45%, #050109 100%); }
.intro-rays { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg at 50% 46%, rgba(232, 194, 122, 0.10) 0deg 1.2deg, transparent 1.2deg 9deg);
  animation: spin 90s linear infinite; mask-image: radial-gradient(circle at 50% 46%, #000 10%, transparent 60%); -webkit-mask-image: radial-gradient(circle at 50% 46%, #000 10%, transparent 60%); }
.intro-grid { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 45%; transform: perspective(300px) rotateX(62deg); transform-origin: 50% 0;
  background-image: linear-gradient(rgba(232, 194, 122, 0.22) 1px, transparent 1px), linear-gradient(90deg, rgba(232, 194, 122, 0.22) 1px, transparent 1px);
  background-size: 42px 42px; animation: gridmove 3s linear infinite; mask-image: linear-gradient(transparent, #000 40%); -webkit-mask-image: linear-gradient(transparent, #000 40%); }
@keyframes gridmove { to { background-position: 0 42px; } }
.intro-motes i { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 8px #ffd27a; opacity: 0;
  animation: mote 7s linear infinite; }
.intro-motes i:nth-child(odd) { background: #c98bff; box-shadow: 0 0 8px #a24dff; }
.intro-motes i:nth-child(1) { left: 6%; animation-delay: 0.00s; animation-duration: 6s; }
.intro-motes i:nth-child(2) { left: 14%; animation-delay: 0.55s; animation-duration: 7s; }
.intro-motes i:nth-child(3) { left: 22%; animation-delay: 1.10s; animation-duration: 8s; }
.intro-motes i:nth-child(4) { left: 30%; animation-delay: 1.65s; animation-duration: 9s; }
.intro-motes i:nth-child(5) { left: 38%; animation-delay: 2.20s; animation-duration: 6s; }
.intro-motes i:nth-child(6) { left: 46%; animation-delay: 2.75s; animation-duration: 7s; }
.intro-motes i:nth-child(7) { left: 54%; animation-delay: 3.30s; animation-duration: 8s; }
.intro-motes i:nth-child(8) { left: 62%; animation-delay: 3.85s; animation-duration: 9s; }
.intro-motes i:nth-child(9) { left: 70%; animation-delay: 4.40s; animation-duration: 6s; }
.intro-motes i:nth-child(10) { left: 78%; animation-delay: 4.95s; animation-duration: 7s; }
.intro-motes i:nth-child(11) { left: 86%; animation-delay: 5.50s; animation-duration: 8s; }
.intro-motes i:nth-child(12) { left: 94%; animation-delay: 6.05s; animation-duration: 9s; }

@keyframes mote { 10% { opacity: 1; } 90% { opacity: 0.6; } to { transform: translateY(-105vh); opacity: 0; } }
#intro .tcs-mark { position: relative; z-index: 2; margin-bottom: 6px; }
.oval-portal { position: relative; z-index: 2; width: min(46vw, 24vh, 190px); aspect-ratio: 1; margin: 12px 0 8px; }
.halo-arcs { position: absolute; left: -45%; right: -45%; top: -14%; height: 70%; border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: repeating-radial-gradient(ellipse at 50% 100%, transparent 0 9px, rgba(162, 77, 255, 0.45) 9px 10px); mask-image: linear-gradient(#000 40%, transparent);
  -webkit-mask-image: linear-gradient(#000 40%, transparent); animation: arcs 4s ease-in-out infinite; }
@keyframes arcs { 50% { opacity: 0.55; transform: scale(1.04); } }
.oval { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--gold); background: radial-gradient(ellipse, #6a2cc4 0%, #3b0f80 55%, #22084d 100%);
  box-shadow: 0 0 40px rgba(162, 77, 255, 0.8), 0 0 90px rgba(162, 77, 255, 0.35), inset 0 0 40px rgba(10, 0, 30, 0.7); overflow: hidden; }
.oval i { position: absolute; inset: calc(var(--k) * 9%); border-radius: 50%; border: 1px solid rgba(220, 190, 255, 0.45); animation: ripple 3.2s ease-in-out infinite; animation-delay: calc(var(--k) * -0.5s); }
.oval i:nth-child(1) { --k: 1; } .oval i:nth-child(2) { --k: 2; } .oval i:nth-child(3) { --k: 3; } .oval i:nth-child(4) { --k: 4; } .oval i:nth-child(5) { --k: 5; }
@keyframes ripple { 50% { opacity: 0.25; transform: scale(0.94); } }
.oval-core { position: absolute; left: calc(50% + var(--gx, 0) * 1%); top: calc(50% + var(--gy, 0) * 1%); width: 15%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(ellipse, #fff 0%, #e2b8ff 35%, rgba(162, 77, 255, 0) 70%); animation: pulse 2.4s ease-in-out infinite; }
#intro .intro-text { position: relative; z-index: 2; }
#intro h1 { margin-top: 4px; text-shadow: 0 0 24px rgba(162, 77, 255, 0.8); }
#intro.ready .btn-main { animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 36px rgba(232, 194, 122, 0.7), 0 0 60px rgba(162, 77, 255, 0.5); } }
/* al entrar, el portal se abre y nos traga */
#intro.fade .oval-portal { transition: transform 0.9s ease-in, opacity 0.9s; transform: scale(5); opacity: 0; }
#intro.fade .intro-text, #intro.fade .tcs-mark { transition: opacity 0.4s; opacity: 0; }

.hint { white-space: normal; text-align: center; width: max-content; max-width: min(88vw, 420px); }

/* Rayitos de la interfaz: cada orden despierta manda energía al orbe */
#uiRays { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ui-ray { stroke: var(--c); stroke-width: 2; stroke-linecap: round; opacity: 0.12; stroke-dasharray: 2 7; }
.ui-ray.lit { opacity: 0.95; stroke-width: 2.5; stroke-dasharray: 6 10; animation: rayflow 0.7s linear infinite; filter: drop-shadow(0 0 4px var(--c)); }
@keyframes rayflow { to { stroke-dashoffset: -16; } }

.ui-ray polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ui-ray { opacity: 0.1; }
.ui-ray .glow { stroke: var(--c); stroke-width: 7; opacity: 0.35; filter: blur(2px); }
.ui-ray .core { stroke: var(--c); stroke-width: 1.6; }
.ui-ray.lit { opacity: 1; animation: rayflick 0.18s steps(2) infinite; }
.ui-ray.lit .core { stroke: #fff; filter: drop-shadow(0 0 3px var(--c)) drop-shadow(0 0 6px var(--c)); }
@keyframes rayflick { 50% { opacity: 0.75; } }

/* Botón de idioma, estirado, al lado del sonido: resalta el idioma activo */
.lang-pill { width: auto !important; padding: 0 4px !important; border-radius: 20px !important; display: flex !important; gap: 0; font-size: 11px; letter-spacing: 0.12em; }
.lang-pill span { padding: 0 8px; line-height: 30px; border-radius: 16px; color: var(--muted); transition: background 0.25s, color 0.25s; }
html[lang="es"] .lang-pill span[data-l="es"], html[lang="en"] .lang-pill span[data-l="en"] { background: var(--gold); color: #1a0a26; font-weight: 600; }
/* Video de Ramiro en el momento wow (16:9, ya recortado sin franjas) */
.wow-video-wrap { position: relative; width: 100%; margin: 8px auto 0; }
.wow-media { width: 100%; max-width: none; max-height: none; aspect-ratio: 16 / 9; object-fit: cover; background: #000; cursor: pointer; }
.wow-unmute { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(10, 2, 20, 0.75); color: var(--text);
  border: 1px solid var(--gold); border-radius: 18px; padding: 6px 14px; font-size: 12px; cursor: pointer; }

@media (max-width: 480px) { #place { font-size: 10.5px; letter-spacing: 0.14em; white-space: nowrap; } #hud nav { gap: 6px; } }

/* Guía inicial */
.guide { align-items: center; }
.guide-box { border-radius: 22px; border: 1px solid var(--gold); animation: wowin 0.6s cubic-bezier(.2, .9, .2, 1); }
.guide-steps { list-style: none; padding: 0; margin: 8px 0 18px; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.guide-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text); }
.guide-steps li span { flex: 0 0 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-size: 12px; }

/* Botón de realidad aumentada en el visor del guardián */
.btn-ar { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 6px 0 10px; padding: 11px 14px;
  background: transparent; color: var(--gold); border: 1px solid var(--gold); border-radius: 22px; font-size: 12px; letter-spacing: 0.14em; cursor: pointer; }
.btn-ar svg { width: 18px; height: 18px; fill: currentColor; }
.btn-ar.hidden { display: none; }
/* Capa sobre la cámara durante la AR */
.ar-canvas { position: fixed; inset: 0; z-index: 40; }
.ar-overlay { position: fixed; inset: 0; z-index: 50; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 22px 16px 34px; }
.ar-overlay.hidden { display: none; }
.ar-msg { margin: 0; padding: 8px 14px; border-radius: 16px; background: rgba(10, 2, 20, 0.6); color: #fff; font-size: 14px; text-align: center; max-width: 92%; }
.ar-exit { pointer-events: auto; background: rgba(10, 2, 20, 0.7); color: #fff; border: 1px solid #d9b46a; border-radius: 22px; padding: 10px 26px; font-size: 13px; letter-spacing: 0.14em; }

/* Landing: segunda opción, entrar con realidad aumentada */
.btn-ar-intro { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px auto 0; padding: 12px 20px; max-width: 320px; width: 86%;
  background: rgba(10, 2, 20, 0.5); color: var(--gold); border: 1px solid var(--gold); border-radius: 26px; font-size: 12px; letter-spacing: 0.14em; cursor: pointer; }
.btn-ar-intro.hidden { display: none; }

/* Logos reales de Ramiro/TCS: The Collector System arriba, ORIGIN como título, OpulX junto al botón de coleccionar */
.tcs-mark img { height: clamp(58px, 15vw, 78px); width: auto; filter: drop-shadow(0 0 10px rgba(243, 233, 208, 0.25)); }
#intro h1 { line-height: 0; margin: 10px 0 6px; }
.origin-logo { height: clamp(64px, 18vw, 88px); width: auto; filter: drop-shadow(0 0 16px rgba(162, 77, 255, 0.85)); }
.opulx-mark { display: block; height: 34px; width: auto; margin: 10px auto 6px; opacity: 0.9; }

/* Logo de ORIGIN en la explosión final */
.origin-reveal { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
.origin-reveal .or-stack { display: flex; flex-direction: column; align-items: center; gap: 34px; }
.origin-reveal .or-credits { display: flex; align-items: center; justify-content: center; gap: 26px; }
.origin-reveal .or-credits img { width: auto; height: min(18vw, 96px); max-width: 42vw; filter: drop-shadow(0 0 5px #05020a) drop-shadow(0 0 12px #05020a) drop-shadow(0 0 22px rgba(255, 210, 122, 0.55)); }
.origin-reveal .or-main { width: min(78vw, 520px); height: auto; filter: drop-shadow(0 0 22px rgba(255, 210, 122, 0.95)) drop-shadow(0 0 60px rgba(162, 77, 255, 0.9)); transform: scale(0.7); transition: transform 4.5s cubic-bezier(.2,.8,.2,1); }
.origin-reveal.show { opacity: 1; }
.origin-reveal.show .or-main { transform: scale(1); }

/* Tarjeta holográfica: se inclina y un reflejo iridiscente recorre la imagen */
.holo { position: relative; width: 62%; max-width: 240px; margin: 0 auto; border-radius: 7.1%; transform: perspective(600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); touch-action: none; will-change: transform; }
.holo #cardImg { width: 100%; max-width: none; display: block; }
.holo::after { content: ""; position: absolute; inset: 0; border-radius: 7.1%; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0.75;
  background: linear-gradient(115deg, transparent 18%, rgba(255, 0, 180, 0.3) 34%, rgba(0, 255, 230, 0.3) 46%, rgba(255, 240, 120, 0.32) 56%, transparent 74%); background-size: 260% 260%; background-position: var(--hx, 50%) var(--hy, 50%); }
.holo::before { content: ""; position: absolute; inset: 0; border-radius: 7.1%; pointer-events: none; z-index: 1; mix-blend-mode: overlay;
  background: radial-gradient(circle at var(--hx, 50%) var(--hy, 50%), rgba(255, 255, 255, 0.55), transparent 55%); }
.intro-steps { max-width: 330px; margin: 10px auto 12px; gap: 7px; }
.intro-steps li { font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.intro-steps li span { flex: 0 0 20px; height: 20px; font-size: 10px; }

#guardNav { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 11; display: flex; flex-direction: column; gap: 9px; }
#guardNav button { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--c); background: rgba(10, 4, 20, 0.78); color: var(--c); display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent); }
#guardNav button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#guardNav.hidden { display: none; }

/* portada: el santuario visto desde arriba, con los cinco guardianes como círculos fijos de sus colores; todo compacto para que entre en cualquier celular sin scroll */
.oval .gd { position: absolute; left: 50%; top: 50%; width: 15%; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 28%, transparent); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent); transform: translate(-50%, -50%) rotate(var(--a)) translateY(-215%) rotate(calc(var(--a) * -1)); }
.oval-core { background: radial-gradient(circle, var(--cw, #fff) 0%, var(--cc, #e2b8ff) 40%, rgba(162, 77, 255, 0) 72%) !important; }
#intro { overflow-y: auto; overflow-x: hidden; padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 10px; min-height: 0; }
#intro .tcs-mark img { height: clamp(34px, 6.5vh, 58px); }
#intro .tcs-mark { margin-bottom: 0; }
.oval-portal { width: min(40vw, 17vh, 170px); margin: 6px 0 4px; }
#intro h1 { margin: 2px 0 2px; }
#intro .origin-logo { height: clamp(38px, 7.5vh, 70px); }
#intro .sub { margin: 0 0 4px; font-size: 11px; }
.intro-steps { margin: 4px auto 6px; gap: 4px; max-width: 340px; }
.intro-steps li { font-size: 10.5px; line-height: 1.25; }
.intro-steps li span { flex: 0 0 16px; height: 16px; font-size: 9px; }
#intro .load { margin: 0 0 6px; min-height: 14px; }
#intro .sound-opt { margin-top: 6px; font-size: 12px; }
#intro .intro-by { margin-top: 6px; } #intro .intro-by img { height: clamp(30px, 5vh, 44px); } #intro .intro-by span { font-size: 10px; }
#intro .intro-rays, #intro .intro-grid, #intro .intro-motes { position: fixed; }

#dock .gsym { width: 44px; height: 44px; transform: translateX(-50%); border: 1.5px solid var(--c); background: rgba(10, 4, 20, 0.85); color: var(--c); display: grid; place-items: center; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent); }
#dock .gsym svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#dock .gsym:nth-of-type(1) { left: 10%; bottom: 150px; } #dock .gsym:nth-of-type(2) { left: 29%; bottom: 186px; } #dock .gsym:nth-of-type(3) { left: 50%; bottom: 200px; } #dock .gsym:nth-of-type(4) { left: 71%; bottom: 186px; } #dock .gsym:nth-of-type(5) { left: 90%; bottom: 150px; }
#uiRays .gray { stroke: var(--c); stroke-width: 1.2; opacity: 0.55; filter: drop-shadow(0 0 3px var(--c)); }
#dock .home.orb { bottom: 152px !important; }
#uiRays .gray { stroke-width: 2; opacity: 0.8; }

.hint { bottom: auto !important; top: calc(62px + env(safe-area-inset-top)); }
