/* ==========================================================================
   Voz a Letra · base.css
   Reset, tipografía base, foco y componentes compartidos por la landing y la app.
   Requiere tokens.css antes. Móvil primero (funciona desde 360px). Sin frameworks.
   Guía y ejemplos: docs/DISENO.md
   ========================================================================== */

/* ---------- Iconos (máscaras SVG; se pintan con currentColor vía .icon) ---------- */
:root {
  --icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.25'/%3E%3Cpath d='M12 11v6M12 7.6v.01'/%3E%3C/svg%3E");
  --icon-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.25'/%3E%3Cpath d='M8 12.4l2.8 2.8 5.4-5.6'/%3E%3C/svg%3E");
  --icon-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.6 2.6 19.8h18.8z'/%3E%3Cpath d='M12 10v4.6M12 17.3v.01'/%3E%3C/svg%3E");
  --icon-error: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.25'/%3E%3Cpath d='M12 7.5v5.5M12 16.4v.01'/%3E%3C/svg%3E");
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8.5' y='8.5' width='11' height='11' rx='2'/%3E%3Cpath d='M15.5 8.5V6A1.5 1.5 0 0 0 14 4.5H6A1.5 1.5 0 0 0 4.5 6v8A1.5 1.5 0 0 0 6 15.5h2.5'/%3E%3C/svg%3E");
  --icon-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 19.5h14'/%3E%3C/svg%3E");
  --icon-upload: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V4M7 9l5-5 5 5M5 19.5h14'/%3E%3C/svg%3E");
  --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E");
  --icon-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2'/%3E%3Cpath d='M8 10.5v-3a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c2cee0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* ==========================================================================
   1. Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-color: var(--bg);
  color-scheme: dark;
  font-synthesis: style;            /* nunca negritas falsas; cursiva simulada sí */
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (pointer: fine) { html { overscroll-behavior: none; } }
body {
  min-height: 100vh; /* taste-skill-ignore: respaldo; la línea siguiente usa 100dvh */
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: var(--weight-regular);
  line-height: var(--lh-text);
  letter-spacing: var(--track-text);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }  /* sin especificidad: cada componente pone su padding */
table { border-collapse: collapse; }
[hidden] { display: none !important; }
a, button, label, summary, select, [role="button"], [role="tab"], [role="switch"] { touch-action: manipulation; }
::selection { background-color: var(--selection-bg); color: var(--selection-ink); }
hr { border: 0; height: 0; margin-block: var(--space-7); }  /* sin líneas: solo espacio */

/* Barras de scroll discretas */
* { scrollbar-color: var(--ocean-500) transparent; scrollbar-width: thin; }

/* ==========================================================================
   2. Foco (visible siempre con teclado)
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* ==========================================================================
   3. Tipografía
   ========================================================================== */
h1, h2, .display, .h1, .h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-optical-sizing: auto;
  line-height: var(--lh-heading);
  letter-spacing: var(--track-heading);
  text-wrap: balance;
  hyphens: none;
}
h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
.display {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
}
h3, .h3 {
  font-family: var(--font-text);
  font-size: var(--fs-h3);
  font-weight: var(--weight-semibold);
  line-height: var(--lh-snug);
  letter-spacing: 0;
  text-wrap: balance;
}
h4, .h4 {
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: var(--weight-bold);
  line-height: 1.35;
  letter-spacing: 0;
}
h5, h6 { font-size: var(--fs-small); font-weight: var(--weight-bold); line-height: 1.4; }
:where(h1, h2, h3, h4, h5, h6)[id] { scroll-margin-top: calc(var(--header-h) + var(--space-5)); }

:where(p) { max-width: var(--measure); text-wrap: pretty; }
.lead {
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--text);
  max-width: 36ch;
  text-wrap: pretty;
}
.small, small { font-size: var(--fs-small); line-height: 1.5; }
strong, b { font-weight: var(--weight-bold); }
.serif { font-family: var(--font-display); font-weight: var(--weight-display); }
.sans { font-family: var(--font-text); }
.text-soft { color: var(--text-soft); }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--light-cyan); }
.num, .tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.measure { max-width: var(--measure); }
.measure-narrow { max-width: var(--measure-narrow); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Enlaces: en texto corrido, cian y subrayados (se reconocen sin leer). */
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
.link,
:where(p, li, dd, td, figcaption, .prose, .alert, .field__hint, .toast) a:not([class]) {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-color: rgb(98 227 255 / 0.45);
  transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease;
}
@media (hover: hover) and (pointer: fine) {
  .link:hover,
  :where(p, li, dd, td, figcaption, .prose, .alert, .field__hint, .toast) a:not([class]):hover {
    text-decoration-color: currentColor;
    color: var(--light-ice);
  }
}
.link--quiet { color: var(--text-soft); text-decoration-color: rgb(194 206 224 / 0.35); }

/* Texto largo (páginas SEO, privacidad, términos) */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem); margin-top: 1.6em; }
.prose h3 { margin-top: 1.5em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--light-cyan); }

