/* Guía web de Colima Go — base: tokens, componentes y piezas comunes.
   Mundo "noche de feria" (ver DESIGN.md): mismas fuentes, tokens y focos que
   la portada. Cada página suma su propio archivo en css/paginas/. */

/* ============ Fuentes (subconjunto latin de Google Fonts, licencia OFL) ============ */
@font-face { font-family: 'Shrikhand'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/shrikhand-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ============ Tokens: noche de feria (oscuro) y feria de día (claro) ============ */
:root {
  color-scheme: dark;
  --suelo: #0e1119;          /* asfalto mojado */
  --suelo-2: #141926;
  --suelo-3: #1b2233;
  --tinta: #f2f1ee;          /* vapor */
  --tinta-suave: #bfc3cd;
  --tinta-tenue: #8f96a6;
  --foco: #ffc347;           /* foco de feria: luz y acción principal */
  --foco-hondo: #e9a318;
  --foco-hover: #ffd06b;
  --sobre-foco: #151822;
  --lona: #2c56a8;           /* toldo azul */
  --lona-hondo: #1e3a6e;
  --bandera: #bf3828;        /* manta roja */
  --acento-texto: #ffc347;   /* acento tipográfico legible sobre el suelo */
  --peligro-texto: #ff8f7c;  /* texto de error sobre el suelo */
  --letra-tabla: #f6f5f1;
  --linea: rgba(242,241,238,0.12);
  --cable: #3b4254;
  --vidrio: #2a3040;         /* foco apagado */
  --grano: 0.07;
  --sombra: 0 0 0 transparent;
  --sombra-flotante: 0 10px 28px -10px rgba(0,0,0,0.6);
  --velo: rgba(6,8,12,0.72);
  --boton-foto: rgba(10,12,18,0.58);
  --franja-fiestas: #1e3a6e;
  --tinta-fiestas: var(--tinta);
  --barra-alto: 64px;
  --pestanas-alto: 62px;
  --curva-salida: cubic-bezier(.16,1,.3,1);
  --fuente: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --curva-rebote: cubic-bezier(.2,.9,.3,1.3);
}
:root {
  --brochazo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 64' preserveAspectRatio='none'%3E%3Cpath d='M9 7C40 3 78 6 118 4s86-3 111 1c4 1 6 3 5 5l2 4-3 4 3 5-2 6 3 6-3 5 2 6-4 4c1 3-1 6-5 7-33 3-71 1-110 3S29 61 11 59c-4-1-6-3-5-6l-3-5 3-5-4-6 3-5-3-6 3-5-2-5 3-4c-1-3 1-5 3-6z'/%3E%3Cpath d='M20 60l38-2 2 3-38 2zM170 2l40 1-1 2-40-1z'/%3E%3C/svg%3E");
}
:root[data-tema="claro"] { color-scheme: light; }
@media (prefers-color-scheme: light) { :root:not([data-tema="oscuro"]) { color-scheme: light; } }

/* Feria de día: cal de Comala, focos apagados, las lonas ponen el color */
:root[data-tema="claro"] {
  --suelo: #f4f4f1; --suelo-2: #eaebe7; --suelo-3: #dfe1dc;
  --tinta: #141824; --tinta-suave: #3f4554; --tinta-tenue: #5b6272;
  --foco: #f7b52a; --foco-hondo: #d99612; --foco-hover: #ffc13f; --sobre-foco: #141824;
  --lona: #1e3a6e; --lona-hondo: #152a52; --bandera: #b8321f;
  --acento-texto: #b8321f; --peligro-texto: #b8321f;
  --linea: rgba(20,24,36,0.14); --cable: #2a2f3c; --vidrio: #fbfbfa;
  --grano: 0.025; --sombra: 0 0 0 transparent;
  --sombra-flotante: 0 10px 26px -10px rgba(20,24,36,0.35);
  --franja-fiestas: #1e3a6e; --tinta-fiestas: #f2f1ee;
}
@media (prefers-color-scheme: light) {
  :root:not([data-tema="oscuro"]) {
    --suelo: #f4f4f1; --suelo-2: #eaebe7; --suelo-3: #dfe1dc;
    --tinta: #141824; --tinta-suave: #3f4554; --tinta-tenue: #5b6272;
    --foco: #f7b52a; --foco-hondo: #d99612; --foco-hover: #ffc13f; --sobre-foco: #141824;
    --lona: #1e3a6e; --lona-hondo: #152a52; --bandera: #b8321f;
    --acento-texto: #b8321f; --peligro-texto: #b8321f;
    --linea: rgba(20,24,36,0.14); --cable: #2a2f3c; --vidrio: #fbfbfa;
    --grano: 0.025; --sombra: 0 0 0 transparent;
    --sombra-flotante: 0 10px 26px -10px rgba(20,24,36,0.35);
    --franja-fiestas: #1e3a6e; --tinta-fiestas: #f2f1ee;
  }
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--barra-alto) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--suelo); color: var(--tinta);
  font-family: var(--fuente); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  transition: background-color .4s ease, color .4s ease;
}
/* Grano de asfalto: textura fija, muy tenue */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: var(--grano);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
:root[data-tema="claro"] body::before { filter: invert(1); }
@media (prefers-color-scheme: light) { :root:not([data-tema="oscuro"]) body::before { filter: invert(1); } }
main, header, footer, nav { position: relative; z-index: 1; }
main { flex: 1 0 auto; }
::selection { background: var(--foco); color: var(--sobre-foco); }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; border-radius: 6px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
button, [role="button"], summary { cursor: pointer; }
:where(button):disabled { cursor: not-allowed; }
/* Barras de desplazamiento y números con la paleta, no con la del navegador */
* { scrollbar-width: thin; scrollbar-color: var(--cable) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--cable); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
time, .contador, .cifra { font-variant-numeric: tabular-nums; }
::placeholder { color: var(--tinta-tenue); opacity: 1; }
input, textarea { caret-color: var(--foco); }

