/* Diseño: Google Maps en el celular, siempre en blanco (sin modo oscuro).
   Pantalla 1: mapa de fondo con la barra de búsqueda y la hoja de reseña encima.
   Pantalla 3: la ficha del local con fotos, calificación, botones, solapas y reseñas. */
:root {
  --bg: #ffffff;
  --fg: #1f1f1f;
  --fg2: #444746;
  --fg3: #747775;
  --line: #e3e3e3;
  --line2: #c4c7c5;
  --surface: #f0f4f9;
  --surface2: #e9eef6;
  --primary: #0b57d0;
  --primary-press: #0842a0;
  --on-primary: #ffffff;
  --star: #fbbc04;
  --star-off: #dadce0;
  --ok: #188038;
  --avatar: #0b57d0;
  --shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
  --shadow-s: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
  --font: "Google Sans Text", "Google Sans", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-display: "Google Sans", "Google Sans Text", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
img { max-width: 100%; }

/* ---------- Mapa de fondo ---------- */
.map {
  position: fixed; inset: 0;
  background: #f2f3f0 url("img/mapa.svg") center -395px / 1400px auto repeat;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 10px;
  transition: opacity .3s;
}
.map.off { opacity: 0; pointer-events: none; }
.searchbar {
  max-width: 480px; width: 100%; margin: 0 auto;
  height: 48px; border-radius: 24px;
  background: #fff; box-shadow: var(--shadow-s);
  display: flex; align-items: center; gap: 12px;
  padding: 0 8px 0 14px;
  color: var(--fg2);
}
.searchbar svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.searchbar .q { flex: 1; font-size: 16px; color: var(--fg3); }
.searchbar .av {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--avatar); color: #fff; font-weight: 500;
  display: grid; place-items: center;
}
.mapchips {
  max-width: 480px; width: 100%; margin: 0 auto;
  display: flex; gap: 8px; overflow: hidden;
}
.mchip {
  height: 32px; padding: 0 12px 0 10px; border-radius: 16px; flex: none;
  background: #fff; box-shadow: var(--shadow-s);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--fg2);
}
.mchip svg { width: 18px; height: 18px; fill: var(--fg3); }

/* ---------- Hoja ---------- */
.sheet {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -1px 4px rgba(60,64,67,.2);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 24px;
  min-height: 100%;
}
.sheet.over { margin-top: 200px; min-height: calc(100% - 200px); }
.sheet.full { margin-top: 0; border-radius: 0; box-shadow: none; }
@media (min-width: 600px) {
  .sheet.full { margin-block: 24px; min-height: calc(100% - 48px); border-radius: 28px; box-shadow: var(--shadow); }
  body:has(.sheet.full) { background: var(--surface); }
  .sheet.over { margin-top: 220px; }
}
.handle {
  width: 32px; height: 4px; border-radius: 2px;
  background: var(--line2); margin: 10px auto 0;
}

/* Barra de arriba */
.topbar {
  height: 60px;
  display: flex; align-items: center; gap: 4px;
  margin-left: -8px;
}
.iconbtn {
  width: 48px; height: 48px; flex: none;
  border: 0; background: transparent; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--fg2);
}
.iconbtn svg { width: 24px; height: 24px; fill: currentColor; }
.iconbtn:active { background: var(--surface2); }
.iconbtn:focus-visible, .btn:focus-visible, .chip:focus-visible, .star:focus-visible, .pill:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.topbar .title {
  font-family: var(--font-display);
  font-size: 22px; line-height: 28px; font-weight: 400;
  flex: 1; margin: 0 0 0 8px;
}
.demo-chip {
  font-size: 11px; line-height: 16px; letter-spacing: .4px; font-weight: 500;
  color: var(--fg2); background: var(--surface); border-radius: 8px;
  padding: 2px 8px; flex: none;
}
.profilebar { position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 2; margin-left: -8px; margin-right: -8px; padding-right: 8px; }
.profilebar-q {
  flex: 1; height: 44px; border-radius: 22px; margin-left: 4px;
  background: var(--surface); display: flex; align-items: center;
  padding: 0 16px; font-size: 16px; font-weight: 500;
}