/* Código real (solo <code>/<pre>) */
:not(pre) > code {
  font-family: var(--font-code);
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: var(--radius);
  background-color: var(--surface-2);
}
pre {
  font-family: var(--font-code);
  font-size: var(--fs-small);
  line-height: 1.55;
  padding: var(--space-4);
  border-radius: var(--radius);
  background-color: var(--surface-1);
  overflow-x: auto;
}

/* Tecla */
kbd, .kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.2em 0.5em 0.25em;
  font-family: var(--font-text);
  font-size: 0.86em;
  font-weight: var(--weight-semibold);
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  color: var(--text);
  background-color: var(--surface-4);
  border-radius: var(--radius);
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.38); /* taste-skill-ignore: relieve interior de tecla */
}

/* Código para copiar: recuperación VOZ-XXXX-…, dirección USDT, monto exacto.
   No es monoespaciada: Atkinson Hyperlegible ya distingue 0/O y 1/l/I (aquí sí, con el cero con barra). */
.code-box {
  display: block;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-text-code);
  font-size: clamp(1.125rem, 1rem + 0.7vw, 1.5rem);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums slashed-zero;
  letter-spacing: var(--track-wide);
  line-height: 1.35;
  color: var(--text);
  background-color: var(--surface-2);
  border-radius: var(--radius);
  overflow-wrap: anywhere;   /* corta primero en los guiones; una dirección larga, donde haga falta */
  user-select: all;
}

/* ==========================================================================
   4. Accesibilidad: salto al contenido y texto solo para lectores
   ========================================================================== */
.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--margin);
  z-index: var(--z-skip);
  padding: var(--space-3) var(--space-5);
  font-weight: var(--weight-bold);
  color: var(--ocean-950);
  background-color: var(--ink);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--t-ui) var(--ease-out);
}
.skip-link:focus, .skip-link:focus-visible { transform: none; }

.visually-hidden, .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================================================
   5. Layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--margin));
  margin-inline: auto;
  padding-left: max(var(--margin), env(safe-area-inset-left));
  padding-right: max(var(--margin), env(safe-area-inset-right));
}
.container--wide { max-width: calc(var(--container-wide) + 2 * var(--margin)); }
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--margin)); }
.container--bleed { max-width: none; padding-inline: 0; }

.section { padding-block: calc(var(--section) / 2); }
.stack { display: flex; flex-direction: column; gap: var(--gap, var(--space-4)); }
.stack > * { min-width: 0; }
.stack--sm { --gap: var(--space-2); }
.stack--lg { --gap: var(--space-6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--space-3)); }
.cluster--end { justify-content: flex-end; }
.cluster--between { justify-content: space-between; }

/* Línea de contexto opcional (ver DISENO.md: en la landing NO va encima de títulos). */
.eyebrow { /* taste-skill-ignore: lo pide el contrato; uso limitado en DISENO.md */
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-text);
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--light-cyan);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background-color: currentColor;
}

/* Icono suelto: <span class="icon" style="--icon: var(--icon-copy)" aria-hidden="true"></span> */
.icon {
  display: inline-block;
  flex: none;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.2em;
  background-color: currentColor;
  -webkit-mask: var(--icon, var(--icon-info)) center / contain no-repeat;
  mask: var(--icon, var(--icon-info)) center / contain no-repeat;
}

/* ==========================================================================
   6. Botones
   ========================================================================== */
