/* ============================================================
   Festival Etcétera — CSS BASE (estructura y componentes)
   Acá NO vive la personalidad visual: todo color, tipografía,
   radio, borde y sombra sale de tokens. La piel la ponen los
   temas de temas.css vía [data-tema="..."] en <html>.
   ============================================================ */

:root {
  color-scheme: light;

  /* Lienzo y superficies */
  --fondo: #f6f3ea;
  --fondo-2: #ebe7da;
  --fondo-textura: none;
  --fondo-textura-tam: auto;
  --superficie: #ffffff;
  --superficie-2: #f1eee4;
  --superficie-3: #e5e1d2;
  --campo-fondo: #ffffff;
  --velo: rgba(20, 20, 28, .55);
  --nav-fondo: rgba(246, 243, 234, .92);

  /* Tinta */
  --tinta: #15151c;
  --tinta-2: #4a4a58;
  --tinta-3: #84848f;

  /* Bordes */
  --borde: rgba(21, 21, 28, .16);
  --borde-fuerte: rgba(21, 21, 28, .38);
  --grosor-borde: 1.5px;

  /* Primario (el azul protagonista de cada tema) */
  --primario: #1937c9;
  --primario-suave: rgba(25, 55, 201, .12);
  --sobre-primario: #ffffff;

  /* Acentos y estados (coral=rechazo/calor, ambar=atención, verde=ok, violeta=extra) */
  --coral: #c8250f;
  --coral-suave: rgba(200, 37, 15, .12);
  --ambar: #9a6a00;
  --ambar-suave: rgba(240, 165, 5, .16);
  --verde: #177245;
  --verde-suave: rgba(23, 114, 69, .13);
  --violeta: #4936c4;
  --violeta-suave: rgba(73, 54, 196, .12);
  --sobre-acento: #ffffff;

  /* Forma */
  --radio: 16px;
  --radio-chico: 10px;
  --sombra: 0 10px 30px rgba(21, 21, 28, .12);
  --sombra-flotante: 0 10px 26px rgba(25, 55, 201, .35);

  /* Tipografía */
  --tipografia: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Métricas */
  --alto-nav-inferior: 62px;

  /* Flecha de los <select> (se redefine en temas oscuros) */
  --flecha-select: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315151c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--tipografia);
  background-color: var(--fondo);
  background-image: var(--fondo-textura);
  background-size: var(--fondo-textura-tam);
  color: var(--tinta);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; color: inherit; }

::selection { background: var(--primario); color: var(--sobre-primario); }

:focus-visible { outline: 2.5px solid var(--primario); outline-offset: 2px; }

/* ---------- Splash ---------- */

.splash {
  min-height: 100svh; display: grid; place-content: center; text-align: center; gap: .5rem;
  color: var(--tinta-3);
}
.splash-logo { font-size: 4rem; animation: girar 2.4s linear infinite; color: var(--primario); }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Utilidades ---------- */

.oculto { display: none !important; }
.centrado { text-align: center; }
.silencio { color: var(--tinta-3); font-size: .86rem; }
.fila-sep { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }

.contenedor { width: min(1080px, 100% - 2.4rem); margin-inline: auto; }

/* ============================================================
   BOTONES
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--primario); color: var(--sobre-primario); border: var(--grosor-borde) solid var(--primario);
  font-weight: 800; font-size: .95rem; letter-spacing: .01em;
  padding: .72rem 1.35rem; border-radius: 999px; cursor: pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-sec { background: transparent; color: var(--tinta); border-color: var(--borde-fuerte); }
.btn-sec:hover { border-color: var(--tinta); filter: none; }

.btn-fantasma { background: transparent; border-color: transparent; color: var(--tinta-2); padding: .55rem .9rem; }
.btn-fantasma:hover { color: var(--tinta); filter: none; transform: none; }

.btn-peligro { background: transparent; color: var(--coral); border-color: var(--coral-suave); }
.btn-peligro:hover { border-color: var(--coral); }
.btn-verde { background: var(--verde); border-color: var(--verde); color: var(--sobre-acento); }
.btn-chico { padding: .42rem .9rem; font-size: .84rem; }
.btn-bloque { width: 100%; }

/* ============================================================
   FORMULARIOS (inputs correctos en todos los temas)
   ============================================================ */

.campo { display: grid; gap: .3rem; margin-bottom: .95rem; }
.campo label { font-size: .8rem; font-weight: 700; color: var(--tinta-2); text-transform: uppercase; letter-spacing: .06em; }

.campo input, .campo select, .campo textarea,
.editor-fila input, .editor-fila textarea, .item-fila input, .grilla-limites input, .buscador input {
  width: 100%; background: var(--campo-fondo); color: var(--tinta);
  border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio-chico);
  font-size: 1rem; font-family: inherit;
  transition: border-color .15s ease;
}
.campo input, .campo select { min-height: 44px; }
.campo input, .campo select, .campo textarea { padding: .62rem .8rem; }
.campo textarea { resize: vertical; min-height: 74px; }

