/* ==========================================================================
   TuRuta · Cabo San Lucas
   ========================================================================== */
:root {
  --brand-1: #14B8A6;
  --brand-2: #1D4ED8;
  --brand: #0E7C86;
  --brand-ink: #0B5F68;
  --accent: #FF7A3D;
  --accent-2: #FF4D6D;
  --ok: #16A34A;
  --warn: #F59E0B;
  --bad: #E11D48;
  --bg: #EEF3F8;
  --surface: #FFFFFF;
  --surface-2: #F3F6FA;
  --surface-3: #E8EEF5;
  --line: #E1E8F0;
  --text: #0F1E36;
  --muted: #5B6B82;
  --glass: rgba(255, 255, 255, .82);
  --shadow-sm: 0 2px 8px -2px rgba(15, 30, 54, .12);
  --shadow: 0 14px 36px -14px rgba(15, 30, 54, .35);
  --shadow-lg: 0 24px 60px -20px rgba(15, 30, 54, .45);
  --radius: 20px;
  --radius-sm: 14px;
  --topbar-h: 58px;
  --tabbar-h: 66px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --sheet-h: 210px;
  --ease: cubic-bezier(.22, .9, .24, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0A1120;
  --surface: #111B2E;
  --surface-2: #17233A;
  --surface-3: #1E2C47;
  --line: #22324F;
  --text: #E8EEF8;
  --muted: #94A4BE;
  --brand: #2CC4C0;
  --brand-ink: #7FE3DD;
  --glass: rgba(17, 27, 46, .82);
  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, .5);
  --shadow: 0 14px 36px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--brand); }
h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
h2 { font-size: 1.45rem; font-weight: 800; }
h3 { font-size: 1.08rem; font-weight: 750; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.inline { width: 16px; height: 16px; vertical-align: -3px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; border-radius: 10px; }

/* ---------------- Splash ---------------- */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: radial-gradient(120% 80% at 20% 10%, #22D3C5 0%, transparent 60%), linear-gradient(150deg, #0E7C86, #1D4ED8 70%, #172554);
  color: #fff;
  transition: opacity .6s var(--ease), visibility .6s;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash-inner { text-align: center; display: grid; justify-items: center; gap: 6px; }
.splash-logo { width: 92px; height: 92px; border-radius: 24px; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .45); animation: pop .7s var(--spring) both; }
.splash-title { margin: 14px 0 0; font-size: 2.6rem; font-weight: 850; letter-spacing: -.04em; animation: rise .7s .1s var(--ease) both; }
.splash-title span, .brand-text b span { color: #FFB38A; }
.splash-sub { margin: 0; opacity: .85; font-weight: 600; animation: rise .7s .18s var(--ease) both; }
.splash-road { position: relative; width: 240px; height: 40px; margin-top: 26px; border-radius: 12px; background: rgba(7, 18, 40, .45); overflow: hidden; animation: rise .7s .25s var(--ease) both; }
.splash-road .lane { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .8) 0 16px, transparent 16px 30px); animation: lane .6s linear infinite; }
.splash-bus { position: absolute; width: 64px; height: 32px; top: 2px; left: -70px; animation: drive-in 1.5s .35s var(--ease) forwards; }
.splash-bus .wheel, .tab-bus.driving .wheel { transform-box: fill-box; transform-origin: center; animation: spin .4s linear infinite; }
@keyframes lane { to { background-position: -30px 0; } }
@keyframes drive-in { 0% { left: -70px; } 100% { left: calc(50% - 32px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- Layout (móvil primero) ---------------- */
.app { position: fixed; inset: 0; overflow: hidden; }
.map-wrap { position: absolute; inset: 0; z-index: 1; }
#map { position: absolute; inset: 0; background: var(--bg); }

.topbar {
  position: absolute; z-index: 800;
  top: calc(10px + var(--safe-t)); left: 10px; right: 10px;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 0 10px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform .45s var(--ease), opacity .3s;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-logo { width: 38px; height: 38px; border-radius: 11px; box-shadow: var(--shadow-sm); }
.brand-text { display: grid; line-height: 1.05; }
.brand-text b { font-size: 1.22rem; font-weight: 850; letter-spacing: -.03em; }
.brand-text b span { color: var(--accent); }
.brand-text small { font-size: .72rem; color: var(--muted); font-weight: 650; letter-spacing: .02em; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.live-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); font-size: .8rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.live-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .55); } 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--text); transition: background .2s, transform .2s var(--spring); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.9); }
.ic-sun { display: none; }
[data-theme="dark"] .ic-sun { display: block; }
[data-theme="dark"] .ic-moon { display: none; }