.btn {
  --btn-bg: var(--surface-3);
  --btn-bg-hover: var(--surface-4);
  --btn-fg: var(--text);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: var(--control-h);
  max-width: 100%;
  padding: 0.5rem 1.375rem;
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  letter-spacing: 0.005em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  color: var(--btn-fg);
  background-color: var(--btn-bg);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--t-press) var(--ease-out),
    background-color var(--t-hover) ease,
    color var(--t-hover) ease,
    box-shadow var(--t-hover) ease; /* taste-skill-ignore: transición del anillo interior */
}
.btn .icon, .btn svg { width: 1.2em; height: 1.2em; flex: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background-color: var(--btn-bg-hover); }
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Principal: ámbar faro. Solo Pagar / Probar gratis / Comprar. Una por pantalla. */
.btn--primary {
  --btn-bg: var(--accent);
  --btn-bg-hover: var(--accent-hover);
  --btn-fg: var(--accent-ink);
}
.btn--primary:active { background-color: var(--accent-press); }

/* Fantasma: para encima de fotos/video y acciones secundarias ("Entrar"). */
.btn--ghost {
  --btn-bg: rgb(237 243 251 / 0.06);
  --btn-bg-hover: rgb(237 243 251 / 0.14);
  box-shadow: var(--ring-ghost); /* taste-skill-ignore: anillo interior (inset), no sombra */
}
@media (hover: hover) and (pointer: fine) {
  .btn--ghost:hover { box-shadow: inset 0 0 0 1.5px rgb(237 243 251 / 0.6); } /* taste-skill-ignore: anillo interior */
}

/* Silencioso: solo texto (Cancelar, Ver más). */
.btn--quiet {
  --btn-bg: transparent;
  --btn-bg-hover: rgb(237 243 251 / 0.08);
  --btn-fg: var(--text-soft);
  padding-inline: 0.875rem;
}
@media (hover: hover) and (pointer: fine) {
  .btn--quiet:hover { color: var(--text); }
}

/* Peligro: borrar cuenta / borrar transcripción (siempre con confirmación). */
.btn--danger {
  --btn-bg: var(--error-bg);
  --btn-bg-hover: var(--error-bg-strong);
  --btn-fg: var(--error);
}

.btn--lg {
  min-height: var(--control-h-lg);
  padding-inline: 1.875rem;
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
}
.btn--sm {
  min-height: 2.5rem;
  padding-inline: 1rem;
  font-size: var(--fs-small);
}
.btn--sm::after { content: ""; position: absolute; inset: -4px -2px; }  /* área táctil de 48px */
.btn--block { display: flex; width: 100%; white-space: normal; }
.btn--icon { width: var(--control-h); padding: 0; flex: none; }
.btn--icon.btn--sm { width: 2.5rem; }

/* Deshabilitado */
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Cargando: <button class="btn btn--primary is-loading" aria-busy="true">Pagando…</button> */
.btn.is-loading, .btn[aria-busy="true"] { cursor: progress; pointer-events: none; opacity: 1; }
.btn.is-loading::before, .btn[aria-busy="true"]::before {
  content: "";
  flex: none;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: vl-spin 0.8s linear infinite;
}

/* ==========================================================================
   7. Formularios
   ========================================================================== */
.field { display: grid; gap: var(--space-2); min-width: 0; }
.field__label, .label {
  display: block;
  font-size: var(--fs-body);
  font-weight: var(--weight-semibold);
  line-height: 1.35;
  color: var(--text);
}
.field__hint { font-size: var(--fs-small); line-height: 1.45; color: var(--text-muted); }
.field__error {
  display: flex;
  align-items: flex-start;
  gap: 0.45em;
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
  line-height: 1.45;
  color: var(--error);
}
.field__error::before {
  content: "";
  flex: none;
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.12em;
  background-color: currentColor;
  -webkit-mask: var(--icon-error) center / contain no-repeat;
  mask: var(--icon-error) center / contain no-repeat;
}
.field__error:empty { display: none; }

.input, .select, .textarea {
  display: block;
  width: 100%;
  min-height: var(--control-h);
  padding: 0.75rem 1rem;
  font-family: var(--font-text);
  font-size: max(1rem, var(--fs-body));   /* ≥16px: iOS no hace zoom */
  font-weight: var(--weight-regular);
  line-height: 1.4;
  color: var(--text);
  background-color: var(--surface-1);
  border: var(--border-w) solid var(--line-field);
  border-radius: var(--radius);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease;
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder); opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .input:hover, .select:hover, .textarea:hover { border-color: var(--line-field-hover); }
}
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
  background-color: var(--surface-2);
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"],
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea {
  border-color: var(--error);
}
.input:disabled, .select:disabled, .textarea:disabled { opacity: 0.55; cursor: not-allowed; }
.input:-webkit-autofill, .input:-webkit-autofill:hover, .input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: inset 0 0 0 100px var(--surface-2); /* taste-skill-ignore: fondo de autocompletado */
  transition: background-color 9999s ease 0s;
}
.input--code {
  font-family: var(--font-text-code);
  font-variant-numeric: tabular-nums slashed-zero;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}
