/* ============================================================
   Tarjetas de Rango 4Life
   Mobile-first. Sin dependencias, sin build.
   ============================================================ */

:root {
  --accent: #3c55a5;        /* color real de la tarjeta: relleno decorativo */
  --accent-ink: #8fa4e8;    /* variante legible sobre el fondo: texto y bordes (la calcula app.js) */

  --bg: #06080f;
  --bg-2: #0b0f1b;
  --text: #f3f5f9;
  --muted: #8c94a8;
  --line: rgba(255, 255, 255, .10);
  --surface: rgba(255, 255, 255, .055);
  --surface-2: rgba(255, 255, 255, .085);
  --shadow: rgba(0, 0, 0, .55);

  --ease: cubic-bezier(.16, .84, .24, 1);
  --flip-ms: 880ms;

  /* La tarjeta manda: es 2:3 y nunca debe desbordar ni a lo alto ni a lo ancho. */
  --card-w: min(76vw, 340px, calc(52vh * 0.6667));
  --card-h: calc(var(--card-w) * 1.5);
  --radius: 18px;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@supports (height: 100dvh) {
  :root { --card-w: min(76vw, 340px, calc(52dvh * 0.6667)); }
}

[data-theme="light"] {
  --bg: #eaeef6;
  --bg-2: #dde4f0;
  --text: #0e121c;
  --muted: #5b647a;
  --line: rgba(10, 16, 32, .12);
  --surface: rgba(255, 255, 255, .72);
  --surface-2: #fff;
  --shadow: rgba(20, 30, 60, .22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  padding-bottom: var(--safe-b);
  transition: background 500ms var(--ease), color 300ms var(--ease);
}

svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Fondo ambiental: respira con el color del rango ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 62%),
    radial-gradient(90% 60% at 50% 108%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 68%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 55%);
  transition: background 700ms var(--ease);
}
/* Grano finísimo: le quita el aspecto "plano" al degradado */
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='.5'/></svg>");
}
[data-theme="light"] .ambient::after { opacity: .30; mix-blend-mode: multiply; }

/* ---------- Barra superior ---------- */
.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(var(--safe-t) + 12px) 16px 8px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* La marca es de la app, no del rango: se queda fija para no desaparecer
   con los acentos extremos (Platino Elite es casi negro). */
.brand__mark {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 9px;
  background: linear-gradient(140deg, #6e96eb, #3c55a5);
  box-shadow: 0 0 0 1px var(--line), 0 6px 18px -8px #3c55a5;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand__text strong { font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.brand__text small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar__actions { display: flex; gap: 8px; flex: none; }

.iconbtn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 200ms, transform 120ms;
}
.iconbtn:active { transform: scale(.93); }
.iconbtn svg { stroke-width: 1.8; }
.iconbtn .i-sun { display: none; }
[data-theme="light"] .iconbtn .i-sun { display: block; }
[data-theme="light"] .iconbtn .i-moon { display: none; }

/* ---------- Escenario ---------- */
.stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

/* ---------- Carrusel ---------- */
.deck {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* El primer y último slide quedan centrados; los vecinos asoman a los lados. */
  padding: 26px calc((100vw - var(--card-w)) / 2);
  -webkit-overflow-scrolling: touch;
}
.deck::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 var(--card-w);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
}

/* ---------- La tarjeta ---------- */
.card {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  perspective: 1700px;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: none;
  /* Los vecinos se atenúan y encogen: la activa manda. */
  transform: scale(.88);
  opacity: .38;
  filter: saturate(.7);
  transition: transform 450ms var(--ease), opacity 450ms var(--ease), filter 450ms var(--ease);
}
.slide.is-active .card { transform: scale(1); opacity: 1; filter: none; }

/* Sombra proyectada: se aplasta y se ensancha cuando la tarjeta gira */
.card__shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -26px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--shadow), transparent 78%);
  filter: blur(10px);
  transform-origin: 50% 50%;
}
.card.is-flipping .card__shadow { animation: shadowSquash var(--flip-ms) var(--ease); }

@keyframes shadowSquash {
  0%   { transform: scaleX(1) scaleY(1); opacity: 1; }
  50%  { transform: scaleX(.55) scaleY(.7); opacity: .5; }
  100% { transform: scaleX(1) scaleY(1); opacity: 1; }
}