.campo input::placeholder, .campo textarea::placeholder,
.editor-fila input::placeholder, .editor-fila textarea::placeholder,
.item-fila input::placeholder, .buscador input::placeholder { color: var(--tinta-3); opacity: 1; }

.campo input:hover, .campo select:hover, .campo textarea:hover { border-color: var(--borde-fuerte); }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible,
.editor-fila input:focus-visible, .editor-fila textarea:focus-visible, .item-fila input:focus-visible,
.grilla-limites input:focus-visible, .buscador input:focus-visible {
  outline: 2.5px solid var(--primario); outline-offset: 1px; border-color: transparent;
}
.campo input:user-invalid, .campo textarea:user-invalid { border-color: var(--coral); }
.campo input:disabled, .campo select:disabled, .campo textarea:disabled { opacity: .55; cursor: not-allowed; }

.campo select {
  appearance: none; -webkit-appearance: none;
  background-image: var(--flecha-select);
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 17px;
  padding-right: 2.4rem;
}

input[type="checkbox"], input[type="radio"] { accent-color: var(--primario); width: 18px; height: 18px; flex: none; cursor: pointer; }
input[type="date"] { color-scheme: inherit; }
input, select, textarea { accent-color: var(--primario); }

/* Contraseñas con ojo para mostrar/ocultar */
.caja-clave { position: relative; }
.caja-clave input { padding-right: 2.9rem; }
.boton-ojo {
  position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer;
  color: var(--tinta-3); display: grid; place-content: center; border-radius: 50%;
}
.boton-ojo:hover { color: var(--tinta); }
.boton-ojo svg { width: 19px; height: 19px; }

.campo-error { color: var(--coral); font-size: .85rem; font-weight: 600; min-height: 1.2em; }
.campos-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
@media (max-width: 480px) { .campos-2 { grid-template-columns: 1fr; gap: 0; } }

/* ============================================================
   LANDING PÚBLICA
   ============================================================ */

.nav-publica {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.2rem; gap: 1rem;
  transition: background .25s ease, box-shadow .25s ease;
}
.nav-publica.solida { background: var(--nav-fondo); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--borde); }
.nav-links { display: flex; gap: 1.1rem; align-items: center; }
.nav-links a { text-decoration: none; font-weight: 700; font-size: .9rem; color: var(--tinta-2); }
.nav-links a:hover { color: var(--tinta); }
@media (max-width: 760px) { .nav-links .solo-escritorio { display: none; } }

.logo-etc {
  display: inline-flex; align-items: center; gap: .45rem; text-decoration: none;
  font-weight: 900; font-size: 1.15rem; letter-spacing: -.02em;
}
.logo-etc img { width: 30px; height: 30px; border-radius: 8px; }

/* ---------- Hero (la decoración de fondo la pone cada tema) ---------- */

.hero {
  position: relative; min-height: 100svh;
  display: grid; place-content: center; text-align: center;
  padding: 5.5rem 1.2rem 4rem; overflow: hidden; isolation: isolate;
}
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; }

.hero-chapa {
  display: inline-flex; gap: .5rem; align-items: center; margin-inline: auto;
  background: var(--ambar-suave); color: var(--ambar); font-weight: 800; font-size: .82rem;
  border: var(--grosor-borde) solid currentColor;
  padding: .35rem .95rem; border-radius: 999px; transform: rotate(-2deg);
  text-transform: uppercase; letter-spacing: .07em;
}

.hero h1 {
  font-size: clamp(3.4rem, 14vw, 8.5rem);
  font-weight: 900; line-height: .92; letter-spacing: -.045em; text-transform: uppercase;
  margin: 1.1rem 0 .4rem;
}
.hero h1 .asterisco { color: var(--primario); display: inline-block; animation: latir 2.8s ease-in-out infinite; }
@keyframes latir { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.12) rotate(18deg); } }

.hero-bajada { font-size: clamp(1.05rem, 3vw, 1.5rem); font-weight: 700; color: var(--tinta-2); }
.hero-bajada em { font-style: normal; color: var(--primario); }

.hero-fecha {
  margin: 1.4rem auto .4rem; display: inline-flex; flex-wrap: wrap; justify-content: center;
  gap: .6rem 1rem; font-weight: 800; font-size: clamp(1rem, 2.6vw, 1.25rem);
}
.hero-fecha span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-fecha svg { width: 19px; height: 19px; color: var(--primario); }

.cuenta { display: flex; justify-content: center; gap: .7rem; margin: 1.6rem 0 1.9rem; flex-wrap: wrap; }
.cuenta-celda {
  min-width: 74px; padding: .7rem .6rem; border-radius: var(--radio);
  background: var(--superficie); border: var(--grosor-borde) solid var(--borde);
}
.cuenta-celda b { display: block; font-size: clamp(1.7rem, 6vw, 2.4rem); font-variant-numeric: tabular-nums; line-height: 1.1; }
.cuenta-celda span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tinta-3); font-weight: 700; }
.cuenta-listo { font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 900; color: var(--primario); }