.textarea { min-height: 7.5rem; resize: vertical; line-height: var(--lh-text); }
.select {
  padding-right: 2.75rem;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1.1rem;
  cursor: pointer;
}
.select option, .select optgroup { background-color: var(--surface-1); color: var(--text); }

/* Campo + botón en una fila (copiar link, dirección USDT) */
.input-group { display: flex; gap: var(--space-2); align-items: stretch; }
.input-group > .input, .input-group > .code-box { flex: 1 1 auto; min-width: 0; }
.input-group > .btn { flex: none; }

/* Casilla y opción: la etiqueta entera es el área táctil */
.checkbox, .radio {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: var(--tap);
  padding-block: 0.6rem;
  font-size: var(--fs-body);
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
}
.checkbox input, .radio input {
  flex: none;
  display: grid;
  place-content: center;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.05em 0 0;
  background-color: var(--surface-1);
  border: 1.5px solid var(--line-field-hover);
  border-radius: var(--radius);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background-color var(--t-press) ease, border-color var(--t-press) ease;
}
.radio input { border-radius: 50%; }
.checkbox input::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  background-color: var(--ocean-950);
  -webkit-mask: var(--icon-check) center / contain no-repeat;
  mask: var(--icon-check) center / contain no-repeat;
  opacity: 0;
  transform: scale(0.6);
  transition: transform var(--t-press) var(--ease-out), opacity var(--t-press) ease;
}
.radio input::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background-color: var(--ocean-950);
  opacity: 0;
  transform: scale(0.6);
  transition: transform var(--t-press) var(--ease-out), opacity var(--t-press) ease;
}
.checkbox input:checked, .radio input:checked { background-color: var(--light-cyan); border-color: var(--light-cyan); }
.checkbox input:checked::before, .radio input:checked::before { opacity: 1; transform: scale(1); }
.checkbox input:focus-visible, .radio input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.checkbox:has(input:disabled), .radio:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }

/* Interruptor: <label class="switch"><input type="checkbox" role="switch"> Separar quién habla</label> */
.switch {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: var(--tap);
  font-size: var(--fs-body);
  line-height: 1.35;
  color: var(--text);
  cursor: pointer;
}
.switch input {
  position: relative;
  flex: none;
  width: 3.25rem;
  height: 1.875rem;
  margin: 0;
  background-color: var(--surface-3);
  border: 1.5px solid var(--line-field);
  border-radius: var(--radius-pill);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background-color var(--t-ui) ease, border-color var(--t-ui) ease;
}
.switch input::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.2rem;
  width: 1.3rem;
  height: 1.3rem;
  margin-top: -0.65rem;
  border-radius: 50%;
  background-color: var(--ink-soft);
  transition: transform var(--t-ui) var(--ease-out), background-color var(--t-ui) ease;
}
.switch input:checked { background-color: var(--light-cyan); border-color: var(--light-cyan); }
.switch input:checked::before { transform: translateX(1.3rem); background-color: var(--ocean-950); }
.switch input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.switch:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }

/* ==========================================================================
   8. Tarjeta (sin bordes ni sombras: un paso de tono)
   ========================================================================== */
.card {
  position: relative;
  min-width: 0;
  padding: clamp(1.25rem, 0.95rem + 1.3vw, 2rem);
  color: var(--text);
  background-color: var(--surface-1);
  border-radius: var(--radius);
}
.card--raised { background-color: var(--surface-2); }
.card--flush { padding: 0; overflow: hidden; }
.card__title { font-family: var(--font-text); font-size: var(--fs-h3); font-weight: var(--weight-semibold); line-height: var(--lh-snug); }
.card--interactive {
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out), box-shadow var(--t-hover) ease; /* taste-skill-ignore: anillo interior */
}
@media (hover: hover) and (pointer: fine) {
  .card--interactive:hover { background-color: var(--surface-2); }
}
.card--interactive:active { transform: scale(0.99); }
.card.is-selected, .card[aria-pressed="true"], .card[aria-checked="true"], .card[aria-current="true"] {
  box-shadow: var(--ring-selected); /* taste-skill-ignore: anillo interior de seleccionado */
}

