/* La Veci — estilos de la plaza */
:root {
  --negro: #221A17;
  --amarillo: #F8D108;
  --amarillo-sombra: #C4A400;
  --fondo: #EFECE5;
  --tarjeta: #FFFFFF;
  --suave: #F7F5F0;
  --texto: #221A17;
  --texto-2: #514C43;
  --texto-3: #6E685E;
  --claro-sobre-negro: #B8B2A6;
  --siena: #A4552F;
  --verde: #4E8A45;
  --verde-texto: #33612C;
  --verde-fondo: #EAF1E6;
  --gris-fondo: #E4E0D7;
  --gris-punto: #8E887E;
  --gris-texto: #5E594F;
  --borde: rgba(34, 26, 23, 0.10);
  --sombra: 0 2px 6px rgba(34, 26, 23, 0.06);
  --rayas: repeating-linear-gradient(135deg, #E4DFD4 0 7px, #EDE9E0 7px 14px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #DCD7CD;
  color: var(--texto);
  font-family: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--siena); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

.app {
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--fondo);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ── Cabeceras ── */
.cabecera {
  background: var(--negro);
  color: #EFECE5;
  padding: calc(18px + env(safe-area-inset-top)) 20px 24px;
  border-radius: 0 0 26px 26px;
}
.cabecera-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo-cabecera { height: 66px; width: auto; }
.saludo { font-size: 14px; color: var(--claro-sobre-negro); font-weight: 500; text-align: right; }
.saludo b { color: #EFECE5; }
.pregunta { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; margin: 20px 0 14px; line-height: 1.15; }

.cabecera-barra { display: flex; align-items: center; gap: 8px; padding-bottom: 18px; border-radius: 0; }
.cabecera-titulo h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.15; }
.cabecera-titulo p { color: var(--claro-sobre-negro); font-size: 15px; margin-top: 14px; max-width: 320px; }
.raya { width: 46px; height: 6px; border-radius: 99px; background: var(--amarillo); margin-top: 10px; }
.volver {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; margin-left: -10px;
  color: var(--claro-sobre-negro); font-size: 22px; text-decoration: none;
}

.buscador {
  display: flex; align-items: center; gap: 10px;
  background: var(--fondo); border-radius: 16px; padding: 4px 6px 4px 16px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
.buscador input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  padding: 12px 6px; font-size: 16px; color: var(--texto);
}
.buscador input::placeholder { color: var(--texto-3); }
.buscador-claro { flex: 1; box-shadow: none; border-radius: 14px; }

/* ── Contenido ── */
.contenido { padding: 0 20px 120px; flex: 1; }
.seccion { margin-top: 24px; }
.seccion-titulo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.seccion-titulo h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.punto-verde { width: 9px; height: 9px; border-radius: 50%; background: var(--verde); display: inline-block; }
.enlace { font-size: 14px; font-weight: 700; color: var(--siena); text-decoration: none; padding: 8px 0; }

.categorias { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.categoria {
  background: var(--suave); border: 1px solid rgba(34, 26, 23, 0.07); border-radius: 14px;
  padding: 12px 2px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--texto-2); text-decoration: none;
  box-shadow: 0 1px 2px rgba(34, 26, 23, 0.05);
}
.categoria-emoji { font-size: 22px; line-height: 1; }

.lista { display: flex; flex-direction: column; gap: 12px; }
.tarjeta {
  display: flex; gap: 13px; background: var(--tarjeta); border-radius: 18px; padding: 11px;
  box-shadow: var(--sombra); text-decoration: none; color: var(--texto);
}
.tarjeta-foto {
  width: 86px; height: 86px; flex: 0 0 86px; border-radius: 13px; overflow: hidden;
  background: var(--rayas); display: flex; align-items: center; justify-content: center;
}
.tarjeta-foto img { width: 100%; height: 100%; object-fit: cover; }
.tarjeta-sinfoto { font-size: 30px; opacity: 0.7; }
.tarjeta-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.tarjeta-nombre { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.tarjeta-meta { font-size: 12.5px; color: var(--texto-3); font-weight: 500; }
.tarjeta-resumen { font-size: 13.5px; color: var(--texto-2); line-height: 1.35; }

.estado {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  border-radius: 99px; padding: 4px 10px 4px 8px; font-size: 11.5px; font-weight: 700; margin-top: 2px;
}
.estado .punto { width: 7px; height: 7px; border-radius: 50%; }
.estado-on { background: var(--verde-fondo); color: var(--verde-texto); }
.estado-on .punto { background: var(--verde); }
.estado-off { background: var(--gris-fondo); color: var(--gris-texto); }
.estado-off .punto { background: var(--gris-punto); }
.estado-grande { font-size: 13.5px; padding: 8px 14px 8px 11px; gap: 8px; flex-wrap: wrap; }
.estado-grande .punto { width: 9px; height: 9px; }
.estado-nota { font-weight: 500; opacity: 0.85; }

.banner {
  background: var(--amarillo); border-radius: 20px; padding: 20px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.banner h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; max-width: 260px; line-height: 1.2; }
.banner p { font-size: 14px; color: #4A3F00; font-weight: 500; }

.vacio { text-align: center; padding: 24px 12px; color: var(--texto-3); font-size: 15px; }
.vacio b { color: var(--texto); }
.vacio-icono { margin: 0 auto 12px; opacity: 0.85; }
.vacio-grande { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 36px; }
.vacio-grande h2 { color: var(--texto); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.vacio-grande p { max-width: 260px; }
.vacio-cuadro { width: 64px; height: 64px; border-radius: 18px; background: var(--amarillo); display: flex; align-items: center; justify-content: center; }

.titulo-busqueda { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips-categorias { margin-top: 8px; }
.chip {
  background: var(--suave); border: 1px solid rgba(34, 26, 23, 0.08); border-radius: 99px;
  padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--texto-2); text-decoration: none;
}
.conteo { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texto-3); margin: 22px 0 12px; }

/* ── Botones ── */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px; padding: 13px 20px; min-height: 44px;
  background: var(--amarillo); color: var(--negro); font-size: 15px; font-weight: 800;
  text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 var(--amarillo-sombra);
}
.boton:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--amarillo-sombra); }
.boton-oscuro { background: var(--negro); color: #EFECE5; box-shadow: none; }
.boton-blanco { background: var(--tarjeta); color: var(--negro); box-shadow: var(--sombra); }
.boton-grande { width: 100%; padding: 17px; font-size: 16.5px; border-radius: 16px; }
.botones { display: flex; flex-direction: column; gap: 11px; margin-top: 22px; }

/* ── Puesto ── */
.puesto { display: flex; flex-direction: column; flex: 1; }
.portada { position: relative; height: 280px; background: var(--rayas); overflow: hidden; }
.portada img { width: 100%; height: 100%; object-fit: cover; }
.portada-vacia { display: flex; align-items: center; justify-content: center; }
.portada-emoji { font-size: 64px; opacity: 0.6; }
.boton-flotante {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); width: 44px; height: 44px; border: 0;
  border-radius: 12px; background: rgba(34, 26, 23, 0.78); color: #EFECE5; font-size: 19px;
  display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer;
}
.boton-flotante.izquierda { left: 16px; }
.boton-flotante.derecha { right: 16px; }
.aviso-admin { background: var(--negro); color: var(--amarillo); font-size: 13px; font-weight: 600; padding: 10px 20px; }
.puesto-cuerpo { background: var(--fondo); border-radius: 24px 24px 0 0; margin-top: -24px; position: relative; padding: 22px 20px 24px; }
.puesto-cat { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--siena); }
.puesto-nombre { font-size: 28px; font-weight: 800; letter-spacing: -0.025em; margin: 6px 0 12px; line-height: 1.1; }
.puesto-desc { font-size: 16px; line-height: 1.55; color: #3D3A33; margin-top: 16px; }
.subtitulo { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; margin: 26px 0 12px; }
.galeria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.galeria-item { position: relative; aspect-ratio: 1; border-radius: 13px; overflow: hidden; background: var(--rayas); }
.galeria-item img { width: 100%; height: 100%; object-fit: cover; }
.galeria-nota {
  position: absolute; inset: auto 0 0 0; padding: 18px 7px 6px; color: #fff; font-size: 11px; font-weight: 700; line-height: 1.2;
  background: linear-gradient(180deg, rgba(20, 16, 14, 0) 0%, rgba(20, 16, 14, 0.75) 100%);
}
.ficha {
  margin-top: 24px; background: var(--suave); border: 1px solid rgba(34, 26, 23, 0.07); border-radius: 18px;
  padding: 16px 17px; display: flex; flex-direction: column; gap: 13px;
}
.ficha-fila { display: flex; gap: 12px; align-items: flex-start; }
.ficha-icono { width: 20px; flex: 0 0 20px; font-size: 15px; }
.ficha-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-3); }
.ficha-valor { font-size: 15px; font-weight: 600; color: #3D3A33; margin-top: 2px; }
.vecino { display: flex; align-items: center; gap: 11px; margin-top: 22px; font-size: 14px; color: var(--texto-3); }
.vecino-icono { width: 40px; height: 40px; border-radius: 50%; background: var(--amarillo); display: flex; align-items: center; justify-content: center; font-size: 16px; flex: 0 0 40px; }
.cta-fija {
  position: sticky; bottom: 0; margin-top: auto; padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(239, 236, 229, 0) 0%, var(--fondo) 26%);
}
.cta-nota { text-align: center; font-size: 12px; color: var(--texto-3); margin-top: 9px; }