/* Tabbar */
.tabbar {
  position: absolute; z-index: 900; left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px -18px rgba(15, 30, 54, .4);
  transition: transform .45s var(--ease);
}
.tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--muted); font-size: .72rem; font-weight: 700; transition: color .25s; padding-top: 6px; }
.tab .ic { width: 24px; height: 24px; transition: transform .35s var(--spring); }
.tab.is-active { color: var(--brand); }
.tab.is-active .ic { transform: translateY(-2px) scale(1.12); }
.tab-road { position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, transparent) 0 10px, transparent 10px 18px); opacity: .55; }
.tab-bus { position: absolute; top: -16px; left: 0; width: 38px; height: 19px; pointer-events: none; transform: translateX(var(--bus-x, 0px)); transition: transform .75s var(--ease); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); }
.tab-bus.flip use { transform: scaleX(-1); transform-origin: center; transform-box: fill-box; }
.tab-bus.driving { animation: bump .25s ease-in-out infinite alternate; }
@keyframes bump { to { margin-top: -1.5px; } }

/* Sheet (panel) */
.sheet {
  position: absolute; z-index: 850; left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-b));
  height: var(--sheet-h);
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -16px 40px -20px rgba(15, 30, 54, .45);
  display: flex; flex-direction: column;
  transition: height .5s var(--ease), transform .45s var(--ease);
  will-change: height;
}
.sheet.dragging { transition: none; }
.sheet-grip { flex: none; height: 24px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-grip span { width: 44px; height: 5px; border-radius: 99px; background: var(--line); }
.sheet-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 16px calc(20px); overscroll-behavior: contain; scrollbar-width: thin; }

.map-fabs { position: absolute; z-index: 700; right: 12px; bottom: calc(var(--sheet-h) + var(--tabbar-h) + var(--safe-b) + 14px); display: grid; gap: 10px; transition: bottom .5s var(--ease), opacity .3s; }
.fab { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--surface); color: var(--text); box-shadow: var(--shadow); transition: transform .25s var(--spring), background .2s; }
.fab:hover { transform: translateY(-2px); }
.fab:active { transform: scale(.92); }
.fab.is-busy .ic { animation: spin 1.2s linear infinite; }
.map-hint { position: absolute; z-index: 700; left: 50%; top: calc(var(--safe-t) + var(--topbar-h) + 22px); transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: .8rem; font-weight: 650; color: var(--muted); box-shadow: var(--shadow-sm); white-space: nowrap; transition: opacity .5s, transform .5s var(--ease); }
.map-hint.gone { opacity: 0; transform: translate(-50%, -10px); pointer-events: none; }

.app[data-sheet="full"] .map-fabs, .app[data-sheet="full"] .map-hint { opacity: 0; pointer-events: none; }

/* ---------------- Vistas ---------------- */
.view { display: none; }
.view.is-active { display: block; animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 2px 12px; }
.view-head p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.pill-btn { padding: 7px 14px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: .82rem; color: var(--text); transition: background .2s, transform .2s var(--spring); white-space: nowrap; }
.pill-btn:active { transform: scale(.94); }
.pill-btn:hover { background: var(--surface-3); }

.search-field { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 46px; border-radius: 15px; background: var(--surface-2); border: 1.5px solid transparent; transition: border-color .2s, box-shadow .2s, background .2s; color: var(--muted); }
.search-field:focus-within { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 1rem; }
.search-field input::placeholder { color: var(--muted); opacity: .8; }
.search-field.big { height: 52px; }
.sf-go { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--brand); color: #fff; margin-right: -6px; transition: transform .2s var(--spring); }
.sf-go:active { transform: scale(.9); }

