/* Lima, como está hoy · prototipo 219. Diseño: una sola apariencia, oscura (la de Don Salazar).
   Composición: a la izquierda la voz y las acciones; a la derecha, el escenario con la maqueta como en el video. */
:root {
  color-scheme: dark;
  --negro: #111111;
  --hondo: #0a0a09;
  --beige: #ECEAE2;
  --tenue: rgba(236, 234, 226, 0.66);
  --sutil: rgba(236, 234, 226, 0.46);
  --linea: rgba(236, 234, 226, 0.14);
  --linea2: rgba(236, 234, 226, 0.28);
  --velo: rgba(17, 17, 17, 0.88);
  --oro: linear-gradient(135deg, #B88E31, #FEDE9F 35%, #EAC05B 55%, #A77C1F 80%, #966C10);
  --oro-1: #EAC05B;
  --oro-2: #B88E31;
  --abierto: #7FAE7F;
  --cerrado: #C98B7E;
  --f-sans: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-serif: 'Noto Serif', Georgia, 'Times New Roman', serif;
  --ch: 7px;
  --panel: 384px;
}
html, body { height: 100%; }
body { margin: 0; background: var(--negro); color: var(--beige); font-family: var(--f-sans); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, select { font: inherit; color: inherit; }
a { color: inherit; }
.chaflan { clip-path: polygon(var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch), 100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%, var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch)); }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--oro-1); outline-offset: 3px; }

