/* La Safoteca · temas de temporada
   Cada tema solo redefine las variables de color de estilos.css: el aspecto normal no se toca.
   Se activa solo entre las fechas de config.js (js/temas.js pone <html data-tema="...">). */

/* ---------- Halloween 🎃 ---------- */
:root[data-tema="halloween"] {
  --lila: #e8731f;
  --violeta: #a8400a;
  --tinta: #2b1a12;
  --tinta-suave: #6b4a36;
  --papel: #fff6ec;
  --superficie: #ffffff;
  --suave: #ffe6cc;
  --linea: #f0cba5;
  --boton-fondo: #a8400a;
  --boton-texto: #ffffff;
  --alerta-fondo: #f4dcf0;
  --alerta-texto: #5a1a56;
  --sombra: 0 1px 2px rgb(43 26 18 / .14), 0 6px 18px rgb(43 26 18 / .10);
}
@media (prefers-color-scheme: dark) {
  :root[data-tema="halloween"] {
    --lila: #ff8a3d;
    --violeta: #ffa45c;
    --tinta: #fdeede;
    --tinta-suave: #d9bba6;
    --papel: #130b17;
    --superficie: #1e1426;
    --suave: #2c1b35;
    --linea: #4d3057;
    --boton-fondo: #ff8a3d;
    --boton-texto: #1c0f08;
    --alerta-fondo: #3a1b3a;
    --alerta-texto: #f6cdf1;
    --sombra: 0 1px 2px rgb(0 0 0 / .45), 0 6px 18px rgb(0 0 0 / .35);
  }
}
/* Franja decorativa fina bajo la cabecera */
:root[data-tema="halloween"] .cabecera { border-bottom: 3px solid var(--lila); }

/* Halloween: calabazas en la barra superior (solo en el inicio; las fichas también tienen logotipo, pero no calabazas) */
:root[data-tema="halloween"] .cabecera[data-vista="inicio"]::after {
  content: ""; position: absolute; pointer-events: none;
  right: 3.5rem; top: env(safe-area-inset-top); bottom: 0;
  aspect-ratio: 800 / 260;
  background: url("../img/tema/calabazas.webp") right bottom / contain no-repeat;
}
/* Halloween: telaraña de fondo, a la derecha y por detrás del contenido */
:root[data-tema="halloween"] body::before {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  top: var(--alto-cabecera); right: 0;
  width: min(115vw, 760px); aspect-ratio: 740 / 440;
  background: var(--lila);
  opacity: .55;
  -webkit-mask: url("../img/tema/telarana.webp") right top / 100% 100% no-repeat;
          mask: url("../img/tema/telarana.webp") right top / 100% 100% no-repeat;
}
@media (prefers-color-scheme: dark) {
  :root[data-tema="halloween"] body::before { background: #f1e6dc; opacity: .40; }
}


/* ---------- Navidad 🎄 ---------- */
/* Mantiene la paleta normal de la web (lila y negro); solo añade el logotipo con gorro (app.js) y la nieve. */

/* Navidad: copos blancos en la parte de arriba, fijos y por detrás del contenido.
   La imagen se repite solo a lo ancho (mosaico horizontal, sin copos cortados en los bordes), así que
   siempre hay nieve de lado a lado, sea cual sea el ancho de la pantalla; hacia abajo se desvanece.
   Llevan un fino contorno lila para que se vean también sobre el fondo claro. */
:root[data-tema="navidad"] body::before {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  top: var(--alto-cabecera); left: 0; right: 0; height: 400px;
  background: url("../img/tema/copos.webp") 0 0 / 740px auto repeat-x;
  filter: drop-shadow(0 0 1.2px rgb(156 136 187 / .95)) drop-shadow(0 0 1px rgb(156 136 187 / .6));
  -webkit-mask: linear-gradient(to bottom, #000 45%, transparent);
          mask: linear-gradient(to bottom, #000 45%, transparent);
  opacity: .85;
}
@media (prefers-color-scheme: dark) {
  :root[data-tema="navidad"] body::before { filter: none; opacity: .6; }
}