/* Local y quién publica */
.place {
  display: flex; align-items: center; gap: 16px;
  padding-block: 4px 20px;
}
.place .logo { width: 48px; height: 48px; border-radius: 50%; flex: none; box-shadow: var(--shadow-s); }
.place .name { font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 500; }
.place .cat { color: var(--fg2); }
.who {
  display: flex; align-items: center; gap: 16px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--avatar); color: var(--on-primary);
  font-family: var(--font-display); font-size: 18px; font-weight: 500;
  display: grid; place-items: center;
}
.who .n { font-weight: 500; }
.who .pub { color: var(--fg2); font-size: 12px; line-height: 16px; display: flex; align-items: center; gap: 4px; }
.who .pub svg { width: 14px; height: 14px; fill: currentColor; }

/* Estrellas */
.stars { display: flex; justify-content: center; gap: 4px; padding-block: 16px 4px; }
.star {
  width: 52px; height: 52px; border: 0; background: transparent;
  border-radius: 50%; display: grid; place-items: center;
  color: var(--star-off); transition: color .15s;
}
.star svg { width: 40px; height: 40px; fill: currentColor; transition: transform .18s cubic-bezier(.2,.8,.2,1.4); }
.star.on { color: var(--star); }
.star:active svg { transform: scale(.85); }
.star.pop svg { animation: pop .32s cubic-bezier(.2,.8,.2,1.4); }
@keyframes pop { 0% { transform: scale(.8) } 50% { transform: scale(1.22) } 100% { transform: scale(1) } }
.rating-label { text-align: center; min-height: 20px; color: var(--fg2); padding-bottom: 20px; }
.rating-label.set { color: var(--fg); font-weight: 500; }

/* Chips de temas */
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 16px; }
.chip {
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line2); border-radius: 8px;
  background: transparent; color: var(--fg);
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:active, .chip.on { background: var(--surface2); border-color: transparent; }
.chip.on { color: var(--primary); }

