/* Santa Fe de Antioquia es + — identidad de la marca del municipio: colores planos y alegres, letra redondeada.
   Celular primero: mapa a pantalla completa con hoja inferior; desde 900 px, panel lateral. */
@font-face { font-family: "Fredoka"; src: url(../fonts/fredoka.woff2) format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(../fonts/nunito.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
:root {
  --teal: #1e9e96; --teal-osc: #13766f; --carmin: #c0315d; --naranja: #d7663e; --ocre: #ecb35c; --ocre-osc: #9a640e;
  --verde: #3f8a33; --lima: #95bd5c; --morado: #8e3b8f; --tinta: #2a2230; --tinta-2: #5b5363; --papel: #fff; --crema: #fbf7f0;
  --linea: #e8e0d5; --sombra: 0 10px 30px -12px rgba(42, 34, 48, .35);
  /* Tokens que cambian en modo oscuro (valores oscuros en css/tema.css) */
  color-scheme: light;
  --sombra-c: #000; --enlace: #13766f; --carmin-txt: #c0315d; --velo: rgba(42, 34, 48, .45); --papel-vidrio: rgba(255, 255, 255, .95);
  --tinte-teal: #e9f6f4; --tinte-ocre: #fff5e4; --tinte-lima: #eef6e4; --tinte-carmin: #fff3f3; --tinte-sol: #fff6c4; --error: #a3261b;
  --c-ver: var(--carmin); --c-naturaleza: #357a2b; --c-dormir: var(--morado); --c-comer: #c4502b; --c-experiencias: var(--ocre-osc); --c-servicios: var(--teal-osc);
  --letra: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --titular: "Fredoka", "Nunito", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --barra: calc(60px + env(safe-area-inset-top, 0px));
  --ease: cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--letra); color: var(--tinta); background: var(--crema); overflow: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--titular); font-weight: 600; line-height: 1.15; margin: 0; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
input, select, textarea { font-size: 16px !important; } /* menos de 16 px hace que iOS acerque la página al tocar */
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.lectora { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar-a { position: fixed; left: 8px; top: -60px; z-index: 100; background: var(--tinta); color: var(--papel); padding: 8px 12px; border-radius: 8px; }
.saltar-a:focus { top: 8px; }
.enlace { background: none; border: 0; padding: 0; color: var(--enlace); text-decoration: underline; font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 999px;
  background: var(--teal-osc); color: #fff; font: 700 15px/1.1 var(--letra); text-decoration: none; transition: transform .15s var(--ease), background .2s; }
.btn:hover { background: #0f615b; } .btn:active { transform: scale(.97); }
.btn--claro { background: var(--papel); color: var(--tinta); box-shadow: inset 0 0 0 2px var(--linea); }
.btn--claro:hover { background: var(--crema); }
.btn--carmin { background: var(--carmin); } .btn--carmin:hover { background: #a3264d; }
.btn svg { width: 20px; height: 20px; }

/* ---------- Barra superior ---------- */
.barra { position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--barra); padding: env(safe-area-inset-top, 0px) max(10px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 8px; background: var(--papel); box-shadow: 0 1px 0 var(--linea); }
.barra__marca img { height: 46px; width: auto; }
.barra__lema { display: none; margin: 0; font: 700 14px/1.2 var(--titular); color: var(--tinta-2); }
.barra__idioma { margin-left: auto; position: relative; display: flex; align-items: center; color: var(--enlace); }
.barra__idioma svg { position: absolute; left: 9px; width: 18px; height: 18px; pointer-events: none; }
.barra__idioma select { appearance: none; min-height: 40px; padding: 6px 10px 6px 32px; border: 2px solid var(--linea); border-radius: 999px; background: var(--papel);
  font-weight: 700; font-size: 14px; max-width: 128px; }
.btn-it { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--carmin); color: #fff; font-weight: 800; font-size: 14px; }
.btn-it svg { width: 20px; height: 20px; }
.btn-it span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn-it b { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: #fff; color: var(--carmin); font-size: 13px; }
.btn-it.salta { animation: salta .5s var(--ease); }
@keyframes salta { 40% { transform: scale(1.18) rotate(-4deg); } }
@media (min-width: 420px) { .btn-it span { position: static; width: auto; height: auto; overflow: visible; clip: auto; } }
@media (min-width: 900px) { .barra__lema { display: block; } }

/* ---------- App y mapa ---------- */
.app { position: fixed; inset: var(--barra) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); }
.mapa { position: absolute; inset: 0; background: var(--crema); }
.mapa__error { position: absolute; z-index: 5; top: 140px; left: 16px; right: 16px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--tinte-carmin); color: var(--error); box-shadow: var(--sombra); }
.maplibregl-ctrl-group { border-radius: 12px !important; }
.maplibregl-ctrl-bottom-right { bottom: 116px; }

/* Buscador y categorías sobre el mapa */
.filtros { position: absolute; z-index: 10; top: 10px; left: 10px; right: 10px; pointer-events: none; }
.filtros > * { pointer-events: auto; }
.buscador { position: relative; display: flex; align-items: center; background: var(--papel); border-radius: 999px; box-shadow: var(--sombra); }
.buscador svg { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--enlace); }
.buscador input { width: 100%; min-height: 48px; padding: 10px 44px 10px 44px; border: 0; border-radius: 999px; background: none; font-size: 16px; }
.buscador input::-webkit-search-cancel-button { display: none; }
.buscador__x { position: absolute; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 999px; background: var(--crema); font-size: 22px; line-height: 1; }
.chips { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px 6px 8px; border: 0; border-radius: 999px;
  background: var(--papel); box-shadow: 0 4px 14px -6px rgba(42, 34, 48, .45); font-weight: 800; font-size: 14px; scroll-snap-align: start; white-space: nowrap; }
.chip i { width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; background: var(--c, var(--teal-osc)); color: #fff; }
.chip i svg { width: 16px; height: 16px; }
.chip[aria-pressed="true"] { background: var(--c, var(--teal-osc)); color: #fff; }
.chip[aria-pressed="true"] i { background: rgba(255, 255, 255, .25); }

.clima-pill { position: absolute; z-index: 9; right: 10px; top: 118px; display: flex; flex-direction: column; align-items: center; min-width: 64px;
  padding: 6px 10px; border: 0; border-radius: 16px; background: var(--papel); box-shadow: var(--sombra); font-size: 11px; font-weight: 800; color: var(--tinta-2); }
.clima-pill b { font: 600 18px/1.1 var(--titular); color: var(--tinta); }

/* Marcadores */
.pin { width: 36px; height: 36px; padding: 0; border: 3px solid #fff; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg); background: var(--c, var(--teal-osc));
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35); display: grid; place-items: center; transition: width .2s var(--ease), height .2s var(--ease); }
.pin svg { width: 18px; height: 18px; color: #fff; transform: rotate(45deg); }
.pin[aria-pressed="true"] { width: 48px; height: 48px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .8), 0 6px 16px rgba(0, 0, 0, .4); z-index: 2; }
.pin--aprox { border-style: dashed; opacity: .9; }
.pin-num { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; background: var(--carmin); color: #fff; font: 700 14px/24px var(--titular); text-align: center; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.ave-sim { width: 64px; height: auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); pointer-events: none; }

/* ---------- Hoja inferior (directorio) ---------- */
.hoja { --peek: 112px; position: absolute; z-index: 20; left: 0; right: 0; bottom: 0; height: 88%; display: flex; flex-direction: column;
  background: var(--papel); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px -12px rgba(42, 34, 48, .35);
  transform: translateY(calc(100% - var(--peek))); transition: transform .35s var(--ease); touch-action: pan-x; }
.hoja[data-estado="media"] { transform: translateY(45%); }
.hoja[data-estado="abierta"] { transform: translateY(0); }
.hoja.arrastrando { transition: none; }
.hoja[data-estado="media"] .hoja__cuerpo { padding-bottom: calc(0.4 * (100dvh - var(--barra)) + 20px + env(safe-area-inset-bottom, 0px)); }
.hoja__asa { flex: none; height: 26px; border: 0; background: none; display: grid; place-items: center; touch-action: none; }
.hoja__asa::before { content: ""; width: 44px; height: 5px; border-radius: 9px; background: var(--linea); }
.hoja__cab { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px 12px; touch-action: none; }
.hoja__cab h2 { font-size: 20px; }
.hoja__alternar { border: 0; background: var(--crema); border-radius: 999px; min-height: 40px; padding: 6px 14px; font-weight: 800; color: var(--enlace); }
.hoja__cuerpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px calc(20px + env(safe-area-inset-bottom, 0px)); touch-action: pan-y; }
.vacio { margin: 8px 4px 16px; color: var(--tinta-2); }

.lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lugar { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 16px; background: var(--papel);
  box-shadow: inset 0 0 0 2px var(--linea); cursor: pointer; transition: box-shadow .2s, transform .2s var(--ease); animation: entra .4s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 35ms); }
.lugar:hover, .lugar:focus-within { box-shadow: inset 0 0 0 2px var(--c); }
.lugar.activo { box-shadow: inset 0 0 0 3px var(--c); }
.lugar__foto { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--c); display: grid; place-items: center; color: #fff; }
.lugar__foto svg { width: 30px; height: 30px; }
.lugar__txt { min-width: 0; }
.lugar__abrir { all: unset; cursor: pointer; overflow-wrap: anywhere; }
.lugar__abrir:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; border-radius: 6px; }
.lugar h3 { font-size: 17px; overflow-wrap: anywhere; }
.lugar__cat { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13px; font-weight: 800; color: var(--tinta-2); }
.lugar__cat::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.lugar p { margin: 2px 0 0; font-size: 14px; color: var(--tinta-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mas { width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--crema); color: var(--carmin-txt); font: 700 26px/1 var(--titular); display: grid; place-items: center; }
.mas[aria-pressed="true"] { background: var(--carmin); color: #fff; font-size: 20px; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }

.rutas { margin-top: 22px; }
.rutas h3 { font-size: 18px; margin-bottom: 10px; }
.rutas__fila { display: grid; gap: 10px; }
.ruta { padding: 14px; border-radius: 16px; background: linear-gradient(135deg, var(--tinte-ocre), var(--tinte-lima)); box-shadow: inset 0 0 0 2px var(--linea); }
.ruta h4 { margin: 0 0 4px; font: 600 17px/1.2 var(--titular); }
.ruta p { margin: 0 0 10px; font-size: 14px; color: var(--tinta-2); }
.ruta__meta { font-size: 13px; font-weight: 800; color: var(--enlace); }
.pie { margin: 26px 4px 0; font-size: 13px; color: var(--tinta-2); }
.pie p { margin: 0 0 6px; }

/* ---------- Clima ahora (3 tarjetas) ---------- */
.climas { margin: 0 0 16px; }
.climas__titulo { font: 800 12px/1 var(--letra); text-transform: uppercase; letter-spacing: .12em; color: var(--tinta-2); margin-bottom: 8px; }
.climas__fila { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.clima { --h: 100; --vel: 4s; position: relative; overflow: hidden; isolation: isolate; border-radius: 16px; padding: 10px; min-height: 128px;
  color: #2a2230; background: linear-gradient(165deg, hsl(var(--h) 78% 70%), hsl(calc(var(--h) + 20) 85% 86%)); animation: entra .6s var(--ease) backwards; }
.clima:nth-child(2) { animation-delay: .08s; } .clima:nth-child(3) { animation-delay: .16s; }
.clima[data-tipo="nublado"], .clima[data-tipo="niebla"] { background: linear-gradient(165deg, hsl(var(--h) 28% 66%), hsl(var(--h) 32% 84%)); }
.clima[data-tipo="llovizna"], .clima[data-tipo="lluvia"], .clima[data-tipo="tormenta"] { background: linear-gradient(165deg, hsl(var(--h) 18% 56%), hsl(var(--h) 22% 74%)); }
.clima[data-dia="0"] { color: #f6efe4; background: linear-gradient(165deg, hsl(228 48% 12%), hsl(var(--h) 42% 27%)); }
.clima__lugar { font: 800 11px/1.2 var(--letra); text-transform: uppercase; letter-spacing: .06em; }
.clima__temp { font: 600 34px/1 var(--titular); margin: 6px 0 4px; }
.clima__temp span { font-size: .45em; vertical-align: .9em; margin-left: 1px; }
.clima__estado, .clima__extra { margin: 0; font-size: 12px; line-height: 1.3; font-weight: 700; }
.clima__extra { font-weight: 600; opacity: .85; margin-top: 2px; }
.clima__cielo { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.clima__cielo i { position: absolute; display: block; }
.cl-sol { top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff6c4, #ffc62e 60%, #ff9d1c);
  box-shadow: 0 0 0 5px rgb(255 214 70 / .35), 0 0 20px 6px rgb(255 190 40 / .55); animation: cl-late var(--vel) ease-in-out infinite; }
.cl-sol::before { content: ""; position: absolute; inset: -11px; border-radius: 50%; background: repeating-conic-gradient(rgb(255 205 60 / .75) 0 6deg, transparent 6deg 30deg);
  mask: radial-gradient(circle, transparent 52%, #000 54%, #000 70%, transparent 72%); animation: cl-gira 16s linear infinite; }
.cl-luna { top: 12px; right: 16px; width: 22px; height: 22px; border-radius: 50%; box-shadow: 7px 4px 0 0 #f4e9c4; transform: rotate(-20deg); animation: cl-flota 6s ease-in-out infinite; }
.cl-estrellas { inset: 0 0 45% 30%; background: radial-gradient(1.4px 1.4px at 20% 30%, #fff 99%, transparent), radial-gradient(1px 1px at 55% 15%, #fff 99%, transparent),
  radial-gradient(1.2px 1.2px at 80% 60%, #fff 99%, transparent), radial-gradient(1px 1px at 35% 75%, #fff 99%, transparent), radial-gradient(1.3px 1.3px at 65% 85%, #fff 99%, transparent);
  animation: cl-titila 3.2s ease-in-out infinite; }
.cl-nube { top: 22px; right: 4px; width: 42px; height: 14px; border-radius: 14px; background: #fff; opacity: .92; animation: cl-deriva 9s ease-in-out infinite alternate; }
.cl-nube::before, .cl-nube::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cl-nube::before { width: 18px; height: 18px; left: 6px; top: -9px; } .cl-nube::after { width: 24px; height: 24px; left: 17px; top: -14px; }
.cl-nube--2 { top: 36px; right: 28px; transform: scale(.75); opacity: .75; animation-duration: 12s; animation-direction: alternate-reverse; }
[data-dia="0"] .cl-nube { background: #8d93a8; }
[data-tipo="lluvia"] .cl-nube, [data-tipo="tormenta"] .cl-nube, [data-tipo="llovizna"] .cl-nube { background: #d5d8de; }
[data-dia="0"][data-tipo="lluvia"] .cl-nube, [data-dia="0"][data-tipo="tormenta"] .cl-nube { background: #6c7184; }
.cl-lluvia { inset: 32px 0 0 38%; background: repeating-linear-gradient(105deg, transparent 0 7px, rgb(40 90 160 / .55) 7px 8px, transparent 8px 13px);
  background-size: 26px 26px; mask: linear-gradient(#000 40%, transparent); animation: cl-llueve .5s linear infinite; }
[data-dia="0"] .cl-lluvia { background-image: repeating-linear-gradient(105deg, transparent 0 7px, rgb(170 200 255 / .6) 7px 8px, transparent 8px 13px); }
.cl-lluvia--fina { opacity: .55; animation-duration: .9s; }
.cl-rayo { inset: 0; background: rgb(255 255 240 / .85); opacity: 0; animation: cl-rayo 5s steps(1) infinite; }
.cl-niebla { inset: 0; background: repeating-linear-gradient(transparent 0 12px, rgb(255 255 255 / .45) 12px 18px, transparent 18px 26px);
  mask: linear-gradient(90deg, transparent, #000 40%); animation: cl-deriva 7s ease-in-out infinite alternate; }
.cl-calor { inset: 40% 0 0; background: repeating-linear-gradient(transparent 0 5px, rgb(255 120 40 / .18) 5px 7px); filter: blur(1px); animation: cl-calor 2.4s linear infinite; }
@keyframes cl-late { 50% { transform: scale(1.1); box-shadow: 0 0 0 8px rgb(255 214 70 / .25), 0 0 28px 10px rgb(255 190 40 / .6); } }
@keyframes cl-gira { to { transform: rotate(360deg); } }
@keyframes cl-flota { 50% { transform: rotate(-20deg) translateY(-3px); } }
@keyframes cl-titila { 50% { opacity: .35; } }
@keyframes cl-deriva { to { translate: -14px 0; } }
@keyframes cl-llueve { to { background-position: -7px 26px; } }
@keyframes cl-rayo { 0%, 7%, 11% { opacity: 0; } 5%, 9% { opacity: 1; } }
@keyframes cl-calor { to { background-position: 0 -14px; } }

/* ---------- Ficha y paneles ---------- */
.ficha, .itinerario { position: absolute; z-index: 25; inset: 0; background: var(--papel); overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); animation: sube .35s var(--ease); }
@keyframes sube { from { transform: translateY(40px); opacity: 0; } }
.cerrar { position: sticky; top: 10px; float: right; z-index: 3; margin: 10px 10px 0 0; width: 44px; height: 44px; border: 0; border-radius: 999px;
  background: var(--papel-vidrio); box-shadow: var(--sombra); font-size: 28px; line-height: 1; }
.ficha__fotos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--c); margin-top: -54px; }
.ficha__fotos::-webkit-scrollbar { display: none; }
.ficha__fotos figure { flex: none; width: 100%; margin: 0; scroll-snap-align: start; position: relative; }
.ficha__fotos img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.ficha__fotos figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 12px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.ficha__fotos figcaption a { color: #fff; }
.ficha__sin-foto { height: 150px; display: grid; place-items: center; color: #fff; margin-top: -54px; background: var(--c); }
.ficha__sin-foto svg { width: 56px; height: 56px; }
.ficha__puntos { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.ficha__puntos i { width: 7px; height: 7px; border-radius: 50%; background: var(--linea); }
.ficha__puntos i.on { background: var(--c); }
.ficha__cuerpo { padding: 14px 18px 0; }
.ficha__cat { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--c); color: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; }
.ficha__cat svg { width: 16px; height: 16px; flex: none; }
.ficha h2 { font-size: 26px; margin: 10px 0 8px; }
.ficha__desc { margin: 0 0 12px; font-size: 16px; }
.ficha__datos { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--crema); font-size: 15px; }
.ficha__acciones { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.ficha dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 14px; font-size: 15px; }
.ficha dt { font-weight: 800; color: var(--tinta-2); }
.ficha dd { margin: 0; overflow-wrap: anywhere; }
.ficha dd a { color: var(--enlace); font-weight: 700; }
.ficha__nota, .ficha__fuentes { font-size: 13px; color: var(--tinta-2); }
.ficha__fuentes a { color: var(--tinta-2); overflow-wrap: anywhere; }

/* ---------- Itinerario ---------- */
.itinerario__cab { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 18px;
  background: var(--papel-vidrio); box-shadow: 0 1px 0 var(--linea); }
.itinerario__cab h2 { font-size: 22px; }
.itinerario__cab .cerrar { position: static; float: none; margin: 0; box-shadow: none; background: var(--crema); }
.itinerario__cuerpo { padding: 14px 14px 0; }
.it-ajustes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; font-weight: 800; font-size: 14px; }
.it-ajustes select, .dia__cab input { min-height: 40px; padding: 6px 10px; border: 2px solid var(--linea); border-radius: 12px; background: var(--papel); font-weight: 700; }
.dia { margin-bottom: 18px; padding: 12px; border-radius: 18px; background: var(--crema); }
.dia__cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
.dia__cab h3 { font-size: 19px; margin-right: auto; }
.dia__cab label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--tinta-2); }
.paradas { list-style: none; margin: 0; padding: 0; min-height: 56px; border-radius: 14px; }
.paradas.destino { box-shadow: inset 0 0 0 3px dashed var(--teal); background: var(--tinte-teal); outline: 3px dashed var(--teal); outline-offset: -3px; }
.paradas:empty::after { content: attr(data-vacio); display: block; padding: 14px; font-size: 14px; color: var(--tinta-2); }
.parada { position: relative; display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 10px 8px 10px 4px; border-radius: 14px;
  background: var(--papel); box-shadow: 0 2px 0 var(--linea); touch-action: pan-y; }
.parada.levantada { z-index: 5; box-shadow: 0 14px 30px -10px rgba(42, 34, 48, .5); opacity: .95; }
.parada.hueco { visibility: hidden; }
.parada__asa { width: 34px; height: 44px; border: 0; background: none; color: #b7ada0; touch-action: none; cursor: grab; display: grid; place-items: center; }
.parada__asa svg { width: 22px; height: 22px; fill: currentColor; }
.parada__hora { font: 700 13px/1.2 var(--letra); color: var(--carmin-txt); }
.parada__nombre { all: unset; display: block; font: 600 16px/1.2 var(--titular); cursor: pointer; overflow-wrap: anywhere; }
.parada__nombre:focus-visible { outline: 3px solid var(--teal); border-radius: 4px; }
.parada__dur { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13px; color: var(--tinta-2); }
.parada__dur input { width: 64px; min-height: 34px; padding: 2px 6px; border: 2px solid var(--linea); border-radius: 10px; text-align: center; }
.parada__btns { display: flex; flex-direction: column; gap: 2px; }
.parada__btns button { width: 34px; height: 30px; border: 0; border-radius: 8px; background: var(--crema); font-size: 15px; color: var(--tinta-2); }
.parada__btns .x { color: var(--carmin-txt); font-size: 20px; }
.tramo { display: flex; align-items: center; gap: 8px; margin: 2px 0 2px 16px; padding: 6px 0 6px 18px; border-left: 3px dotted var(--teal); font-size: 13px; font-weight: 700; color: var(--enlace); }
.it-total { margin: 8px 0 0; font-size: 14px; font-weight: 800; color: var(--tinta-2); }
.it-acciones { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px -14px 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--papel-vidrio); box-shadow: 0 -1px 0 var(--linea); }
.it-acciones .btn { flex: 1 1 140px; }
.it-nota { font-size: 13px; color: var(--tinta-2); }
.it-vacio { display: grid; justify-items: center; gap: 10px; padding: 20px 10px; text-align: center; color: var(--tinta-2); }
.it-vacio img { width: 120px; animation: cl-flota 4s ease-in-out infinite; }

/* ---------- Simulación ---------- */
.simulacion { position: absolute; z-index: 26; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--tinta); color: var(--papel); box-shadow: var(--sombra); max-width: calc(100% - 20px); }
.simulacion__hora { margin: 0; font: 600 16px/1.2 var(--titular); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.simulando .hoja, body.simulando .filtros, body.simulando .clima-pill { display: none; }
@media (max-width: 480px) { .simulacion { left: 10px; right: 10px; transform: none; border-radius: 20px; } .simulacion__hora { flex: 1; white-space: normal; font-size: 14px; } }

/* ---------- Aviso ---------- */
.aviso { position: fixed; z-index: 60; left: 50%; top: calc(var(--barra) + 12px); transform: translateX(-50%); margin: 0; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 999px; background: var(--tinta); color: var(--papel); font-weight: 700; box-shadow: var(--sombra); animation: sube .3s var(--ease); }

/* ---------- Bienvenida: el ave llega volando y se posa en la cruz ---------- */
.bienvenida { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; padding: 20px;
  background: radial-gradient(circle at 50% 38%, var(--papel) 0 35%, var(--crema) 70%); animation: aparece .3s ease; }
.bienvenida.sale { animation: desaparece .35s ease forwards; }
@keyframes aparece { from { opacity: 0; } } @keyframes desaparece { to { opacity: 0; visibility: hidden; } }
.bienvenida__escena { position: relative; width: 220px; height: 230px; }
.bienvenida__cruz { position: absolute; left: 50%; bottom: 0; width: 120px; translate: -50% 0; animation: cruz .5s .9s var(--ease) backwards; }
.bienvenida__ave { position: absolute; left: 50%; bottom: 82px; width: 190px; translate: -46% 0; transform-origin: 60% 90%;
  animation: vuela 1.25s cubic-bezier(.3, .7, .3, 1) backwards, posa 3s 1.3s ease-in-out infinite; }
@keyframes vuela {
  0% { transform: translate(180px, -260px) rotate(18deg) scale(.4); opacity: 0; }
  35% { transform: translate(60px, -150px) rotate(-10deg) scale(.7); opacity: 1; }
  70% { transform: translate(-30px, -40px) rotate(8deg) scale(1.05); }
  100% { transform: none; }
}
@keyframes posa { 50% { transform: rotate(-4deg) translateY(-3px); } }
@keyframes cruz { from { transform: scale(0) rotate(-90deg); } }
.confeti { position: absolute; left: 50%; top: 60%; width: 12px; height: 12px; border-radius: 3px; opacity: 0; animation: confeti 1.2s 1.1s var(--ease) forwards; }
.confeti:nth-child(1) { background: var(--carmin); --x: -110px; --y: -120px; } .confeti:nth-child(2) { background: var(--ocre); --x: 120px; --y: -100px; border-radius: 50%; }
.confeti:nth-child(3) { background: var(--teal); --x: -130px; --y: 20px; } .confeti:nth-child(4) { background: var(--lima); --x: 130px; --y: 40px; border-radius: 50%; }
.confeti:nth-child(5) { background: var(--morado); --x: -40px; --y: -150px; } .confeti:nth-child(6) { background: var(--naranja); --x: 60px; --y: -160px; border-radius: 50%; }
@keyframes confeti { 30% { opacity: 1; } to { opacity: 0; transform: translate(var(--x), var(--y)) rotate(220deg); } }
.bienvenida__globo { position: relative; max-width: 340px; padding: 18px 20px; border-radius: 24px; background: var(--papel); box-shadow: var(--sombra); text-align: center;
  animation: entra .5s 1.25s var(--ease) backwards; }
.bienvenida__globo::before { content: ""; position: absolute; top: -10px; left: 50%; width: 20px; height: 20px; translate: -50% 0; rotate: 45deg; background: var(--papel); }
.bienvenida__hola { font: 600 21px/1.2 var(--titular); color: var(--enlace); margin: 0 0 6px; }
.bienvenida__globo p { margin: 0 0 14px; }

/* ---------- Pantallas grandes: panel lateral ---------- */
@media (min-width: 900px) {
  .hoja { top: 0; right: auto; width: 400px; height: auto; border-radius: 0; transform: none !important; box-shadow: 1px 0 0 var(--linea); }
  .hoja__asa, .hoja__alternar { display: none; }
  .hoja__cab { padding-top: 14px; }
  .filtros { left: 412px; right: 90px; }
  .clima-pill { top: 10px; }
  .ficha { right: auto; width: 400px; box-shadow: 1px 0 0 var(--linea); }
  .itinerario { left: auto; width: 420px; box-shadow: -1px 0 0 var(--linea); }
  .maplibregl-ctrl-bottom-right { bottom: 0; }
  .lugar[draggable="true"] { cursor: grab; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .bienvenida__ave, .bienvenida__cruz, .bienvenida__globo, .confeti { animation: none !important; }
}

/* ---------- Impresión / PDF del itinerario ---------- */
.impresion { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { overflow: visible; background: #fff; height: auto; }
  body.imprimiendo > *:not(.impresion) { display: none !important; }
  body.imprimiendo .impresion { display: block; font-size: 11pt; color: #000; }
  .imp__cab { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid var(--teal); padding-bottom: 8px; margin-bottom: 10px; }
  .imp__cab img { height: 60px; width: auto; }
  .imp__cab h1 { font-size: 20pt; color: var(--teal-osc); }
  .imp__mapa { display: block; width: auto; max-width: 100%; max-height: 95mm; object-fit: contain; border-radius: 6px; margin: 6px auto 10px; }
  .imp__dia { break-inside: avoid-page; margin-top: 10px; }
  .imp__dia h2 { font-size: 14pt; color: var(--carmin); margin-bottom: 4px; }
  .imp__tabla { width: 100%; border-collapse: collapse; }
  .imp__tabla td, .imp__tabla th { padding: 5px 6px; border-bottom: 1px solid #ddd; vertical-align: top; text-align: left; }
  .imp__tabla th { font-size: 9pt; text-transform: uppercase; color: #555; }
  .imp__tabla .t { font-size: 9pt; color: #13766f; }
  .imp__pie { margin-top: 12px; font-size: 9pt; color: #555; }
}
