/* Componentes y valores de Referencias/stitch/code.html; compilados localmente sin CDN. */
@font-face{font-family:'Plus Jakarta Sans';src:url('/vendor/fonts/jakarta.ttf') format('truetype');font-weight:200 800;font-display:swap}
@font-face{font-family:Inter;src:url('/vendor/fonts/inter.ttf') format('truetype');font-weight:100 900;font-display:swap}
@font-face{font-family:'Material Symbols Outlined';src:url('/vendor/fonts/material-symbols.ttf') format('truetype');font-weight:400;font-display:block}
:root{color-scheme:light;--primary:#00685f;--on-surface:#0d1c2f;--on-surface-variant:#3d4947;--surface:#f8f9ff;--surface-container-low:#eff4ff;--surface-container-high:#dde9ff;--outline-variant:#bcc9c6;--secondary-container:#6df5e1}
*{box-sizing:border-box}body{margin:0;background:#e6eeff;color:var(--on-surface);font-family:'Plus Jakarta Sans',sans-serif}button,summary,a{-webkit-tap-highlight-color:transparent}button{border:0;cursor:pointer;font:600 14px/18px Inter,sans-serif;color:var(--primary)}button:disabled{opacity:.5;cursor:default}a{color:var(--primary)}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #195cd1;outline-offset:2px}[hidden]{display:none!important}p,h1,h2{margin:0}h2{overflow-wrap:anywhere}
.material-symbols-outlined{font-family:'Material Symbols Outlined';font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;font-feature-settings:'liga';-webkit-font-smoothing:antialiased;flex-shrink:0}
.headline-sm{font-family:'Plus Jakarta Sans',sans-serif;font-size:18px;font-weight:600;line-height:24px;letter-spacing:-.01em}.body-sm{font-size:13px;font-weight:400;line-height:18px}.label-lg{font-family:Inter,sans-serif;font-size:14px;font-weight:600;line-height:18px;letter-spacing:.01em}
.app{max-width:560px;height:100dvh;margin:auto;display:flex;flex-direction:column;overflow:hidden;background:var(--surface);padding-top:env(safe-area-inset-top);padding-bottom:calc(66px + env(safe-area-inset-bottom))}
.topbar{height:64px;flex:0 0 64px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;background:rgba(248,249,255,.9);backdrop-filter:blur(24px);box-shadow:0 4px 16px rgba(13,28,47,.04);position:relative;z-index:1100}.brand{display:flex;align-items:center;gap:4px}.brand-icon{font-size:20px;color:var(--primary)}
.icon-button{width:48px;height:48px;flex:0 0 48px;display:flex;align-items:center;justify-content:center;border-radius:9999px;padding:0;background:transparent;color:var(--on-surface)}.icon-button:active,.map-pill:active{transform:scale(.98)}
.notice-bar{padding:8px 12px 4px;background:var(--surface-container-low);flex-shrink:0}.mode{padding:4px 10px;border-radius:4px;background:var(--surface-container-high);display:flex;gap:6px;align-items:center;font:600 12px/16px Inter,sans-serif;color:var(--on-surface-variant)}.mode .material-symbols-outlined{font-size:16px}.notice{flex-shrink:0;padding:8px 12px;font-size:13px;line-height:18px;background:var(--surface-container-low)}
.map-area{position:relative;flex:1;min-height:120px}#map{position:absolute;inset:0;background:#eff4f1}.map-controls{position:absolute;right:12px;top:12px;z-index:800;display:flex;flex-direction:column;gap:8px}.floating{background:#fff;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)}#locate{color:var(--primary)}#locate .material-symbols-outlined{font-size:26px}.map-pill{position:absolute;left:12px;top:12px;z-index:800;display:flex;gap:6px;align-items:center;border-radius:9999px;min-height:48px;padding:8px 12px;background:white;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);font:600 12px/16px Inter,sans-serif}.map-pill .material-symbols-outlined{font-size:18px}
.drawer{position:relative;z-index:900;flex-shrink:0;margin-top:-16px;background:white;border-radius:24px 24px 0 0;box-shadow:0 -8px 24px -4px rgba(4,47,46,.1);padding:4px 12px 24px;max-height:45dvh;overflow:auto}.handle-space{padding:8px 0;display:flex;justify-content:center}.drag-handle{width:40px;height:4px;border-radius:9999px;background:rgba(188,201,198,.6)}.section-heading{display:flex;align-items:center;gap:8px;margin-bottom:8px}.section-heading .material-symbols-outlined{font-size:22px;color:var(--primary)}.hint{color:var(--on-surface-variant);padding-left:30px}.stop-card{background:var(--surface-container-low);padding:16px;border-radius:16px;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1),0 0 0 2px rgba(0,104,95,.2)}.heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.heading h2{flex:1}.heading .icon-button{color:var(--primary);margin:-8px -8px -8px 0}.arrival-row{background:white;padding:12px;border-radius:12px;display:flex;align-items:center;gap:12px;box-shadow:0 1px 2px rgba(0,0,0,.05)}.line-icon{width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:var(--primary);color:white;border-radius:6px}.line-content{min-width:0}.lines{font:600 14px/20px Inter,sans-serif;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--primary);margin-top:4px}.caution{color:var(--on-surface-variant);margin-top:12px}
.secondary-menu summary{list-style:none;cursor:pointer}.secondary-menu summary::-webkit-details-marker{display:none}.menu-card{position:absolute;right:12px;top:60px;width:min(340px,calc(100vw - 24px));max-height:calc(100dvh - 150px - env(safe-area-inset-bottom));overflow:auto;padding:12px;background:white;border-radius:16px;box-shadow:0 8px 24px rgba(13,28,47,.16);font:13px/18px Inter,sans-serif}.menu-link{display:flex;align-items:center;min-height:48px;padding:12px;border-radius:12px;background:var(--surface-container-low);font-weight:600;text-decoration:none}.source-details>summary{padding:14px 12px;min-height:48px;color:var(--primary);font-weight:600}.source-details>summary:after{content:' +';float:right}.source-details[open]>summary:after{content:' −'}.source-details p{margin:8px 12px;overflow-wrap:anywhere;font-size:12px;line-height:18px}.legend{display:flex;flex-wrap:wrap;gap:12px;margin:12px;font-size:12px}.legend span{display:inline-flex;gap:6px;align-items:center}
.attribution{position:fixed;z-index:2000;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,560px);padding:8px 12px calc(8px + env(safe-area-inset-bottom));background:white;font:11px/1.65 Inter,sans-serif;box-shadow:0 -1px 8px rgba(13,28,47,.07)}.attribution a{text-decoration:underline;text-underline-offset:2px}.map-error p{margin:0}.map-error button{min-height:48px;padding:8px 12px;border-radius:9999px;background:white;margin-top:4px}
.stop-pin,.user-pin{display:flex;align-items:center;justify-content:center;background:transparent;border:0}.stop-pin span{width:18px;height:18px;border:3px solid white;background:var(--primary);border-radius:50%;box-shadow:0 1px 5px rgba(13,28,47,.44)}.stop-pin.selected span{outline:4px solid var(--secondary-container)}.user-pin span{width:18px;height:18px;background:#195cd1;border:3px solid white;transform:rotate(45deg);box-shadow:0 1px 4px #0007}.stop-key,.user-key{display:inline-block;width:10px;height:10px;background:var(--primary);border-radius:50%}.user-key{background:#195cd1;transform:rotate(45deg);border-radius:0}.leaflet-container{font-family:Inter,sans-serif}

/* SVG locales: el tamaño no depende de nombres de iconos ni ligaduras de fuente. */
.app-icon{display:inline-flex;width:24px;height:24px;flex:0 0 24px;align-items:center;justify-content:center;vertical-align:middle}
.app-icon svg{display:block;width:100%;height:100%;overflow:hidden}
.brand .app-icon{color:var(--primary);width:24px;height:24px}
.simulation-pin .app-icon{width:24px;height:24px}

/* Horarios L5: se reutilizan las tarjetas y tipografía del diseño exportado. */
.schedule-controls{display:grid;gap:8px;margin-bottom:12px;font:12px/18px Inter,sans-serif}.schedule-controls input{min-height:48px;min-width:0;width:100%;border:1px solid var(--outline-variant);border-radius:12px;padding:8px 12px;font:14px/20px Inter,sans-serif;background:white;color:var(--on-surface)}.schedule-controls .menu-link{border:0;width:100%}.departures-list{display:grid;gap:8px;margin-top:12px}.departure{width:100%;text-align:left;color:var(--on-surface);min-height:60px}.departure strong{color:var(--primary);font:600 18px/24px Inter,sans-serif}.departure .line-content{display:grid;gap:4px}.route-stops{padding-left:24px;margin:12px 0 0;font:13px/20px Inter,sans-serif}.route-stops li{padding:6px 0;overflow-wrap:anywhere}.current-stop{font-weight:700;color:var(--primary)}

/* La lista se desplaza dentro de la ficha; encabezado y vuelta permanecen visibles. */
.route-open .drawer{height:45dvh;display:flex;flex-direction:column;overflow:hidden}
.route-open .handle-space,.route-open .heading{flex-shrink:0}
.route-open #stopSheet,.route-open .stop-card,.route-open #routePanel{display:flex;flex-direction:column;flex:1;min-height:0}
#routePass,#routeLabel,#backToStop{flex-shrink:0}
#routePass{color:var(--on-surface)}#routeLabel{color:var(--primary);margin:4px 0 8px}
.route-stops{position:relative;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;list-style:none;padding:0;margin:12px 0 0}
.route-stops .route-stop{padding:12px;gap:12px;margin-bottom:8px;align-items:center;min-height:48px}
.route-stop-name{flex:1;min-width:0;font:600 14px/18px Inter,sans-serif}
.route-stop-time{flex-shrink:0;text-align:right;color:var(--primary);font:600 14px/18px Inter,sans-serif;font-variant-numeric:tabular-nums}
.route-stop-day{display:block;color:var(--on-surface-variant);font-size:10px;line-height:14px}
.route-stops .current-stop{background:var(--surface-container-high);box-shadow:inset 3px 0 var(--primary)}
@media(max-height:650px){.route-open .drawer{height:55dvh;max-height:55dvh}}

/* Símbolo propio para la simulación; no comparte forma con usuario ni paradas. */
.simulation-pin{position:relative;display:flex;align-items:center;justify-content:center;background:#233144;color:white;border:2px dashed var(--secondary-container);border-radius:10px;box-shadow:0 2px 6px rgba(13,28,47,.25)}
.simulation-pin .material-symbols-outlined{font-size:22px}
.simulation-badge{position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);padding:0 3px;background:#233144;color:white;border-radius:3px;font:700 8px/12px Inter,sans-serif}
.simulation-overlay{position:absolute;z-index:850;left:12px;right:76px;bottom:24px;max-height:calc(100% - 76px);overflow:auto;padding:8px;border-radius:12px;background:rgba(255,255,255,.96);box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);pointer-events:auto}
.route-open #simulationControls{flex-shrink:0}
.route-open .drawer{height:60dvh;max-height:60dvh}
.route-open .route-stops{min-height:96px}
@media(max-height:650px){
  .route-open .drawer{height:calc(100dvh - 270px);max-height:calc(100dvh - 270px);overflow-y:auto;display:block}
  .route-open #stopSheet,.route-open .stop-card,.route-open #routePanel{flex:none}
  .route-open .route-stops{height:160px;flex:none}
}