.hero-acciones { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }

/* ---------- Marquesina ---------- */

.marquesina {
  overflow: hidden; white-space: nowrap; border-block: var(--grosor-borde) solid var(--borde);
  padding: .65rem 0; background: var(--superficie);
}
.marquesina-tira { display: inline-block; animation: desfilar 30s linear infinite; }
.marquesina span { font-weight: 900; text-transform: uppercase; letter-spacing: .12em; font-size: .95rem; margin-right: 1.1rem; }
.marquesina .m-coral { color: var(--coral); }
.marquesina .m-ambar { color: var(--primario); }
.marquesina .m-violeta { color: var(--violeta); }
@keyframes desfilar { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */

.seccion { padding: 4.2rem 0; }
.seccion-etiqueta {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--tinta-3);
  margin-bottom: .6rem;
}
.seccion-etiqueta::before { content: "✳"; color: var(--primario); font-size: 1rem; }
.seccion h2 { font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.08; margin-bottom: 1rem; }
.seccion-intro { max-width: 640px; color: var(--tinta-2); font-size: 1.05rem; }

/* Flex con última fila centrada: cualquier cantidad de tarjetas queda simétrica
   (nada de huérfanas pegadas a la izquierda). Móvil 1 col, tablet 2, escritorio 3. */
.tarjetas-propuestas { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; margin-top: 1.8rem; }
.tarjeta-propuesta {
  flex: 0 1 100%;
  background: var(--superficie); border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio);
  padding: 1.3rem 1.2rem; display: grid; gap: .5rem; align-content: start;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
@media (min-width: 620px) { .tarjeta-propuesta { flex-basis: calc(50% - .45rem); } }
@media (min-width: 960px) { .tarjeta-propuesta { flex-basis: calc(33.333% - .6rem); } }
.tarjeta-propuesta:hover { transform: translateY(-3px); border-color: var(--borde-fuerte); }
.tarjeta-propuesta .picto { width: 42px; height: 42px; border-radius: 12px; display: grid; place-content: center; }
.tarjeta-propuesta .picto svg { width: 22px; height: 22px; }
.tarjeta-propuesta h3 { font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; }
.tarjeta-propuesta p { color: var(--tinta-2); font-size: .92rem; }
.picto-0 { background: var(--primario-suave); color: var(--primario); }
.picto-1 { background: var(--coral-suave); color: var(--coral); }
.picto-2 { background: var(--violeta-suave); color: var(--violeta); }
.picto-3 { background: var(--verde-suave); color: var(--verde); }

/* Cronograma */
.linea-tiempo { margin-top: 1.6rem; display: grid; gap: 0; max-width: 640px; }
.hito { display: grid; grid-template-columns: 74px 22px 1fr; gap: .6rem; }
.hito-hora { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--primario); padding-top: .15rem; text-align: right; }
.hito-eje { position: relative; }
.hito-eje::before { content: ""; position: absolute; left: 50%; top: 6px; bottom: -6px; width: 2px; background: var(--borde); transform: translateX(-50%); }
.hito:last-child .hito-eje::before { bottom: auto; height: 14px; }
.hito-eje::after {
  content: ""; position: absolute; left: 50%; top: 6px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--primario); transform: translateX(-50%);
  box-shadow: 0 0 0 4px var(--primario-suave);
}
.hito:nth-child(3n+2) .hito-eje::after { background: var(--coral); box-shadow: 0 0 0 4px var(--coral-suave); }
.hito:nth-child(3n) .hito-eje::after { background: var(--violeta); box-shadow: 0 0 0 4px var(--violeta-suave); }
.hito-cuerpo { padding-bottom: 1.5rem; }
.hito-cuerpo h3 { font-size: 1.02rem; font-weight: 800; }
.hito-cuerpo p { color: var(--tinta-2); font-size: .9rem; }

/* Lugar */
.tarjeta-lugar {
  margin-top: 1.6rem; border-radius: var(--radio); border: var(--grosor-borde) solid var(--borde);
  background: var(--superficie);
  padding: 1.8rem; display: grid; gap: .5rem; max-width: 640px;
  position: relative; overflow: hidden;
}
.tarjeta-lugar h3 { font-size: 1.5rem; font-weight: 900; letter-spacing: -.02em; }
.tarjeta-lugar p { color: var(--tinta-2); position: relative; }
.tarjeta-lugar .btn { justify-self: start; margin-top: .6rem; }

/* Entradas */
.tarjetas-venta { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: .9rem; margin-top: 1.6rem; }
.tarjeta-venta {
  background: var(--superficie); border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio);
  padding: 1.15rem; display: grid; gap: .25rem; align-content: start; text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