/* Campo de texto */
.field {
  display: block; position: relative;
  border: 1px solid var(--line2); border-radius: 8px;
  padding: 14px 16px 28px;
  transition: border-color .15s, box-shadow .15s;
}
.field:focus-within { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.field textarea {
  width: 100%; min-height: 104px; resize: none;
  border: 0; outline: 0; background: transparent;
  font-size: 16px; line-height: 24px; padding: 0; display: block;
}
.field textarea::placeholder { color: var(--fg3); }
.field .count {
  position: absolute; right: 12px; bottom: 8px;
  font-size: 12px; line-height: 16px; color: var(--fg2);
  font-variant-numeric: tabular-nums;
}

/* Fotos y botones */
.photos { padding-block: 16px 8px; display: flex; flex-direction: column; gap: 12px; }
.btn {
  height: 40px; padding: 0 24px; border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 500; letter-spacing: .1px;
  border: 1px solid transparent; background: transparent;
  text-decoration: none; white-space: nowrap;
  transition: background .15s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn.outlined { border-color: var(--line2); color: var(--primary); }
.btn.outlined:active { background: var(--surface2); }
.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.filled:active { background: var(--primary-press); }
.btn.filled:disabled { background: var(--line); color: var(--fg3); cursor: default; }
.btn.text { color: var(--primary); padding: 0 12px; }
.btn.text:active { background: var(--surface2); }
.btn.wide { width: 100%; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs:empty { display: none; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--surface); }

.actions { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.note { text-align: center; color: var(--fg3); font-size: 12px; line-height: 16px; padding-top: 8px; margin: 0; }

/* ---------- Publicando ---------- */
.posting { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; color: var(--fg2); }
.posting p { margin: 0; }
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid var(--surface2); border-top-color: var(--primary);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

/* ---------- Ficha del local ---------- */
.gallery {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 3px;
  height: 200px; border-radius: 12px; overflow: hidden;
  margin-top: 4px;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery > img { height: 200px; }
.gallery .col { display: flex; flex-direction: column; gap: 3px; }
.gallery .col img, .gallery .more { height: 98.5px; overflow: hidden; }
.gallery .more { position: relative; }
.gallery .more span {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.45); color: #fff; font-size: 18px; font-weight: 500;
}
.head { padding-block: 16px 12px; }
.head h2 {
  font-family: var(--font-display);
  font-size: 24px; line-height: 32px; font-weight: 400; margin: 0 0 2px;
}
.rating-row { display: flex; align-items: center; gap: 6px; color: var(--fg2); }
.rating-row .num { font-weight: 500; color: var(--fg); font-variant-numeric: tabular-nums; }
.s { display: inline-flex; gap: 1px; color: var(--star); }
.s svg { width: 16px; height: 16px; fill: currentColor; }
.s .off { color: var(--star-off); }
.s .half { position: relative; color: var(--star-off); }
.s .half svg + svg { position: absolute; inset: 0; color: var(--star); clip-path: inset(0 50% 0 0); }
.meta { color: var(--fg2); font-size: 14px; }
.meta .open { color: var(--ok); font-weight: 500; }
.meta .closed { color: #c5221f; font-weight: 500; }

.pills {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 12px; margin-inline: -16px; padding-inline: 16px;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; height: 36px; padding: 0 16px 0 12px; border-radius: 18px;
  border: 1px solid var(--line2); background: var(--bg); color: var(--primary);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.pill svg { width: 18px; height: 18px; fill: currentColor; }
.pill:active { background: var(--surface2); }
.pill.filled { background: var(--primary); color: var(--on-primary); border-color: transparent; }

.tabs {
  display: flex; border-bottom: 1px solid var(--line);
  margin-inline: -16px; padding-inline: 8px;
}
.tabs span, .tabs button {
  flex: 1; text-align: center; padding: 12px 4px 10px;
  color: var(--fg2); font-weight: 500; font-size: 14px; font-family: inherit;
  border: 0; border-bottom: 3px solid transparent; white-space: nowrap;
  background: none; margin: 0; cursor: pointer; border-radius: 0;
}
.tabs span { cursor: default; }
.tabs .on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* Pestaña Información */
.info { list-style: none; margin: 0; padding: 8px 0 4px; }
.info-row {
  display: flex; align-items: center; gap: 16px; padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.info-row:last-child { border-bottom: 0; }
.info-link { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; color: inherit; text-decoration: none; margin: -12px 0; padding: 12px 0; border-radius: 8px; }
.info-link:active { background: var(--surface); }
.info-row .ii {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center; color: var(--primary);
}
.info-row .ii svg { width: 22px; height: 22px; fill: currentColor; }
.info-row .ii.wa { color: #25d366; }
.info-row > span:last-child, .info-link > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.info-row b { font-weight: 400; font-size: 15px; color: var(--fg); }
.info-row b .open { color: var(--ok); font-weight: 500; }
.info-row small { font-size: 13px; color: var(--fg2); }
.info-note { color: var(--fg3); font-size: 12px; margin: 8px 0 0; }

.summary-block { display: flex; gap: 20px; align-items: center; padding-block: 20px 8px; }
.summary-block .big { text-align: center; flex: none; width: 96px; }
.summary-block .avg { font-family: var(--font-display); font-size: 48px; line-height: 56px; font-weight: 400; font-variant-numeric: tabular-nums; }
.summary-block .big .s { justify-content: center; }
.summary-block .tot { color: var(--fg2); font-size: 12px; margin-top: 4px; }
.bars { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bar { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--fg2); }
.bar span { width: 8px; text-align: right; font-variant-numeric: tabular-nums; }
.bar i { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar b { display: block; height: 100%; background: var(--star); border-radius: 4px; transition: width .6s cubic-bezier(.2,.8,.2,1); }

.sort { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 12px 4px; margin-inline: -16px; padding-inline: 16px; }
.sort::-webkit-scrollbar { display: none; }
.sortchip {
  flex: none; height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line2); color: var(--fg); font-weight: 500;
  display: inline-flex; align-items: center;
}
.sortchip.on { background: var(--surface2); border-color: transparent; color: var(--primary); }

.reviews { list-style: none; margin: 0; padding: 0; }
.review { padding-block: 16px; border-bottom: 1px solid var(--line); }
.review.new { background: var(--surface); margin-inline: -16px; padding-inline: 16px; border-radius: 0; animation: slidein .5s cubic-bezier(.2,.8,.2,1); }
@keyframes slidein { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
.review .rh { display: flex; align-items: center; gap: 12px; }
.review .ava { width: 40px; height: 40px; border-radius: 50%; flex: none; color: #fff; font-weight: 500; font-size: 16px; display: grid; place-items: center; }
.review .rn { font-weight: 500; }
.review .rm { color: var(--fg2); font-size: 12px; line-height: 16px; }
.review .rr { display: flex; align-items: center; gap: 8px; padding-block: 10px 6px; color: var(--fg2); font-size: 12px; }
.review .rr .newtag { color: var(--primary); font-weight: 500; }
.review p { margin: 0; color: var(--fg); }
.review .rp { display: flex; gap: 6px; padding-top: 10px; }
.review .rp img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.review .rl { display: flex; gap: 20px; padding-top: 12px; color: var(--fg2); font-size: 13px; }
.review .rl span { display: inline-flex; align-items: center; gap: 6px; }
.review .rl svg { width: 18px; height: 18px; fill: currentColor; }
.review .owner { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--surface); }
.review .owner .ot { font-weight: 500; font-size: 13px; }
.review .owner .od { color: var(--fg2); font-size: 12px; margin-bottom: 4px; }

.pitch {
  margin-top: 24px; background: var(--surface); border-radius: 16px;
  padding: 16px; display: flex; gap: 14px;
}
.pitch .ico { color: var(--primary); flex: none; }
.pitch .ico svg { width: 24px; height: 24px; fill: currentColor; }
.pitch h3 { font-size: 14px; font-weight: 500; margin: 0 0 2px; }
.pitch p { margin: 0; color: var(--fg2); }

@media (prefers-reduced-motion: reduce) {
  .star svg, .star.pop svg, .review.new, .bar b { animation: none; transition: none; }
}

/* ---------- Buscar ---------- */
.searchbar { border: 0; cursor: pointer; text-align: left; font: inherit; }
.searchhead { gap: 8px; }
.searchinput {
  flex: 1; height: 48px; border-radius: 24px; min-width: 0;
  background: var(--surface); display: flex; align-items: center; gap: 8px;
  padding: 0 12px 0 16px; margin: 0;
}
.searchinput input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 16px; -webkit-appearance: none; appearance: none;
}
.searchinput input::-webkit-search-cancel-button { display: none; }
.searchinput svg { width: 24px; height: 24px; fill: var(--fg2); flex: none; }
.searchinput.asq { border: 0; font: inherit; color: var(--fg); font-size: 16px; font-weight: 500; cursor: pointer; }
.sugs { list-style: none; margin: 0; padding: 8px 0; }
.sugs button {
  width: 100%; border: 0; background: transparent; text-align: left;
  display: flex; align-items: center; gap: 16px; padding: 10px 4px; border-radius: 12px;
}
.sugs button:active { background: var(--surface); }
.sugs .si { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; flex: none; }
.sugs .si svg { width: 22px; height: 22px; fill: var(--fg2); }
.sugs b { display: block; font-weight: 400; font-size: 16px; }
.sugs small { display: block; color: var(--fg2); font-size: 13px; }

/* ---------- Resultados ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 12px; margin-inline: -16px; padding-inline: 16px; }
.filters::-webkit-scrollbar { display: none; }
.mapstrip {
  position: relative; height: 150px; border-radius: 12px; overflow: hidden;
  background: #f2f3f0 url("img/mapa.svg") -200px -700px / 1400px auto no-repeat;
}
.pin {
  position: absolute; transform: translate(-50%, -100%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12px; font-weight: 500; color: var(--fg); white-space: nowrap;
  transition: left .6s cubic-bezier(.2,.8,.2,1), top .6s cubic-bezier(.2,.8,.2,1);
}
.pin svg { width: 26px; height: 26px; }
.pin span { background: rgba(255,255,255,.9); padding: 1px 6px; border-radius: 6px; }
.pin.mine svg { width: 34px; height: 34px; }
.rcount { margin: 12px 0 0; color: var(--fg2); font-size: 13px; }
.places { list-style: none; margin: 0; padding: 0; }
.placecard {
  display: flex; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--line);
  width: 100%; border-left: 0; border-right: 0; border-top: 0; background: transparent; text-align: left; font: inherit; color: inherit;
  animation: slidein .45s cubic-bezier(.2,.8,.2,1);
}
.placecard:active { background: var(--surface); }
.placecard .info { flex: 1; min-width: 0; }
.placecard .pn { font-size: 16px; font-weight: 500; line-height: 22px; }
.placecard .pr { display: flex; align-items: center; gap: 5px; color: var(--fg2); font-size: 13px; }
.placecard .pr .num { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.placecard .pm { color: var(--fg2); font-size: 13px; }
.placecard .ph { font-size: 13px; color: var(--fg2); }
.placecard .ph .open { color: var(--ok); font-weight: 500; }
.placecard img { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface); }
.placecard.mine { background: var(--surface); margin-inline: -16px; padding-inline: 16px; width: auto; }
.placecard .rank {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--fg2); color: #fff; font-size: 12px; font-weight: 500; margin-right: 6px; vertical-align: 2px;
}
.placecard.mine .rank { background: #ea4335; }
.placecard .ptags { display: flex; gap: 6px; padding-top: 6px; flex-wrap: wrap; }
.placecard .ptag { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--line2); color: var(--fg2); }
.placecard.mine .ptag.top { background: #fef7e0; border-color: #fbbc04; color: #7a5a00; }
.pitch .btn { margin-top: 12px; }
.results-dim .placecard.mine { background: #fff; }

/* Calificar desde la ficha */
.write { display: flex; align-items: center; gap: 16px; padding-block: 16px 4px; border-top: 1px solid var(--line); margin-top: 8px; }
.write .wt { font-weight: 500; margin-bottom: 2px; }
.wstars { display: flex; gap: 2px; margin-left: -6px; }
.wstars button { width: 36px; height: 36px; border: 0; background: transparent; border-radius: 50%; display: grid; place-items: center; color: var(--star-off); }
.wstars button svg { width: 28px; height: 28px; fill: currentColor; }
.wstars button:active, .wstars button.on { color: var(--star); }

/* ---------- Cómo llegar (trayecto simulado) ---------- */
.dirhead { gap: 8px; }
.dirpoints {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border-radius: 12px; padding: 8px 12px; position: relative;
}
.dirpoints::before {
  content: ""; position: absolute; left: 17px; top: 20px; bottom: 20px; border-left: 2px dotted var(--line2);
}
.dp { display: flex; align-items: center; gap: 12px; font-size: 14px; height: 24px; }
.dp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; position: relative; z-index: 1; }
.dp .dot.from { background: #fff; border: 3px solid var(--primary); box-sizing: border-box; }
.dp .dot.to { background: #ea4335; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.modes { display: flex; gap: 6px; padding-block: 12px 8px; }
.modes button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; border-radius: 18px; border: 1px solid var(--line2); background: var(--bg);
  color: var(--fg2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; padding: 0 6px;
}
.modes button svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.modes button.on { background: var(--surface2); border-color: transparent; color: var(--primary); }
.modes button:focus-visible { outline: 2px solid var(--primary); }
.dirmap {
  position: relative; height: 280px; border-radius: 16px; overflow: hidden;
  background: #f2f3f0 url("img/mapa.svg") -480px -620px / 1400px auto no-repeat;
}
.dirmap .route { position: absolute; left: 0; top: 0; overflow: visible; }
.dirmap #route { stroke-dasharray: 600; stroke-dashoffset: 600; }
.dirmap.draw #route { animation: draw 1.4s cubic-bezier(.4,0,.2,1) .2s forwards; }
.dirmap.nav #route { animation: none; stroke-dashoffset: 0; stroke: #1e8e3e; }
.dirmap.nav #route-bg { stroke: #fff; }
.dirmap .halo { transform-origin: 80px 262px; animation: pulse 2s ease-out infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }
.dirlabel {
  position: absolute; transform: translate(-50%, 0); font-size: 12px; font-weight: 500; color: var(--fg);
  background: rgba(255,255,255,.92); padding: 2px 6px; border-radius: 6px; white-space: nowrap;
}
.dirsum { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px 4px; }
.eta { font-family: var(--font-display); font-size: 24px; line-height: 30px; }
.eta b { font-weight: 500; color: #188038; }
.eta span { color: var(--fg2); font-size: 16px; }
.via { color: var(--fg2); font-size: 13px; margin-top: 2px; }
#dir-start { display: inline-flex; align-items: center; gap: 8px; padding-inline: 20px; }
#dir-start svg { width: 18px; height: 18px; fill: currentColor; }
.navbar {
  display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 14px 16px;
  background: #1e8e3e; color: #fff; border-radius: 14px; animation: slidein .4s cubic-bezier(.2,.8,.2,1);
}
.navbar svg { width: 34px; height: 34px; fill: currentColor; flex: none; }
.navbar b { display: block; font-size: 22px; font-weight: 500; line-height: 26px; }
.navbar span { font-size: 14px; opacity: .92; }
.steps { list-style: none; margin: 12px 0 0; padding: 0; }
.steps li { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps .si { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; flex: none; color: var(--fg2); }
.steps .si svg { width: 20px; height: 20px; fill: currentColor; }
.steps .si.end { color: #ea4335; }
.steps li > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.steps b { font-weight: 400; font-size: 15px; }
.steps small { color: var(--fg2); font-size: 13px; }
.steps li.done { opacity: .45; }
.steps li.now b { font-weight: 500; color: var(--primary); }