.card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(var(--deg, 0deg));
  transition: transform var(--flip-ms) var(--ease);
}
.card.is-back .card__inner { --deg: 180deg; }

/* El "levantamiento": la tarjeta se acerca al lector a mitad del giro,
   que es lo que hace que se lea como una página que se voltea y no como un sprite. */
.card.is-flipping .card__inner { animation: lift var(--flip-ms) var(--ease); }

@keyframes lift {
  0%   { scale: 1; translate: 0 0; }
  50%  { scale: 1.06; translate: 0 -14px; }
  100% { scale: 1; translate: 0 0; }
}

.face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .35) inset,
    0 30px 60px -24px rgba(0, 0, 0, .75),
    0 0 0 1px rgba(0, 0, 0, .06);
}
.face--back { transform: rotateY(180deg); }

.face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Barrido especular: cruza la cara durante el giro */
.face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent 28%,
    rgba(255, 255, 255, .58) 46%,
    rgba(255, 255, 255, .18) 54%,
    transparent 68%);
  translate: -120% 0;
  opacity: 0;
}
.card.is-flipping .face::after { animation: glare var(--flip-ms) var(--ease); }

@keyframes glare {
  0%   { translate: -120% 0; opacity: 0; }
  35%  { opacity: .9; }
  100% { translate: 120% 0; opacity: 0; }
}

/* Sombreado de canto: oscurece el borde de fuga mientras gira */
.face::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, .30), transparent 42%);
  opacity: 0;
}
.card.is-flipping .face::before { animation: edge var(--flip-ms) var(--ease); }

@keyframes edge {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}

/* Halo del color del rango. Usa la tinta y no el acento crudo: si no,
   la tarjeta negra de Platino Elite se quedaría sin ningún halo. */
.card::before {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-ink) 45%, transparent), transparent 72%);
  opacity: 0;
  filter: blur(28px);
  transition: opacity 500ms var(--ease);
}
.slide.is-active .card::before { opacity: .55; }

/* Botón de ampliar: vive fuera de .card__inner, así no gira con la tarjeta */
.card__zoom {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  padding: 7px;
  border: 0;
  border-radius: 11px;
  background: rgba(0, 0, 0, .42);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 400ms var(--ease), transform 120ms;
}
.slide.is-active .card__zoom { opacity: 1; }
.card__zoom:active { transform: scale(.9); }
.card__zoom svg { stroke-width: 2; }

/* Cinta "1 de 15" sobre la tarjeta */
.card__pos {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .04em;
  color: #fff;
  background: rgba(0, 0, 0, .42);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 400ms var(--ease);
}
.slide.is-active .card__pos { opacity: 1; }
.card.is-back .card__pos { opacity: 0; }

/* ---------- Lectura bajo la tarjeta ---------- */
.readout {
  text-align: center;
  padding: 30px 22px 10px;
  min-height: 0;
}

.readout__step {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.readout__name {
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.12;
  margin: 4px 0 6px;
}

.readout__income {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.readout__income > span:first-child { font-size: 19px; font-weight: 650; }
.readout__income-label { font-size: 11px; color: var(--muted); }

.readout__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  transition: opacity 300ms;
}
.readout__hint svg { width: 14px; height: 14px; flex: none; }
.readout__hint.is-hidden { opacity: 0; }

/* ---------- Riel de progresión ---------- */
.rail {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 16px 12px;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: color 220ms, border-color 220ms, background 220ms, transform 120ms;
}
.chip:active { transform: scale(.95); }
.chip__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--dot);
  flex: none;
}
.chip.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--dot) 18%, transparent);
  border-color: color-mix(in srgb, var(--dot) 60%, transparent);
}