/* ==========================================================================
   9. Badge (estado chico) y Pill (dato destacado, ej. saldo)
   ========================================================================== */
.badge, .pill {
  --tone: var(--text-soft);
  --tone-bg: var(--surface-3);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-text);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  white-space: nowrap;
  color: var(--tone);
  background-color: var(--tone-bg);
  border-radius: var(--radius-pill);
}
.badge { min-height: 1.75rem; padding: 0.2rem 0.7rem; font-size: var(--fs-small); }
.pill { min-height: 2.25rem; padding: 0.35rem 1rem; font-size: var(--fs-body); --tone: var(--text); --tone-bg: var(--surface-2); }
.badge--ok, .pill--ok { --tone: var(--ok); --tone-bg: var(--ok-bg); }
.badge--warn, .pill--warn { --tone: var(--warn); --tone-bg: var(--warn-bg); }
.badge--error, .pill--error { --tone: var(--error); --tone-bg: var(--error-bg); }
.badge--info, .pill--info, .badge--light, .pill--light { --tone: var(--light-cyan); --tone-bg: var(--info-bg); }
.badge--dot::before, .pill--dot::before {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background-color: currentColor;
}
.badge--live::before, .pill--live::before {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background-color: currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .badge--live::before, .pill--live::before { animation: vl-twinkle 1.6s ease-in-out infinite; }
}

/* ==========================================================================
   10. Aviso (alert) — fondo teñido, texto en tinta, icono de color
   <div class="alert alert--ok" role="status"><div><strong class="alert__title">Listo</strong><p>…</p></div></div>
   ========================================================================== */
.alert {
  --tone: var(--info);
  --tone-bg: var(--info-bg);
  --alert-icon: var(--icon-info);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--text);
  background-color: var(--tone-bg);
  border-radius: var(--radius);
}
.alert::before {
  content: "";
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  margin-top: 0.08em;
  background-color: var(--tone);
  -webkit-mask: var(--alert-icon) center / contain no-repeat;
  mask: var(--alert-icon) center / contain no-repeat;
}
.alert > * { min-width: 0; flex: 1 1 auto; }
.alert__title { display: block; font-weight: var(--weight-bold); color: var(--text); }
.alert__title + * { margin-top: 0.15rem; }
.alert .btn { margin-top: var(--space-3); }
.alert--info { --tone: var(--info); --tone-bg: var(--info-bg); --alert-icon: var(--icon-info); }
.alert--ok { --tone: var(--ok); --tone-bg: var(--ok-bg); --alert-icon: var(--icon-ok); }
.alert--warn { --tone: var(--warn); --tone-bg: var(--warn-bg); --alert-icon: var(--icon-warn); }
.alert--error { --tone: var(--error); --tone-bg: var(--error-bg); --alert-icon: var(--icon-error); }

/* ==========================================================================
   11. Toast — mensajes que flotan abajo. Contenedor con aria-live.
   <div class="toasts" aria-live="polite"><div class="toast toast--ok">Texto copiado</div></div>
   ========================================================================== */
.toasts {
  position: fixed;
  z-index: var(--z-toast);
  left: max(var(--margin), env(safe-area-inset-left));
  right: max(var(--margin), env(safe-area-inset-right));
  bottom: max(var(--margin), env(safe-area-inset-bottom));
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  pointer-events: none;
}
.toast {
  --tone: var(--light-cyan);
  --toast-icon: var(--icon-info);
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  max-width: 26rem;
  padding: 0.9rem 1rem 0.9rem 1.1rem;
  font-size: var(--fs-body);
  line-height: 1.45;
  color: var(--text);
  background-color: var(--surface-3);
  border-radius: var(--radius);
}
.toasts .toast { box-shadow: var(--shadow-float); }   /* taste-skill-ignore: sombra solo cuando flota */
.toast::before {
  content: "";
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  margin-top: 0.03em;
  background-color: var(--tone);
  -webkit-mask: var(--toast-icon) center / contain no-repeat;
  mask: var(--toast-icon) center / contain no-repeat;
}
.toast > :not(.toast__close) { flex: 1 1 auto; min-width: 0; }
.toast__close { margin: -0.45rem -0.4rem -0.45rem 0; }
.toast--ok { --tone: var(--ok); --toast-icon: var(--icon-ok); }
.toast--warn { --tone: var(--warn); --toast-icon: var(--icon-warn); }
.toast--error { --tone: var(--error); --toast-icon: var(--icon-error); }
@media (min-width: 48em) {
  .toasts { left: auto; width: min(26rem, 100% - 2 * var(--margin)); justify-items: end; }
}
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: vl-toast-in var(--t-dialog) var(--ease-out) both; }
  .toast.is-leaving { animation: vl-toast-out 220ms var(--ease-out) forwards; }
}