a.tarjeta-venta:hover { transform: translateY(-3px); border-color: var(--primario); }
.tarjeta-venta h3 { font-weight: 800; font-size: 1rem; display: flex; gap: .5rem; align-items: center; }
.tarjeta-venta h3 svg { width: 17px; height: 17px; color: var(--primario); flex: none; }
.tarjeta-venta p { color: var(--tinta-2); font-size: .88rem; }
.aviso-entradas {
  margin-top: 1.2rem; padding: .9rem 1.1rem; border-radius: var(--radio-chico);
  background: var(--primario-suave); border: var(--grosor-borde) dashed var(--primario);
  color: var(--tinta); font-size: .92rem; max-width: 640px;
}

/* FAQ */
.faq { margin-top: 1.4rem; max-width: 680px; display: grid; gap: .6rem; }
.faq details { background: var(--superficie); border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio-chico); padding: .9rem 1.1rem; }
.faq summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; font-weight: 900; color: var(--primario); transition: transform .2s ease; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: .5rem; color: var(--tinta-2); font-size: .94rem; }

/* Footer */
.pie { border-top: var(--grosor-borde) solid var(--borde); margin-top: 2rem; padding: 2.6rem 0 calc(2.2rem + env(safe-area-inset-bottom)); background: var(--superficie); }
.pie-grande { font-size: clamp(2.2rem, 9vw, 4.5rem); font-weight: 900; letter-spacing: -.04em; text-transform: uppercase; line-height: 1; opacity: .16; user-select: none; }
.pie-filas { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; }
.pie a { color: var(--tinta-2); font-weight: 600; text-decoration: none; }
.pie a:hover { color: var(--tinta); }
.pie-redes { display: flex; gap: .9rem; align-items: center; }

/* ============================================================
   ACCESO
   ============================================================ */

.acceso { min-height: 100svh; display: grid; place-items: center; padding: 2rem 1.2rem; position: relative; isolation: isolate; overflow: hidden; }
.acceso::before { content: ""; position: absolute; z-index: -1; }
.caja-acceso {
  width: min(420px, 100%); background: var(--superficie); border: var(--grosor-borde) solid var(--borde);
  border-radius: calc(var(--radio) + 6px); padding: 1.8rem 1.6rem; box-shadow: var(--sombra);
}
.caja-acceso .logo-etc { justify-content: center; width: 100%; margin-bottom: .4rem; }
.caja-acceso h1 { font-size: 1.45rem; font-weight: 900; text-align: center; letter-spacing: -.02em; }
.caja-acceso .silencio { text-align: center; display: block; margin-bottom: 1.2rem; }

.pestanias { display: grid; grid-template-columns: 1fr 1fr; background: var(--fondo-2); border-radius: 999px; padding: 4px; margin-bottom: 1.3rem; }
.pestanias button { border: 0; background: transparent; color: var(--tinta-3); font-weight: 800; font-size: .92rem; padding: .55rem; border-radius: 999px; cursor: pointer; }
.pestanias button.activa { background: var(--superficie); color: var(--tinta); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

/* ============================================================
   PANEL DE GESTIÓN
   ============================================================ */

.panel { min-height: 100svh; display: grid; grid-template-rows: auto 1fr; }
.panel-cuerpo { padding: 1.1rem 1.2rem calc(var(--alto-nav-inferior) + 2.2rem + env(safe-area-inset-bottom)); width: min(1120px, 100%); margin-inline: auto; }

.barra-panel {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .65rem 1.2rem; background: var(--nav-fondo); backdrop-filter: blur(10px);
  border-bottom: var(--grosor-borde) solid var(--borde);
}
.barra-panel .logo-etc { font-size: 1rem; }
.barra-panel .logo-etc img { width: 26px; height: 26px; }
.chip-usuario {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  background: var(--superficie); border: var(--grosor-borde) solid var(--borde); border-radius: 999px;
  padding: .3rem .8rem .3rem .35rem; font-size: .85rem; font-weight: 700; cursor: pointer; color: var(--tinta);
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-content: center;
  background: var(--primario); color: var(--sobre-primario); font-weight: 900; font-size: .8rem; flex: none;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* Navegación inferior / lateral */
.nav-panel {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 35;
  display: flex; justify-content: space-around;
  background: var(--nav-fondo); backdrop-filter: blur(12px);
  border-top: var(--grosor-borde) solid var(--borde);
  padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom));
}
.nav-panel a {
  display: grid; justify-items: center; gap: 2px; text-decoration: none;
  color: var(--tinta-3); font-size: .64rem; font-weight: 700; letter-spacing: .02em;
  padding: .3rem .6rem; border-radius: 12px; position: relative; min-width: 58px;
}
.nav-panel a svg { width: 21px; height: 21px; }
.nav-panel a.activa { color: var(--tinta); background: var(--superficie-2); }
.nav-panel a.activa svg { color: var(--primario); }
.punto-alerta { position: absolute; top: 2px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px var(--fondo); }

.nav-panel a.nav-extra { display: none; }