.rotulo { font-family: 'Shrikhand', serif; line-height: 0.98; }
.tablilla { font-family: var(--fuente); font-weight: 600; }
.tablero-titulo { font-family: var(--fuente); font-weight: 700; line-height: 1.05; }
.envoltura { width: min(1240px, 100% - 40px); margin-inline: auto; }
.envoltura-lectura { width: min(760px, 100% - 40px); margin-inline: auto; }
.envoltura-feed { width: min(1120px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.saltar {
  position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--foco); color: var(--sobre-foco);
  padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: top .2s;
}
.saltar:focus { top: 12px; }
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic .lleno { fill: currentColor; stroke: none; }
.ic-grande { width: 1.6em; height: 1.6em; }

/* ============ Guirnalda de focos (el hilo de toda la guía) ============ */
.guirnalda { position: relative; height: var(--alto, 48px); pointer-events: none; }
.guirnalda svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.guirnalda path { fill: none; stroke: var(--cable); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.foco {
  position: absolute; width: 11px; height: 15px; margin-left: -5.5px; margin-top: -1px;
  border-radius: 45% 45% 50% 50% / 38% 38% 62% 62%;
  background: var(--vidrio); border: 1px solid var(--cable);
  transition: background-color .5s ease, box-shadow .8s ease, border-color .5s ease;
}
.foco::before { /* casquillo */
  content: ''; position: absolute; left: 2.5px; top: -4px; width: 5px; height: 4px; border-radius: 1px; background: var(--cable);
}
.encendida .foco {
  background: var(--foco); border-color: #ffe29a;
  box-shadow: 0 0 6px 1px rgba(255,195,71,0.9), 0 0 22px 6px rgba(255,170,40,0.28);
  transition-delay: calc(var(--i) * 45ms);
}
/* De día los focos no se encienden: son vidrio */
:root[data-tema="claro"] .encendida .foco { background: var(--vidrio); border-color: var(--cable); box-shadow: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-tema="oscuro"]) .encendida .foco { background: var(--vidrio); border-color: var(--cable); box-shadow: none; }
}
/* Un foco suelto (indicadores, pestaña activa, toast): sin cable propio */
.foco-solo { position: relative; display: inline-block; flex: none; width: 11px; height: 15px; margin-top: 4px; border-radius: 45% 45% 50% 50% / 38% 38% 62% 62%; background: var(--vidrio); border: 1px solid var(--cable); transition: background-color .4s, box-shadow .6s; }
.foco-solo::before { content: ''; position: absolute; left: 2.5px; top: -4px; width: 5px; height: 4px; border-radius: 1px; background: var(--cable); }
.foco-solo.encendido { background: var(--foco); border-color: #ffe29a; box-shadow: 0 0 6px 1px rgba(255,195,71,0.9), 0 0 18px 4px rgba(255,170,40,0.25); }
:root[data-tema="claro"] .foco-solo.encendido { background: var(--foco); box-shadow: none; }
@media (prefers-color-scheme: light) { :root:not([data-tema="oscuro"]) .foco-solo.encendido { background: var(--foco); box-shadow: none; } }

/* ============ Barra superior ============ */
.barra {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--suelo) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(12px); -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background-color .4s;
}
.barra.con-sombra { border-bottom-color: var(--linea); }
.barra .envoltura { display: flex; align-items: center; gap: 16px; height: var(--barra-alto); }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.perro {
  width: 34px; height: 34px; flex-shrink: 0; background: var(--tinta);
  -webkit-mask: url(/img/perro-de-colima.webp) center / contain no-repeat; mask: url(/img/perro-de-colima.webp) center / contain no-repeat;
}
.marca-nombre { font-family: 'Shrikhand', serif; font-size: 21px; line-height: 1; }
.marca-nombre span { color: var(--acento-texto); }
.distritos { display: flex; gap: 4px; }
.distritos a {
  display: block; white-space: nowrap; padding: 8px 12px; border-radius: 999px; text-decoration: none;
  font-family: var(--fuente); font-weight: 600; font-size: 16px;
  color: var(--tinta-suave); transition: color .2s, background-color .2s;
}
.distritos a:hover { color: var(--tinta); background: var(--suelo-3); }
.distritos a[aria-current] { color: var(--tinta); }
.distritos a[aria-current]::after { content: ''; display: block; height: 2px; margin-top: 2px; border-radius: 2px; background: var(--foco); }
.barra-acciones { display: flex; align-items: center; gap: 8px; }
.interruptor, .btn-icono {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: transparent; border: 1px solid var(--linea); color: var(--tinta); cursor: pointer; text-decoration: none; padding: 0;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.interruptor:hover, .btn-icono:hover { background: var(--suelo-3); border-color: var(--tinta-tenue); }
.interruptor:active, .btn-icono:active { transform: scale(.94); }
.interruptor svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.interruptor .vidrio { fill: var(--foco); transition: fill .3s; }
:root[data-tema="claro"] .interruptor .vidrio { fill: transparent; }
@media (prefers-color-scheme: light) { :root:not([data-tema="oscuro"]) .interruptor .vidrio { fill: transparent; } }
.btn-idioma {
  height: 40px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; text-decoration: none;
  border: 1px solid var(--linea); color: var(--tinta-suave); font-family: var(--fuente); font-weight: 600; font-size: 15px;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-idioma:hover { background: var(--suelo-3); color: var(--tinta); border-color: var(--tinta-tenue); }
.btn-usuario { position: relative; overflow: hidden; }
.btn-usuario img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.btn-usuario.con-sesion { border-color: var(--foco); }
.btn-descargar-nav { padding: 9px 16px; font-size: 15px; }

/* ============ Barra de pestañas (móvil): el borde superior es el cable ============ */
.pestanas-app {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: color-mix(in srgb, var(--suelo) 94%, transparent);
  backdrop-filter: saturate(1.2) blur(14px); -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-top: 1px solid var(--cable); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pestanas-app ul { display: grid; grid-template-columns: repeat(5, 1fr); height: var(--pestanas-alto); }
.pestanas-app a {
  position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--tinta-tenue); transition: color .2s, transform .2s;
  font-family: var(--fuente); font-weight: 600; font-size: 12.5px;
}
.pestanas-app a .ic { width: 23px; height: 23px; }
.pestanas-app a:active { transform: scale(.95); }
.pestanas-app a[aria-current] { color: var(--tinta); }
.pestanas-app a[aria-current] .ic { fill: currentColor; fill-opacity: .18; }
.pestanas-app a[aria-current]::before { /* el foco que cuelga del cable */
  content: ''; position: absolute; top: -1px; left: 50%; width: 11px; height: 15px; margin-left: -5.5px; transform: translateY(-9px) scale(.9);
  border-radius: 45% 45% 50% 50% / 38% 38% 62% 62%; background: var(--foco); border: 1px solid #ffe29a;
  box-shadow: 0 0 6px 1px rgba(255,195,71,0.9), 0 0 18px 4px rgba(255,170,40,0.25);
}
:root[data-tema="claro"] .pestanas-app a[aria-current]::before { box-shadow: none; border-color: var(--foco-hondo); }
@media (prefers-color-scheme: light) { :root:not([data-tema="oscuro"]) .pestanas-app a[aria-current]::before { box-shadow: none; border-color: var(--foco-hondo); } }

/* ============ Botones pintados ============ */
/* La pintura es una capa con máscara de brochazo; el botón queda sin máscara
   para que el anillo de foco no se recorte. */
.btn-pintado {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; cursor: pointer; border: 0;
  background: transparent; color: var(--sobre-foco); min-height: 52px;
  padding: 14px 26px 13px; font-family: var(--fuente); font-weight: 700; font-size: 18px; line-height: 1.1; text-align: left;
  transition: transform .18s var(--curva-rebote), opacity .2s;
}
.btn-pintado::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--foco); transition: background-color .2s;
  -webkit-mask: var(--brochazo) center / 100% 100% no-repeat; mask: var(--brochazo) center / 100% 100% no-repeat;
}
.btn-pintado:hover { transform: translateY(-2px) rotate(-0.6deg); }
.btn-pintado:hover::before { background: var(--foco-hover); }
.btn-pintado:active { transform: translateY(1px) rotate(0); }
.btn-pintado:focus-visible { outline-offset: 4px; }
.btn-pintado .ic { width: 22px; height: 22px; }
.btn-pintado small { display: block; font-family: var(--fuente); font-weight: 500; font-size: 12px; letter-spacing: 0; text-transform: none; opacity: .8; }
.btn-pintado[disabled], .btn-pintado[aria-disabled="true"] { opacity: .45; pointer-events: none; transform: none; }
.btn-lona { color: var(--letra-tabla); } .btn-lona::before { background: var(--lona); } .btn-lona:hover::before { background: color-mix(in srgb, var(--lona) 82%, #fff); }
.btn-bandera { color: var(--letra-tabla); } .btn-bandera::before { background: var(--bandera); } .btn-bandera:hover::before { background: color-mix(in srgb, var(--bandera) 82%, #fff); }
.btn-chico { min-height: 40px; padding: 9px 18px; font-size: 15px; }
.btn-ancho { display: flex; width: 100%; }
/* Contorno y texto: sin brochazo */
.btn-contorno, .btn-texto {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; text-decoration: none; cursor: pointer;
  font-family: var(--fuente); font-weight: 600; font-size: 16px; line-height: 1.1;
  border-radius: 999px; transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn-contorno { background: transparent; color: var(--tinta); border: 1px solid var(--linea); }
.btn-contorno:hover { background: var(--suelo-3); border-color: var(--tinta-tenue); }
.btn-contorno:active, .btn-texto:active { transform: scale(.97); }
.btn-texto { background: transparent; color: var(--acento-texto); border: 0; padding-inline: 10px; }
.btn-texto:hover { text-decoration: underline; }
.btn-peligro { color: var(--peligro-texto); border-color: color-mix(in srgb, var(--bandera) 55%, transparent); }
.btn-peligro:hover { background: color-mix(in srgb, var(--bandera) 16%, transparent); border-color: var(--bandera); }
.tiendas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============ Cabecera de página: guirnalda + letrero colgado ============ */
.cabecera { position: relative; padding-top: 14px; }
.cabecera > .guirnalda { --alto: 48px; }
.cabecera-fila { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 48px; align-items: end; padding-top: 44px; margin-bottom: 40px; }
@media (min-width: 861px) { .cabecera-fila.con-entrada { grid-template-columns: auto minmax(0, 1fr); } }
.letrero-colgante {
  position: relative; justify-self: start; width: fit-content; max-width: 100%; font-size: clamp(32px, 4vw, 58px);
  background: var(--tinta-letrero, var(--lona)); color: var(--texto-letrero, #f6f5f1);
  padding: .2em .42em .26em; border-radius: 6px; box-shadow: var(--sombra);
  rotate: var(--giro, -1deg); /* propiedad propia: la entrada anima transform sin borrar el giro */
  transform-origin: 50% calc(var(--cuerda, 40) * -1px);
  overflow-wrap: anywhere;
}
.letrero-colgante::before, .letrero-colgante::after {
  content: ''; position: absolute; bottom: 100%; width: 1px; height: calc(var(--cuerda, 40) * 1px); background: var(--cable);
}
.letrero-colgante::before { left: 14%; } .letrero-colgante::after { right: 14%; }
.letrero-lona { --tinta-letrero: var(--lona); }
.letrero-bandera { --tinta-letrero: var(--bandera); }
.cabecera-entrada { color: var(--tinta-suave); font-size: 18px; max-width: 32em; padding-bottom: 6px; }
.cabecera-compacta .cabecera-fila { padding-top: 34px; margin-bottom: 28px; }
.cabecera-compacta > .guirnalda { --alto: 36px; }

/* Entrada al hacer scroll: visible por defecto, solo con JS se anima */
.js [data-revela] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--curva-salida), transform .8s var(--curva-salida); }
.js [data-revela].visto { opacity: 1; transform: none; }
.js [data-revela="2"] { transition-delay: .12s; }
.js [data-revela="3"] { transition-delay: .24s; }

/* ============ Secciones, filas de texto y etiquetas ============ */
.seccion { padding: 8px 0 72px; }
.seccion-titulo { font-family: var(--fuente); font-weight: 700; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.05; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.seccion-titulo .ic { color: var(--acento-texto); }
.pagina-pie { padding-bottom: 96px; }
.tablilla-muni { font-family: var(--fuente); font-weight: 600; font-size: 14px; color: var(--acento-texto); text-decoration: none; }
a.tablilla-muni:hover { text-decoration: underline; }
.tablilla-tenue { font-family: var(--fuente); font-weight: 600; font-size: 13px; color: var(--tinta-tenue); }
.pastilla { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-family: var(--fuente); font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.pastilla-hoy { background: var(--foco); color: var(--sobre-foco); }
.pastilla-lona { background: var(--lona); color: var(--letra-tabla); }
.pastilla-tenue { background: var(--suelo-3); color: var(--tinta-suave); }
.nota { color: var(--tinta-tenue); font-size: 14px; }
.lectura { font-size: 17px; line-height: 1.65; max-width: 68ch; color: var(--tinta); }
.lectura p + p { margin-top: 1em; }
.texto-peligro { color: var(--peligro-texto); }

/* Lista de lugares cercanos (guía de visita de un lugar, de un evento y de una fiesta) */
.cerca-lista { margin: 14px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--linea); max-width: 62ch; }
.cerca-lista li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--linea); font-size: 16.5px; min-width: 0; }
.cerca-lista a { color: var(--acento-texto); font-weight: 500; text-underline-offset: 3px; overflow-wrap: anywhere; }
.cerca-lista .nota { font-size: 14.5px; }
/* Párrafos y listas de las secciones de contexto: enlaces con el acento y viñetas visibles */
.lectura-contexto a { color: var(--acento-texto); text-underline-offset: 3px; }
.lectura-contexto .lectura ul { margin: 0; padding-left: 1.2em; list-style: disc; }
.lectura-contexto .lectura li + li { margin-top: .55em; }
.cerca-lista + .lectura { margin-top: 18px; }

/* ============ Chips y pestañas (filtros) ============ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-deslizables { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; margin-inline: -20px; padding-inline: 20px; scroll-padding-inline: 20px; }
.chips-deslizables > * { flex: none; scroll-snap-align: start; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 18px; border-radius: 999px;
  background: transparent; border: 1px solid var(--linea); color: var(--tinta-suave); text-decoration: none; white-space: nowrap;
  font-family: var(--fuente); font-weight: 600; font-size: 16px;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s;
}
.chip:hover { color: var(--tinta); border-color: var(--tinta-tenue); }
.chip:active { transform: scale(.96); }
.chip[aria-selected="true"], .chip[aria-pressed="true"], .chip[aria-current="true"], .chip.activo { background: var(--tinta); color: var(--suelo); border-color: var(--tinta); }
.chip-miniatura { padding-left: 6px; }
.chip-miniatura img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--suelo-3); }

/* ============ Fotos: marco, sin foto, medallón ============ */
.marco { position: relative; border-radius: 10px; overflow: hidden; background: var(--suelo-3); }
.marco > img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .26s; }
.marco-16-10 { aspect-ratio: 16 / 10; } .marco-4-5 { aspect-ratio: 4 / 5; } .marco-4-3 { aspect-ratio: 4 / 3; } .marco-16-9 { aspect-ratio: 16 / 9; } .marco-1 { aspect-ratio: 1; }
.sin-foto { position: absolute; inset: 0; display: grid; place-items: center; background: var(--suelo-3); }
.sin-foto::before { content: ''; width: 28%; max-width: 96px; aspect-ratio: 1; background: color-mix(in srgb, var(--tinta) 22%, transparent); -webkit-mask: url(/img/perro-de-colima.webp) center / contain no-repeat; mask: url(/img/perro-de-colima.webp) center / contain no-repeat; }
.medallon { display: block; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #fff; flex: none; }
.medallon img { width: 100%; height: 100%; object-fit: cover; }
.medallon-elegido { outline: 2px solid var(--foco); outline-offset: 3px; }

/* ============ Tarjeta de lugar (la foto manda; el texto va debajo) ============ */
.rejilla-lugares { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 36px 24px; }
.rejilla-lugares > .anuncio { grid-column: 1 / -1; }
.tarjeta-lugar { position: relative; display: flex; flex-direction: column; min-width: 0; }
.tarjeta-lugar .marco:hover > img, .tarjeta-lugar:hover .marco > img { transform: scale(1.05); }
.tl-titulo { font-family: var(--fuente); font-weight: 700; font-size: 26px; line-height: 1.08; margin-top: 14px; }
.tl-titulo a { text-decoration: none; }
.tl-titulo a::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: 10px; } /* toda la tarjeta es el enlace */
.tl-titulo a:focus-visible { outline: none; }
.tl-titulo a:focus-visible::after { outline: 3px solid var(--foco); outline-offset: 4px; }
.tl-muni { margin-top: 2px; }
.tl-desc { color: var(--tinta-suave); font-size: 15.5px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-extra { color: var(--tinta-suave); font-size: 15px; margin-top: 4px; }
.tl-accion { position: absolute; top: 10px; right: 10px; z-index: 2; }
.btn-foto {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; padding: 0;
  background: var(--boton-foto); color: #f6f5f1; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .15s, background-color .2s;
}
.btn-foto:hover { background: rgba(10,12,18,.78); }
.btn-foto:active { transform: scale(.9); }
.btn-foto[aria-pressed="true"] { color: #ff6b57; }
.btn-foto[aria-pressed="true"] .ic, [data-favorito][aria-pressed="true"] .ic { fill: currentColor; }

/* ============ Estado vacío / error / carga ============ */
.estado-vista { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 20px; gap: 14px; }
.estado-vista .ev-icono { width: 64px; height: 64px; border-radius: 50%; background: var(--suelo-3); display: grid; place-items: center; color: var(--tinta-suave); }
.estado-vista .ev-icono .ic { width: 28px; height: 28px; }
.estado-vista h2, .estado-vista h3 { font-family: var(--fuente); font-weight: 700; font-size: 26px; line-height: 1.1; }
.estado-vista p { color: var(--tinta-suave); max-width: 32em; }
.estado-vista .btn-pintado, .estado-vista .btn-contorno { margin-top: 8px; }
/* Carga: cinco focos que se encienden en secuencia (no un spinner) */
.cargando-focos { display: inline-flex; gap: 10px; align-items: flex-start; height: 24px; }
.cargando-focos span { width: 11px; height: 15px; margin-top: 5px; border-radius: 45% 45% 50% 50% / 38% 38% 62% 62%; background: var(--vidrio); border: 1px solid var(--cable); animation: encender 1.1s infinite; animation-delay: calc(var(--i) * 140ms); }
@keyframes encender { 0%, 55%, 100% { background: var(--vidrio); border-color: var(--cable); box-shadow: none; } 15%, 40% { background: var(--foco); border-color: #ffe29a; box-shadow: 0 0 10px 2px rgba(255,195,71,.6); } }
:root[data-tema="claro"] .cargando-focos span { animation-name: encender-dia; }
@media (prefers-color-scheme: light) { :root:not([data-tema="oscuro"]) .cargando-focos span { animation-name: encender-dia; } }
@keyframes encender-dia { 0%, 55%, 100% { background: var(--vidrio); } 15%, 40% { background: var(--foco); border-color: var(--foco-hondo); } }
.cargando { display: flex; justify-content: center; padding: 48px 0; }
.esqueleto { background: var(--suelo-3); border-radius: 8px; animation: pulso .7s ease-in-out infinite alternate; }
@keyframes pulso { from { opacity: .55; } to { opacity: 1; } }

/* ============ Anuncios (espacio reservado, nunca sobre el contenido) ============ */
.anuncio { position: relative; display: block; border-block: 1px solid var(--linea); padding: 10px 0 14px; margin-block: 8px; min-height: 96px; }
.anuncio-etiqueta { display: block; font-family: var(--fuente); font-weight: 600; font-size: 12px; color: var(--tinta-tenue); margin-bottom: 8px; }
.anuncio-infeed { min-height: 280px; }
.anuncio ins.adsbygoogle { display: block; min-height: 90px; }
.anuncio-infeed ins.adsbygoogle { min-height: 250px; }
.anuncio-promo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; min-height: 64px; }
.anuncio-promo h3 { font-family: 'Shrikhand', serif; font-size: 22px; line-height: 1.1; }
.anuncio-promo p { color: var(--tinta-suave); font-size: 15.5px; max-width: 34em; margin-top: 4px; }
.anuncio-promo .tiendas { gap: 8px; }
.anuncio-pie { position: relative; z-index: 1; }

/* ============ Hoja / diálogo (login, comentarios, compartir, reportar) ============ */
dialog.hoja {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 88vh; max-height: 88dvh; overflow: auto;
  padding: 0; border: 0; border-radius: 18px 18px 0 0; background: var(--suelo-2); color: var(--tinta);
  box-shadow: 0 -16px 40px -12px rgba(0,0,0,.6); overscroll-behavior: contain;
}
dialog.hoja[open] { animation: hoja-sube .34s var(--curva-salida) both; }
dialog.hoja::backdrop { background: var(--velo); backdrop-filter: blur(4px); animation: aparece .2s ease both; }
@keyframes hoja-sube { from { transform: translateY(40px); opacity: 0; } }
@keyframes aparece { from { opacity: 0; } }
.hoja-asa { width: 40px; height: 4px; border-radius: 4px; background: var(--cable); margin: 10px auto 0; }
.hoja-cabeza { display: flex; align-items: center; gap: 12px; padding: 14px 20px 10px; position: sticky; top: 0; background: var(--suelo-2); z-index: 2; }
.hoja-cabeza h2 { font-family: 'Shrikhand', serif; font-size: 26px; line-height: 1.05; margin-right: auto; }
.hoja-cuerpo { padding: 6px 20px 24px; }
.hoja-cerrar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--suelo-3); border: 0; color: var(--tinta-suave); padding: 0; }
.hoja-cerrar:hover { color: var(--tinta); }
@media (min-width: 720px) {
  dialog.hoja { inset: 0; margin: auto; width: min(560px, 92vw); max-height: 86vh; border-radius: 18px; border: 1px solid var(--linea); box-shadow: 0 24px 60px -16px rgba(0,0,0,.6); }
  dialog.hoja[open] { animation: hoja-aparece .26s var(--curva-salida) both; }
  .hoja-asa { display: none; }
  dialog.hoja.hoja-ancha { width: min(760px, 92vw); }
}
@keyframes hoja-aparece { from { opacity: 0; transform: translateY(8px) scale(.98); } }
body.hoja-abierta { overflow: hidden; }

/* ============ Formularios ============ */
.campo { display: block; margin-bottom: 18px; }
.campo > label, .campo > .campo-etiqueta { display: block; font-family: var(--fuente); font-weight: 600; font-size: 14px; color: var(--tinta-suave); margin-bottom: 6px; }
.campo .ayuda { display: block; font-size: 13.5px; color: var(--tinta-tenue); margin-top: 6px; }
input[type="text"], input[type="email"], input[type="search"], input[type="url"], textarea, select {
  width: 100%; background: var(--suelo-2); color: var(--tinta); border: 1px solid var(--linea); border-radius: 8px;
  padding: 12px 14px; font: inherit; font-size: 16px; line-height: 1.4; transition: border-color .2s, background-color .2s;
}
textarea { min-height: 120px; resize: vertical; }
input:hover, textarea:hover, select:hover { border-color: var(--tinta-tenue); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-color: transparent; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opcion { position: relative; }
.opcion input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opcion span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--linea); color: var(--tinta-suave);
  font-family: var(--fuente); font-weight: 600; font-size: 16px; transition: background-color .2s, color .2s, border-color .2s;
}
.opcion input:hover + span { color: var(--tinta); border-color: var(--tinta-tenue); }
.opcion input:checked + span { background: var(--tinta); color: var(--suelo); border-color: var(--tinta); }
.opcion input:focus-visible + span { outline: 3px solid var(--foco); outline-offset: 3px; }
.aviso-error { background: color-mix(in srgb, var(--bandera) 16%, transparent); border: 1px solid color-mix(in srgb, var(--bandera) 50%, transparent); color: var(--tinta); font-size: 14.5px; padding: 10px 12px; border-radius: 8px; }

/* ============ Acciones de un post: me gusta, comentarios, vistas, compartir ============ */
.acciones { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.acc {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 999px; background: transparent; border: 0; color: var(--tinta-suave);
  font-family: var(--fuente); font-weight: 600; font-size: 16px; transition: background-color .2s, color .2s, transform .15s;
}
button.acc:hover { background: var(--suelo-3); color: var(--tinta); }
button.acc:active { transform: scale(.93); }
.acc[aria-pressed="true"] { color: var(--acento-texto); }
.acc[aria-pressed="true"] .ic { fill: currentColor; }
.acc .ic { width: 22px; height: 22px; }
.acc-espacio { flex: 1; }
.acciones-pastilla { display: inline-flex; border: 1px solid var(--linea); border-radius: 999px; padding: 2px; }
.acciones-pastilla .acc + .acc { border-left: 1px solid var(--linea); border-radius: 0; }

/* Menú flotante (reportar / ocultar) */
.menu-flotante { position: absolute; z-index: 30; min-width: 210px; background: var(--suelo-2); border: 1px solid var(--linea); border-radius: 12px; box-shadow: var(--sombra-flotante); padding: 6px; }
.menu-flotante button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 12px 12px; border-radius: 8px; text-align: left; font-size: 16px; }
.menu-flotante button:hover { background: var(--suelo-3); }
.menu-flotante .ic { color: var(--tinta-suave); }

/* ============ Comentarios ============ */
.comentarios-lista { display: grid; gap: 14px; margin: 14px 0 18px; }
.comentario { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; }
.comentario-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--suelo-3); object-fit: cover; }
.comentario-burbuja { background: var(--suelo-2); border: 1px solid var(--linea); border-radius: 4px 16px 16px 16px; padding: 10px 14px; min-width: 0; }
.comentario-nombre { font-weight: 600; font-size: 15px; }
.comentario-texto { font-size: 16px; overflow-wrap: anywhere; white-space: pre-wrap; margin-top: 2px; }
.comentario-pie { display: flex; gap: 14px; align-items: center; margin-top: 4px; font-size: 13px; color: var(--tinta-tenue); }
.comentario-borrar { background: none; border: 0; padding: 4px 0; color: var(--peligro-texto); font-size: 13.5px; font-weight: 600; }
.comentario-borrar:hover { text-decoration: underline; }
.comentarios-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.comentarios-form textarea { min-height: 52px; max-height: 160px; border-radius: 22px; padding: 14px 18px; resize: none; }
.btn-enviar { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--foco); color: var(--sobre-foco); display: grid; place-items: center; padding: 0; transition: transform .15s, background-color .2s; }
.btn-enviar:hover { background: var(--foco-hover); }
.btn-enviar:active { transform: scale(.92); }
.btn-enviar[disabled] { background: var(--suelo-3); color: var(--tinta-tenue); cursor: not-allowed; }
.btn-enviar[disabled]:hover { background: var(--suelo-3); }
.comentarios-contador { font-size: 12.5px; color: var(--tinta-tenue); text-align: right; margin-top: 4px; }