/* ==========================================================================
   12. Modal y hoja (usa <dialog> nativo + showModal())
   <dialog class="modal" aria-labelledby="t1">…</dialog>   ·   <dialog class="modal sheet">…</dialog>
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(100% - 2 * var(--margin), 34rem);
  max-width: none;
  height: fit-content;
  max-height: min(100dvh - 2 * var(--margin), 48rem);
  padding: 0;
  color: var(--text);
  background-color: var(--surface-2);
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-float); /* taste-skill-ignore: el modal flota */
  overflow: auto;
  overscroll-behavior: contain;
}
.modal::backdrop { background-color: rgb(var(--scrim-rgb) / 0.8); }
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4) 0 var(--space-5);
}
.modal__title {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: var(--track-heading);
  text-wrap: balance;
  padding-top: 0.15rem;
}
.modal__body { padding: var(--space-4) var(--space-5) var(--space-5); }
.modal__body > * + * { margin-top: var(--space-4); }
.modal__footer {
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: 0 var(--space-5) var(--space-5);
}
html:has(.modal[open]) { overflow: hidden; }

/* Hoja: sube desde abajo en el teléfono; en pantallas grandes es un modal normal. */
@media (max-width: 47.99em) {
  .sheet {
    margin: auto 0 0;
    width: 100%;
    max-height: 92dvh;
    border-radius: var(--radius) var(--radius) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: vl-modal-in var(--t-dialog) var(--ease-out) both; }
  .modal[open]::backdrop { animation: vl-fade-in var(--t-dialog) ease both; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 47.99em) {
  .sheet[open] { animation: vl-sheet-in var(--t-dialog) var(--ease-out) both; }
}

/* ==========================================================================
   13. Pestañas y control segmentado
   ========================================================================== */
.tabs {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: none;
  min-height: var(--tap);
  padding: 0.55rem 0.9rem 0.75rem;
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color var(--t-hover) ease;
}
.tab::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.3rem;
  height: 2px;
  border-radius: 2px;
  background-color: var(--light-cyan);
  transform: scaleX(0);
  transition: transform var(--t-ui) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--text-soft); } }
.tab[aria-selected="true"], .tab[aria-current="page"], .tab.is-active { color: var(--text); }
.tab[aria-selected="true"]::after, .tab[aria-current="page"]::after, .tab.is-active::after { transform: scaleX(1); }

.segmented {
  display: inline-flex;
  max-width: 100%;
  padding: 4px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  background-color: var(--surface-2);
  border-radius: var(--radius-pill);
}
.segmented > button, .segmented > a, .segmented > label {
  position: relative;
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.4rem 1.1rem;
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text-muted);
  background-color: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color var(--t-ui) var(--ease-out), color var(--t-ui) ease;
}
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .segmented > :hover { color: var(--text); }
}
.segmented > [aria-pressed="true"], .segmented > [aria-selected="true"], .segmented > [aria-checked="true"],
.segmented > [aria-current="page"], .segmented > .is-active, .segmented > label:has(input:checked) {
  color: var(--text);
  background-color: var(--surface-4);
}
.segmented > label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.segmented--block { display: flex; width: 100%; }

/* ==========================================================================
   14. Progreso — <div class="progress" role="progressbar" aria-valuenow="42" style="--value:42"><span class="progress__bar"></span></div>
   ========================================================================== */