/* ---------- Acciones ---------- */
.actions {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  padding: 0 16px 14px;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 15px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms, filter 200ms, background 200ms;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--ghost { background: var(--surface); color: var(--text); }
.btn--primary {
  background: #25d366;                       /* verde WhatsApp */
  border-color: transparent;
  color: #06210f;
  box-shadow: 0 10px 26px -12px #25d366;
}
.btn--primary .i-wa { stroke-width: 1.6; }

/* ---------- Hojas inferiores ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
}
.sheet[hidden] { display: none; }

.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 12, .62);
  backdrop-filter: blur(3px);
  animation: fade 260ms var(--ease);
}
@keyframes fade { from { opacity: 0; } }

.sheet__panel {
  position: relative;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: 26px 26px 0 0;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .7);
  padding-bottom: var(--safe-b);
  animation: rise 380ms var(--ease);
}
@keyframes rise { from { transform: translateY(100%); } }

.sheet.is-closing .sheet__panel { animation: sink 240ms var(--ease) forwards; }
.sheet.is-closing .sheet__scrim { animation: fade 240ms var(--ease) reverse forwards; }
@keyframes sink { to { transform: translateY(100%); } }

.sheet__grab {
  width: 100%;
  padding: 12px 0 8px;
  border: 0;
  background: none;
  cursor: pointer;
  flex: none;
}
.sheet__grab::before {
  content: "";
  display: block;
  width: 40px; height: 4px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--line);
}

.sheet__body { overflow-y: auto; padding: 4px 20px 24px; -webkit-overflow-scrolling: touch; }

/* ---------- Contenido del panel de explicación ---------- */
.sh__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sh__swatch {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 13px;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--line), 0 8px 22px -10px var(--accent-ink);
}
.sh__name { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.sh__tag { font-size: 13px; color: var(--muted); line-height: 1.35; }

.sh__hero {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 18px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
}
.sh__hero b { font-size: 30px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sh__hero span { font-size: 12px; color: var(--muted); }

.sh__h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 10px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sh__h::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.req { display: flex; flex-direction: column; gap: 1px; }
.req__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.req__row:first-child { border-radius: 13px 13px 0 0; }
.req__row:last-child { border-radius: 0 0 13px 13px; }
.req__row:only-child { border-radius: 13px; }
.req__v {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-width: 92px;
  flex: none;
}
.req__l { font-size: 14px; color: var(--muted); }

.ben { display: flex; flex-direction: column; gap: 12px; }
.ben__row { display: flex; flex-direction: column; gap: 5px; }
.ben__k { font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.ben__v { font-size: 15px; line-height: 1.45; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
}

.new { display: flex; flex-direction: column; gap: 8px; }
.new__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--accent-ink) 34%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-ink) 10%, transparent);
}
.new__plus {
  flex: none;
  width: 18px; height: 18px;
  margin-top: 1px;
  color: var(--accent-ink);
}
.new__txt { font-size: 14px; line-height: 1.4; }
.new__txt small { display: block; color: var(--muted); font-size: 11.5px; }

.note {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 2px solid var(--accent-ink);
  border-radius: 0 10px 10px 0;
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.legal { margin-top: 26px; }
.legal summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 0;
  list-style: none;
}
.legal summary::-webkit-details-marker { display: none; }
.legal summary::before { content: "＋ "; }
.legal[open] summary::before { content: "－ "; }
.legal p { font-size: 11.5px; line-height: 1.55; color: var(--muted); margin-bottom: 8px; }
.legal a { color: var(--accent-ink); }

/* ---------- Menú de compartir ---------- */
.share__body { padding: 4px 20px 26px; }
.share__title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 16px; }
.share__title span { color: var(--accent-ink); }

.share__opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  margin-bottom: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 200ms, transform 120ms;
}
.share__opt:active { transform: scale(.98); }
.share__ico {
  width: 42px; height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-2);
}
.share__ico--wa { background: #25d366; color: #06210f; }
.share__txt strong { display: block; font-size: 15px; font-weight: 600; }
.share__txt small { font-size: 12px; color: var(--muted); }

/* ---------- Cuadrícula de rangos ---------- */
.grid {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: fade 260ms var(--ease);
}
.grid[hidden] { display: none; }

.grid__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-t) + 14px) 16px 12px;
  border-bottom: 1px solid var(--line);
}
.grid__bar h2 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }

.grid__scroll {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
  padding: 18px 16px calc(var(--safe-b) + 24px);
  -webkit-overflow-scrolling: touch;
}

.gcard { cursor: pointer; border: 0; background: none; padding: 0; text-align: center; }
.gcard img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .7);
  transition: transform 200ms var(--ease);
}
.gcard:active img { transform: scale(.95); }
.gcard b { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--text); }
.gcard small { display: block; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Visor a pantalla completa ---------- */
.zoom {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  background: #05070d;
  animation: fade 240ms var(--ease);
}
.zoom[hidden] { display: none; }
.zoom.is-closing { animation: fade 200ms var(--ease) reverse forwards; }

.zoom__stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  /* Sin esto el navegador se queda con el pellizco y no llegan los eventos. */
  touch-action: none;
  cursor: grab;
}
.zoom__stage:active { cursor: grabbing; }