/* ── Cajas de texto ── */
.caja { background: var(--tarjeta); border-radius: 18px; padding: 18px; box-shadow: var(--sombra); margin-top: 24px; }
.etiqueta { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-3); }
.caja-texto { font-size: 15.5px; color: #3D3A33; margin-top: 10px; line-height: 1.5; word-break: break-word; }
.texto-largo { padding-top: 22px; }
.texto-largo p { margin-bottom: 14px; color: #3D3A33; }
.frase { font-weight: 800; color: var(--negro); }
.lista-simple { padding-left: 20px; margin: 0; color: #3D3A33; }
.lista-simple li { margin-bottom: 10px; }

/* ── Barra inferior ── */
.tabbar {
  position: sticky; bottom: 0; z-index: 40; margin-top: auto;
  background: #FFFFFF; border-radius: 24px 24px 0 0; box-shadow: 0 -6px 24px rgba(34, 26, 23, 0.10);
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: flex-end; justify-content: space-around;
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 60px; padding: 6px 0;
  font-size: 11px; font-weight: 700; color: var(--texto-3); text-decoration: none;
}
.tab span { font-size: 19px; line-height: 1.1; }
.tab.activo { color: var(--negro); }
.tab-centro { margin-top: -26px; color: var(--negro); }
.tab-centro .mas {
  width: 54px; height: 54px; border-radius: 50%; background: var(--amarillo); color: var(--negro);
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800;
  box-shadow: 0 3px 0 var(--amarillo-sombra);
}
.contenido:has(+ .tabbar) { padding-bottom: 30px; }

.aviso-flotante {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 90;
  background: var(--negro); color: #EFECE5; padding: 11px 18px; border-radius: 99px; font-size: 14px; font-weight: 600;
}

@media (min-width: 520px) {
  body { padding: 0; }
  .app { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 30px 60px rgba(0, 0, 0, 0.08); }
}

/* ── Cintillo de instalación (1.1.1) ── */
.cintillo {
  display: flex; align-items: center; gap: 10px;
  background: var(--negro); color: #EFECE5;
  padding: calc(9px + env(safe-area-inset-top)) 10px 9px 14px;
  border-bottom: 1px solid rgba(239, 236, 229, 0.12);
}
.cintillo[hidden] { display: none; }
.cintillo-iso { height: 27px; width: auto; flex: 0 0 auto; }
.cintillo-texto { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.cintillo-instalar {
  flex: 0 0 auto; border: 0; border-radius: 10px; padding: 9px 14px; min-height: 40px;
  background: var(--amarillo); color: var(--negro); font-size: 14px; font-weight: 800; cursor: pointer;
}
.cintillo-cerrar {
  flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent;
  color: var(--claro-sobre-negro); font-size: 16px; cursor: pointer;
}
/* Con el cintillo visible, el header ya no necesita el margen del notch */
.cintillo:not([hidden]) + .cabecera { padding-top: 18px; }
.cintillo:not([hidden]) + .puesto .boton-flotante { top: 14px; }

/* ── Hoja de pasos para iPhone ── */
.hoja-fondo {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 16, 14, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.hoja-fondo[hidden] { display: none; }
.hoja {
  width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto;
  background: var(--fondo); border-radius: 26px 26px 0 0;
  padding: 12px 20px calc(22px + env(safe-area-inset-bottom));
}
.hoja-asa { width: 44px; height: 5px; border-radius: 99px; background: #C9C2B4; margin: 0 auto 16px; }
.hoja-cabeza { display: flex; gap: 14px; align-items: center; }
.hoja-icono { border-radius: 13px; flex: 0 0 52px; }
.hoja-cabeza h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.hoja-cabeza p { font-size: 14px; color: var(--texto-3); margin-top: 3px; }
.pasos { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 12px; }
.paso {
  display: grid; grid-template-columns: 32px 1fr; gap: 6px 12px;
  background: var(--tarjeta); border-radius: 18px; padding: 14px; box-shadow: var(--sombra);
}
.paso-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--negro); color: var(--amarillo);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
}
.paso-texto { display: flex; flex-direction: column; gap: 3px; font-size: 14px; color: var(--texto-2); }
.paso-texto b { color: var(--negro); font-size: 15.5px; }
.paso-ilustracion { grid-column: 1 / -1; }
.barra-safari {
  display: flex; align-items: center; justify-content: space-around;
  background: #F2F2F4; border: 1px solid #DCDCE0; border-radius: 14px; padding: 8px 6px; font-size: 18px;
}
.ic-gris { color: #A3A3AA; width: 34px; text-align: center; }
.ic-resaltado {
  color: #0A84FF; width: 44px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #fff; box-shadow: 0 0 0 3px var(--amarillo);
}
.menu-ios { background: #F2F2F4; border: 1px solid #DCDCE0; border-radius: 14px; overflow: hidden; font-size: 14.5px; }
.menu-fila { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid #DCDCE0; }
.menu-fila:first-child { border-top: 0; }
.menu-gris { color: #A3A3AA; }
.menu-resaltado { background: #fff; color: #1C1C1E; font-weight: 700; box-shadow: inset 0 0 0 3px var(--amarillo); }
.hoja-nota { font-size: 13px; color: var(--texto-3); margin: 14px 0 14px; text-align: center; }