.seg { display: flex; gap: 6px; margin: 12px 0 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.seg::-webkit-scrollbar { display: none; }
.seg button { padding: 7px 13px; border-radius: 999px; font-size: .82rem; font-weight: 700; color: var(--muted); background: transparent; border: 1.5px solid var(--line); white-space: nowrap; transition: all .25s var(--ease); }
.seg button.is-active { background: var(--text); border-color: var(--text); color: var(--surface); }

/* Lista de rutas */
.route-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.route-list li { animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
.route-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; text-align: left; transition: background .2s, transform .2s var(--spring); }
.route-item:hover { background: var(--surface-2); }
.route-item:active { transform: scale(.985); }
.route-item.is-off { opacity: .45; }
.ri-text { flex: 1; min-width: 0; display: grid; }
.ri-text b { font-weight: 700; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ri-text small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: .9rem; }

/* Insignia de ruta tipo letrero de camión */
.badge {
  --c: #0E7C86;
  position: relative; flex: none;
  min-width: 48px; height: 44px; padding: 0 6px;
  display: grid; place-items: center; align-content: center;
  border-radius: 12px;
  background: var(--c);
  color: #fff;
  font-weight: 850; font-size: 1.15rem; line-height: 1; letter-spacing: -.02em;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 4px 10px -4px var(--c);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.badge small { font-size: .52rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .9; margin-bottom: 2px; }
.badge.urbano::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 5px; height: 2px; border-radius: 2px; background: repeating-linear-gradient(90deg, #fff 0 4px, transparent 4px 7px); opacity: .9; }
.badge.sm { min-width: 36px; height: 30px; border-radius: 9px; font-size: .9rem; }
.badge.sm small { display: none; }
.badge.lg { min-width: 70px; height: 64px; border-radius: 18px; font-size: 1.8rem; }
.badge.lg small { font-size: .62rem; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.on { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.status.soon { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.status.off { color: var(--muted); background: var(--surface-2); }
.ri-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-right: 4px; }
.ri-dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.ri-dot.soon { background: var(--warn); }
.ri-dot.off { background: var(--line); }

/* Detalle de ruta */
.route-detail { animation: viewIn .45s var(--ease) both; }
.rd-top { display: flex; align-items: center; gap: 8px; margin: 0 -4px 10px; }
.back-btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px 7px 6px; border-radius: 999px; font-weight: 700; font-size: .85rem; color: var(--text); background: var(--surface-2); }
.back-btn:hover { background: var(--surface-3); }
.rd-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.rd-head h2 { font-size: 1.15rem; }
.rd-head p { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 750; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.stat-card { padding: 12px; border-radius: 16px; background: var(--surface-2); display: grid; gap: 2px; }
.stat-card small { color: var(--muted); font-size: .74rem; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.stat-card small .ic { width: 15px; height: 15px; }
.stat-card b { font-size: 1.02rem; font-weight: 800; }
.note-card { padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-size: .85rem; margin: 10px 0; display: flex; gap: 10px; }
.note-card .ic { color: var(--warn); width: 18px; height: 18px; margin-top: 2px; }
details.recorrido { border-radius: 16px; background: var(--surface-2); padding: 0 14px; margin: 10px 0; }
details.recorrido summary { cursor: pointer; padding: 13px 0; font-weight: 750; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.recorrido summary::-webkit-details-marker { display: none; }
details.recorrido summary .ic { transition: transform .3s var(--ease); width: 18px; }
details.recorrido[open] summary .ic { transform: rotate(90deg); }
details.recorrido p { margin: 0 0 14px; font-size: .86rem; color: var(--muted); white-space: pre-line; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 15px; font-weight: 750; font-size: .95rem; transition: transform .2s var(--spring), box-shadow .2s, background .2s, opacity .2s; white-space: nowrap; }
.btn:active { transform: scale(.96); }
.btn .ic { width: 19px; height: 19px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 22px -10px var(--accent-2); }
.btn-primary:hover { box-shadow: 0 14px 28px -10px var(--accent-2); }
.btn-brand { color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); box-shadow: 0 10px 22px -12px var(--brand-2); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-block { width: 100%; margin-top: 10px; }
.link-btn { font-weight: 750; font-size: .84rem; color: var(--brand); padding: 6px 8px; border-radius: 10px; }
.link-btn:hover { background: var(--surface-2); }

/* ---------------- Buscar ---------------- */
.stepper { list-style: none; display: flex; align-items: center; padding: 0; margin: 0 0 16px; position: relative; }
.stepper::before { content: ""; position: absolute; left: 22px; right: 22px; top: 17px; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 13px); }
.stepper .step { flex: 1; display: grid; justify-items: center; gap: 4px; position: relative; font-size: .72rem; font-weight: 750; color: var(--muted); }
.stepper .step:first-child { justify-items: start; }
.stepper .step:last-child { justify-items: end; }
.stepper i { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 850; background: var(--surface); border: 3px solid var(--line); color: var(--muted); transition: all .4s var(--ease); z-index: 1; }
.stepper i .ic { width: 18px; height: 18px; }
.stepper .is-current i { border-color: var(--brand); color: var(--brand); transform: scale(1.08); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 15%, transparent); }
.stepper .is-done i { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper .is-current, .stepper .is-done { color: var(--text); }
.stepper-progress { position: absolute; left: 22px; top: 17px; height: 4px; border-radius: 4px; background: var(--brand); transition: width .6s var(--ease); }

.wz-step { display: none; }
.wz-step.is-active { display: block; animation: viewIn .45s var(--ease) both; }
.wz-step h3 { margin: 4px 0 12px; }
.option-card { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 10px; border-radius: 18px; background: var(--surface-2); border: 1.5px solid transparent; text-align: left; transition: transform .25s var(--spring), border-color .2s, background .2s, box-shadow .25s; }
.option-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, transparent); background: var(--surface); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.option-card:active { transform: scale(.98); }
.option-card.slim { padding: 10px 12px; margin-top: 10px; }
.option-card.is-loading .oc-icon .ic { animation: spin 1.1s linear infinite; }
.oc-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.slim .oc-icon { width: 36px; height: 36px; border-radius: 11px; }
.slim .oc-icon .ic { width: 18px; height: 18px; }
.oc-blue { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.oc-teal { background: linear-gradient(135deg, #2DD4BF, #0E7C86); }
.oc-orange { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.oc-text { flex: 1; display: grid; }
.oc-text b { font-weight: 750; }
.oc-text small { color: var(--muted); font-size: .82rem; }
.oc-chev { color: var(--muted); width: 18px; }

.place-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); margin-bottom: 12px; }
.place-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 850; font-size: .85rem; flex: none; }
.dot-a { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.dot-b { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.place-text { flex: 1; min-width: 0; display: grid; }
.place-text small { color: var(--muted); font-size: .74rem; font-weight: 700; }
.place-text b { font-weight: 750; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-ends { position: relative; }
.trip-ends .place-row { margin-bottom: 6px; padding: 7px 12px; }
.trip-ends .place-dot { width: 26px; height: 26px; font-size: .78rem; }
.trip-ends::before { content: ""; position: absolute; left: 24px; top: 32px; height: 16px; border-left: 3px dotted var(--muted); opacity: .5; }
#view-buscar.is-result .view-head { display: none; }
#view-buscar.is-result .stepper { margin-top: 4px; }

.place-results { list-style: none; margin: 8px 0 0; padding: 0; }
.place-results li { animation: rise .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.place-results button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px; border-radius: 14px; transition: background .2s; }
.place-results button:hover { background: var(--surface-2); }
.place-results .pr-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); flex: none; }
.place-results .pr-ic .ic { width: 18px; height: 18px; }
.place-results span { display: grid; min-width: 0; }
.place-results b { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-results small { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-results .loading, .place-results .msg { padding: 12px; color: var(--muted); font-size: .86rem; }
.sub-title { margin: 18px 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: .84rem; border: 1.5px solid transparent; transition: all .2s var(--ease); }
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.chip:active { transform: scale(.95); }
.chip .em { font-size: 1rem; }

/* Resultado */
.result-box { margin-top: 6px; }
.result-card { border-radius: 22px; background: var(--surface); border: 1.5px solid var(--line); overflow: hidden; box-shadow: var(--shadow-sm); animation: cardIn .5s var(--ease) both; }
.result-card.slide-left { animation: slideL .45s var(--ease) both; }
.result-card.slide-right { animation: slideR .45s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes slideL { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes slideR { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
.rc-head { display: flex; align-items: center; gap: 12px; padding: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--surface)), var(--surface)); border-bottom: 1px solid var(--line); }
.rc-head .rc-title { flex: 1; min-width: 0; display: grid; }
.rc-head .rc-title small { color: var(--muted); font-weight: 700; font-size: .74rem; }
.rc-head .rc-title b { font-size: .95rem; font-weight: 800; line-height: 1.2; }
.rc-best { position: absolute; }
.rank { font-size: .7rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; align-self: flex-start; }
.rank.best { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.rc-total { display: flex; align-items: baseline; gap: 8px; padding: 12px 16px 0; }
.rc-total b { font-size: 1.6rem; font-weight: 850; letter-spacing: -.03em; }
.rc-total span { color: var(--muted); font-size: .84rem; font-weight: 650; }
.timeline { list-style: none; margin: 8px 0 0; padding: 6px 16px 4px; position: relative; }
.timeline li { position: relative; display: flex; gap: 12px; padding: 8px 0 12px; }
.timeline li::before { content: ""; position: absolute; left: 15px; top: 36px; bottom: -6px; border-left: 3px dotted var(--muted); opacity: .45; }
.timeline li.bus::before { border-left: 5px solid var(--c); opacity: 1; left: 14px; }
.timeline li:last-child::before { display: none; }
.tl-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; z-index: 1; }
.tl-ic .ic { width: 18px; height: 18px; }
.bus .tl-ic { background: var(--c); color: #fff; }
.tl-ic.end { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.tl-ic.wait { color: var(--warn); }
.tl-text { display: grid; gap: 1px; padding-top: 1px; min-width: 0; }
.tl-text b { font-weight: 750; font-size: .92rem; }
.tl-text small { color: var(--muted); font-size: .8rem; }
.tl-text .street { color: var(--text); font-weight: 650; }
.rc-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.rc-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.rc-actions .btn { height: 46px; }
.rc-actions .btn-ghost { background: var(--surface); }
.rc-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 0; }
.rc-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--line); transition: all .35s var(--ease); }
.rc-dots i.on { width: 20px; background: var(--accent); }
.rc-warn { margin: 0 16px 12px; padding: 10px 12px; border-radius: 12px; font-size: .82rem; background: color-mix(in srgb, var(--warn) 13%, transparent); display: flex; gap: 8px; }
.rc-warn .ic { color: var(--warn); width: 18px; height: 18px; }
.walk-tip { padding: 12px 14px; border-radius: 16px; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; font-size: .88rem; background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.walk-tip .ic { color: var(--ok); }
.calc { display: grid; justify-items: center; gap: 10px; padding: 28px 0; color: var(--muted); font-weight: 650; }
.calc .road { position: relative; width: 180px; height: 26px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.calc .road::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, var(--muted) 0 10px, transparent 10px 18px); opacity: .5; animation: lane .5s linear infinite; }
.calc svg { position: absolute; width: 44px; height: 22px; top: 2px; left: 0; animation: shuttle 1.6s ease-in-out infinite alternate; }
.calc .wheel { transform-box: fill-box; transform-origin: center; animation: spin .4s linear infinite; }
@keyframes shuttle { from { left: 0; } to { left: calc(100% - 44px); } }

/* ---------------- Selector en mapa ---------------- */
.pick { position: absolute; inset: 0; z-index: 750; pointer-events: none; opacity: 0; transition: opacity .3s; }
.app.picking .pick { opacity: 1; }
.pick-banner { position: absolute; left: 50%; top: calc(var(--safe-t) + 14px); transform: translate(-50%, -20px); display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 16px; background: var(--text); color: var(--surface); font-weight: 750; font-size: .9rem; box-shadow: var(--shadow); white-space: nowrap; transition: transform .45s var(--ease); max-width: calc(100% - 24px); }
.pick-banner .ic { width: 18px; height: 18px; color: var(--accent); }
.app.picking .pick-banner { transform: translate(-50%, 0); }
.pick-pin { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.pin-head { position: absolute; left: -22px; top: -54px; width: 44px; height: 44px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: linear-gradient(135deg, #3B82F6, #1D4ED8); display: grid; place-items: center; box-shadow: 0 8px 18px -6px rgba(29, 78, 216, .7); transition: transform .3s var(--spring); border: 3px solid #fff; }
.pin-head .ic { transform: rotate(45deg); color: #fff; width: 20px; height: 20px; }
.pick-pin.dest .pin-head { background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 18px -6px rgba(255, 77, 109, .7); }
.pin-shadow { position: absolute; left: -8px; top: -4px; width: 16px; height: 8px; border-radius: 50%; background: rgba(0, 0, 0, .3); transition: transform .3s var(--spring), opacity .3s; }
.pick-pin.lift .pin-head { transform: translateY(-14px) rotate(-45deg); }
.pick-pin.lift .pin-shadow { transform: scale(.6); opacity: .5; }
.pick-actions { position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 16px); display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; transform: translateY(30px); transition: transform .45s var(--ease); pointer-events: auto; }
.app:not(.picking) .pick-actions { pointer-events: none; }
.app.picking .pick-actions { transform: none; }
.pick-actions .btn { height: 52px; box-shadow: var(--shadow); }
.pick-actions .btn-ghost { background: var(--surface); }
.app.picking .sheet { transform: translateY(calc(100% + var(--tabbar-h) + 40px)); }
.app.picking .tabbar { transform: translateY(110%); }
.app.picking .topbar { transform: translateY(-140%); opacity: 0; }
.app.picking .map-fabs { bottom: calc(var(--safe-b) + 84px); }
.app.picking .map-hint { opacity: 0; }

/* ---------------- Marcadores del mapa ---------------- */
.leaflet-container { font-family: var(--font); background: var(--bg); }
/* Mapa base más suave para que resalten las rutas; versión nocturna */
.base-tiles { filter: saturate(.55) brightness(1.04) contrast(.95); }
[data-theme="dark"] .base-tiles { filter: invert(1) hue-rotate(180deg) brightness(1.05) contrast(.86) saturate(.45); }
[data-theme="dark"] .leaflet-container { background: #1b2230; }
.leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--muted); border-radius: 8px 0 0 0; }
.leaflet-control-attribution a { color: var(--muted); }
.leaflet-bottom.leaflet-right { bottom: calc(var(--sheet-h) + var(--tabbar-h) + var(--safe-b)); transition: bottom .5s var(--ease); }
.app.picking .leaflet-bottom.leaflet-right { bottom: 0; }
.leaflet-bar a { background: var(--surface); color: var(--text); border-color: var(--line) !important; }
.leaflet-bar a:hover { background: var(--surface-2); }
.leaflet-popup-content-wrapper { border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 12px 14px; font-size: .86rem; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); top: 6px; right: 6px; }
.pp-title { font-weight: 800; margin-bottom: 8px; display: block; }
.pp-routes { display: flex; flex-wrap: wrap; gap: 6px; max-width: 230px; }
.pp-routes button { transition: transform .2s var(--spring); }
.pp-routes button:hover { transform: translateY(-2px); }
.pp-hint { color: var(--muted); font-size: .76rem; display: block; margin-top: 8px; }

.route-flow { stroke-dasharray: 1 18; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -19; } }
.route-draw { animation: draw 1.4s var(--ease) both; }
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }

.mk { position: relative; }
.mk-origin { width: 22px; height: 22px; border-radius: 50%; background: #2563EB; border: 3.5px solid #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .6); }
.mk-origin::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; background: rgba(37, 99, 235, .28); animation: ping 2s ease-out infinite; z-index: -1; }
.mk-origin span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 9px; font-weight: 900; }
@keyframes ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.mk-dest { width: 36px; height: 36px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 3px solid #fff; box-shadow: 0 6px 14px -4px rgba(255, 77, 109, .8); display: grid; place-items: center; animation: drop .6s var(--spring) both; }
.mk-dest .ic { transform: rotate(45deg); color: #fff; width: 16px; height: 16px; }
@keyframes drop { from { transform: translateY(-30px) rotate(-45deg); opacity: 0; } to { transform: rotate(-45deg); opacity: 1; } }
.mk-stop { display: grid; justify-items: center; gap: 3px; animation: pop .5s var(--spring) both; }
.mk-stop .sign { width: 32px; height: 32px; border-radius: 10px; background: var(--c); border: 3px solid #fff; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .45); }
.mk-stop .sign .ic { width: 16px; height: 16px; }
.mk-stop .lbl { padding: 3px 8px; border-radius: 999px; background: var(--text); color: var(--surface); font-size: 10.5px; font-weight: 800; white-space: nowrap; box-shadow: var(--shadow-sm); }
.mk-bus { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid #fff; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px -4px rgba(0, 0, 0, .5); transition: transform .2s; }
.mk-bus .ic { width: 17px; height: 17px; }
.mk-me { width: 18px; height: 18px; border-radius: 50%; background: #2563EB; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37, 99, 235, .2), 0 3px 10px rgba(0, 0, 0, .3); }
.mk-label { padding: 3px 7px; border-radius: 8px; background: var(--c); color: #fff; font-weight: 850; font-size: 11px; border: 2px solid #fff; box-shadow: var(--shadow-sm); white-space: nowrap; transform: translate(-50%, -50%); display: inline-block; }

/* ---------------- Descargar ---------------- */
.dl-hero { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; padding: 6px 2px 16px; }
.mock-phone { width: 112px; height: 206px; border-radius: 24px; padding: 6px; background: #0F172A; box-shadow: var(--shadow-lg); transform: rotate(-6deg); animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-8px); } }
.mock-screen { position: relative; width: 100%; height: 100%; border-radius: 19px; overflow: hidden; background: #EAF2F8; }
.mock-map { width: 100%; height: 100%; display: block; }
.mm-bg { fill: #EAF2F8; }
.mm-road { fill: none; stroke: #fff; stroke-width: 6; }
.mm-route { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: mmDraw 2.4s var(--ease) forwards; }
.mm-route.r1 { stroke: #E53935; }
.mm-route.r2 { stroke: #1E63D6; animation-delay: .3s; }
.mm-route.r3 { stroke: #FFB300; animation-delay: .6s; }
@keyframes mmDraw { to { stroke-dashoffset: 0; } }
.mock-card { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 7px; border-radius: 12px; background: #fff; display: grid; grid-template-columns: 18px 1fr; gap: 4px 6px; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .3); }
.mock-card i { grid-row: span 2; width: 18px; height: 18px; border-radius: 6px; background: var(--accent); }
.mock-card b { height: 6px; border-radius: 3px; background: #CBD5E1; }
.mock-card b.short { width: 60%; }
.dl-copy h2 { font-size: 1.35rem; margin: 6px 0; }
.dl-copy p { margin: 0; color: var(--muted); font-size: .9rem; }
.eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.platform-hint { margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); font-size: .85rem; font-weight: 650; display: flex; gap: 8px; align-items: center; }
.store-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.store-btn { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 18px; color: #fff; text-decoration: none; text-align: left; overflow: hidden; transition: transform .25s var(--spring), box-shadow .25s; }
.store-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.store-btn:hover::after { transform: translateX(120%); }
.store-btn:hover { transform: translateY(-3px); }
.store-btn:active { transform: scale(.97); }
.store-btn .ic { width: 30px; height: 30px; }
.store-btn span { display: grid; line-height: 1.15; }
.store-btn small { font-size: .72rem; opacity: .85; font-weight: 650; }
.store-btn b { font-size: 1.02rem; font-weight: 800; }
.store-btn .tag { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: .62rem; font-weight: 850; padding: 2px 7px; border-radius: 99px; background: rgba(255, 255, 255, .22); letter-spacing: .05em; }
.store-btn.android { background: linear-gradient(135deg, #34D27F, #0F9D58); box-shadow: 0 12px 26px -14px #0F9D58; }
.store-btn.ios { background: linear-gradient(135deg, #2B3445, #0B1220); box-shadow: 0 12px 26px -14px #0B1220; }
[data-theme="dark"] .store-btn.ios { background: linear-gradient(135deg, #F8FAFC, #CBD5E1); color: #0B1220; }
.store-btn.is-recommended { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 3px; }
.in-app-note { display: none; margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--ok) 12%, var(--surface)); font-size: .88rem; gap: 10px; align-items: center; }
.in-app-note .ic { color: var(--ok); }
.in-app .in-app-note { display: flex; }
.in-app #apkBtn, .in-app #androidSteps, .in-app #pwaBtn { display: none !important; }
.in-app .store-btns { grid-template-columns: 1fr; }
.steps-card { margin-top: 14px; padding: 16px; border-radius: 22px; background: var(--surface-2); scroll-margin-top: 12px; }
.steps-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.steps-card h3 .ic { width: 22px; height: 22px; }
#androidSteps h3 .ic { color: #0F9D58; }
.steps-card.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.num-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.num-steps li { counter-increment: s; position: relative; padding-left: 38px; font-size: .9rem; }
.num-steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); font-weight: 850; font-size: .8rem; color: var(--brand); box-shadow: var(--shadow-sm); }
.fine { font-size: .78rem; color: var(--muted); margin: 10px 0 0; }

.ios-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 10px -16px 0; padding: 4px 0; scroll-behavior: smooth; }
.ios-track::-webkit-scrollbar { display: none; }
.ios-step { flex: 0 0 100%; scroll-snap-align: center; margin: 0; display: grid; justify-items: center; gap: 12px; padding: 0 16px; }
.phone-svg { width: 100%; max-width: 210px; height: auto; filter: drop-shadow(0 18px 24px rgba(15, 30, 54, .25)); }
.ios-step figcaption { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; max-width: 320px; }
.ios-step figcaption > b { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: .85rem; }
.ios-step figcaption small { display: block; color: var(--muted); font-size: .78rem; margin-top: 3px; word-break: break-all; }
.ios-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.ios-nav .icon-btn { background: var(--surface); box-shadow: var(--shadow-sm); }
.dots { display: flex; gap: 6px; }
.dots button { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: all .35s var(--ease); }
.dots button.on { width: 22px; background: var(--accent); }
/* Teléfono ilustrado (siempre claro, como el iPhone real) */
.ph-frame { fill: #0F172A; }
.ph-screen { fill: #FFFFFF; }
.ph-island { fill: #0F172A; }
.ph-page { fill: #EAF2F8; }
.ph-page.dim { fill: #8996A8; }
.ph-bar { fill: #F8FAFC; }
.ph-url { fill: #E6EBF1; }
.ph-chip { fill: #fff; }
.ph-t { font: 600 10px var(--font); fill: #0F172A; }
.ph-t.s { font-size: 8px; fill: #64748B; font-weight: 500; }
.ph-t.b { font-weight: 800; }
.ph-t.link { fill: #0A84FF; }
.ph-t.white { fill: #fff; font-weight: 700; font-size: 9px; }
.ph-icons, .ph-share, .ph-plus { fill: none; stroke: #0A84FF; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ph-plus { stroke: #0F172A; stroke-width: 1.6; }
.ph-sheet { fill: #F8FAFC; }
.ph-grab { fill: #CBD5E1; }
.ph-apps circle { fill: #D7DEE7; }
.ph-row { fill: #fff; }
.ph-line { fill: #E2E8F0; }
.ph-add { fill: rgba(10, 132, 255, .12); }
.ph-kb > rect { fill: #D1D5DB; }
.ph-kb .keys rect { fill: #fff; }
.ph-home rect { fill: rgba(255, 255, 255, .5); }
.ph-home .dock { fill: rgba(255, 255, 255, .3); }
.phone-svg .mm-route { stroke-width: 7; animation-duration: 3s; }
.hl { stroke: var(--accent); stroke-width: 2.5; }
.ph-row.hl { fill: #FFF1EA; }
.ph-url.hl { fill: #FFF1EA; }
.hl-ico { stroke: var(--accent); }
.tap { fill: rgba(255, 122, 61, .35); stroke: rgba(255, 122, 61, .9); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: tap 1.6s ease-out infinite; }
@keyframes tap { 0% { transform: scale(.5); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.ph-newapp { transform-box: fill-box; transform-origin: center bottom; animation: hop 1.6s var(--ease) infinite; }
@keyframes hop { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-6px) scale(1.06); } }

/* ---------------- Contacto ---------------- */
.contact-hero { text-align: center; padding: 8px 6px 14px; display: grid; justify-items: center; gap: 8px; }
.contact-logo { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--shadow); animation: pop .6s var(--spring) both; }
.contact-hero p { margin: 0; color: var(--muted); font-size: .9rem; max-width: 330px; }
.contact-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--surface-2); text-decoration: none; color: var(--text); margin-bottom: 10px; transition: transform .25s var(--spring), box-shadow .25s, background .2s; }
.contact-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: var(--surface); }
.contact-card:active { transform: scale(.98); }
.cc-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: #fff; flex: none; }
.ig .cc-icon { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FDF497 5%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.mail .cc-icon { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); }
.cc-text { flex: 1; display: grid; min-width: 0; }
.cc-text small { color: var(--muted); font-size: .76rem; font-weight: 700; }
.cc-text b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.cc-chev { color: var(--muted); width: 18px; transition: transform .25s var(--ease); }
.contact-card:hover .cc-chev { transform: translateX(3px); }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.stat { padding: 14px 8px; border-radius: 18px; text-align: center; background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), var(--surface-2)); display: grid; }
.stat b { font-size: 1.4rem; font-weight: 850; letter-spacing: -.03em; color: var(--brand-ink); }
.stat span { font-size: .72rem; color: var(--muted); font-weight: 700; }
.credits { padding: 16px; border-radius: 20px; border: 1.5px dashed var(--line); font-size: .84rem; }
.credits h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 1rem; }
.credits h3 .ic { width: 18px; height: 18px; color: var(--brand); }
.credits p { margin: 0 0 8px; color: var(--muted); }
.credits b { color: var(--text); }
.disclaimer { font-size: .78rem; }
.footer-note { text-align: center; color: var(--muted); font-size: .8rem; margin: 18px 0 6px; }
.heart { color: var(--accent-2); display: inline-block; animation: beat 1.4s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } }

/* ---------------- Toast y modal ---------------- */
.toast { position: fixed; z-index: 2000; left: 50%; top: calc(var(--safe-t) + 80px); transform: translate(-50%, -20px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 16px; background: var(--text); color: var(--surface); font-weight: 650; font-size: .88rem; box-shadow: var(--shadow-lg); transition: all .4s var(--ease); max-width: calc(100% - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; background: rgba(8, 15, 30, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.modal.show { opacity: 1; visibility: visible; }
.modal-card { width: min(400px, 100%); padding: 22px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg); transform: scale(.92) translateY(10px); transition: transform .4s var(--spring); }
.modal.show .modal-card { transform: none; }
.modal-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.modal-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.modal-actions { display: grid; gap: 8px; margin-top: 18px; }

/* ---------------- Escritorio ---------------- */
@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 420px 1fr; grid-template-rows: auto auto 1fr; }
  .topbar { position: relative; grid-column: 1; grid-row: 1; top: auto; left: auto; right: auto; margin: 14px 14px 0; box-shadow: none; background: var(--surface-2); border: 0; }
  .tabbar { position: relative; grid-column: 1; grid-row: 2; height: 70px; padding: 0 6px; margin: 10px 14px 0; border-radius: 18px; border: 1px solid var(--line); box-shadow: none; background: var(--surface); }
  .tab { font-size: .74rem; padding: 4px 0 16px; }
  .tab-road { top: auto; bottom: 7px; left: 14px; right: 14px; }
  .tab-bus { top: auto; bottom: 3px; width: 28px; height: 14px; }
  .sheet { position: relative; grid-column: 1; grid-row: 3; height: auto !important; bottom: auto; border-radius: 0; box-shadow: none; background: transparent; min-height: 0; }
  .sheet-grip { display: none; }
  .sheet-body { padding: 14px 18px 24px; }
  .app { background: var(--surface); }
  .map-wrap { position: relative; grid-column: 2; grid-row: 1 / 4; inset: auto; margin: 14px 14px 14px 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
  .map-fabs { bottom: 24px !important; right: 18px; }
  .leaflet-bottom.leaflet-right { bottom: 0 !important; }
  .map-hint { top: 18px; }
  .pick-banner { top: 18px; }
  .pick-actions { left: 50%; right: auto; width: 380px; margin-left: -190px; bottom: 24px; }
  .app.picking .sheet { transform: none; opacity: .5; pointer-events: none; }
  .app.picking .tabbar { transform: none; opacity: .5; pointer-events: none; }
  .app.picking .topbar { transform: none; opacity: 1; }
  .app.picking .map-fabs { bottom: 100px !important; }
  .ios-step { flex-basis: 100%; }
}
@media (min-width: 1400px) {
  .app { grid-template-columns: 460px 1fr; }
}
@media (max-width: 380px) {
  .live-chip { display: none; }
  .store-btns { grid-template-columns: 1fr; }
  .dl-hero { grid-template-columns: 90px 1fr; }
  .mock-phone { width: 90px; height: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