.progress {
  --value: 0;
  position: relative;
  display: block;
  width: 100%;
  height: 0.5rem;
  overflow: hidden;
  background-color: var(--surface-3);
  border-radius: var(--radius-pill);
}
.progress--lg { height: 0.75rem; }
.progress__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--value) * 1%);
  max-width: 100%;
  background-color: var(--light-cyan);
  border-radius: inherit;
  transition: width var(--t-ui) var(--ease-out);
}
.progress--ok .progress__bar { background-color: var(--ok); }
.progress--indeterminate .progress__bar, .progress.is-indeterminate .progress__bar {
  width: 38%;
  animation: vl-indeterminate 1.5s var(--ease-in-out) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .progress--indeterminate .progress__bar, .progress.is-indeterminate .progress__bar {
    width: 100%;
    animation: vl-pulse 2.2s ease-in-out infinite;
  }
}
.progress__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}
/* <progress> nativo (por si acaso) */
progress.progress { appearance: none; -webkit-appearance: none; border: 0; }
progress.progress::-webkit-progress-bar { background-color: var(--surface-3); border-radius: var(--radius-pill); }
progress.progress::-webkit-progress-value { background-color: var(--light-cyan); border-radius: var(--radius-pill); }
progress.progress::-moz-progress-bar { background-color: var(--light-cyan); border-radius: var(--radius-pill); }

/* ==========================================================================
   15. Esqueleto (carga) y spinner
   ========================================================================== */
.skeleton {
  display: block;
  min-height: 1em;
  background-color: var(--surface-2);
  border-radius: var(--radius);
}
.skeleton--text { height: 1em; margin-block: 0.35em; width: var(--w, 100%); }
.skeleton--title { height: 1.6em; width: var(--w, 60%); }
.skeleton--circle { border-radius: 50%; width: var(--size, 3rem); height: var(--size, 3rem); }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: vl-pulse 1.8s ease-in-out infinite; }
}

/* <span class="spinner" role="status"><span class="visually-hidden">Cargando…</span></span> */
.spinner {
  display: inline-block;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: middle;
  border-radius: 50%;
  border: 2.5px solid rgb(98 227 255 / 0.22);
  border-top-color: var(--light-cyan);
  animation: vl-spin 0.9s linear infinite;
}
.spinner--sm { width: 1rem; height: 1rem; border-width: 2px; }
.spinner--lg { width: 2.75rem; height: 2.75rem; border-width: 3px; }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}

/* ==========================================================================
   16. Tabla (las líneas entre filas están permitidas solo aquí)
   <div class="table-wrap"><table class="table">…</table></div>
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  background-color: var(--surface-1);
  border-radius: var(--radius);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--text);
}
.table caption { padding: var(--space-4); text-align: left; color: var(--text-muted); caption-side: top; }
.table th {
  padding: 0.8rem 1rem;
  font-weight: var(--weight-semibold);
  text-align: left;
  white-space: nowrap;
  color: var(--text-soft);
  background-color: var(--surface-2);
}
.table td { padding: 0.85rem 1rem; vertical-align: top; border-top: 1px solid var(--line-table); }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table--hover tbody tr { transition: background-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .table--hover tbody tr:hover { background-color: var(--surface-2); }
}

/* ==========================================================================
   17. Imagen de cine, velo (scrim) y grano
   ========================================================================== */
.media {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--bg-deep);
  border-radius: var(--radius);
}
.media > img, .media > video, .media > picture, .media > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--bleed { border-radius: 0; }
.media--169 { aspect-ratio: 16 / 9; }
.media--scope { aspect-ratio: 2.39 / 1; }   /* formato cine */
.media--916 { aspect-ratio: 9 / 16; }
.media--45 { aspect-ratio: 4 / 5; }
.media--grade > img, .media--grade > video, .media--grade > picture > img { filter: brightness(0.9) contrast(1.06); }
.media__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--margin);
}
@media (prefers-reduced-motion: no-preference) {
  .media--drift > img, .media--drift > picture > img, .media--drift > video {
    animation: vl-drift var(--t-drift) var(--ease-in-out) infinite alternate;
  }
}

/* Velo: degradado NEUTRO (negro océano) solo para que el texto se lea sobre la foto. */
.scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.scrim--bottom { background-image: linear-gradient(to top, rgb(var(--scrim-rgb) / 0.94) 0%, rgb(var(--scrim-rgb) / 0.6) 34%, rgb(var(--scrim-rgb) / 0) 72%); } /* taste-skill-ignore: velo neutro sobre foto */
.scrim--top { background-image: linear-gradient(to bottom, rgb(var(--scrim-rgb) / 0.78) 0%, rgb(var(--scrim-rgb) / 0) 28%); } /* taste-skill-ignore: velo neutro sobre foto */
.scrim--left { background-image: linear-gradient(to right, rgb(var(--scrim-rgb) / 0.92) 0%, rgb(var(--scrim-rgb) / 0.62) 36%, rgb(var(--scrim-rgb) / 0) 72%); } /* taste-skill-ignore: velo neutro sobre foto */
.scrim--full { background-color: rgb(var(--scrim-rgb) / 0.55); }
.scrim--vignette { background-image: radial-gradient(ellipse 75% 70% at 50% 45%, rgb(var(--scrim-rgb) / 0) 40%, rgb(var(--scrim-rgb) / 0.9) 100%); } /* taste-skill-ignore: velo neutro sobre foto */