@media (min-width: 920px) {
  .nav-panel a.nav-extra { display: grid; }
  .nav-panel a.nav-mas { display: none; }
  .panel-cuerpo { padding-bottom: 2.5rem; padding-left: 236px; }
  .nav-panel {
    top: 58px; bottom: 0; right: auto; left: 0; width: 216px;
    flex-direction: column; justify-content: flex-start; gap: .2rem;
    border-top: 0; border-right: var(--grosor-borde) solid var(--borde); padding: 1rem .7rem;
  }
  .nav-panel a { grid-template-columns: 24px 1fr; justify-items: start; align-items: center; gap: .6rem; font-size: .92rem; padding: .6rem .8rem; width: 100%; }
  .punto-alerta { top: 50%; right: 12px; transform: translateY(-50%); }
}

.cabecera-vista { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.cabecera-vista h1 { font-size: 1.5rem; font-weight: 900; letter-spacing: -.02em; }
.cabecera-vista .acciones { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Fichas de estadísticas */
.fichas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.ficha { background: var(--superficie); border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio); padding: .95rem 1rem; display: grid; gap: .15rem; align-content: start; }
.ficha .ficha-titulo { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-3); }
.ficha b { font-size: 1.45rem; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ficha .ficha-nota { font-size: .78rem; color: var(--tinta-3); }
.ficha-coral b { color: var(--coral); }
.ficha-verde b { color: var(--verde); }
.ficha-ambar b { color: var(--ambar); }
.ficha-violeta b { color: var(--violeta); }

/* Medidores y barras */
.medidor { height: 9px; border-radius: 999px; background: var(--fondo-2); border: 1px solid var(--borde); overflow: hidden; margin-top: .45rem; }
.medidor i { display: block; height: 100%; border-radius: 999px; background: var(--coral); transition: width .5s ease; }
.medidor .ok { background: var(--verde); }
.medidor .alerta { background: var(--ambar); }

.grafico-barras { display: grid; gap: .55rem; margin-top: .8rem; }
.fila-barra { display: grid; grid-template-columns: minmax(110px, 150px) 1fr auto; align-items: center; gap: .7rem; font-size: .88rem; }
.fila-barra .nombre { color: var(--tinta-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-barra .pista { height: 12px; border-radius: 6px; background: var(--fondo-2); overflow: hidden; }
.fila-barra .pista i { display: block; height: 100%; border-radius: 6px 4px 4px 6px; min-width: 3px; }
.fila-barra .valor { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .84rem; }
.fila-barra .valor small { color: var(--tinta-3); font-weight: 600; }
.fila-barra.excedida .valor, .fila-barra.excedida .nombre { color: var(--coral); font-weight: 800; }

/* Paneles y tarjetas */
.panelcito { background: var(--superficie); border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.panelcito > h2 { font-size: 1.02rem; font-weight: 800; margin-bottom: .3rem; }
.rejilla-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 860px) { .rejilla-2 { grid-template-columns: 1fr; } }

/* Listas de registros */
.lista-registros { display: grid; gap: .6rem; }
.registro {
  display: grid; grid-template-columns: 42px 1fr auto; gap: .75rem; align-items: center;
  background: var(--superficie); border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio);
  padding: .8rem .95rem; cursor: pointer; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  text-align: left; width: 100%; color: inherit; font-size: 1rem;
}
.registro:hover { border-color: var(--borde-fuerte); transform: translateY(-1px); }
.registro .picto { width: 42px; height: 42px; border-radius: 12px; display: grid; place-content: center; overflow: hidden; }
.registro .picto svg { width: 20px; height: 20px; }
.registro .picto img { width: 42px; height: 42px; object-fit: cover; }
.registro-centro { min-width: 0; }
.registro-centro h3 { font-size: .98rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.registro-centro p { font-size: .8rem; color: var(--tinta-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.registro-lado { text-align: right; display: grid; gap: .25rem; justify-items: end; }
.registro-lado b { font-variant-numeric: tabular-nums; font-size: 1rem; }

/* Insignias de estado (siempre punto + texto, nunca solo color) */
.insignia {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: .18rem .6rem; border-radius: 999px; white-space: nowrap;
}
.insignia::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.insignia-verde { background: var(--verde-suave); color: var(--verde); }
.insignia-ambar { background: var(--ambar-suave); color: var(--ambar); }
.insignia-coral { background: var(--coral-suave); color: var(--coral); }
.insignia-violeta { background: var(--violeta-suave); color: var(--violeta); }
.insignia-gris { background: var(--superficie-3); color: var(--tinta-2); }

/* Chips de filtro */
.chips { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { border: var(--grosor-borde) solid var(--borde); background: var(--superficie); color: var(--tinta-2); font-weight: 700; font-size: .82rem; padding: .38rem .85rem; border-radius: 999px; cursor: pointer; }
.chip.activa { background: var(--tinta); color: var(--fondo); border-color: var(--tinta); }

.buscador { position: relative; margin-bottom: 1rem; }
.buscador input { border-radius: 999px; padding: .62rem 1rem .62rem 2.5rem; font-size: .95rem; min-height: 44px; }
.buscador svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--tinta-3); }

/* Botón flotante */
.fab {
  position: fixed; right: 1.1rem; bottom: calc(var(--alto-nav-inferior) + 1.1rem + env(safe-area-inset-bottom)); z-index: 34;
  width: 58px; height: 58px; border-radius: 20px; border: var(--grosor-borde) solid var(--primario); cursor: pointer;
  background: var(--primario); color: var(--sobre-primario); display: grid; place-content: center;
  box-shadow: var(--sombra-flotante); transition: transform .15s ease;
}
.fab:hover { transform: scale(1.06) rotate(90deg); }
.fab svg { width: 26px; height: 26px; }
@media (min-width: 920px) { .fab { bottom: 2rem; right: 2rem; } }

/* Botón flotante de instalación (solo páginas públicas, solo si se puede instalar) */
.boton-instalar-flotante { display: none; }
body[data-vista="inicio"] .boton-instalar-flotante:not(.oculto),
body[data-vista="acceso"] .boton-instalar-flotante:not(.oculto) {
  display: inline-flex;
  position: fixed; right: 1.1rem; bottom: calc(1.1rem + env(safe-area-inset-bottom)); z-index: 34;
  box-shadow: var(--sombra-flotante);
}
.boton-instalar-flotante svg { width: 18px; height: 18px; }

/* Volver desde el acceso a la página del festival */
.volver-atras {
  position: absolute; top: calc(.9rem + env(safe-area-inset-top)); left: .9rem; z-index: 2;
}

/* Botón flotante de temas (siempre visible) */
.boton-tema {
  position: fixed; left: 1.1rem; bottom: calc(var(--alto-nav-inferior) + 1.1rem + env(safe-area-inset-bottom)); z-index: 34;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--superficie); color: var(--primario); border: var(--grosor-borde) solid var(--borde-fuerte);
  display: grid; place-content: center; box-shadow: var(--sombra);
  transition: transform .15s ease;
}
.boton-tema:hover { transform: rotate(-14deg) scale(1.06); }
.boton-tema svg { width: 22px; height: 22px; }
body[data-vista="inicio"] .boton-tema, body[data-vista="acceso"] .boton-tema { bottom: 1.1rem; }
@media (min-width: 920px) { .boton-tema { bottom: 2rem; } }

.opcion-tema {
  display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; align-items: center;
  background: var(--superficie); border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio);
  padding: .9rem 1rem; cursor: pointer; width: 100%; text-align: left; color: inherit;
}
.opcion-tema.activa { border-color: var(--primario); outline: 2px solid var(--primario); outline-offset: -1px; }
.opcion-tema h3 { font-size: 1rem; font-weight: 800; }
.opcion-tema p { font-size: .8rem; color: var(--tinta-3); grid-column: 1; }
.muestras { display: flex; gap: 5px; grid-row: span 2; }
.muestras i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(0, 0, 0, .18); }

/* Estados vacíos */
.vacio { text-align: center; padding: 3rem 1rem; color: var(--tinta-3); }
.vacio .vacio-icono { font-size: 2.6rem; color: var(--primario); margin-bottom: .6rem; display: block; }
.vacio b { color: var(--tinta-2); display: block; margin-bottom: .2rem; font-size: 1.05rem; }

/* ---------- Modales ---------- */

#capa-modal:empty { display: none; }
.fondo-modal {
  position: fixed; inset: 0; z-index: 60; background: var(--velo);
  display: grid; place-items: end center; backdrop-filter: blur(4px);
  animation: aparecer .18s ease;
}
@keyframes aparecer { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 560px; max-height: 92svh; overflow-y: auto;
  background: var(--superficie); border: var(--grosor-borde) solid var(--borde-fuerte);
  border-radius: calc(var(--radio) + 6px) calc(var(--radio) + 6px) 0 0;
  padding: 1.3rem 1.3rem calc(1.5rem + env(safe-area-inset-bottom));
  animation: subir .22s ease;
}
@keyframes subir { from { transform: translateY(40px); opacity: .6; } }
@media (min-width: 700px) {
  .fondo-modal { place-items: center; }
  .modal { border-radius: calc(var(--radio) + 6px); padding-bottom: 1.4rem; }
}
.modal-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.modal-cabecera h2 { font-size: 1.2rem; font-weight: 900; letter-spacing: -.01em; }
.cerrar-modal { background: var(--superficie-2); border: var(--grosor-borde) solid var(--borde); border-radius: 50%; width: 34px; height: 34px; display: grid; place-content: center; cursor: pointer; color: var(--tinta-2); }
.cerrar-modal svg { width: 16px; height: 16px; }
.modal-pie { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.2rem; flex-wrap: wrap; }

/* Ítems del gasto */
.items-lista { display: grid; gap: .5rem; }
.item-fila { display: grid; grid-template-columns: 1fr 110px 34px; gap: .5rem; align-items: center; }
.item-fila input { padding: .5rem .65rem; font-size: .92rem; }
.quitar-item { background: transparent; border: 0; color: var(--tinta-3); cursor: pointer; display: grid; place-content: center; }
.quitar-item:hover { color: var(--coral); }
.quitar-item svg { width: 17px; height: 17px; }
.items-total { text-align: right; font-weight: 800; margin-top: .4rem; font-variant-numeric: tabular-nums; }

.dato-doble { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--borde); font-size: .93rem; }
.dato-doble:last-child { border-bottom: 0; }
.dato-doble span { color: var(--tinta-3); }
.dato-doble b { text-align: right; }