/* ── Botones ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 20px; border: 0; cursor: pointer; font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; transition: filter 0.2s, background-color 0.2s; }
.btn--oro { background: var(--oro); color: #111; }
.btn--oro:hover { filter: brightness(1.07); }
.btn--linea { background: transparent; color: var(--beige); box-shadow: inset 0 0 0 1px var(--linea2); clip-path: none; border-radius: 0; }
.btn--linea:hover { background: rgba(236, 234, 226, 0.06); }
.btn[disabled] { opacity: 0.45; cursor: progress; }
.enlace { background: none; border: 0; padding: 0; color: var(--oro-1); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ── Vista 1: la maqueta ── */
.vista-maqueta { position: relative; z-index: 3; display: flex; flex-direction: column; min-height: 100%; background: var(--negro); transition: opacity 0.7s cubic-bezier(.76, 0, .24, 1); }
.app[data-vista="mapa"] .vista-maqueta { opacity: 0; pointer-events: none; }
.app[data-vista="mapa"] .vista-maqueta[data-fuera] { visibility: hidden; }
.cab { display: flex; flex-direction: column; gap: 8px; padding-block: 18px 14px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.lado { display: flex; flex-direction: column; gap: 18px; padding-block: 18px 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.kicker { margin: 0; font-weight: 600; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--tenue); }
.voz { margin: 0; font-family: var(--f-serif); font-style: italic; font-weight: 500; font-stretch: 87.5%; font-size: clamp(25px, 6.6vw, 34px); line-height: 1.12; text-wrap: balance; }
.bajada { margin: 0; color: var(--tenue); max-width: 34em; }
.acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.acciones .btn { flex: 1 1 200px; }
.escenario { position: relative; overflow: hidden; height: min(122vw, 68vh); min-height: 380px; background: radial-gradient(ellipse 72% 64% at 50% 52%, #24211d 0%, #171513 46%, #0b0b0a 100%); touch-action: pan-y; }
.escenario::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%); }
.render { position: absolute; left: 0; top: 0; width: 1px; height: 1px; max-width: none; user-select: none; -webkit-user-drag: none; opacity: 0; transition: opacity 1.2s cubic-bezier(.16, 1, .3, 1); }
.render[data-listo] { opacity: 1; }
.capa-lineas { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
.capa-lineas line { stroke: var(--oro-1); stroke-width: 1; opacity: 0.85; }
.capa-etq { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.punto { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--oro-1); box-shadow: 0 0 0 2px #111, 0 0 0 3px rgba(234, 192, 91, 0.55), 0 0 12px rgba(234, 192, 91, 0.55); }
.etq { position: absolute; pointer-events: auto; border: 0; cursor: pointer; background: var(--oro); color: #111; font-weight: 700; font-size: 10.5px; line-height: 1; letter-spacing: 0.11em; text-transform: uppercase; padding: 6px 10px 5px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); --ch: 5px; }
.etq:hover, .etq[aria-current="true"] { filter: brightness(1.1); }
.etq[data-cerca] { outline: 2px solid var(--beige); outline-offset: 2px; }
.yo-maq { position: absolute; z-index: 4; transform: translate(-50%, -50%); pointer-events: none; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--beige); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.yo-maq i { width: 10px; height: 10px; border-radius: 50%; background: var(--beige); box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.85), 0 0 0 4px rgba(236, 234, 226, 0.5); }
.lima { position: absolute; left: 0; right: 0; bottom: max(14px, 3.2%); z-index: 3; margin: 0; text-align: center; font-weight: 600; font-size: clamp(18px, 3.4vw, 28px); letter-spacing: 0.52em; text-indent: 0.52em; text-transform: uppercase; color: rgba(236, 234, 226, 0.92); pointer-events: none; }
/* animación de entrada de los pines (como en el video) */
.anim .punto, .anim .etq { opacity: 0; transform: translateY(6px) scale(0.92); transition: opacity 0.5s cubic-bezier(.16, 1, .3, 1), transform 0.6s cubic-bezier(.16, 1, .3, 1); }
.anim .punto[data-visto], .anim .etq[data-visto] { opacity: 1; transform: none; }
.anim line { stroke-dasharray: var(--l); stroke-dashoffset: var(--l); transition: stroke-dashoffset 0.55s cubic-bezier(.16, 1, .3, 1); }
.anim line[data-visto] { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .anim .punto, .anim .etq { opacity: 1; transform: none; transition: none; }
  .anim line { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
  .render { transition: none; }
  .vista-maqueta { transition: none; }
}
.lista { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linea); }
.lista li { border-bottom: 1px solid var(--linea); }
.lista button { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; padding: 11px 2px; background: none; border: 0; cursor: pointer; text-align: left; }
.lista button:hover b { color: var(--oro-1); }
.lista b { font-weight: 600; font-size: 15px; }
.lista small { grid-column: 1; color: var(--sutil); font-size: 12.5px; }
.estado { font-size: 12px; letter-spacing: 0.06em; color: var(--cerrado); white-space: nowrap; }
.estado[data-abierto="true"] { color: var(--abierto); }
.donde { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: rgba(236, 234, 226, 0.04); box-shadow: inset 0 0 0 1px var(--linea); }
.donde[hidden] { display: none !important; }
.donde h2 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tenue); }
.fila { display: flex; flex-wrap: wrap; gap: 8px; }
.fila > * { flex: 1 1 150px; min-width: 0; }
.sel { appearance: none; min-height: 44px; padding: 10px 34px 10px 12px; border: 0; background: rgba(17, 17, 17, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ECEAE2' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; box-shadow: inset 0 0 0 1px var(--linea2); color: var(--beige); font-size: 14px; }
.aviso { margin: 0; min-height: 1em; font-size: 13px; color: var(--oro-1); }
.privacidad { margin: 0; font-size: 12px; color: var(--sutil); }
.resultado { display: flex; flex-direction: column; gap: 8px; }
.resultado[hidden] { display: none !important; }
.resultado .grande { margin: 0; font-family: var(--f-serif); font-style: italic; font-stretch: 87.5%; font-size: 26px; line-height: 1.1; }
.resultado p { margin: 0; }
.tiempo { color: var(--oro-1); font-weight: 600; }
.pie { margin: 0; padding-block: 14px 22px; font-size: 11.5px; color: var(--sutil); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ── Vista 2: el mapa 3D ── */
.vista-mapa { position: fixed; inset: 0; z-index: 1; background: #0f0e0c; opacity: 0; pointer-events: none; transition: opacity 0.7s cubic-bezier(.76, 0, .24, 1); }
.app[data-vista="mapa"] .vista-mapa { opacity: 1; pointer-events: auto; z-index: 4; }
.vista-mapa[data-viendo] { opacity: 1; }
.mapa { position: absolute; inset: 0; }
.mapa { z-index: 0; }
.m-ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 0.5s; }
.vista-mapa .maplibregl-ctrl-bottom-right { bottom: var(--hoja-alto, 0px); transition: bottom 0.3s; }
.app[data-vista="mapa"] .m-ui[data-listo] { opacity: 1; }
.m-ui > * { pointer-events: auto; }
.volver { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); left: max(12px, env(safe-area-inset-left, 0px)); min-height: 42px; padding: 10px 16px; border: 0; cursor: pointer; background: var(--velo); color: var(--beige); font-weight: 600; font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; box-shadow: inset 0 0 0 1px var(--linea2); }
.hoja { position: absolute; left: 0; right: 0; bottom: 0; max-height: 46%; overflow-y: auto; overscroll-behavior: contain; background: rgba(14, 13, 12, 0.94); box-shadow: 0 -1px 0 var(--linea); padding-block: 14px calc(14px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.hoja-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.hoja h2 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tenue); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip { flex: 0 0 auto; min-height: 36px; padding: 8px 12px; border: 0; cursor: pointer; background: rgba(236, 234, 226, 0.07); box-shadow: inset 0 0 0 1px var(--linea2); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--oro); color: #111; box-shadow: none; }
.tarjeta { display: grid; grid-template-columns: 112px 1fr; gap: 14px; margin-top: 12px; }
.tarjeta figure { margin: 0; aspect-ratio: 1; overflow: hidden; background: #1b1a18; }
.tarjeta img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sinfoto { display: grid; place-content: center; height: 100%; text-align: center; font-family: var(--f-serif); font-style: italic; font-stretch: 87.5%; font-size: 15px; color: var(--sutil); padding: 8px; background: rgba(236, 234, 226, 0.04); }
.tarjeta h3 { margin: 2px 0 4px; font-family: var(--f-serif); font-style: italic; font-weight: 500; font-stretch: 87.5%; font-size: 25px; line-height: 1.05; }
.tarjeta p { margin: 0 0 4px; font-size: 13.5px; }
.tarjeta .dist { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--tenue); }
.tarjeta .acc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tarjeta .acc .btn { min-height: 38px; padding: 9px 12px; font-size: 11.5px; }
.nota { font-size: 12px; color: var(--sutil); margin: 10px 0 0; }
/* marcadores del mapa */
.mk { display: flex; flex-direction: column; align-items: center; cursor: pointer; background: none; border: 0; padding: 0; }
.mk .pas { background: var(--oro); color: #111; font-weight: 700; font-size: 11.5px; letter-spacing: 0.11em; text-transform: uppercase; padding: 6px 10px 5px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); --ch: 5px; }
.mk .tallo { width: 2px; height: 26px; background: var(--oro-1); }
.mk .pt { width: 12px; height: 12px; border-radius: 50%; background: var(--oro-1); border: 3px solid #111; box-shadow: 0 0 0 2px var(--oro-1), 0 3px 10px rgba(0, 0, 0, 0.6); margin-bottom: -6px; }
.mk[aria-current="true"] .pas { outline: 2px solid var(--beige); outline-offset: 2px; }
.mk--punto .pas { visibility: hidden; }
.mk--punto .tallo { height: 10px; }
.mk-yo { display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.mk-yo span { background: var(--beige); color: #111; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 8px 4px; }
.mk-yo i { width: 14px; height: 14px; margin-top: 6px; border-radius: 50%; background: var(--beige); box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.8), 0 0 0 5px rgba(236, 234, 226, 0.6); }
.moneda { width: 120px; height: 120px; pointer-events: none; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55)); transform-origin: 50% 100%; animation: moneda 0.8s cubic-bezier(.16, 1, .3, 1); }
.moneda img { width: 100%; height: 100%; display: block; }
@keyframes moneda { from { opacity: 0; transform: translateY(18px) scale(0.6); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .moneda { animation: none; } .vista-mapa, .m-ui { transition: none; } }
.cargando { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; padding: 10px 16px; background: var(--velo); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tenue); box-shadow: inset 0 0 0 1px var(--linea2); }
.cargando[hidden] { display: none !important; }

@media (max-width: 899px) {
  .tarjeta { grid-template-columns: 84px 1fr; gap: 12px; }
  .tarjeta h3 { font-size: 22px; }
  .tarjeta .acc .btn { min-height: 34px; padding: 8px 10px; font-size: 10.5px; letter-spacing: 0.1em; }
}
/* ── Escritorio ── */
@media (min-width: 900px) {
  html, body { overflow: hidden; }
  .app { height: 100%; }
  .vista-maqueta { display: grid; grid-template-columns: var(--panel) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: 'cab esc' 'lado esc' 'pie esc'; height: 100%; min-height: 0; }
  .cab { grid-area: cab; padding-block: 40px 4px; padding-left: max(36px, env(safe-area-inset-left, 0px)); padding-right: 28px; gap: 14px; }
  .lado { grid-area: lado; min-height: 0; padding-block: 18px 16px; padding-left: max(36px, env(safe-area-inset-left, 0px)); padding-right: 28px; overflow-y: auto; gap: 20px; }
  .escenario { grid-area: esc; height: auto; min-height: 0; }
  .pie { grid-area: pie; padding-left: max(36px, env(safe-area-inset-left, 0px)); padding-right: 28px; }
  .acciones .btn { flex: 1 1 100%; }
  .etq { font-size: 12.5px; padding: 7px 12px 6px; }
  .vista-mapa .maplibregl-ctrl-bottom-right { bottom: 0; }
  .hoja { left: max(12px, env(safe-area-inset-left, 0px)); right: auto; top: calc(env(safe-area-inset-top, 0px) + 66px); bottom: auto; width: calc(var(--panel) - 24px); max-height: calc(100% - 80px - env(safe-area-inset-top, 0px)); box-shadow: inset 0 0 0 1px var(--linea); padding: 18px; }
  .chips { flex-wrap: wrap; overflow: visible; }
  .tarjeta { grid-template-columns: 1fr; }
  .tarjeta figure { aspect-ratio: 16 / 10; }
}

/* ── 221: el 3D fotorrealista de Google ── */
.mapa-g { position: absolute; left: 0; right: 0; top: 0; bottom: var(--hoja-alto, 0px); z-index: 0; display: none; transition: bottom 0.3s; }
.vista-mapa[data-google] .mapa-g { display: block; }
.vista-mapa[data-google] .mapa { display: none; }
.mapa-g gmp-map-3d { display: block; width: 100%; height: 100%; }
.calib { position: absolute; left: 0; top: 0; width: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.calib circle { fill: none; stroke: #39e1ff; stroke-width: 2; }
.calib polyline { fill: none; stroke: #39e1ff; stroke-width: 1.5; opacity: 0.9; }
/* primero se apaga la maqueta y después aparece el 3D de Google: nunca se ven los dos mapas a la vez */
.escenario[data-apagado] .render, .escenario[data-apagado] .capa-etq, .escenario[data-apagado] .capa-lineas, .escenario[data-apagado] .yo-maq { opacity: 0 !important; transition: opacity 0.38s cubic-bezier(.76, 0, .24, 1) !important; }
.cargando--maq { z-index: 8; }
/* los marcadores dentro del 3D de Google usan el diseño de la 220 */
.mk--g { cursor: pointer; }
.moneda--g { padding-bottom: 64px; box-sizing: content-box; }
.g-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; font-size: 11px; color: var(--sutil); }
/* la clave de Google (solo en el prototipo; en la web va en una variable del servidor) */
.g3d { font-size: 13px; color: var(--tenue); border-top: 1px solid var(--linea); padding-top: 12px; }
.g3d[hidden] { display: none; }
.g3d summary { cursor: pointer; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.g3d-cuerpo { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.g3d-cuerpo p { margin: 0; }
.g3d-in { background-image: none; padding-right: 12px; }
@media (min-width: 900px) {
  .mapa-g { bottom: 0; }
  /* la hoja termina antes del borde inferior para no tapar el logo de Google */
  .vista-mapa[data-google] .hoja { max-height: calc(100% - 66px - 100px - env(safe-area-inset-top, 0px)); }
}

/* ── 226: la web ── */
/* «Nuestras cafeterías» para volver (dentro del kicker), la fila de la ubicación cuando el sitio no la permite y el enlace sin JavaScript */
.volver-web { color: inherit; text-decoration: none; }
.volver-web:hover { color: var(--oro-1); }
.fila[hidden] { display: none; }
.bajada a { color: var(--oro-1); text-underline-offset: 3px; }
/* El filtro por distrito de Nuestras cafeterías: las sedes de otros distritos se atenúan en la maqueta */
.escenario .etq.is-fuera, .escenario .punto.is-fuera { opacity: 0.22; }
.capa-lineas line { transition: opacity 0.35s ease; }
.capa-lineas line.is-fuera { opacity: 0.12; }
/* «¿Dónde estás?» dentro de la hoja del mapa: el título ya lo pone la hoja */
.hoja .donde > h2 { display: none; }
/* Dentro de Nuestras cafeterías (data-incrustado): la maqueta sola, del tamaño del marco; los botones y los créditos
   los pone la página. Al entrar, la página pone el marco en pantalla completa y el mapa se ve como siempre. */
html[data-incrustado], html[data-incrustado] body { height: 100%; overflow: hidden; }
html[data-incrustado] body { background: #0d0e0e; }
html[data-incrustado] .app { height: 100%; }
html[data-incrustado] .vista-maqueta { display: block; height: 100%; min-height: 0; }
html[data-incrustado] .cab, html[data-incrustado] .lado, html[data-incrustado] .pie { display: none; }
html[data-incrustado] .escenario { position: absolute; inset: 0; height: auto; min-height: 0; }
