/* Valores por defecto (tema «Costa»). Cada local los reemplaza con /tema.css, generado desde locales/<id>/tema.json. */
:root {
  --escena: #141210;
  --escena-sup: #1e1a17;
  --escena-sup2: #2a2521;
  --escena-linea: rgba(245, 239, 230, .14);
  --escena-texto: #f5efe6;
  --escena-suave: #c9bfb2;
  --papel-fondo: #f6f0e7;
  --papel-fondo2: #ece3d6;
  --papel-sup: #fffaf3;
  --papel-borde: #d8cdbe;
  --papel-texto: #1b1714;
  --papel-suave: #4d443c;
  --acento: #e0a458;
  --acento-escena: #f0b86c;
  --acento-papel: #8a5a1c;
  --sobre-acento: #1b1309;
  --ok: #2f6b45;
  --ok-fondo: #e3f0e6;
  --error: #a3352b;
  --error-escena: #ffb4a6;
  --error-fondo: #f8e4e1;
  --aviso-fondo: #fbefd9;
  --radio: 14px;
  --radio-g: 22px;
  --radio-boton: 999px;
  --fuente-titulos: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Georgia", serif;
  --fuente-texto: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --peso-titulos: 500;
  --sombra: 0 10px 30px rgba(0, 0, 0, .18);
  --t-rapida: 180ms;
  --curva: cubic-bezier(.2, .8, .2, 1);
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--fuente-texto); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--fuente-titulos); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: var(--espaciado-titulos, -.01em); text-transform: var(--transformar-titulos, none); }
p { margin: 0; }
a { color: inherit; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--acento); color: var(--papel-texto); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.saltar:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--acento-escena); outline-offset: 3px; border-radius: 6px; }

/* Botones: objetivos de toque ≥ 48 px */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 52px; padding: 0 22px; border-radius: var(--radio-boton);
  border: 2px solid transparent; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--t-rapida), transform var(--t-rapida) var(--curva), border-color var(--t-rapida); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primario { background: var(--acento); color: var(--sobre-acento); }
.btn-primario:hover { background: var(--acento-escena); }
.btn-secundario { background: transparent; color: currentColor; border-color: currentColor; }
.btn-oscuro { background: var(--papel-texto); color: var(--papel-fondo); }
.btn-oscuro:hover { background: color-mix(in srgb, var(--papel-texto) 85%, white); }
.btn-texto { background: none; border: 0; padding: 0 6px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; cursor: pointer; }
.btn-bloque { width: 100%; }

.chip-demo { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--acento) 16%, transparent); color: var(--acento-escena); border: 1px solid color-mix(in srgb, var(--acento) 45%, transparent); }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: girar .8s linear infinite; flex: none; }
@keyframes girar { to { transform: rotate(360deg); } }

.esqueleto { background: linear-gradient(90deg, rgba(0,0,0,.06), rgba(0,0,0,.12), rgba(0,0,0,.06)); background-size: 200% 100%; animation: brillo 1.2s linear infinite; border-radius: 12px; }
@keyframes brillo { to { background-position: -200% 0; } }

.alerta { border-radius: var(--radio); padding: 14px 16px; display: grid; gap: 6px; }
.alerta-error { background: var(--error-fondo); color: #5d1a14; border-left: 5px solid var(--error); }
.alerta-ok { background: var(--ok-fondo); color: #183b25; border-left: 5px solid var(--ok); }
.alerta-aviso { background: var(--aviso-fondo); color: #4a3310; border-left: 5px solid var(--acento-papel); }
.alerta strong { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Cinemáticas: el video se superpone a la imagen fija, que queda como respaldo */
.cine-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 600ms ease; pointer-events: none; }
.con-video .cine-video { opacity: 1; }
.cine-pausa { position: absolute; right: 12px; top: 64px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.45); color: #fff; font-size: .8rem; cursor: pointer; }
.prot-media .cine-pausa, .f-media .cine-pausa { top: auto; bottom: 12px; }