/* Grano de película.
   - Toda la página: <body class="has-grain"> (vive en body::after; no uses body::after para otra cosa).
   - Solo una imagen: <div class="grain" aria-hidden="true"></div> dentro de un .media (encima de la foto, debajo del texto).
   - Grano vivo (parpadeo de película): añade .grain--live (solo héroe; se apaga con "reducir movimiento"). */
.has-grain::after,
.grain {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  background-image: var(--grain-image);
  background-size: var(--grain-size);
  opacity: var(--grain-opacity);
}
.grain { position: absolute; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .grain--live, .has-grain.grain--live::after { inset: -10%; animation: vl-grain 0.9s steps(6) infinite; }
}

/* ==========================================================================
   18. Movimiento: entrada al cargar y revelado al hacer scroll
   - .enter / .enter--scene: solo CSS, al cargar (no necesitan JS).
   - .reveal: necesita <html class="js"> + el observer de DISENO.md. Sin JS se ve todo.
   Retraso escalonado: style="--i:1", "--i:2"…
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .enter {
    animation: vl-rise var(--t-reveal) var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * var(--stagger) + 120ms);
  }
  .enter--scene {
    animation: vl-scene var(--t-scene) var(--ease-film) both;
    animation-delay: calc(var(--i, 0) * 140ms);
  }

  .js .reveal {
    opacity: 0;
    transform: translate3d(0, var(--reveal-distance), 0);
    transition:
      opacity var(--t-reveal) var(--ease-out),
      transform var(--t-reveal) var(--ease-out),
      filter var(--t-reveal) var(--ease-out),
      clip-path 1100ms var(--ease-in-out);
    transition-delay: calc(var(--i, 0) * var(--stagger));
  }
  .js .reveal--fade { transform: none; }
  .js .reveal--zoom { transform: scale(var(--reveal-scale)); transition-duration: var(--t-scene); }
  .js .reveal--focus { transform: scale(1.015); filter: blur(var(--reveal-blur)); transition-duration: var(--t-scene); }
  .js .reveal--mask { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); }
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes vl-spin { to { transform: rotate(360deg); } }
@keyframes vl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes vl-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes vl-fade-in { from { opacity: 0; } }
@keyframes vl-rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
@keyframes vl-scene { from { opacity: 0; transform: scale(1.06); } }
@keyframes vl-drift { from { transform: scale(1); } to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); } }
@keyframes vl-modal-in { from { opacity: 0; transform: translate3d(0, 12px, 0) scale(0.98); } }
@keyframes vl-sheet-in { from { opacity: 0.4; transform: translate3d(0, 48px, 0); } }
@keyframes vl-toast-in { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.98); } }
@keyframes vl-toast-out { to { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.98); } }
@keyframes vl-indeterminate { from { transform: translateX(-105%); } to { transform: translateX(270%); } }
@keyframes vl-grain {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-3%, 2%); }
  33% { transform: translate(2%, -4%); }
  50% { transform: translate(-4%, -1%); }
  67% { transform: translate(3%, 3%); }
  83% { transform: translate(-1%, 4%); }
  100% { transform: translate(0, 0); }
}

/* Red de seguridad: con "reducir movimiento" se apaga toda transición/animación,
   salvo los indicadores esenciales (spinner, progreso, botón cargando). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *:not(.spinner, .progress__bar, .is-loading, [aria-busy="true"], .motion-ok, .motion-ok *),
  *:not(.spinner, .progress__bar, .is-loading, [aria-busy="true"], .motion-ok, .motion-ok *)::before,
  *:not(.spinner, .progress__bar, .is-loading, [aria-busy="true"], .motion-ok, .motion-ok *)::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ==========================================================================
   19. Impresión (transcripciones en papel)
   ========================================================================== */
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .grain, .has-grain::after, .scrim, .toasts, .skip-link, .btn, dialog { display: none !important; }
  a { color: #000; }
}