/* ---------- Puerta ---------- */

.puerta-caja { max-width: 520px; margin-inline: auto; }
.puerta-input {
  width: 100%; text-align: center; font-size: 1.7rem; font-weight: 900; letter-spacing: .12em;
  text-transform: uppercase; background: var(--campo-fondo); color: var(--tinta);
  border: 2px solid var(--borde-fuerte); border-radius: var(--radio); padding: 1rem;
}
.puerta-input:focus-visible { outline: 3px solid var(--primario); border-color: transparent; }
.resultado-puerta { border-radius: var(--radio); padding: 1.2rem; margin-top: 1rem; display: grid; gap: .3rem; text-align: center; }
.resultado-ok { background: var(--verde-suave); border: 2px solid var(--verde); }
.resultado-mal { background: var(--coral-suave); border: 2px solid var(--coral); }
.resultado-puerta b { font-size: 1.3rem; }

/* ---------- Kanban ---------- */

.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; align-items: start; }
@media (max-width: 860px) { .kanban { grid-template-columns: 1fr; } }
.columna-kanban { background: var(--fondo-2); border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio); padding: .7rem; }
.columna-kanban h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--tinta-3); padding: .2rem .4rem .6rem; display: flex; justify-content: space-between; }
.columna-kanban .lista-registros { gap: .5rem; }
.tarjeta-tarea {
  background: var(--superficie); border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio-chico);
  padding: .7rem .8rem; display: grid; gap: .4rem; cursor: pointer; width: 100%; text-align: left; color: inherit; font-size: 1rem;
}
.tarjeta-tarea:hover { border-color: var(--borde-fuerte); }
.tarjeta-tarea h3 { font-size: .93rem; font-weight: 700; line-height: 1.3; }
.tarea-meta { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; font-size: .74rem; color: var(--tinta-3); }
.tarea-avance { justify-self: end; }