/* La tarjeta se ajusta a la pantalla; su tamaño real es el del <img>,
   que es lo que mide el código de zoom para limitar el arrastre. */
.zoom__img,
#zoom-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 10px;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
}

.zoom__top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(var(--safe-t) + 12px) 14px 28px;
  background: linear-gradient(180deg, rgba(5, 7, 13, .85), transparent);
  pointer-events: none;
}
.zoom__top > * { pointer-events: auto; }
.zoom__name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.01em;
  color: #fff;
  padding-left: 4px;
}
.iconbtn--solid { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .16); color: #fff; }

.zoom__hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-b) + 86px);
  z-index: 2;
  translate: -50% 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 500ms var(--ease);
}
.zoom__hint.is-off { opacity: 0; }

.zoom__bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  gap: 10px;
  padding: 30px 16px calc(var(--safe-b) + 14px);
  background: linear-gradient(0deg, rgba(5, 7, 13, .9), transparent);
}
.zoom__bottom .btn--ghost {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .16);
  color: #fff;
}
.zoom__bottom .btn[hidden] { display: none; }

/* ---------- Instalar: aviso y panel ---------- */
.iconbtn--accent {
  background: color-mix(in srgb, var(--accent-ink) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent-ink) 45%, transparent);
  color: var(--accent-ink);
}
.iconbtn[hidden] { display: none; }

.promo {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(var(--safe-b) + 76px);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .75);
  animation: rise 420ms var(--ease);
}
.promo[hidden] { display: none; }
.promo.is-closing { animation: sink 220ms var(--ease) forwards; }

.promo__ico {
  width: 32px; height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent-ink) 18%, transparent);
  color: var(--accent-ink);
}
.promo__txt { flex: 1; font-size: 13.5px; font-weight: 550; line-height: 1.25; }

.promo__cta {
  flex: none;
  padding: 8px 13px;
  border: 0;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.promo__x {
  flex: none;
  width: 30px; height: 30px;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.ins__title { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.ins__sub { font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-bottom: 18px; }

.ins__now {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  margin-bottom: 18px;
  border: 0;
  border-radius: 15px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}
.ins__now[hidden] { display: none; }
.ins__now svg { width: 18px; height: 18px; flex: none; }

.ins__tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.ins__tab {
  flex: 1;
  padding: 9px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms, color 200ms;
}
.ins__tab.is-on { background: var(--surface-2); color: var(--text); }

.ins__steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.ins__steps li {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.5;
}
.ins__steps li > span { flex: 1; min-width: 0; }
.ins__steps li::before {
  content: counter(step);
  flex: none;
  width: 24px; height: 24px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-ink) 20%, transparent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}
.ins__steps b { font-weight: 650; }

/* Los glifos van dentro del texto del paso: deben verse como iconos, no romper el renglón */
.ins__g {
  display: inline-block;
  vertical-align: -4px;
  width: 18px; height: 18px;
  margin: 0 1px;
  padding: 2px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text);
  stroke-width: 1.8;
}

.ins__copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 22px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
}
.ins__copy svg { width: 16px; height: 16px; flex: none; color: var(--muted); }

/* ---------- Aviso flotante ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 84px);
  z-index: 40;
  translate: -50% 0;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(12, 16, 28, .94);
  border: 1px solid var(--line);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms var(--ease), translate 260ms var(--ease);
}
.toast.is-on { opacity: 1; translate: -50% -8px; }

/* ---------- Modo incrustado (?embed=1) ---------- */
body.is-embed .topbar { display: none; }
body.is-embed .readout { padding-top: 22px; }

/* ---------- Pantallas grandes ---------- */
@media (min-width: 780px) {
  :root { --card-w: min(340px, calc(56vh * 0.6667)); }
  .actions { max-width: 460px; margin: 0 auto; width: 100%; }
  .rail { justify-content: safe center; }
}

/* ---------- Accesibilidad: sin movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .card__inner { transition: none; }
}
