/* BajaPe — presentation layer matched to the supplied Assets references.
   All data, navigation, maps, permissions and alert actions remain in app.js. */
:root { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; --cond: var(--font); --r-s: 11px; --r-m: 15px; --r-l: 26px; --paper: #f3f6fa; --shadow: 0 3px 12px rgba(25, 47, 77, .07); --tabh: 68px; }
body { font-size: 14px; line-height: 1.4; }
#app { max-width: 560px; background: var(--paper); }
.screen { padding: calc(env(safe-area-inset-top, 0px) + 22px) 18px calc(var(--tabh) + env(safe-area-inset-bottom, 0px) + 24px); min-height: 100dvh; }
.screen.full { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); }
.screen.banded { padding-top: 0; padding-left: 0; padding-right: 0; }
svg.i { width: 21px; height: 21px; stroke-width: 1.9; }
h2.sect { font-size: 15px; font-weight: 700; margin: 22px 0 10px; }
.sect-row { margin: 20px 0 10px; }
.sect-row h2.sect { margin: 0; }
.sect-sub { font-size: 12px; margin: -5px 0 13px; color: var(--muted); }
.see-all { font-size: 12px; font-weight: 600; color: #1686cc; }
.iconbtn { width: 38px; height: 38px; }
.topbar { min-height: 40px; gap: 10px; margin-bottom: 14px; }
.topbar h1 { font-size: 19px; font-weight: 700; }
.tile { width: 36px; height: 36px; border-radius: 11px; }
.btn { min-height: 48px; border-radius: 13px; font-size: 14px; letter-spacing: 0; padding: 10px 16px; }
.btn.primary { box-shadow: 0 3px 9px rgba(255, 190, 0, .25); background: #ffca08; }
.btn.dark { background: #132644; color: #fff; }
.btn.ghost { font-size: 13px; }
.input, select.input { min-height: 44px; padding: 10px 12px; font-size: 14px; border-width: 1px; box-shadow: 0 2px 6px rgba(25, 47, 77, .03); }
.field { margin-bottom: 16px; }
.field > span { font-size: 13px; margin-bottom: 8px; font-weight: 650; }
.seg { gap: 8px; }
.seg button { min-height: 40px; padding: 8px 10px; font-size: 12px; border: 0; box-shadow: var(--shadow); }
.seg button[aria-pressed="true"] { color: #fff; background: #132644; }
.note { font-size: 12px; line-height: 1.5; }
.linkbtn { font-size: 12px; }
.info-box { padding: 12px; gap: 10px; border-radius: 11px; background: #e2efff; color: #2a7bbc; font-size: 12px; line-height: 1.5; margin-top: 16px; }
.info-box svg { width: 24px; height: 24px; }
/* Home: original individual city artwork, compact saved-place and transit cards. */
.home-hero { margin: -22px -18px 0; padding: 24px 18px 0; min-height: 204px; isolation: isolate; }
.home-hero .brand { font-size: 13px; font-weight: 700; gap: 5px; margin: 0 0 24px; }
.home-hero .brand svg { width: 17px; height: 23px; }
.hero-img { z-index: 0 !important; right: 0; top: 0; width: 57% !important; max-width: 306px; opacity: 1; }
.home-hero .hero { padding: 0; }
.home-hero .hero h1 { font-family: var(--font); font-size: 31px; line-height: 1.04; letter-spacing: -1.05px; white-space: normal; max-width: 62%; margin: 0 0 10px; }
.home-hero .hero p { max-width: 67%; font-size: 12px; line-height: 1.5; }
html[lang^="es"] .home-hero .hero p span { white-space: normal; }
.searchbox, .searchbox.pill { border: 1px solid #dce2ea; border-radius: 13px; min-height: 46px; padding: 0 10px 0 13px; box-shadow: 0 3px 9px rgba(25, 47, 77, .08); }
.searchbox input { height: 44px; font-size: 12px; }
.searchbox .iconbtn { width: 30px; height: 36px; }
.screen.home .searchbox { margin-top: 0; position: relative; }
.screen.home .sect-row, .screen.home h2.sect { margin-top: 19px; margin-bottom: 9px; }
.screen.home .sect-row .sect { margin: 0; }
.places { margin: 0 -18px; padding: 2px 18px 9px; gap: 9px; }
.place { width: 93px; min-height: 95px; padding: 11px 10px 10px; border-radius: 12px; justify-content: flex-start; }
.place.add { width: 77px; border: 1px dashed var(--line); background: color-mix(in srgb, var(--card) 40%, transparent); }
.place .pic, .place .tile.round { width: 36px; height: 36px; margin-bottom: 7px; }
.place b { font-size: 12px; margin: 0; }
.place small { font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place.add b { font-size: 11px; }
.kebab { width: 25px; height: 30px; right: 0; top: 1px; }
.kebab svg { width: 15px; }
.modes { gap: 10px; }
.mode { min-height: 104px; padding: 12px; border-radius: 14px; border-top-width: 4px; background: var(--card); }
.mode::before { opacity: .42; background-size: 133px; background-position: right -20px top 6px; }
.mode .mpic { width: 39px; height: 39px; margin-bottom: 9px; }
.mode b { font-size: 13px; }
.mode .sub { font-size: 11px; }
.mode .chev { bottom: 13px; right: 8px; }
.more-tp { margin-top: 17px; gap: 7px; }
.more-tp > span { font-size: 12px; }
.more-tp .chip { font-size: 11px; min-height: 34px; padding: 6px 9px; gap: 5px; }
.cta-row { margin-top: 15px; border-radius: 12px; padding: 11px; gap: 10px; }
.cta-row .tile.round { width: 36px; height: 36px; }
.cta-row b { font-size: 13px; }
.cta-row div > span { font-size: 11px; }
.active-banner { margin-top: 10px; padding: 11px; font-size: 13px; }
.active-banner span { font-size: 11px; }
/* Illustrated header with real HTML copy and controls. */
.band { padding: calc(env(safe-area-inset-top, 0px) + 28px) 18px 47px; min-height: 171px; background: linear-gradient(120deg, #102445, #13406f); }
.band-txt { max-width: 66%; }
.band h1 { font-family: var(--font); font-size: 25px; line-height: 1.1; letter-spacing: -.5px; margin-bottom: 8px; }
.band p { font-size: 12px; line-height: 1.5; opacity: .9; }
.band-back { margin-bottom: 16px; box-shadow: none; background: #fff; color: #12345c; width: 34px; height: 34px; }
.band-art { right: 2px; bottom: 25px; width: 42%; max-width: 190px; }
.band-art img { width: 100%; display: block; }
.band-art.scene { inset: 0; width: 100%; height: 100%; max-width: none; opacity: .87; }
.band-art.scene img { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.band-art.scene::after { position: absolute; content: ""; inset: 0; background: linear-gradient(90deg, rgba(8, 34, 66, .76), rgba(8, 34, 66, .16) 70%, transparent); }
.band-back, .band-txt { position: relative; z-index: 2; }
.band-body { border-radius: 24px 24px 0 0; padding: 18px 16px 0; margin-top: -26px; background: var(--paper); }
.empty-card { border-radius: 17px; padding: 16px 14px 18px; }
.empty-card h2 { font-size: 18px; margin: 8px 0; }
.empty-card p { font-size: 13px; line-height: 1.5; margin-bottom: 18px; }
.empty-card .btn { min-height: 47px; }
.empty-card .info-box { margin-top: 18px; }
.empty-card.light { border: 1px solid color-mix(in srgb, var(--line) 50%, transparent); background: color-mix(in srgb, var(--card) 75%, var(--paper)); padding: 15px 14px 19px; }
.empty-card.light h2 { font-size: 17px; white-space: normal; color: var(--ink); }
.empty-card.light p { font-size: 13px; color: var(--muted); }
.empty-card.light .btn { min-height: 47px; font-size: 14px; }
.empty-card.light .ill { max-width: 320px; width: 100%; }
.screen.lugares { background: var(--paper); }
.screen.lugares .band { min-height: 170px; padding-bottom: 48px; }
.screen.lugares .band-txt { max-width: 63%; }
.screen.lugares .band h1 { font-size: 25px; }
.screen.lugares .band p { font-size: 12px; }
.screen.lugares .band-body { background: var(--paper); padding-top: 18px; }
.band-art.flush { width: 44%; max-width: 205px; top: 0; bottom: 10px; right: 0; }
.band-art.flush img { height: 100%; object-fit: cover; object-position: left center; }
.examples { gap: 9px; }
.ex { gap: 6px; border-radius: 12px; padding: 11px 6px; font-size: 12px; }
.ex img { width: 44px; height: 44px; }
.history-ill { width: 100%; border-radius: 12px; display: block; aspect-ratio: 1.65; object-fit: cover; }
.history-screen .band h1 { max-width: 95%; }
.row { padding: 12px; gap: 11px; min-height: 58px; }
.row .txt b { font-size: 13px; }
.row .txt span { font-size: 11px; }
.row .ic { width: 36px; height: 36px; }
.row .status { font-size: 10px; padding: 3px 6px; }
/* Search. Supplied city and individual place artwork; empty states remain truthful. */
.search-screen .band { min-height: 208px; padding-top: calc(env(safe-area-inset-top, 0px) + 18px); padding-bottom: 50px; }
.search-screen .band-txt { max-width: 67%; }
.search-screen .band h1 { font-size: 25px; }
.search-screen .band-art.search-art { width: 50%; max-width: 255px; right: 0; top: 18px; bottom: 29px; }
.search-art img { height: 100%; object-fit: cover; object-position: right center; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); mask-image: linear-gradient(90deg, transparent, #000 22%); }
.search-screen .band-body { padding: 17px 16px 0; }
.search-screen [data-res] { box-shadow: none; background: transparent; }
.loadrow { padding: 12px; font-size: 12px; min-height: 44px; background: var(--card); border-radius: 10px; gap: 10px; }
.quick2 { margin-top: 12px; gap: 9px; }
.qcard { border: 1px solid #e2eaf5; border-radius: 12px; padding: 12px 9px; gap: 7px; background: #edf5ff; }
.qcard .tile { width: 31px; height: 34px; background: transparent; }
.qcard b { font-size: 11px; line-height: 1.25; }
.qcard span:last-child { font-size: 10px; line-height: 1.4; }
.row-card { margin-top: 12px; padding: 11px; gap: 10px; border-radius: 11px; min-height: 48px; }
.row-card b { font-size: 12px; }
.search-screen .list:not([data-res]) { background: transparent; box-shadow: none; display: grid; gap: 9px; overflow: visible; }
.search-screen .row { background: var(--card); border: 0; border-radius: 12px; box-shadow: var(--shadow); }
.place-icon { display: block; object-fit: contain; width: 36px; height: 36px; }
.place-icon.university { object-fit: cover; object-position: center 88%; }
/* Route headers, direction chips and continuous station diagrams. */
.transit-screen .band { min-height: 224px; padding: calc(env(safe-area-inset-top, 0px) + 20px) 18px 60px; }
.transit-screen .band-txt { max-width: 90%; }
.transit-screen .band h1 { font-size: 25px; }
.transit-screen .dirs { position: relative; z-index: 3; margin: -69px 16px 0; gap: 7px; display: grid; }
.transit-screen .dirs button { font-size: 12px; padding: 8px 11px; min-height: 47px; display: flex; align-items: center; gap: 9px; justify-content: center; border-radius: 11px; }
.transit-screen .dirs button[aria-pressed="true"] { background: var(--c); color: #fff; box-shadow: 0 3px 8px color-mix(in srgb, var(--c) 30%, transparent); }
.transit-screen .dirs svg { width: 20px; height: 20px; }
.transit-screen .dirs span { max-width: 125px; text-align: left; }
.transit-screen .transit-body { margin-top: -8px; padding-top: 28px; }
.transit-body > [data-ramal] { display: flex; align-items: center; justify-content: space-between; background: #e3f0ff; width: 100%; padding: 12px; border-radius: 11px; margin: -6px 0 17px; text-align: left; }
.transit-body [data-status]:empty { display: none; }
.transit-body .diagram { box-shadow: none; border-radius: 14px; padding: 7px 0; }
.diagram::before { left: 27px; top: 30px; bottom: 30px; width: 4px; }
.stop { min-height: 43px; padding: 9px 12px 9px 19px; gap: 13px; }
.stop .node { width: 20px; height: 20px; border-width: 3px; }
.stop.term .node { width: 22px; height: 22px; margin-left: -1px; }
.stop .nm { font-size: 13px; }
.stop.term:first-child { background: color-mix(in srgb, var(--c) 9%, var(--card)); margin: 0 7px; width: calc(100% - 14px); border-radius: 10px; padding-left: 12px; }
.stop.term:first-child .nm { font-weight: 700; }
.stop-chevron { color: #8a99ad; display: flex; }
.stop-chevron svg { width: 16px; height: 16px; }
.stop .tag { font-size: 10px; }
.transit-body > .note { padding: 13px; background: #e3f0ff; border-radius: 11px; margin: 17px 0 12px; color: #527496; }
.transit-body > [data-lrep] { display: flex; align-items: center; gap: 9px; background: #e3f0ff; border-radius: 11px; width: 100%; padding: 12px; text-align: left; color: #247fc0; }
.transit-body > [data-lrep] > span { flex: 1; }
.transit-body > [data-lrep] .ifill { width: 21px; height: 21px; }
.corridors-screen .band { min-height: 210px; padding-top: calc(env(safe-area-inset-top, 0px) + 20px); }
.corridors-screen .band-txt { max-width: 76%; }
.corridors-screen .band-body { padding: 19px 16px 0; }
.corridors-screen .lines { gap: 13px; }
.corridor-card { position: relative; min-height: 105px; padding: 15px 11px 15px 0; grid-template-columns: 5px 42px 1fr auto; gap: 11px; border-radius: 14px; isolation: isolate; }
.corridor-card::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .2; background: url('/img/ui/corr.webp') right center / auto 112px no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent 45%, #000); mask-image: linear-gradient(90deg, transparent 45%, #000); }
.corridor-card:nth-child(2)::before { filter: hue-rotate(135deg); }
.corridor-card:nth-child(3)::before { filter: hue-rotate(55deg); }
.corridor-card .bar { margin: -15px 0; }
.corridor-icon { color: var(--c) !important; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.corridor-icon svg { width: 28px; height: 28px; }
.corridor-card b { font-size: 15px; }
.corridor-copy span { display: block; max-width: 165px; margin-top: 5px; font-size: 12px; }
/* Confirm screen keeps Leaflet interactive; do not overlay it with a screenshot. */
.confirm-screen { padding-top: calc(env(safe-area-inset-top, 0px) + 14px); }
.confirm-screen .topbar { margin-bottom: 10px; }
.confirm-screen .map { height: 250px; border-radius: 16px; }
.map-ctl { gap: 6px; }
.map-btn { width: 35px; height: 35px; font-size: 20px; border-radius: 9px; }
.map-note { display: flex; align-items: center; gap: 9px; color: #267cc3; background: #e3efff; border-radius: 10px; padding: 9px 10px; margin-top: 9px; }
.map-note svg { width: 21px; height: 21px; flex: none; }
.confirm-screen .field { margin-bottom: 16px; }
.confirm-screen [data-name] { background: var(--card); }
.confirm-screen [data-when] button[aria-pressed="true"] { color: #fff; background: #132644; }
.awake-note { display: flex; gap: 10px; align-items: flex-start; padding: 13px; border-radius: 11px; background: #fff8e4; color: #73603b; font-size: 12px; }
.awake-note svg { color: #ffbe00; flex: none; }
.confirm-screen .err:empty { min-height: 0; margin: 0; }
.confirm-screen [data-act] { margin-top: 15px; }
/* Profile cards and preferences. Existing account and permission actions preserved. */
.screen.profile { padding-top: calc(env(safe-area-inset-top, 0px) + 25px); }
.page-title { font-size: 29px; line-height: 1.1; font-weight: 750; letter-spacing: -.9px; margin: 0 0 20px; }
.profile-card { padding: 16px; gap: 13px; border-radius: 14px; }
.profile-card[role="button"] { cursor: pointer; }
.avatar { width: 52px; height: 52px; font: 700 24px var(--font); }
.profile-card b { font-size: 13px; }
.profile-card .muted.small { font-size: 12px; line-height: 1.4; margin-top: 4px; }
.prow { padding: 12px; min-height: 67px; gap: 10px; border-color: color-mix(in srgb, var(--line) 55%, transparent); }
.prow b { font-size: 13px; }
.prow small { font-size: 11px; line-height: 1.4; }
.prow select { font-size: 12px; min-height: 34px; max-width: 42%; padding: 5px 7px; border-width: 1px; border-radius: 8px; }
.prow .tile { width: 32px; height: 32px; }
.prow.col .btn + .btn { margin-top: 9px; }
.pill-btn { font-size: 11px; min-height: 32px; }
.danger-row { font-size: 13px; border-radius: 9px; }
/* Auth bottom sheets: both OAuth providers share the existing Supabase client. */
.scrim { background: rgba(14, 26, 44, .38); backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); }
.sheet { max-width: 560px; border-radius: 26px 26px 0 0; }
.sheet.auth-sheet { padding: 12px 20px calc(env(safe-area-inset-bottom, 0px) + 19px); background: var(--card); }
.auth-sheet .grab { margin-bottom: 19px; width: 43px; height: 4px; }
.auth-head { position: relative; min-height: 93px; margin-bottom: 11px; padding-top: 7px; isolation: isolate; }
.auth-head img { position: absolute; width: 135px; height: 118px; object-fit: cover; right: -5px; bottom: -6px; border-radius: 20px; z-index: -1; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%); mask-image: linear-gradient(90deg, transparent, #000 12%); }
.sheet .auth-head h2 { font-family: var(--font); font-size: 26px; font-weight: 750; letter-spacing: -.8px; margin: 0 0 7px; max-width: 70%; }
.sheet .auth-head p { color: var(--muted); font-size: 12px; line-height: 1.5; max-width: 65%; margin: 0; }
.auth-close { position: absolute; right: -4px; top: -18px; width: 32px; height: 32px; background: var(--card); }
.auth-close svg { width: 17px; height: 17px; }
.auth-form .field { margin-bottom: 13px; }
.auth-form .field > span:first-child { font-size: 13px; }
.auth-input { position: relative; display: flex !important; align-items: center; font-weight: 400 !important; margin-bottom: 0 !important; }
.auth-input > svg { position: absolute; left: 12px; color: #919ba9; width: 19px; height: 19px; pointer-events: none; }
.auth-input input { padding-left: 40px; padding-right: 40px; font-size: 13px; background: color-mix(in srgb, var(--paper) 55%, var(--card)); }
.auth-input input[type="email"] { padding-right: 12px; }
.password-toggle { position: absolute; right: 0; top: 0; height: 44px; width: 44px; background: transparent; border: 0; display: grid; place-items: center; color: #929dab; }
.password-toggle svg { width: 19px; height: 19px; }
.auth-forgot { display: block; margin: -3px 0 0 auto; min-height: 32px; padding: 4px 0; color: #2a8ac4; font-size: 12px; }
.auth-sheet .err { margin: 0 0 5px; font-size: 12px; min-height: 0; }
.auth-sheet .err:empty { display: none; }
.auth-submit { border-radius: 999px; margin-top: 11px; font-size: 14px; box-shadow: 0 4px 9px rgba(19, 38, 68, .12); position: relative; }
.auth-submit svg { position: absolute; right: 17px; width: 18px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 13px 0; color: #a0a9b5; font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-social { display: grid; gap: 8px; }
.oauth-btn { border-radius: 999px; min-height: 43px; font-weight: 500; font-size: 12px; gap: 9px; background: #eaf2ff; color: #132644; }
.oauth-btn + .oauth-btn { margin-top: 0; }
.oauth-btn svg { width: 22px; height: 22px; }
.auth-switch { display: block; width: 100%; text-align: center; color: #2584c2; font-size: 12px; padding: 8px 0 0; min-height: 34px; }
.tabs { left: 50%; right: auto; width: min(100%, 560px); transform: translateX(-50%); border: 1px solid #e8edf4; border-bottom: 0; border-radius: 21px 21px 0 0; box-shadow: 0 -3px 12px rgba(22, 48, 79, .035); }
.tabs nav { height: var(--tabh); }
.tabs a { font-size: 10px; gap: 5px; font-weight: 500; color: #8390a1; }
.tabs a svg { width: 22px; height: 22px; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tabs a[aria-current="page"] svg { color: #c49400; filter: drop-shadow(0 0 4px rgba(255, 195, 14, .65)); }
.tabs a[aria-current="page"]::before { left: 26%; right: 26%; height: 3px; }
/* Large screens use a centered app surface with roomier cards, no server runtime. */
@media (min-width: 700px) {
  body { background: color-mix(in srgb, var(--paper) 88%, #cbd7e6); }
  #app { box-shadow: 0 0 70px rgba(19, 34, 63, .09); }
  .screen { padding-left: 25px; padding-right: 25px; }
  .screen.banded { padding-left: 0; padding-right: 0; }
  .band { padding-left: 25px; padding-right: 25px; }
  .band-body { padding-left: 24px; padding-right: 24px; }
  .home-hero { margin-left: -25px; margin-right: -25px; padding-left: 25px; padding-right: 25px; min-height: 244px; }
  .home-hero .hero h1 { font-size: 37px; }
  .home-hero .hero p { font-size: 14px; }
  .home-hero .brand { margin-bottom: 32px; }
  .places { margin-left: -25px; margin-right: -25px; padding-left: 25px; padding-right: 25px; }
  .place { width: 112px; }
  .mode { min-height: 116px; }
  .mode b { font-size: 15px; }
  .sheet.auth-sheet { border-radius: 25px; max-width: 450px; padding: 15px 24px 23px; }
  .auth-head { margin-bottom: 15px; }
  .auth-input input { min-height: 47px; }
}
@media (max-width: 350px) {
  .screen { padding-left: 13px; padding-right: 13px; }
  .screen.banded { padding-left: 0; padding-right: 0; }
  .home-hero { padding-left: 13px; padding-right: 13px; margin-left: -13px; margin-right: -13px; min-height: 185px; }
  .home-hero .hero h1 { font-size: 27px; }
  .home-hero .hero p { font-size: 11px; }
  .band h1, .transit-screen .band h1, .search-screen .band h1 { font-size: 22px; }
  .auth-head img { width: 115px; }
  .sheet .auth-head h2 { font-size: 23px; }
  .sheet.auth-sheet { padding-left: 15px; padding-right: 15px; }
}
/* Keep the original auto/dark preferences functional. */
:root[data-theme="dark"] { --paper: #0c1526; }
:root[data-theme="dark"] .band-body, :root[data-theme="dark"] .screen.lugares { background: var(--paper); }
:root[data-theme="dark"] .auth-input input { background: var(--paper); }
:root[data-theme="dark"] .oauth-btn, :root[data-theme="dark"] .quick2 .qcard { background: #1d3150; color: #eaf0f8; }
:root[data-theme="dark"] .tabs, :root[data-theme="dark"] .searchbox { border-color: var(--line); }
:root[data-theme="dark"] .awake-note { background: #342d18; color: #e3d4a6; }
:root[data-theme="dark"] .map-note, :root[data-theme="dark"] .transit-body > .note, :root[data-theme="dark"] .transit-body > [data-lrep], :root[data-theme="dark"] .transit-body > [data-ramal] { background: #1b2d50; color: #bfd4f5; }
:root[data-theme="dark"] .auth-head img, :root[data-theme="dark"] .history-ill, :root[data-theme="dark"] .empty-card.light .ill { opacity: .83; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #0c1526; }
  :root:not([data-theme="light"]) .band-body, :root:not([data-theme="light"]) .screen.lugares { background: var(--paper); }
  :root:not([data-theme="light"]) .oauth-btn, :root:not([data-theme="light"]) .quick2 .qcard { background: #1d3150; color: #eaf0f8; }
  :root:not([data-theme="light"]) .tabs, :root:not([data-theme="light"]) .searchbox { border-color: var(--line); }
  :root:not([data-theme="light"]) .awake-note { background: #342d18; color: #e3d4a6; }
  :root:not([data-theme="light"]) .map-note, :root:not([data-theme="light"]) .transit-body > .note, :root:not([data-theme="light"]) .transit-body > [data-lrep], :root:not([data-theme="light"]) .transit-body > [data-ramal] { background: #1b2d50; color: #bfd4f5; }
}
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }

.place-suggestion .place-icon { margin-bottom: 7px; }

.study-symbol { border-radius: 50%; color: #1671c4; background: #e7f3ff; display: grid; place-items: center; }
.study-symbol svg { width: 27px; height: 27px; fill: #1671c4; stroke: #fff; stroke-width: 1; }
html[lang^="es"] .home-hero .hero h1 { max-width: none; white-space: nowrap; font-size: 30px; }
@media (max-width: 350px) {
  html[lang^="es"] .home-hero .hero h1 { font-size: 26px; }
  .places { margin-left: -13px; margin-right: -13px; padding-left: 13px; padding-right: 13px; }
}
@media (min-width: 700px) { html[lang^="es"] .home-hero .hero h1 { font-size: 37px; } }
.confirm-screen [data-style] button { display: flex; align-items: center; justify-content: center; gap: 8px; }
.confirm-screen [data-style] button svg { width: 17px; height: 17px; }
.confirm-screen [data-style] button[aria-pressed="true"] svg { color: #ffca08; }
.home-hero .hero-img { -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%) !important; mask-image: linear-gradient(90deg, transparent, #000 45%) !important; }
.searchbox:focus-within { border-color: #82b6e0; box-shadow: 0 0 0 2px rgba(46, 127, 196, .12); }

/* iOS/Android: los campos de texto miden 16 px o más; con menos, el iPhone hace zoom al escribir */
input, select, textarea, .input, select.input, .searchbox input, .auth-input input, .prow select, .field input { font-size: 16px !important; }
input::placeholder, textarea::placeholder { text-overflow: ellipsis; }
.prow select { max-width: 48%; min-height: 40px; }
html, body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
.sheet { overscroll-behavior: contain; }

/* Pantalla de bienvenida: tipografía original (Barlow) */
.ob { --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --cond: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif; font-family: var(--font); }
.ob h1 { font: 700 clamp(2.4rem, 10vw, 3.2rem)/.95 var(--cond); letter-spacing: 0; }
.ob p, .ob .btn, .ob .linkbtn { font-family: var(--font); }
.ob p { font-size: 1.08rem; line-height: 1.45; }

/* ===== Pie: redes sociales e información ===== */
.foot { margin-top: 30px; padding-bottom: 8px; }
.foot .sect { margin: 0 0 12px; font-size: 1.12rem; }
.fgrid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.fcard { display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 68px; background: var(--card); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 18px; box-shadow: 0 4px 14px -10px rgba(19, 34, 63, .35); text-decoration: none; color: var(--ink); }
.fcard:active { background: var(--paper); }
.ftile { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.ftile svg { width: 24px; height: 24px; }
.ftile.ig { background: linear-gradient(145deg, #12326F, #071735); }
.ftile.tt { background: linear-gradient(145deg, #1F73D6, #0B3F8C); }
.ftile.xx { background: #0A1230; }
.ftile.info { background: #E3EEFF; color: #1F5FBF; }
.ftile.info svg { width: 25px; height: 25px; }
:root[data-theme="dark"] .ftile.info { background: #1B2D50; color: #8DB7FF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ftile.info { background: #1B2D50; color: #8DB7FF; } }
.ftxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ftxt b { font-size: 1.02rem; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }
.ftxt small { color: var(--muted); font-size: .88rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fgo { width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.fgo svg { width: 18px; height: 18px; }
.fdiv { border: 0; height: 1px; background: var(--line); margin: 22px 0 20px; }
.fseo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 22px; font-size: .86rem; color: var(--muted); }
.fseo a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.fcopy { margin: 12px 0 0; text-align: center; font-size: .8rem; color: var(--muted); }

/* ===== Emergencia (SOS) ===== */
.sos-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: #D93A26; color: #fff; font: 800 .88rem var(--font); letter-spacing: .02em; padding: 9px 14px 9px 11px; min-height: 40px; box-shadow: 0 8px 18px -8px rgba(217, 58, 38, .85); cursor: pointer; }
.sos-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sos-btn:active { transform: scale(.97); }
.home-hero .sos-btn { position: absolute; right: 20px; top: 2px; z-index: 4; }
.trip-head .sos-btn { margin-left: auto; margin-right: 10px; }
.sos-h { display: flex; align-items: center; gap: 10px; color: #D93A26; margin-bottom: 6px; } .sos-h svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sos-calls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 4px; }
.sos-call { display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 76px; border-radius: 16px; color: #fff; text-decoration: none; }
.sos-call.pol { background: #1F5FBF; } .sos-call.bom { background: #D93A26; } .sos-call.sam { background: #0A8754; } .sos-call.l100 { background: #7A3FA6; }
.sos-num { font: 800 1.9rem/1 var(--cond); letter-spacing: .02em; }
.sos-lbl { flex: 1; min-width: 0; display: flex; flex-direction: column; } .sos-lbl b { font-size: .95rem; } .sos-lbl small { opacity: .92; font-size: .74rem; line-height: 1.2; }
.sos-call > svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sos-h3 { font-size: 1.05rem; margin: 18px 0 6px; } .sos-loc { font-size: .9rem; color: var(--muted); margin: 0 0 8px; }
.sos-contact { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.sos-contact > div { flex: 1; min-width: 0; } .sos-contact small { display: block; color: var(--muted); }
.sos-mini { font-weight: 700; text-decoration: none; padding: 11px 12px; border-radius: 12px; background: #E3EEFF; color: #1F5FBF; font-size: .9rem; } .sos-mini.wa { background: #DFF5EA; color: #0A8754; }
.sos-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; } .sos-row .btn { flex: 1 1 auto; width: auto; min-width: 120px; margin: 0; }
.btn.sos-siren { background: #D93A26; color: #fff; margin-top: 10px; } .btn.sos-siren.on { background: #7a1d12; }
/* SOS: ajustes de posición y ancho */
.sos-calls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sos-call { min-width: 0; padding: 12px 10px; gap: 8px; }
.sos-num { font-size: 1.65rem; } .sos-lbl b { font-size: .92rem; } .sos-lbl small { overflow-wrap: anywhere; }
.sos-call > svg { width: 18px; height: 18px; }
.home-hero .sos-btn { top: calc(env(safe-area-inset-top, 0px) * 0 + 8px); }
.home-hero .sos-btn { top: 16px; }

/* ===== Compartir en vivo + SOS arriba a la izquierda ===== */
.home-top { position: relative; z-index: 4; display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.home-top .brand { margin: 0; }
.home-top .sos-btn { position: static; top: auto; right: auto; min-height: 36px; padding: 6px 13px 6px 9px; font-size: .8rem; }
.home-top .sos-btn svg { width: 18px; height: 18px; }
.pill.live { background: #DFF5EA; color: #0A8754; font-weight: 700; }
.pill.live .dot { width: 8px; height: 8px; border-radius: 50%; background: #0A8754; display: inline-block; margin-right: 6px; animation: pulse2 1.6s infinite; }
.live-list { margin: 10px 0 16px; padding-left: 20px; color: var(--ink-2); } .live-list li { margin: 7px 0; }
.live-on { display: flex; align-items: center; gap: 8px; color: #0A8754; font-weight: 700; margin: 4px 0 12px; }
.live-on i { width: 10px; height: 10px; border-radius: 50%; background: #0A8754; animation: pulse2 1.6s infinite; }
.live-link .input { margin-bottom: 10px; }