/* ---------- Equipo / miembros ---------- */

.tarjeta-miembro {
  display: grid; grid-template-columns: 42px 1fr auto; gap: .8rem; align-items: center;
  background: var(--superficie); border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio);
  padding: .85rem 1rem;
}
.tarjeta-miembro .avatar { width: 42px; height: 42px; font-size: 1rem; }
.tarjeta-miembro .picto svg { width: 20px; height: 20px; }
.tarjeta-miembro h3 { font-size: .98rem; font-weight: 800; }
.tarjeta-miembro p { font-size: .8rem; color: var(--tinta-3); word-break: break-word; }
.acciones-miembro { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.acciones-miembro select {
  background: var(--campo-fondo); color: var(--tinta); border: var(--grosor-borde) solid var(--borde);
  border-radius: 999px; padding: .35rem 1.8rem .35rem .7rem; font-size: .82rem; font-weight: 700;
  appearance: none; background-image: var(--flecha-select); background-repeat: no-repeat; background-position: right .5rem center; background-size: 14px;
}

/* ---------- Actividad ---------- */

.linea-actividad { display: grid; gap: 0; }
.evento-actividad { display: grid; grid-template-columns: 34px 1fr; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--borde); }
.evento-actividad:last-child { border-bottom: 0; }
.evento-actividad .picto { width: 34px; height: 34px; border-radius: 10px; display: grid; place-content: center; background: var(--superficie-2); color: var(--tinta-2); }
.evento-actividad .picto svg { width: 16px; height: 16px; }
.evento-actividad p { font-size: .9rem; }
.evento-actividad .silencio { font-size: .76rem; }

/* ---------- Ajustes: editores de filas ---------- */

.editor-filas { display: grid; gap: .5rem; }
.editor-fila { display: grid; grid-template-columns: 1fr 34px; gap: .5rem; align-items: start; background: var(--fondo-2); border: var(--grosor-borde) solid var(--borde); border-radius: var(--radio-chico); padding: .6rem; }
.editor-fila .campos { display: grid; gap: .4rem; }
.editor-fila input, .editor-fila textarea { padding: .45rem .6rem; font-size: .9rem; border-radius: 8px; }
.editor-fila textarea { resize: vertical; min-height: 40px; }

.grilla-limites { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .8rem; margin: .6rem 0 1rem; }
@media (max-width: 560px) { .grilla-limites { grid-template-columns: 1fr; } }
.grilla-limites label { display: grid; gap: .2rem; font-size: .76rem; font-weight: 700; color: var(--tinta-2); }
.grilla-limites input { padding: .5rem .7rem; font-size: .95rem; }

/* ---------- Toasts ---------- */