/* ============ Aviso breve (toast) ============ */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; justify-items: center; width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 12px 18px 12px 16px; border-radius: 999px; background: var(--suelo-3); color: var(--tinta); border: 1px solid var(--linea); box-shadow: var(--sombra-flotante); font-size: 15.5px; line-height: 1.35; animation: toast-entra .3s var(--curva-salida) both; }
:root[data-tema="claro"] .toast { background: var(--tinta); color: var(--suelo); }
@media (prefers-color-scheme: light) { :root:not([data-tema="oscuro"]) .toast { background: var(--tinta); color: var(--suelo); } }
.toast.sale { animation: toast-sale .25s ease both; }
@keyframes toast-entra { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-sale { to { opacity: 0; transform: translateY(8px); } }

/* ============ Pie ============ */
.pie { border-top: 1px solid var(--linea); padding: 28px 0 36px; margin-top: 24px; }
.pie .envoltura { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.pie .marca { margin: 0; }
.pie .perro { width: 26px; height: 26px; }
.pie .marca-nombre { font-size: 17px; }
.pie-enlaces { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.pie-enlaces a { color: var(--tinta-suave); font-size: 15px; text-decoration: none; padding: 4px 0; }
.pie-enlaces a:hover { color: var(--tinta); text-decoration: underline; }
.pie p { color: var(--tinta-tenue); font-size: 14px; width: 100%; }

/* ============ Responsive ============ */
/* El menú de arriba tiene 9 opciones: en pantallas medianas se compacta y, donde ya no cabe, se oculta
   (la portada hace lo mismo con los mismos anchos, para que sea siempre el mismo menú). */
@media (max-width: 1440px) {
  .distritos { gap: 0; }
  .distritos a { padding: 8px 9px; font-size: 15px; }
}
@media (max-width: 1360px) {
  .distritos { display: none; }
}
@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .pestanas-app { display: block; }
  body { padding-bottom: calc(var(--pestanas-alto) + env(safe-area-inset-bottom, 0px)); }
  .toasts { bottom: calc(var(--pestanas-alto) + 18px + env(safe-area-inset-bottom, 0px)); }
  .barra .btn-descargar-nav, .barra .btn-favoritos, .barra .btn-buscar { display: none; }
  .cabecera { padding-top: 6px; }
  .cabecera-fila { padding-top: 30px; margin-bottom: 20px; gap: 12px; }
  .seccion { padding-bottom: 56px; }
  .pie { padding-bottom: 28px; }
}
@media (max-width: 520px) {
  .envoltura, .envoltura-lectura, .envoltura-feed { width: calc(100% - 32px); }
  .chips-deslizables { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .tiendas .btn-pintado { flex: 1 1 100%; }
  .btn-idioma { padding: 0 10px; }
  .rejilla-lugares { gap: 30px 20px; }
}

/* Objetivos táctiles de 44px en pantallas de dedo */
@media (pointer: coarse) {
  .interruptor, .btn-icono, .btn-foto, .hoja-cerrar { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-revela] { opacity: 1; transform: none; }
  .cargando-focos span { animation: none; background: var(--foco); }
}

/* ============ Estilo simple (el mismo de la app, ver DESIGN.md) ============
   Tarjetas planas con borde fino, sin sombras ni decoración; Shrikhand solo en títulos
   de pantalla y en el nombre de la marca; el resto, tipografía del sistema. */
body::before { display: none; }
.guirnalda, .lugar-cable { display: none; }
.foco-solo { width: 9px; height: 9px; margin-top: 0; border-radius: 50%; border: 0; background: var(--tinta-tenue); }
.foco-solo::before { display: none; }
.foco-solo.encendido, :root[data-tema="claro"] .foco-solo.encendido { background: var(--foco); box-shadow: none; }
.cabecera { padding-top: 0; }
.cabecera-fila { padding-top: 36px; margin-bottom: 28px; }
.letrero-colgante {
  rotate: none; background: none; color: var(--tinta); box-shadow: none; padding: 0; border-radius: 0;
  font-size: clamp(32px, 4vw, 48px); line-height: 1.08;
}
.letrero-colgante::before, .letrero-colgante::after { display: none; }
.rotulo { line-height: 1.1; }
.tablero-titulo, .seccion-titulo, .tl-titulo, .estado-vista h2, .estado-vista h3 { font-weight: 700; }
.tl-titulo { font-size: 20px; line-height: 1.25; }
.seccion-titulo { font-size: clamp(22px, 2.2vw, 28px); }
.marco { border-radius: 14px; }
.tablilla-muni, .tablilla-tenue, .pastilla { font-weight: 600; }
.pastilla { font-size: 13px; }
.anuncio-promo h3, .hoja-cabeza h2 { font-family: var(--fuente); font-weight: 700; }
.distritos a { font-weight: 600; font-size: 15px; }
.distritos a[aria-current]::after { display: none; }
.distritos a[aria-current] { color: var(--acento-texto); }
/* Botones: píldora plana, sin brochazo */
.btn-pintado { min-height: 48px; padding: 12px 24px; font-size: 16px; font-weight: 700; border-radius: 999px; background: var(--foco); transition: background-color .2s, transform .15s; }
.btn-pintado::before { display: none; }
.btn-pintado:hover { transform: none; background: var(--foco-hover); }
.btn-pintado:active { transform: scale(.97); }
.btn-lona { background: var(--lona); } .btn-lona:hover { background: color-mix(in srgb, var(--lona) 82%, #fff); }
.btn-bandera { background: var(--bandera); } .btn-bandera:hover { background: color-mix(in srgb, var(--bandera) 82%, #fff); }
.btn-chico { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.btn-contorno, .btn-texto, .chip, .opcion span, .acc { font-size: 15px; }
.btn-descargar-nav { padding: 8px 18px; }
/* Pestañas de abajo: sin cable ni foco colgante; la activa, en ámbar */
.pestanas-app { border-top-color: var(--linea); }
.pestanas-app a { font-size: 11.5px; font-weight: 600; }
.pestanas-app a[aria-current] { color: var(--acento-texto); }
.pestanas-app a[aria-current]::before { display: none; }
.pestanas-app a[aria-current] .ic { fill-opacity: 0; }
/* Cargando: tres puntos, no focos */
.cargando-focos { height: 12px; align-items: center; gap: 8px; }
.cargando-focos span { width: 9px; height: 9px; margin-top: 0; border-radius: 50%; border: 0; background: var(--tinta-tenue); animation-name: punto-carga; }
.cargando-focos span:nth-child(n+4) { display: none; }
@keyframes punto-carga { 0%, 55%, 100% { background: var(--tinta-tenue); } 15%, 40% { background: var(--foco); } }
:root[data-tema="claro"] .cargando-focos span { animation-name: punto-carga; }
@media (prefers-color-scheme: light) { :root:not([data-tema="oscuro"]) .cargando-focos span { animation-name: punto-carga; } }
/* Planos: nada flota en reposo */
.letrero-colgante, .menu-flotante, .toast { box-shadow: none; }
.comentario-burbuja { border-radius: 14px; }
.marca-nombre { white-space: nowrap; }

/* Texto en borrador (con [VERIFICAR] o [COMPLETAR]): solo se ve fuera de producción, ver lib/guia/contenido.js */
.borrador { outline: 2px dashed #c77d00; outline-offset: 3px; background: rgba(199, 125, 0, 0.1); }

/* Qué llevar: subtítulo de "Para ir más lejos" (productos de afiliados, ver lib/guia/afiliados.js) */
.llevar-mas { margin: 22px 0 0; font-size: 15px; font-weight: 700; color: var(--tinta-suave); }
