/* /xv/css/xv.css : la pagina de Rubi XV (shell). Monocromo, "Noir Chrome Couture". */

/* ------------------------------------------------------------------ tema que transiciona */
@property --xv-fondo { syntax: '<color>'; inherits: true; initial-value: #ffffff; }
@property --xv-tinta { syntax: '<color>'; inherits: true; initial-value: #050506; }

:root {
  --xv-fondo: #ffffff;
  --xv-tinta: #050506;
  --xv-gutter: max(28px, env(safe-area-inset-left), env(safe-area-inset-right));
  --xv-ancho: 1240px;
  --xv-linea: color-mix(in srgb, currentColor 22%, transparent);
  --xv-tenue: color-mix(in srgb, currentColor 62%, transparent);
  --xv-pad: clamp(104px, 22vw, 208px);
  color-scheme: only light;  /* sin oscurecido automatico del navegador: el dia/noche lo maneja la pagina */
}
:root[data-tema='noche'] { --xv-fondo: #050506; --xv-tinta: #ffffff; }
:root[data-fondo='noche'] body { background-color: #050506; }
/* en el cuadro del salto de tinta, los botones cambian con todo lo demas (sin su fundido propio de 0.4 a 0.6 s) */
:root.tema-salto .xv-btn { transition: none; }

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}
.reducido { scroll-behavior: auto; }
body {
  margin: 0;
  min-height: 100vh;
  /* Cambio dia/noche (app.js): el fondo del body cruza los grises rapido (data-fondo, 0.4 s, curva empinada
     al centro) y la tinta salta de golpe a la mitad del cruce (data-tema cambia las variables una sola vez).
     Asi el texto nunca queda gris sobre gris, y no se anima ninguna variable heredada (cada cuadro seria un
     recalculo de estilo de todo el documento). */
  background-color: #ffffff;
  color: var(--xv-tinta);
  transition: background-color 0.4s cubic-bezier(0.8, 0, 0.2, 1);
  font-family: var(--xv-texto);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: #050506; color: #fff; }
[data-tema='noche'] ::selection, .xv-cuenta ::selection, .xv-confirmar ::selection { background: #fff; color: #050506; }

/* Sello: bloquea el scroll mientras esta arriba */
.con-js.sellada, .con-js.sellada body { overflow: hidden; height: 100%; }

.xv-saltar {
  position: fixed; left: 12px; top: 12px; z-index: 200;
  padding: 12px 16px; background: #050506; color: #fff;
  font: 500 11px/1 var(--xv-texto); letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  transform: translateY(-200%);
}
.xv-saltar:focus-visible { transform: none; }
.xv-oculto {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ tipografia */
.xv-label {
  font-family: var(--xv-texto);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: var(--xv-tracking);
  text-transform: uppercase;
  font-variant-numeric: lining-nums tabular-nums;
  text-wrap: balance;
}
.xv-titular {
  font-family: var(--xv-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.65rem, 7.4vw + 0.9rem, 6.6rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
  text-wrap: balance;
  font-variant-numeric: lining-nums;
}
.xv-cuerpo {
  font-size: 17px;
  line-height: 1.68;
  font-weight: 300;
  max-width: 34ch;
  text-wrap: pretty;
}
.xv-nw { white-space: nowrap; }
.xv-punto { font-style: normal; display: inline-block; padding: 0 0.12em; }

.xv-envoltura {
  width: min(100% - 2 * var(--xv-gutter), var(--xv-ancho));
  margin-inline: auto;
}
.xv-seccion { position: relative; padding-block: var(--xv-pad); }

/* ------------------------------------------------------------------ boton contorno que se invierte */
.xv-btn {
  --btn-tinta: var(--xv-tinta);
  --btn-fondo: var(--xv-fondo);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; min-width: 232px;
  padding: 0 32px;
  border: 1px solid var(--btn-tinta);
  border-radius: var(--xv-radio);
  background: linear-gradient(var(--btn-tinta), var(--btn-tinta)) no-repeat 50% 100% / 100% 0;
  color: var(--btn-tinta);
  font: 500 11px/1 var(--xv-texto);
  letter-spacing: var(--xv-tracking);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-size 0.55s var(--xv-ease), color 0.4s var(--xv-ease), opacity 0.6s var(--xv-ease), border-color 0.6s var(--xv-ease);
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
}
.xv-btn span { margin-right: calc(-1 * var(--xv-tracking)); }
@media (hover: hover) {
  .xv-btn:hover:not(:disabled) { background-size: 100% 100%; color: var(--btn-fondo); }
}
.xv-btn:active:not(:disabled) { background-size: 100% 100%; color: var(--btn-fondo); transition-duration: 0.12s; }
.xv-btn:disabled { cursor: default; opacity: 0.32; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 5px; }
.xv-btn:focus-visible { outline-offset: 5px; }

/* ------------------------------------------------------------------ 0 · sello (negro, medallon blanco) */
@property --carga { syntax: '<number>'; inherits: true; initial-value: 0; }
.xv-sello { display: none; }
.con-js.sellada .xv-sello {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: start center;
  overflow-y: auto; overscroll-behavior: contain;
  /* arriba fijo: el medallon no se mueve cuando llega el nombre (solo el boton baja) */
  padding: max(clamp(28px, 11svh, 120px), env(safe-area-inset-top)) var(--xv-gutter) max(28px, env(safe-area-inset-bottom));
  color: #ffffff;
  --xv-fondo: #050506; --xv-tinta: #ffffff;
  text-align: center;
}
.xv-sello:focus { outline: none; }
/* la capa negra va aparte: al abrir se le hace el hueco (mascara) sin cortar el texto ni la flor */
.xv-sello__negro {
  position: fixed; inset: 0; z-index: -1; background-color: #050506;
  /* mascara opaca desde el inicio: la capa ya existe al tocar y el primer cuadro del hueco no la crea */
  -webkit-mask-image: linear-gradient(#000, #000); mask-image: linear-gradient(#000, #000);
  will-change: mask-image;
  opacity: 0.999; /* no del todo opaca: el navegador rasteriza el hero debajo antes del toque (sin tiron al abrir) */
}
.xv-sello__col {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 560px;
}
.xv-sello__col .xv-label { text-indent: var(--xv-tracking); }
.xv-sello__arriba, .xv-sello__plata { color: var(--xv-plata); }
.xv-sello__medallon {
  --diam: clamp(150px, 44vw, 220px);
  position: relative;
  width: var(--diam); height: var(--diam);
  margin: clamp(26px, 5.4svh, 48px) 0 clamp(26px, 5svh, 44px);
  display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.xv-sello.is-listo .xv-sello__medallon { cursor: pointer; }
.xv-sello__disco { position: absolute; inset: 0; border-radius: 50%; background: #ffffff; }
/* anillo de carga: aro cromado de 1 px a 8 px del disco; se llena en sentido horario desde las 12 y cierra completo */
.xv-sello__anillo {
  position: absolute; inset: -9px; border-radius: 50%;
  background: conic-gradient(from 0deg, #f4f4f6, #9a9da6 22%, #ffffff 40%, #8a8d95 63%, #e4e5e9 82%, #f4f4f6);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 1.25px), #000 calc(100% - 1px)),
    conic-gradient(#000 calc(var(--carga) * 360deg), transparent 0);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(closest-side, transparent calc(100% - 1.25px), #000 calc(100% - 1px)) intersect,
    conic-gradient(#000 calc(var(--carga) * 360deg), transparent 0);
  transition: --carga 0.9s var(--xv-ease), opacity 1.2s var(--xv-ease);
  opacity: 0.95;
}
.xv-sello.is-listo .xv-sello__anillo { opacity: 0.62; } /* completo: queda como un aro quieto */
.xv-sello__camelia {
  position: relative;
  width: 72%; height: auto;
  animation: xv-respira 5.6s ease-in-out infinite;
}
@keyframes xv-respira {
  /* solo escala (sin giro): la caja medida al tocar es exactamente la flor pintada que retoma el canvas */
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.024); }
}
.xv-sello__para { min-height: 9.5em; display: grid; align-content: start; }
.xv-sello__generico, .xv-sello__personal {
  display: grid; justify-items: center; gap: 10px;
  animation: xv-aparece 0.9s var(--xv-ease) both;
}
/* con codigo en la URL el generico nunca se ve; el bloque personal reserva el lugar del nombre */
.xv-sello__personal { display: none; }
.con-codigo .xv-sello__generico { display: none; }
.con-codigo .xv-sello__personal { display: grid; }
.xv-sello__nombre {
  font-family: var(--xv-display); font-style: italic; font-weight: 400;
  font-size: clamp(2.3rem, 8.6vw + 0.4rem, 4.2rem);
  line-height: 1.04; letter-spacing: -0.01em;
  text-wrap: balance; overflow-wrap: anywhere; hyphens: manual;
  max-width: 14ch;
  margin: 2px 0 6px;
  color: #ffffff;
}
/* blanco sobre negro: los trazos finos se ven mas delgados, un punto mas de peso que el nivel medio */
.xv-sello .xv-sello__nombre { font-weight: 540; }
.xv-sello__personal .xv-sello__nombre { max-width: 16ch; min-height: 1.04em; }
.xv-sello__personal [data-lugares] { min-height: 1.7em; }
/* mientras llega el nombre: una linea fina que brilla, del alto final */
.xv-sello__personal .xv-sello__nombre:empty { position: relative; width: min(62vw, 300px); }
.xv-sello__personal .xv-sello__nombre:empty::before {
  content: ''; position: absolute; left: 0; right: 0; top: 55%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12) 20%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0.12) 80%, transparent) 0 0 / 200% 100%;
  animation: xv-destello 1.6s linear infinite;
}
@keyframes xv-destello { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.xv-sello__abrir { margin-top: clamp(26px, 5svh, 48px); }
@keyframes xv-aparece { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* boton sobre negro: contorno blanco de 1 px, transparente; al habilitarse, un barrido de cromo */
.xv-sello .xv-sello__abrir {
  --btn-tinta: #ffffff; --btn-fondo: #050506;
  overflow: hidden; isolation: isolate;
}
.xv-sello .xv-sello__abrir:disabled { opacity: 0.34; }
.xv-sello__abrir::after {
  content: ''; position: absolute; inset: -1px; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.05) 38%, rgba(236, 236, 239, 0.55) 48%, rgba(154, 157, 166, 0.35) 52%, rgba(255, 255, 255, 0.05) 60%, transparent 68%);
  transform: translateX(-120%);
}
.xv-sello.is-listo .xv-sello__abrir::after { animation: xv-brillo 1.3s var(--xv-ease) 0.25s 1 both; }
@keyframes xv-brillo { from { transform: translateX(-120%); } to { transform: translateX(120%); } }

/* apertura: textos, boton y anillo se van rapido; la flor la decide app-sello.js */
.xv-sello.is-abriendo { pointer-events: none; }
.xv-sello.is-abriendo .xv-sello__abrir { background-size: 100% 0; color: #ffffff; }
.xv-sello.is-abriendo .xv-sello__col > :not(.xv-sello__medallon),
.xv-sello.is-abriendo .xv-sello__anillo {
  opacity: 0; translate: 0 -6px;
  transition: opacity 0.15s ease-out, translate 0.15s ease-out;
}
.xv-sello.is-abriendo .xv-sello__camelia { animation-play-state: paused; }
.xv-sello.is-sin-semilla .xv-sello__camelia { opacity: 0; transition: opacity 0.22s ease-out; }

/* ------------------------------------------------------------------ escenas (hosts de canvas) */
.xv-escena { position: absolute; inset: 0; overflow: hidden; }
.xv-escena > canvas { display: block; }

/* ------------------------------------------------------------------ 1 · inicio */
.xv-inicio {
  position: relative;
  isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  padding: max(26px, env(safe-area-inset-top)) var(--xv-gutter) max(22px, env(safe-area-inset-bottom));
  background: #ffffff; color: #050506;
  --xv-fondo: #ffffff; --xv-tinta: #050506;
  text-align: center;
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
}
.xv-inicio > .xv-escena { z-index: 0; }  /* el canvas queda siempre debajo de la capa de texto */
.xv-inicio > :not(.xv-escena) { position: relative; z-index: 1; }
.xv-inicio .xv-label { text-indent: var(--xv-tracking); }
.xv-inicio__arriba { color: #5d6068; max-width: 30em; }
.xv-inicio__nombre { color: #050506; }
@media (max-width: 599px) {
  /* en telefonos: dos lineas deliberadas, sin separador colgando */
  .xv-inicio__sep { display: none !important; }
  .xv-inicio__nombre { display: block; }
  .xv-inicio__lugar .xv-punto-sep { display: none; }
  .xv-inicio__lugar .xv-nw { display: block; }
}
/* Velo de papel detras de cada grupo de texto del hero: un petalo oscuro que pase detras queda gris palido. */
.xv-velo { position: relative; isolation: isolate; }
.xv-velo::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  inset: -14px -26px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  filter: blur(14px);
}
.xv-inicio__datos { display: grid; justify-items: center; }
.xv-inicio__datos::before { inset: 4px -30px -16px; border-radius: 40%; }
.xv-inicio__folio.xv-velo::before { inset: -18px -14px; }
.xv-desliza.xv-velo::before { inset: -6px -10px; border-radius: 40%; }
.xv-inicio__centro {
  align-self: center;
  display: grid; justify-items: center;
  padding-block: 10px;
}
.xv-inicio__logo {
  width: 86vw; width: min(86vw, 58vh, 600px); width: min(86vw, 58svh, 600px);
  aspect-ratio: 1 / 1;
  margin: 0;
  pointer-events: none;
}
#hero-logo {
  width: 100%; height: 100%;
  transition: opacity 1.3s var(--xv-ease), transform 1.8s var(--xv-ease);
}
#hero-logo.is-espera { opacity: 0; transform: scale(0.965); }
#inicio:focus { outline: none; }
#hero-logo.is-oculto { opacity: 0 !important; transition: none; }
/* relevo tardio (la escena llega despues): fundido simple del logo fijo, sin escala ni salto */
#hero-logo.is-cede { opacity: 0; transform: none; transition: opacity 0.6s ease, transform 1.8s var(--xv-ease); }
.xv-inicio__fecha {
  font-family: var(--xv-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw + 0.95rem, 2.4rem);
  line-height: 1.1; letter-spacing: -0.005em;
  margin-top: clamp(6px, 1.6svh, 18px);
}
.xv-inicio__hora { margin-top: 12px; }
.xv-inicio__lugar { margin-top: 2px; color: #5d6068; }
.xv-inicio > .xv-inicio__folio {
  display: none;
  position: absolute; top: 50%;
  font: 500 11px/1 var(--xv-texto); letter-spacing: 0.5em; text-transform: uppercase;
  color: #8b8e97;
  writing-mode: vertical-rl;
}
.xv-inicio__folio--izq { left: calc(var(--xv-gutter) + 8px); transform: translateY(-50%) rotate(180deg); }
.xv-inicio__folio--der { right: calc(var(--xv-gutter) + 8px); transform: translateY(-50%); }

.xv-inicio__pie { display: grid; justify-items: center; gap: 14px; }
.xv-mueve {
  appearance: none; border: 0; background: none; cursor: pointer;
  padding: 10px 4px; min-height: 44px;
  font: 500 11px/1 var(--xv-texto); letter-spacing: 0.3em; text-transform: uppercase;
  color: #5d6068;
  display: inline-flex; align-items: center; gap: 10px;
}
.xv-mueve::before {
  content: ''; width: 9px; height: 14px; border: 1px solid currentColor; border-radius: 2px;
  animation: xv-ladea 3.2s ease-in-out infinite;
}
@keyframes xv-ladea { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
.xv-desliza {
  display: grid; justify-items: center; gap: 12px;
  text-decoration: none; color: #050506;
  padding: 4px 12px;
}
.xv-desliza .xv-label { font-size: 11px; letter-spacing: 0.42em; text-indent: 0.42em; }
.xv-desliza__linea {
  position: relative; display: block;
  width: 1px; height: clamp(36px, 6svh, 56px);
  background: rgba(5, 5, 6, 0.14);
  overflow: hidden;
}
.xv-desliza__linea::after {
  content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 45%;
  background: #050506;
  animation: xv-gotea 2.4s var(--xv-ease) infinite;
}
.xv-inicio.is-fuera .xv-desliza__linea::after, .xv-inicio.is-fuera .xv-mueve::before { animation-play-state: paused; }
@keyframes xv-gotea { 0% { transform: translateY(-110%); } 70%, 100% { transform: translateY(240%); } }

/* entrada del texto del hero (solo con JS) */
.xv-app .xv-inicio [data-in] { opacity: 0; translate: 0 14px; }
.xv-app .xv-inicio.is-listo [data-in] {
  opacity: 1; translate: none;
  transition: opacity var(--in-dur, 1.1s) var(--xv-ease), translate calc(var(--in-dur, 1.1s) * 1.2) var(--xv-ease);
  transition-delay: var(--in-t, calc(var(--in, 0) * 140ms));
}

/* ------------------------------------------------------------------ revelado al hacer scroll */
.xv-app .xv-rv {
  opacity: 0; transform: translate3d(0, 24px, 0);
  transition: opacity 1s var(--xv-ease), transform 1.25s var(--xv-ease);
  transition-delay: calc(var(--rv, 0) * 120ms);
}
.xv-app .xv-rv.is-visto { opacity: 1; transform: none; }
.reducido .xv-rv { transform: none !important; }

/* ------------------------------------------------------------------ 2 · invitacion */
.xv-invitacion { text-align: center; }
.xv-invitacion__rejilla { display: grid; justify-items: center; }
.xv-invitacion .xv-label { text-indent: var(--xv-tracking); }
.xv-invitacion__titular { margin-top: 30px; max-width: 9ch; }
.xv-invitacion__texto { margin-top: 30px; font-size: 18px; max-width: 30ch; }
.xv-ornamento {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin: clamp(64px, 14vw, 120px) 0 clamp(40px, 9vw, 72px);
  width: 100%;
}
.xv-ornamento__linea { width: 54px; height: 1px; background: var(--xv-linea); }
.xv-ornamento__flor { width: 48px; height: 48px; object-fit: contain; }
.xv-invitacion__contados { display: grid; justify-items: center; gap: 16px; }
.xv-invitacion__contados .xv-cuerpo { max-width: 33ch; color: var(--xv-tenue); }

/* ------------------------------------------------------------------ 3 · cuenta (noche) */
.xv-cuenta {
  background: #050506; color: #ffffff;
  --xv-fondo: #050506; --xv-tinta: #ffffff;
  text-align: center;
}
.xv-cuenta .xv-label { text-indent: var(--xv-tracking); }
.xv-cuenta > .xv-envoltura { display: grid; justify-items: center; }
.xv-reloj {
  margin-top: clamp(36px, 8vw, 64px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%; max-width: 440px;
}
.xv-unidad {
  display: grid; justify-items: center; gap: 4px;
  padding: clamp(18px, 5vw, 30px) 6px clamp(20px, 5vw, 30px);
  position: relative;
}
.xv-unidad .xv-label { color: rgba(255, 255, 255, 0.62); }
.xv-unidad:nth-child(odd)::after {
  content: ''; position: absolute; right: 0; top: 22%; bottom: 22%; width: 1px; background: rgba(255, 255, 255, 0.16);
}
.xv-unidad:nth-child(-n + 2)::before {
  content: ''; position: absolute; left: 14%; right: 14%; bottom: 0; height: 1px; background: rgba(255, 255, 255, 0.16);
}
.xv-num {
  display: inline-flex;
  font-family: var(--xv-display); font-weight: 500; font-style: normal;
  font-optical-sizing: none; font-variation-settings: 'opsz' 14;
  font-size: clamp(4.6rem, 22vw, 6rem);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'lnum' 1, 'tnum' 1;
  letter-spacing: -0.01em;
}
.xv-dig { display: inline-grid; min-width: 0.6em; justify-items: center; }
.xv-dig > span {
  grid-area: 1 / 1;
  display: block;
  padding: 0.04em 0.02em 0.06em;
  background: var(--xv-cromo);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  will-change: transform, opacity;
}
.xv-cuenta__hoy {
  margin-top: clamp(30px, 7vw, 56px); max-width: 12ch;
  background: var(--xv-cromo-suave);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding: 0.06em 0.08em;
}
.xv-cuenta__sinjs { display: none; }
.sin-js .xv-reloj, .sin-js #cuenta-label { display: none; }
.sin-js .xv-cuenta__sinjs {
  display: block; font-style: normal; font-variant-numeric: lining-nums;
  background: var(--xv-cromo); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; padding: 0.06em 0.08em;
}
.xv-cuenta__pie { margin-top: clamp(30px, 7vw, 56px); color: rgba(255, 255, 255, 0.62); }

/* ------------------------------------------------------------------ 4 · el lugar */
.xv-lugar { position: relative; background: #ffffff; color: #050506; --xv-fondo: #ffffff; --xv-tinta: #050506; }
.xv-lugar__escenario {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
  background: #ffffff;
}
.xv-lugar.is-3d { height: 320vh; height: 320svh; }
.xv-lugar.is-3d .xv-lugar__escenario { position: sticky; top: 0; }
#escena-torre { z-index: 1; opacity: 0; transition: opacity 1.2s var(--xv-ease); }
.xv-lugar.is-escena #escena-torre { opacity: 1; }

/* composicion CSS (respaldo sin WebGL, y doble mientras carga la escena) */
.xv-lugar__fondo {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, #d6d8dd 0%, #e6e7ea 22%, #f3f3f4 44%, #fbfbfb 56%, #ffffff 64%, #f6f6f7 100%);
  overflow: hidden;
}
.xv-lugar__fondo > span { position: absolute; display: block; }
.xv-lugar__sol {
  left: 58%; top: 50%; width: 46vmin; height: 46vmin; transform: translate(-50%, -50%);
  background: radial-gradient(circle, #ffffff 0 17%, rgba(255, 255, 255, 0.85) 20%, rgba(255, 255, 255, 0.35) 38%, rgba(255, 255, 255, 0) 64%);
}
.xv-lugar__sierra {
  left: 46%; right: -4%; top: 47%; height: 9%;
  background: linear-gradient(180deg, #cfd1d6, #e2e3e6);
  clip-path: polygon(0% 100%, 6% 62%, 11% 70%, 18% 40%, 24% 55%, 31% 28%, 37% 46%, 44% 22%, 52% 41%, 58% 18%, 66% 36%, 73% 14%, 80% 33%, 88% 20%, 95% 38%, 100% 30%, 100% 100%);
}
.xv-lugar__cerro {
  left: 14%; width: 62%; top: 41%; height: 15%;
  background: linear-gradient(180deg, #a9acb3 0%, #c4c6cb 60%, #dcdde0 100%);
  clip-path: polygon(0% 95%, 6% 88%, 12% 80%, 17% 58%, 22% 38%, 25% 42%, 28% 45%, 33% 30%, 37% 12%, 40% 0%, 43% 10%, 47% 22%, 52% 28%, 56% 22%, 60% 9%, 63% 3%, 66% 16%, 70% 26%, 74% 34%, 78% 40%, 84% 58%, 90% 78%, 95% 89%, 100% 95%, 100% 100%, 0% 100%);
}
.xv-lugar__lomas {
  left: -6%; right: -6%; top: 53%; height: 6%;
  background: linear-gradient(180deg, #d9dade, #eeeef0);
  clip-path: polygon(0% 100%, 0% 60%, 9% 38%, 18% 56%, 27% 30%, 38% 60%, 49% 44%, 60% 66%, 71% 40%, 82% 62%, 92% 36%, 100% 50%, 100% 100%);
}
.xv-lugar__torre {
  left: 0; right: 0; bottom: 0; height: 14%;
  background:
    linear-gradient(180deg, transparent 0 22%, rgba(5, 5, 6, 0.55) 22% calc(22% + 1px), transparent calc(22% + 1px)),
    repeating-linear-gradient(90deg, transparent 0 calc(12% - 1px), rgba(5, 5, 6, 0.28) calc(12% - 1px) 12%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0 22%, rgba(220, 222, 226, 0.5) 22% 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
}
/* modo doble (subida CSS de prueba / mientras carga la escena) */
.xv-lugar.is-3d .xv-lugar__torre {
  left: auto; right: 9%; width: 30%; height: 160%; bottom: auto; top: 0;
  /* silueta de la torre Safi: tres cuerpos que se angostan hacia arriba, cada uno con su banda blanca, y el
     mastil plateado a la izquierda, que rebasa la azotea */
  background:
    linear-gradient(90deg, #8e9198, #cdcfd4 42%, #a3a6ac) left top / 8% 100% no-repeat,
    linear-gradient(180deg, transparent 3%, #f4f4f5 3% 3.8%, transparent 3.8% 24%, #f4f4f5 24% 24.8%, transparent 24.8% 58%, #f4f4f5 58% 58.8%, transparent 58.8%),
    repeating-linear-gradient(180deg, transparent 0 calc(1.6% - 1px), rgba(255, 255, 255, 0.16) calc(1.6% - 1px) 1.6%),
    linear-gradient(90deg, #1c1c21, #2c2d32 40%, #0e0e11);
  -webkit-clip-path: polygon(0 0, 8% 0, 8% 3%, 56% 3%, 56% 24%, 75% 24%, 75% 58%, 100% 58%, 100% 100%, 0 100%);
  clip-path: polygon(0 0, 8% 0, 8% 3%, 56% 3%, 56% 24%, 75% 24%, 75% 58%, 100% 58%, 100% 100%, 0 100%);
  -webkit-mask-image: none; mask-image: none;
  /* sube la camara: la torre baja; al final su azotea queda por debajo del titulo */
  transform: translate3d(0, calc((var(--p, 0) * 1.12 - 0.62) * 100vh), 0);
}
.xv-lugar.is-3d .xv-lugar__cerro,
.xv-lugar.is-3d .xv-lugar__sierra,
.xv-lugar.is-3d .xv-lugar__lomas,
.xv-lugar.is-3d .xv-lugar__sol { transform: translate3d(0, calc((1 - var(--p, 0)) * 26vh), 0); }
.xv-lugar.is-3d .xv-lugar__sol { transform: translate(-50%, -50%) translate3d(0, calc((1 - var(--p, 0)) * 26vh), 0); }
.xv-lugar.is-escena .xv-lugar__fondo { visibility: hidden; transition: visibility 0s linear 1.2s; }

/* capa de textos: tinta, en columnas angostas del lado del cielo (nunca sobre la torre), con velo blanco.
   --torre-x (px) lo pone app-lugar.js: borde izquierdo seguro de la silueta segun la proporcion de la pantalla. */
.xv-lugar__escenario { --torre-x: 36vw; --frase-x: var(--xv-gutter); }
.xv-lugar__capa {
  position: absolute; inset: 0; z-index: 2;
  color: #050506;
  pointer-events: none;
  padding: max(30px, env(safe-area-inset-top)) var(--xv-gutter) max(30px, env(safe-area-inset-bottom));
}
.xv-lugar__label { position: absolute; top: max(30px, env(safe-area-inset-top)); left: var(--xv-gutter); }

.xv-piso {
  position: absolute; left: var(--xv-gutter); bottom: max(34px, calc(env(safe-area-inset-bottom) + 18px));
  display: flex; align-items: flex-end; gap: 12px;
}
.xv-piso__eje {
  --alto: 34vh;
  position: relative;
  width: 13px; height: var(--alto); height: 34svh;
  border-left: 1px solid currentColor;
  background:
    repeating-linear-gradient(to top, currentColor 0 1px, transparent 1px calc(100% / 5.6)) left bottom / 13px 100% no-repeat,
    repeating-linear-gradient(to top, currentColor 0 1px, transparent 1px calc(100% / 56)) left bottom / 6px 100% no-repeat;
  opacity: 0.9;
}
.xv-piso__marca {
  position: absolute; left: -4px; bottom: 0;
  width: 22px; height: 1px; background: currentColor;
  transform: translate3d(0, calc(var(--piso, 0) / -56 * 34vh), 0);
  transition: transform 0.6s var(--xv-ease);
}
@supports (height: 1svh) {
  .xv-piso__marca { transform: translate3d(0, calc(var(--piso, 0) / -56 * 34svh), 0); }
}
.xv-piso__marca::after {
  content: ''; position: absolute; right: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
.xv-piso__lectura { display: grid; gap: 2px; padding-bottom: 2px; }
.xv-piso__lectura .xv-label { font-size: 11px; }
.xv-piso__num {
  display: flex;
  font-family: var(--xv-display); font-weight: 500;
  font-optical-sizing: none; font-variation-settings: 'opsz' 14;
  font-size: clamp(3rem, 14vw, 7.4rem);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'lnum' 1, 'tnum' 1;
}
.xv-odo {
  display: block; height: 1em; overflow: hidden; width: 0.6em;
}
.xv-odo > span {
  display: grid; grid-auto-rows: 1em; justify-items: center;
  transform: translate3d(0, calc(var(--d, 0) * -1em), 0);
  transition: transform 0.7s var(--xv-ease);
}
.xv-odo > span > span { display: block; line-height: 1em; }

.xv-lugar__frase {
  position: absolute; left: var(--frase-x); top: 22%;
  width: var(--frase-ancho, 30vw);
  font-family: var(--xv-display); font-style: italic; font-weight: 400;
  font-size: var(--frase-fs, 22px);
  line-height: 1.08; letter-spacing: -0.01em;
  text-wrap: balance; overflow-wrap: normal; hyphens: none;
  opacity: 0;
  will-change: opacity, transform;
}
/* velos: como en el hero, una placa blanca difusa detras de cada texto */
.xv-lugar__capa .xv-velo::before { inset: -12px -14px; border-radius: 28px; background: rgba(255, 255, 255, 0.86); filter: blur(12px); }
.xv-lugar__capa .xv-piso__lectura.xv-velo::before { inset: -10px -12px -14px; }
.xv-lugar__capa .xv-lugar__frase.xv-velo::before { inset: -0.42em -0.5em; border-radius: 0.8em; filter: blur(max(12px, 0.36em)); }
.xv-lugar__capa .xv-lugar__final.xv-velo::before { inset: -18px -10px; }
.xv-lugar__label.xv-velo::before { inset: -8px -12px; }
.xv-lugar__final {
  position: absolute; left: var(--xv-gutter); right: var(--xv-gutter); top: 10%;
  display: grid; justify-items: center; gap: 14px; text-align: center;
  opacity: 0;
  will-change: opacity, transform;
}
.xv-lugar__final .xv-label { text-indent: var(--xv-tracking); }
.xv-lugar__titulo {
  font-family: var(--xv-display); font-style: italic; font-weight: 400;
  font-size: clamp(3.3rem, 14.2vw, 11rem);
  line-height: 0.98; letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 6px;
}
.xv-lugar__vista { font-size: 15px; line-height: 1.55; max-width: 26ch; text-wrap: balance; }

/* sin pinning: composicion estatica con el cierre (horizonte mas abajo, sin baranda que cruce el piso) */
.xv-lugar:not(.is-3d) .xv-lugar__fondo {
  background: linear-gradient(180deg, #d6d8dd 0%, #e6e7ea 26%, #f3f3f4 50%, #fbfbfb 62%, #ffffff 70%, #f1f1f3 100%);
}
.xv-lugar:not(.is-3d) .xv-lugar__sol { top: 61%; }
.xv-lugar:not(.is-3d) .xv-lugar__cerro { top: 55%; height: 14%; }
.xv-lugar:not(.is-3d) .xv-lugar__sierra { top: 61%; height: 8%; }
.xv-lugar:not(.is-3d) .xv-lugar__lomas { top: 66%; height: 6%; }
.xv-lugar:not(.is-3d) .xv-lugar__torre { display: none; }
.xv-lugar:not(.is-3d) .xv-lugar__frase { display: none; }
.xv-lugar:not(.is-3d) .xv-lugar__final { opacity: 1; }

/* ------------------------------------------------------------------ 5 · como llegar */
.xv-llegar { text-align: center; }
.xv-llegar .xv-label { text-indent: var(--xv-tracking); }
.xv-llegar__rejilla { display: grid; justify-items: center; }
.xv-llegar__intro { display: grid; justify-items: center; }
.xv-llegar__intro .xv-titular { margin-top: 26px; max-width: 8ch; }
.xv-llegar__salon { margin-top: 28px; font-weight: 400; }
.xv-llegar__dir { margin-top: 4px; color: var(--xv-tenue); max-width: 28ch; }
.xv-datos {
  margin-top: clamp(52px, 12vw, 80px);
  width: 100%; max-width: 520px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--xv-linea);
}
.xv-datos > div {
  display: grid; align-content: start; gap: 10px;
  padding: 26px 12px 28px;
  border-bottom: 1px solid var(--xv-linea);
}
.xv-datos > div:nth-child(odd) { border-right: 1px solid var(--xv-linea); }
.xv-datos dt { color: var(--xv-tenue); font-size: 11px; }
.xv-datos dd {
  font-family: var(--xv-display); font-style: italic; font-size: 19px; line-height: 1.3;
  font-variant-numeric: lining-nums;
  text-wrap: balance;
}
.xv-acciones {
  margin-top: clamp(44px, 10vw, 64px);
  display: grid; justify-items: center; gap: 12px;
  width: 100%;
}
.xv-acciones .xv-btn { width: 100%; max-width: 320px; }
.xv-calendario { display: contents; }
.xv-calendario:empty { display: none; }
#calendario-root > * { width: 100%; max-width: 320px; }
#calendario-root > * > button, #calendario-root > .xv-btn { width: 100%; }
.xv-estac {
  margin-top: clamp(88px, 20vw, 150px);
  display: grid; justify-items: center; gap: 18px;
  width: 100%;
  padding-top: clamp(56px, 12vw, 96px);
  border-top: 1px solid var(--xv-linea);
}
.xv-estac__titulo {
  font-family: var(--xv-display); font-style: italic; font-weight: 500;
  font-optical-sizing: none; font-variation-settings: 'opsz' 14;
  font-size: clamp(4rem, 19vw, 10.5rem);
  line-height: 0.95; letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}
.xv-estac .xv-cuerpo { max-width: 28ch; }

/* aviso de cambio de horario: fila completa al final de los datos */
.xv-datos > div.xv-datos__aviso { grid-column: 1 / -1; border-right: 0; justify-items: center; }
.xv-datos__aviso dt { color: inherit; }
.xv-datos .xv-datos__aviso dd {
  font-family: var(--xv-texto); font-style: normal; font-weight: 300;
  font-size: 15px; line-height: 1.6; max-width: 34ch;
  font-variation-settings: normal; text-wrap: pretty;
}

/* el recorrido en video */
.xv-ruta {
  margin-top: clamp(88px, 20vw, 150px);
  padding-top: clamp(56px, 12vw, 96px);
  border-top: 1px solid var(--xv-linea);
  width: 100%;
  display: grid; justify-items: center; gap: clamp(44px, 10vw, 64px);
}
.xv-ruta__texto { display: grid; justify-items: center; }
.xv-ruta__titulo {
  margin-top: 22px;
  font-family: var(--xv-display); font-style: italic;
  font-optical-sizing: none; font-variation-settings: 'opsz' var(--xv-opsz-grande); font-weight: var(--xv-peso-grande);
  font-size: clamp(2.1rem, 5.4vw + 0.8rem, 3.6rem); line-height: 1.06; letter-spacing: -0.01em;
  max-width: 11ch; text-wrap: balance; font-variant-numeric: lining-nums;
}
.xv-ruta__texto .xv-cuerpo { margin-top: 22px; max-width: 28ch; color: var(--xv-tenue); }
.xv-ruta__pasos {
  list-style: none; margin: 36px 0 0; padding: 0;
  width: 100%; max-width: 330px;
  text-align: left;
  border-top: 1px solid var(--xv-linea);
}
.xv-ruta__pasos li {
  display: grid; grid-template-columns: 2.6em 1fr; align-items: baseline;
  padding: 15px 0 16px;
  border-bottom: 1px solid var(--xv-linea);
  font-size: 15px; line-height: 1.5; font-weight: 300;
}
.xv-ruta__n {
  font-family: var(--xv-display); font-style: italic; font-size: 15px;
  font-variant-numeric: lining-nums; color: var(--xv-tenue);
}
.xv-ruta__figura { margin: 0; width: 100%; max-width: 330px; }
.xv-ruta__marco {
  position: relative;
  aspect-ratio: 480 / 848;
  background: #050506; color: #ffffff;
  border-radius: var(--xv-radio);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--xv-linea), 0 30px 60px -34px rgba(5, 5, 6, 0.55);
  -webkit-tap-highlight-color: transparent;
}
.xv-ruta__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; object-fit: cover; background: #050506;
}
.xv-ruta.is-js .xv-ruta__video { cursor: pointer; }
.xv-ruta__play {
  position: absolute; left: 50%; top: 50%;
  width: 68px; height: 68px; margin: -34px 0 0 -34px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.85); border-radius: 50%;
  background: rgba(5, 5, 6, 0.38); color: #ffffff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: pointer; padding: 0 0 0 3px;
  transition: opacity 0.4s var(--xv-ease), transform 0.4s var(--xv-ease);
  touch-action: manipulation;
}
.xv-ruta__play[hidden] { display: none; }
.xv-ruta__play:active { transform: scale(0.95); }
.xv-ruta__avance {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: rgba(255, 255, 255, 0.22);
  opacity: 0; transition: opacity 0.4s var(--xv-ease);
  pointer-events: none;
}
.xv-ruta.is-js .xv-ruta__avance { opacity: 1; }
.xv-ruta__avance > span {
  display: block; height: 100%; background: #ffffff;
  transform-origin: 0 50%; transform: scaleX(var(--avance, 0));
}
.xv-ruta__pie {
  margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  color: var(--xv-tenue);
}
.xv-ruta .xv-ruta__pie .xv-label { text-indent: 0; font-size: 10px; letter-spacing: 0.28em; }
.xv-ruta__sonido {
  appearance: none; background: none; border: 0; color: var(--xv-tinta);
  margin: -14px -4px -14px 0; padding: 14px 4px;
  cursor: pointer; touch-action: manipulation;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
  text-decoration-color: var(--xv-linea);
}
.xv-ruta__sonido[hidden] { display: none; }
.xv-ruta__sonido[aria-pressed='true'] { text-decoration-color: currentColor; }

/* ------------------------------------------------------------------ 6 · vestimenta */
.xv-vestimenta { text-align: center; padding-bottom: calc(var(--xv-pad) * 0.8); }
.xv-vestimenta .xv-label { text-indent: var(--xv-tracking); }
.xv-vestimenta__cabeza { display: grid; justify-items: center; gap: 26px; }
.xv-vestimenta__cabeza .xv-titular { max-width: none; font-size: clamp(2.35rem, 9.6vw, 3.6rem); }
.xv-vestimenta__figura { margin-top: clamp(28px, 6vw, 56px); position: relative; }
.xv-vestimenta__escena {
  position: relative; inset: auto;
  width: calc(100% + 2 * var(--xv-gutter)); margin-inline: calc(-1 * var(--xv-gutter));
  aspect-ratio: 1 / 1.05;
  touch-action: pan-y;
  opacity: 0; transition: opacity 1.4s var(--xv-ease);
}
.xv-vestimenta.is-escena .xv-vestimenta__escena { opacity: 1; cursor: grab; }
.xv-vestimenta.is-escena .xv-vestimenta__escena:active { cursor: grabbing; }
.xv-vestimenta__gira {
  margin: 0 0 4px; font-size: 11px; color: var(--xv-tenue);
  transition: opacity 0.9s var(--xv-ease);
}
.xv-vestimenta__gira.is-fuera { opacity: 0; }
/* bajo cada maniqui: su etiqueta y su linea, en una sola columna */
.xv-vestimenta__pares {
  display: grid; grid-template-columns: 1fr 1fr;
  position: relative;
  border-top: 1px solid var(--xv-linea);
}
.xv-vestimenta__pares::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--xv-linea); }
.xv-vestimenta__pares > div {
  display: grid; justify-items: center; align-content: start; gap: 8px;
  padding: 22px 12px 4px;
}
.xv-vestimenta__pares dd { font-size: 16px; line-height: 1.55; max-width: 15em; text-wrap: balance; }
@media (max-width: 359px) {
  /* a 320 dos columnas quedan apretadas: se apilan */
  .xv-vestimenta__pares { grid-template-columns: 1fr; }
  .xv-vestimenta__pares::after { display: none; }
  .xv-vestimenta__pares > div + div { padding-top: 18px; }
}
.xv-vestimenta__nota {
  margin: clamp(44px, 10vw, 72px) auto 0;
  display: grid; justify-items: center;
  max-width: 34ch;
}
.xv-vestimenta__detalle { font-size: 18px; }
.xv-ornamento--nota { margin: 28px 0 22px; }
.xv-ornamento--nota .xv-ornamento__linea { width: 40px; }
.xv-ornamento--nota .xv-ornamento__flor { width: 40px; height: 40px; }
.xv-vestimenta__cita {
  font-family: var(--xv-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.75rem, 5.4vw + 0.4rem, 2.9rem);
  line-height: 1.12; letter-spacing: -0.008em;
  text-wrap: balance;
}


/* sin escena: no hay maniquies, las dos columnas quedan solas */
.sin-js .xv-vestimenta__figura,
.xv-vestimenta.is-sin-escena .xv-vestimenta__figura { display: none; }
.sin-js .xv-vestimenta__pares,
.xv-vestimenta.is-sin-escena .xv-vestimenta__pares { margin-top: clamp(40px, 9vw, 64px); }

/* ------------------------------------------------------------------ 7 · confirmar (noche) */
.xv-confirmar {
  background: #050506; color: #ffffff;
  --xv-fondo: #050506; --xv-tinta: #ffffff;
  min-height: 70vh;
  padding-block: calc(var(--xv-pad) * 0.55);
}
.xv-confirmar__nota { display: grid; justify-items: center; gap: 22px; text-align: center; }
.xv-confirmar__nota .xv-label { text-indent: var(--xv-tracking); color: #9a9da6; }
.xv-confirmar__nota .xv-titular { font-size: clamp(2.3rem, 6vw + 0.8rem, 4.6rem); max-width: 11ch; }
.xv-confirmar__nota .xv-cuerpo { color: #c8cbd2; }

/* ------------------------------------------------------------------ 8 · pie */
.xv-pie {
  display: grid; justify-items: center; align-content: center; text-align: center; gap: 18px;
  min-height: 62vh; min-height: 62svh;
  background: #ffffff; color: #050506;
  --xv-fondo: #ffffff; --xv-tinta: #050506;
  padding: clamp(96px, 20vw, 168px) var(--xv-gutter) max(64px, calc(env(safe-area-inset-bottom) + 40px));
}
.xv-pie .xv-label { text-indent: var(--xv-tracking); color: var(--xv-tenue); }
.xv-pie__logo { width: 180px; height: 180px; }
.xv-pie__frase {
  margin-top: 10px;
  font-family: var(--xv-display); font-style: italic; font-size: clamp(1.7rem, 4vw + 0.9rem, 2.6rem); line-height: 1.15;
  text-wrap: balance;
}

/* ------------------------------------------------------------------ accion flotante (pastilla solida) */
.xv-flotante {
  position: fixed; z-index: 50;
  right: max(16px, calc(env(safe-area-inset-right) + 12px));
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  border: 1px solid #050506; border-radius: 999px;
  background: #050506; color: #ffffff; text-decoration: none;
  font: 500 11px/1 var(--xv-texto); letter-spacing: 0.3em; text-transform: uppercase;
  box-shadow: 0 6px 22px rgba(5, 5, 6, 0.16);
  opacity: 0; transform: translate3d(0, 14px, 0); pointer-events: none; visibility: hidden;
  transition: opacity 0.45s var(--xv-ease), transform 0.6s var(--xv-ease), visibility 0s linear 0.6s,
    background-color 0.35s var(--xv-ease), color 0.35s var(--xv-ease), border-color 0.35s var(--xv-ease);
}
.xv-flotante span { margin-right: -0.3em; }
.xv-flotante.is-visible {
  opacity: 1; transform: none; pointer-events: auto; visibility: visible;
  transition: opacity 0.45s var(--xv-ease), transform 0.6s var(--xv-ease), visibility 0s,
    background-color 0.35s var(--xv-ease), color 0.35s var(--xv-ease), border-color 0.35s var(--xv-ease);
}
.xv-flotante.is-claro { background: #ffffff; color: #050506; border-color: #ffffff; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4); }
.xv-flotante:active { background: #2c2d32; }
.xv-flotante.is-claro:active { background: #dcdee3; }
@media (hover: hover) {
  .xv-flotante:hover { background: #2c2d32; }
  .xv-flotante.is-claro:hover { background: #ececef; }
}

/* ------------------------------------------------------------------ escritorio */
@media (min-width: 900px) {
  :root { --xv-gutter: max(56px, 4.4vw); }
  body { font-size: 18px; }
  .xv-label { font-size: 12px; }
  .xv-cuerpo { font-size: 18px; }

  .xv-inicio > .xv-inicio__folio { display: block; }
  .xv-inicio__arriba { max-width: 60em; }

  /* invitacion: rejilla editorial asimetrica */
  .xv-invitacion { text-align: left; }
  .xv-invitacion .xv-label { text-indent: 0; }
  .xv-invitacion__rejilla {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    justify-items: start;
    align-items: start;
  }
  .xv-invitacion__label { grid-column: 1 / 4; grid-row: 1; padding-top: 1.4em; }
  .xv-invitacion__titular { grid-column: 3 / 13; grid-row: 1; margin-top: 0; max-width: 9.5ch; font-size: clamp(5rem, 8.4vw, 8.6rem); line-height: 0.98; }
  .xv-invitacion__texto { grid-column: 7 / 12; grid-row: 2; margin-top: 56px; font-size: 21px; max-width: 26ch; }
  .xv-ornamento { grid-column: 1 / 13; grid-row: 3; justify-content: flex-start; margin: 120px 0 64px; }
  .xv-ornamento__linea:first-child { flex: 0 0 calc((100% - 22px * 0) * 0.235); }
  .xv-ornamento__linea:last-child { flex: 1; }
  .xv-invitacion__contados {
    grid-column: 3 / 9; grid-row: 4;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); column-gap: 24px;
    justify-items: start; align-items: start;
  }
  .xv-invitacion__contados .xv-label { padding-top: 0.5em; }
  .xv-invitacion__contados .xv-cuerpo { max-width: 34ch; }

  /* cuenta: una fila */
  .xv-reloj { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1180px; }
  .xv-unidad { padding: 20px 12px 24px; gap: 10px; }
  .xv-unidad::before { display: none; }
  .xv-unidad:not(:nth-child(4))::after {
    content: ''; position: absolute; right: 0; top: 16%; bottom: 16%; width: 1px; background: rgba(255, 255, 255, 0.16);
  }
  .xv-unidad:nth-child(-n + 2)::before { display: none; }
  .xv-num { font-size: clamp(6.5rem, 10.4vw, 10.5rem); }

  /* lugar */
  .xv-lugar__frase { top: 28%; }
  .xv-lugar__final { top: 7%; gap: 10px; }
  .xv-lugar__titulo { font-size: clamp(5rem, 9.6vw, 9.6rem); }
  .xv-lugar__vista { font-size: 17px; max-width: none; }
  .xv-piso__eje { --alto: 44vh; height: 44vh; height: 44svh; }
  .xv-piso__marca { transform: translate3d(0, calc(var(--piso, 0) / -56 * 44vh), 0); }
  @supports (height: 1svh) {
    .xv-piso__marca { transform: translate3d(0, calc(var(--piso, 0) / -56 * 44svh), 0); }
  }
  .xv-piso__num { font-size: clamp(6rem, 8vw, 8.4rem); }

  /* como llegar: dos columnas */
  .xv-llegar { text-align: left; }
  .xv-llegar .xv-label { text-indent: 0; }
  .xv-llegar__rejilla {
    grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
    justify-items: stretch; align-items: start;
  }
  .xv-llegar__intro { grid-column: 1 / 7; grid-row: 1; justify-items: start; }
  .xv-llegar__intro .xv-titular { max-width: 8ch; font-size: clamp(4.6rem, 7vw, 7.2rem); }
  .xv-llegar__dir { max-width: 30ch; }
  .xv-datos { grid-column: 8 / 13; grid-row: 1 / 3; margin-top: 2.4em; max-width: none; }
  .xv-datos > div { padding: 30px 26px 34px 0; }
  .xv-datos > div:nth-child(even) { padding-left: 26px; }
  .xv-datos dd { font-size: 23px; }
  /* Maps y Waze comparten la primera fila; el calendario abarca las dos columnas debajo */
  .xv-acciones {
    grid-column: 1 / 8; grid-row: 2;
    display: grid; grid-template-columns: repeat(2, 236px); justify-content: start; justify-items: stretch; gap: 12px;
    margin-top: 56px;
  }
  .xv-acciones .xv-btn { width: 100%; min-width: 0; max-width: none; }
  #calendario-root > * { grid-column: 1 / -1; width: 100%; max-width: none; }
  #calendario-root > * > button, #calendario-root > .xv-btn { width: 100%; min-width: 0; }
  .xv-estac {
    grid-column: 1 / 13; grid-row: 3;
    grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
    justify-items: start; align-items: end;
    margin-top: 160px; padding-top: 72px;
  }
  .xv-estac .xv-label { grid-column: 1 / 4; align-self: start; padding-top: 0.8em; }
  .xv-estac__titulo { grid-column: 3 / 10; font-size: clamp(8rem, 13vw, 13.5rem); }
  .xv-estac .xv-cuerpo { grid-column: 10 / 13; padding-bottom: 1.6em; }
  .xv-datos > div.xv-datos__aviso { justify-items: start; padding-right: 0; }
  .xv-datos .xv-datos__aviso dd { font-size: 16px; max-width: 40ch; }
  /* el recorrido: texto y pasos a la izquierda, el video vertical a la derecha */
  .xv-ruta {
    grid-column: 1 / 13; grid-row: 4;
    grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
    justify-items: start; align-items: center;
    margin-top: 160px; padding-top: 96px;
  }
  .xv-ruta__texto { grid-column: 1 / 7; justify-items: start; }
  .xv-ruta__titulo { font-size: clamp(3.4rem, 4.6vw, 5rem); max-width: 10ch; }
  .xv-ruta__texto .xv-cuerpo { max-width: 32ch; }
  .xv-ruta__pasos { max-width: 440px; margin-top: 48px; }
  .xv-ruta__pasos li { font-size: 17px; padding: 18px 0 19px; }
  .xv-ruta__figura { grid-column: 8 / 12; justify-self: center; max-width: 340px; }

  /* vestimenta: encabezado centrado sobre la escena ancha */
  .xv-vestimenta__cabeza { gap: 22px; }
  .xv-vestimenta__cabeza .xv-titular { max-width: none; font-size: clamp(4.2rem, 6.4vw, 7rem); }
  .xv-vestimenta__escena { width: 100%; margin-inline: 0; aspect-ratio: auto; height: min(74vh, 720px); min-height: 480px; }
  .xv-vestimenta__gira { text-align: center; }
  .xv-vestimenta__pares { text-align: center; }
  .xv-vestimenta__pares > div { padding: 28px 24px 4px; }
  .xv-vestimenta__pares dd { font-size: 20px; max-width: 22em; }
  .xv-vestimenta__nota { text-align: center; margin-top: 80px; }
  .xv-vestimenta__detalle { font-size: 20px; }
  .xv-ornamento--nota { grid-column: auto; grid-row: auto; justify-content: center; margin: 32px 0 24px; }
  .xv-ornamento--nota .xv-ornamento__linea:first-child,
  .xv-ornamento--nota .xv-ornamento__linea:last-child { flex: 0 0 40px; }
  .sin-js .xv-vestimenta__pares,
  .xv-vestimenta.is-sin-escena .xv-vestimenta__pares { margin-top: 64px; }
}

@media (min-width: 1500px) {
  .xv-num { font-size: 11.5rem; }
}

/* telefonos bajitos o en horizontal */
@media (max-height: 640px) and (max-width: 899px) {
  .xv-sello__medallon { --diam: clamp(132px, 38vw, 170px); margin: 22px 0 22px; }
  .xv-sello__nombre { font-size: clamp(2rem, 7vw, 3rem); }
}
/* telefonos en horizontal (alto corto): todo cabe en una pantalla, el sello en dos columnas */
@media (orientation: landscape) and (max-height: 500px) {
  .con-js.sellada .xv-sello {
    place-items: center;
    padding: max(14px, env(safe-area-inset-top)) max(var(--xv-gutter), env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom)) max(var(--xv-gutter), env(safe-area-inset-left));
  }
  .xv-sello__col {
    display: grid; grid-template-columns: auto minmax(0, 30rem); grid-template-rows: auto auto auto; justify-content: center;
    column-gap: clamp(32px, 6vw, 72px); justify-items: center;
    max-width: 780px;
  }
  .xv-sello__medallon { grid-column: 1; grid-row: 1 / 4; align-self: center; --diam: clamp(112px, 38svh, 176px); margin: 9px; }
  .xv-sello__arriba { grid-column: 2; grid-row: 1; align-self: end; }
  .xv-sello__para { grid-column: 2; grid-row: 2; min-height: 0; margin-top: 12px; width: 100%; }
  .xv-sello__generico, .xv-sello__personal { gap: 6px; }
  .xv-sello__nombre { font-size: clamp(1.7rem, 9svh, 2.7rem); max-width: 18ch; margin: 0 0 2px; }
  .xv-sello__personal .xv-sello__nombre { max-width: 20ch; }
  .xv-sello__personal .xv-sello__nombre:empty { width: min(40vw, 300px); }
  .xv-sello__abrir, .xv-sello .xv-sello__abrir { grid-column: 2; grid-row: 3; align-self: start; margin-top: 14px; }

  /* hero: logo mas chico para que fecha y DESLIZA queden en la primera pantalla */
  .xv-inicio { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .xv-inicio__logo { width: min(86vw, 41svh, 600px); }
  .xv-inicio__centro { padding-block: 4px; }
  .xv-inicio__fecha { font-size: clamp(1.5rem, 7svh, 2rem); margin-top: 4px; }
  .xv-inicio__hora { margin-top: 6px; }
  .xv-inicio__pie { grid-auto-flow: column; align-items: end; gap: 28px; }
  .xv-desliza { gap: 8px; }
  .xv-desliza__linea { height: 28px; }

  /* cuenta: una fila */
  .xv-reloj { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; margin-top: 24px; }
  .xv-unidad { padding: 14px 8px 16px; }
  .xv-unidad::before, .xv-unidad:nth-child(-n + 2)::before { display: none; }
  .xv-unidad:not(:nth-child(4))::after {
    content: ''; position: absolute; right: 0; top: 18%; bottom: 18%; width: 1px; background: rgba(255, 255, 255, 0.16);
  }
  .xv-num { font-size: clamp(3.4rem, 19svh, 5.2rem); }
  .xv-cuenta__hoy, .xv-cuenta__pie { margin-top: 22px; }

  /* torre: el escenario mide exactamente la pantalla; contador y titulo compactos */
  .xv-lugar__escenario { min-height: 0; }
  .xv-lugar__capa { padding-block: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-bottom)); }
  .xv-lugar__label { top: max(16px, env(safe-area-inset-top)); }
  .xv-lugar__frase { top: 20%; }
  .xv-piso { bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px)); gap: 10px; }
  .xv-piso__eje { height: 26vh; height: 26svh; }
  .xv-piso__marca { transform: translate3d(0, calc(var(--piso, 0) / -56 * 26vh), 0); }
  @supports (height: 1svh) {
    .xv-piso__marca { transform: translate3d(0, calc(var(--piso, 0) / -56 * 26svh), 0); }
  }
  .xv-piso__num { font-size: clamp(2.4rem, 15svh, 3.8rem); }
  .xv-lugar__final { top: 5%; gap: 6px; }
  .xv-lugar__titulo { font-size: clamp(2.6rem, 15svh, 4.6rem); margin-bottom: 0; }
  .xv-lugar__vista { font-size: 14px; max-width: none; }

  /* vestimenta: la escena cabe en la pantalla */
  .xv-vestimenta__escena { width: 100%; margin-inline: 0; aspect-ratio: auto; height: 84vh; height: 84svh; min-height: 0; }
  .xv-vestimenta__pares dd { max-width: 22em; }
}

@media (max-width: 359px) {
  :root { --xv-gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  .xv-label { letter-spacing: 0.28em; }
  .xv-btn { min-width: 0; width: 100%; padding: 0 20px; }
  .xv-num { font-size: 4.1rem; }
}

/* ------------------------------------------------------------------ colores forzados (alto contraste) */
@media (forced-colors: active) {
  .xv-velo::before, .xv-lugar__capa .xv-velo::before { display: none; }
  .xv-dig > span, .xv-cuenta__hoy, .sin-js .xv-cuenta__sinjs {
    background: none; -webkit-text-fill-color: CanvasText; color: CanvasText;
  }
  .xv-unidad .xv-label, .xv-cuenta__pie { color: CanvasText; }
  /* la placa de legibilidad de los numerales (capa propia por will-change) tapaba las etiquetas de abajo */
  .xv-num { forced-color-adjust: none; color: CanvasText; }
  .xv-dig > span { will-change: auto; }
}

/* ------------------------------------------------------------------ movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .xv-sello__camelia, .xv-mueve::before { animation: none; }
  .xv-desliza__linea::after { animation: none; transform: none; height: 100%; opacity: 0.5; }
  .xv-sello__nombre:empty::before { animation: none; }
  .xv-sello.is-listo .xv-sello__abrir::after { animation: none; }
  #hero-logo { transform: none !important; filter: none !important; }
  .xv-app .xv-inicio [data-in] { translate: none; }
}

/* ------------------------------------------------------------------ niveles de Bodoni (trazos finos legibles)
   Con optical sizing automatico, Bodoni Moda usa opsz 96 a tamanos medianos y sus trazos finos quedan bajo 1 px.
   Dos niveles compartidos: medio (16 a 44 px aprox.) y grande (titulares). Los numerales grandes tienen el suyo (opsz 14 / 500). */
:root {
  --xv-opsz-medio: 10;  --xv-peso-medio: 500;
  --xv-opsz-grande: 18; --xv-peso-grande: 450;
}
@media (min-width: 900px) {
  /* en escritorio los titulares pasan de 80 px: aguantan mas contraste */
  :root { --xv-opsz-grande: 30; --xv-peso-grande: 400; }
}
.xv-titular,
.xv-lugar__titulo {
  font-optical-sizing: none;
  font-variation-settings: 'opsz' var(--xv-opsz-grande);
  font-weight: var(--xv-peso-grande);
}
.xv-sello__nombre,
.xv-inicio__fecha,
.xv-datos dd,
.xv-lugar__frase,
.xv-pie__frase,
.xv-vestimenta__cita {
  font-optical-sizing: none;
  font-variation-settings: 'opsz' var(--xv-opsz-medio);
  font-weight: var(--xv-peso-medio);
}
/* las frases de la torre pasan de ~44 px cuando la columna del cielo es ancha: nivel grande */
.xv-lugar__frase.is-grande { font-variation-settings: 'opsz' 18; font-weight: 450; }