#capa-toasts {
  position: fixed; bottom: calc(var(--alto-nav-inferior) + 1rem + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%); z-index: 80;
  display: grid; gap: .5rem; justify-items: center; width: min(420px, calc(100% - 2rem));
  pointer-events: none;
}
.toast {
  background: var(--tinta); color: var(--fondo); font-weight: 700; font-size: .92rem;
  padding: .7rem 1.2rem; border-radius: 999px; box-shadow: var(--sombra);
  animation: subir .25s ease; max-width: 100%; text-align: center;
}
.toast-error { background: var(--coral); color: var(--sobre-acento); }
.toast-ok { background: var(--verde); color: var(--sobre-acento); }

/* ---------- Banner aviso ---------- */

.banner-aviso {
  display: flex; gap: .7rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--ambar-suave); border: var(--grosor-borde) solid var(--ambar);
  border-radius: var(--radio); padding: .8rem 1rem; margin-bottom: 1rem; font-size: .92rem;
}

/* ---------- Cámara ---------- */

.camara-caja video { width: 100%; border-radius: var(--radio); background: #000; max-height: 52svh; object-fit: cover; }
.camara-caja video.espejo { transform: scaleX(-1); }
.camara-acciones { display: flex; gap: .8rem; justify-content: center; align-items: center; margin-top: .9rem; flex-wrap: wrap; }
.boton-obturador { width: 68px; height: 68px; border-radius: 50%; border: 4px solid var(--tinta); background: var(--primario); cursor: pointer; }
.boton-obturador:active { transform: scale(.92); }

/* ---------- Tira de fotos ---------- */

.tira-fotos { display: flex; gap: .5rem; flex-wrap: wrap; }
.tira-foto { position: relative; width: 74px; height: 74px; border-radius: 12px; overflow: hidden; border: var(--grosor-borde) solid var(--borde); flex: none; }
.tira-foto img { width: 100%; height: 100%; object-fit: cover; }
.tira-foto .es-pdf { display: grid; place-content: center; width: 100%; height: 100%; font-size: .68rem; font-weight: 800; color: var(--tinta-2); background: var(--fondo-2); }
.tira-foto button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .72); color: #fff; cursor: pointer; display: grid; place-content: center; }
.tira-foto button svg { width: 12px; height: 12px; }

/* ---------- Grilla de fotos ---------- */

.grilla-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; }
.grilla-fotos button, .grilla-fotos a { border: var(--grosor-borde) solid var(--borde); border-radius: 12px; overflow: hidden; padding: 0; cursor: pointer; background: var(--fondo-2); aspect-ratio: 1; display: grid; place-content: stretch; color: var(--tinta-2); text-decoration: none; }
.grilla-fotos img { width: 100%; height: 100%; object-fit: cover; }
.grilla-fotos .es-pdf { display: grid; place-content: center; font-weight: 800; font-size: .8rem; }

/* ---------- Visor de fotos (siempre oscuro: es para mirar fotos) ---------- */

.visor { position: fixed; inset: 0; z-index: 90; background: rgba(8, 8, 14, .96); display: grid; grid-template-rows: auto 1fr; animation: aparecer .15s ease; color: #f2f2f6; }
.visor-barra { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; font-weight: 700; }
.visor-barra .acciones { display: flex; gap: .5rem; }
.visor-barra a, .visor-barra button { background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .25); color: #f2f2f6; width: 38px; height: 38px; border-radius: 50%; display: grid; place-content: center; cursor: pointer; }
.visor-barra svg { width: 17px; height: 17px; }
.visor-cuerpo { overflow: auto; display: grid; place-items: center; padding: 0 .5rem 1rem; }
.visor-cuerpo img { max-width: 96vw; max-height: 80svh; border-radius: 8px; cursor: zoom-in; }
.visor-cuerpo img.ampliada { max-width: none; max-height: none; width: 185vw; cursor: zoom-out; }
.visor-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .25); background: rgba(30, 30, 40, .85); color: #f2f2f6; cursor: pointer; display: grid; place-content: center; z-index: 91; }
.visor-nav svg { width: 20px; height: 20px; }
.visor-ant { left: .6rem; }
.visor-sig { right: .6rem; }

/* ---------- Proveedores ---------- */

.chip-rubro { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: .16rem .6rem; border-radius: 999px; background: var(--primario-suave); color: var(--primario); white-space: nowrap; }
.enlaces-proveedor { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .35rem; }
.enlaces-proveedor a { display: inline-flex; gap: .35rem; align-items: center; font-size: .8rem; font-weight: 700; color: var(--tinta-2); text-decoration: none; border: var(--grosor-borde) solid var(--borde); padding: .26rem .7rem; border-radius: 999px; }
.enlaces-proveedor a:hover { color: var(--tinta); border-color: var(--borde-fuerte); }
.enlaces-proveedor svg { width: 14px; height: 14px; }

/* ---------- Movimiento reducido ---------- */

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

/* ---------- Scrollbar ---------- */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--superficie-3); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
