:root{--red:#b82027;--red-dark:#8e171d;--green:#84d20f;--ink:#17191d;--muted:#68707b;--line:#e7e9ed;--surface:#fff;--bg:#f4f5f7;--shadow:0 8px 24px rgb(25 31 40 / .12);--radius:18px;--appbar:60px}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:76px}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg);line-height:1.5}button,a{font:inherit}button{cursor:pointer}.skip-link{position:fixed;left:12px;top:-60px;z-index:60;background:#fff;padding:10px 14px;border-radius:10px;color:#000}.skip-link:focus{top:10px}.appbar{height:var(--appbar);position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;padding:0 12px;background:rgb(255 255 255 / .96);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}.brand{display:flex;flex-direction:column;align-items:center;line-height:1.1}.brand strong{font-size:.9rem;letter-spacing:.06em}.brand span{font-size:.72rem;color:var(--muted);margin-top:4px}.icon-button{width:44px;height:44px;border:0;border-radius:12px;background:transparent;font-size:1.35rem;color:var(--ink)}.icon-button:hover{background:#f0f1f3}.icon-button:focus-visible,.drawer a:focus-visible,.direction-tabs button:focus-visible,.line-picker button:focus-visible,.map-toggle:focus-visible,.schedule-tabs button:focus-visible,.stops-track button:focus-visible{outline:3px solid #47a9ce;outline-offset:2px}.drawer-overlay{position:fixed;inset:0;z-index:39;background:rgb(0 0 0 / .38)}.drawer{position:fixed;z-index:40;top:0;left:0;width:min(84vw,340px);height:100dvh;background:#fff;box-shadow:18px 0 40px rgb(0 0 0 / .2);transform:translateX(-105%);transition:transform .22s ease;display:flex;flex-direction:column}.drawer.open{transform:translateX(0)}.drawer-head{height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 14px 0 20px;border-bottom:1px solid var(--line)}.drawer nav{padding:10px;display:grid;gap:4px}.drawer a{display:flex;align-items:center;min-height:48px;padding:0 14px;border-radius:12px;color:var(--ink);text-decoration:none;font-weight:650}.drawer a:hover{background:#f4f5f7}.drawer a[href="#linea"]:nth-of-type(3){background:#fff1f2;color:var(--red)}main{width:min(1120px,100%);margin:0 auto;padding:16px}.hero{background:linear-gradient(135deg,#fff 0%,#fff 55%,#fbecef 100%);border:1px solid var(--line);border-left:6px solid var(--red);border-radius:var(--radius);padding:22px;display:flex;align-items:center;justify-content:space-between;box-shadow:var(--shadow)}.hero h1{font-size:clamp(1.8rem,6vw,3rem);margin:.1em 0}.hero p:last-child{margin:0;color:var(--muted)}.eyebrow{font-size:.72rem;font-weight:800;letter-spacing:.12em;color:var(--red);margin:0 0 4px}.route-badge{width:68px;height:68px;border-radius:50%;display:grid;place-items:center;background:var(--red);color:#fff;font-size:1.45rem;font-weight:900;box-shadow:0 9px 24px rgb(184 32 39 / .28)}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px;margin-top:16px;box-shadow:0 4px 16px rgb(25 31 40 / .06)}.section-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.section-title-row h2,.info h2{margin:.1em 0 0;font-size:1.35rem}.status-dot,.schedule-place{font-size:.76rem;color:var(--muted);background:#f2f3f5;border-radius:999px;padding:6px 9px}.line-picker{display:flex;gap:8px;overflow-x:auto;padding:14px 2px 10px;scrollbar-width:thin}.line-picker button{flex:0 0 auto;min-width:44px;height:44px;border-radius:50%;border:1px solid #d7dbe1;background:#fff}.line-picker button.selected{background:var(--red);border-color:var(--red);color:#fff;font-weight:800;box-shadow:0 5px 12px rgb(184 32 39 / .24)}.route-heading{margin:14px -18px -4px;padding:16px 18px;border-top:1px solid var(--line)}.route-heading>div{display:flex;gap:12px;align-items:center}.line-number{min-width:46px;height:36px;padding:0 12px;border-radius:10px;background:#1e2227;color:#fff;display:grid;place-items:center;font-weight:800}.route-heading small{display:block;color:var(--muted);font-weight:500;margin-top:3px}.direction-tabs,.schedule-tabs{display:grid;grid-template-columns:1fr 1fr;gap:0;margin-top:14px;border-radius:12px;overflow:hidden;border:1px solid var(--line)}.direction-tabs button,.schedule-tabs button{min-height:48px;border:0;background:#f1f2f4;font-weight:800;color:#555}.direction-tabs button.active,.schedule-tabs button.active{background:var(--red);color:#fff}.scroll-hint{font-size:.75rem;color:var(--muted);white-space:nowrap}.stops-scroll{overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;padding:18px 4px 12px;position:relative}.stops-track{list-style:none;display:flex;min-width:max-content;padding:0;margin:0}.stops-track li{position:relative;width:150px;padding-top:25px}.stops-track li:not(:last-child)::after{content:"";position:absolute;top:10px;left:50%;right:-50%;height:3px;background:#aeb5be}.stops-track li::before{content:"";position:absolute;z-index:2;top:3px;left:calc(50% - 8px);width:16px;height:16px;border-radius:50%;background:var(--red);border:3px solid #fff;box-shadow:0 0 0 1px var(--red)}.stops-track button{width:100%;min-height:62px;border:0;background:transparent;padding:6px 8px;text-align:center}.stops-track button span{display:block;color:var(--muted);font-size:.7rem}.stops-track button strong{font-size:.84rem}.stops-track button:hover strong{color:var(--red)}.data-note{font-size:.78rem;color:var(--muted);margin:8px 0 0}.map-panel{padding:0;overflow:hidden}.map-toggle{width:100%;min-height:52px;border:0;background:var(--green);color:#184b0b;font-weight:900;display:flex;align-items:center;justify-content:space-between;padding:0 18px}.map-toggle .chevron{font-size:1.35rem;transition:transform .2s}.map-toggle[aria-expanded="true"] .chevron{transform:rotate(180deg)}.map-content{padding:18px}.map-inner-title{margin-bottom:12px}#mapStatus{font-size:.74rem;color:var(--muted)}#leafletMap{height:min(52vh,430px);min-height:300px;border-radius:14px;background:#e9ecef;overflow:hidden}.timetable-wrap{overflow-x:auto;margin-top:12px}.timetable-wrap table{border-collapse:collapse;width:100%;min-width:650px;font-size:.86rem}.timetable-wrap caption{text-align:left;font-weight:800;padding:8px 0 10px}.timetable-wrap th,.timetable-wrap td{border:1px solid #d9dde3;padding:10px 12px;vertical-align:top}.timetable-wrap thead th{background:#f1f3f5}.timetable-wrap tbody th{background:#fafafa;width:140px}.reference-details{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}.reference-details summary{cursor:pointer;font-weight:750}.reference-details img{display:block;width:100%;height:auto;margin-top:12px;border-radius:12px;border:1px solid var(--line)}.info p{max-width:72ch}.toast{position:fixed;z-index:55;left:50%;bottom:24px;transform:translateX(-50%);max-width:min(90vw,460px);background:#111;color:#fff;padding:11px 15px;border-radius:12px;box-shadow:var(--shadow);font-size:.9rem}.leaflet-container{font:inherit}.leaflet-popup-content{margin:10px 12px}.leaflet-control-attribution{font-size:10px}
@media (min-width:760px){main{padding:24px}.panel{padding:24px}.route-heading{margin:18px -24px -6px;padding:18px 24px}.hero{padding:28px}.direction-tabs{max-width:430px}.schedule-tabs{max-width:430px}.drawer{width:310px}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.drawer,.map-toggle .chevron{transition:none}}

.hero-selector{cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}.hero-selector:hover{transform:translateY(-1px);box-shadow:0 11px 28px rgb(25 31 40 / .16)}.hero-selector:focus-visible{outline:3px solid #47a9ce;outline-offset:3px}.modal-backdrop{position:fixed;inset:0;z-index:70;background:rgb(0 0 0 / .48);display:grid;place-items:center;padding:20px}.modal-backdrop[hidden]{display:none}.network-modal{width:min(92vw,440px);background:#fff;border-radius:20px;box-shadow:0 24px 70px rgb(0 0 0 / .28);padding:18px}.network-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.network-modal-head h2{margin:.1em 0 0;font-size:1.45rem}.network-options{display:grid;gap:10px}.network-option{width:100%;min-height:72px;border:1px solid var(--line);border-radius:14px;background:#fff;display:grid;grid-template-columns:1fr auto;grid-template-areas:"city check" "type check";text-align:left;padding:13px 14px;align-items:center}.network-option span:first-child{grid-area:city;color:var(--muted);font-size:.82rem}.network-option strong{grid-area:type;font-size:1.08rem}.network-check{grid-area:check;width:32px;height:32px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;font-weight:900}.network-option:focus-visible,.network-modal .icon-button:focus-visible{outline:3px solid #47a9ce;outline-offset:2px}@media (prefers-reduced-motion:reduce){.hero-selector{transition:none}}

/* Parada seleccionada en el mapa */
.stops-track button.map-selected-stop{outline:3px solid #b82027;outline-offset:3px;border-radius:8px}
.stops-track button{cursor:pointer}

/* busmurcia15: mapa siempre visible y con fallback */
#leafletMap{height:450px!important;min-height:450px;background:#e9edf1}
#mapContent[hidden]{display:block!important}
#mapToggle .chevron{display:none}
#mapFallback{background:#e9edf1}

/* busmurcia19 · Horarios tipo tabla de parada */
.schedule-panel .schedule-place{
  font-weight:700;
  letter-spacing:.02em;
}
.schedule-sheet{
  margin-top:18px;
  border:1px solid #d7dce2;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
}
.schedule-sheet-head{
  padding:14px 18px 12px;
  text-align:center;
  border-bottom:1px solid #d7dce2;
}
.schedule-sheet-head strong{
  display:block;
  font-size:1.35rem;
  color:#27311f;
}
.schedule-sheet-head span{
  display:block;
  margin-top:4px;
  font-size:1rem;
  font-weight:700;
  color:#45513d;
}
.schedule-columns{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  padding:18px;
  align-items:start;
}
.day-schedule{
  border:1px solid #cfd5dc;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}
.day-schedule h3{
  margin:0;
  padding:13px 8px;
  text-align:center;
  font-size:1.05rem;
  color:#314329;
  border-bottom:1px solid #cfd5dc;
  background:#fafbfa;
}
.day-schedule table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}
.day-schedule th,
.day-schedule td{
  border-right:1px solid #d7dce2;
  border-bottom:1px solid #d7dce2;
  text-align:center;
  padding:6px 4px;
}
.day-schedule th:last-child,
.day-schedule td:last-child{border-right:0}
.day-schedule tbody tr:last-child td{border-bottom:0}
.day-schedule th{
  font-size:.88rem;
  font-weight:800;
  background:#f3f5f7;
}
.day-schedule td{
  font-size:.9rem;
  font-weight:650;
  line-height:1.15;
}
@media (max-width:800px){
  .schedule-columns{grid-template-columns:1fr;gap:14px;padding:14px}
  .schedule-sheet{border-radius:14px}
}

/* busmurcia23 · Horario oficial sincronizado con la línea */
.official-schedule-card{
  margin-top:18px;
  border:1px solid #d8dde3;
  border-radius:18px;
  padding:22px;
  background:#fff;
}
.official-schedule-line{
  display:flex;
  align-items:center;
  gap:16px;
}
.official-schedule-number{
  display:grid;
  place-items:center;
  min-width:64px;
  height:64px;
  padding:0 10px;
  border-radius:14px;
  background:#be242a;
  color:#fff;
  font-weight:800;
  font-size:1.15rem;
}
.official-schedule-line strong{
  display:block;
  font-size:1.05rem;
  line-height:1.4;
}
.official-schedule-line p{
  margin:6px 0 0;
  color:#596574;
}
.official-schedule-actions{
  margin-top:20px;
}
.official-schedule-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:0 20px;
  border-radius:12px;
  background:#be242a;
  color:#fff !important;
  text-decoration:none;
  font-weight:800;
}
.official-schedule-link:hover{
  filter:brightness(.95);
}
.official-schedule-note{
  margin:16px 0 0;
  font-size:.9rem;
  line-height:1.5;
  color:#667281;
}
@media (max-width:650px){
  .official-schedule-card{padding:16px}
  .official-schedule-line{align-items:flex-start}
  .official-schedule-number{min-width:54px;height:54px}
  .official-schedule-link{width:100%}
}

.site-credit{
  width:100%;
  padding:22px 16px 26px;
  text-align:center;
  font-size:.85rem;
  font-weight:600;
  color:#6b7280;
  letter-spacing:.03em;
}

.footer-feedback{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  padding:26px 16px 0;
  font-size:.92rem;
}
.footer-feedback-link{
  color:#4f5965;
  text-decoration:none;
  font-weight:700;
}
.footer-feedback-link:hover,
.footer-feedback-link:focus-visible{
  color:#b72027;
  text-decoration:underline;
}
.footer-feedback-separator{
  color:#a0a7af;
}
.site-credit{
  padding-top:12px;
}

.info-report{
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid #e1e5e9;
}
.info-report-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 18px;
  border:1px solid #b72027;
  border-radius:10px;
  color:#b72027;
  background:#fff;
  text-decoration:none;
  font-size:.86rem;
  font-weight:800;
  letter-spacing:.04em;
}
.info-report-link:hover,
.info-report-link:focus-visible{
  background:#b72027;
  color:#fff;
}

/* busmurcia29 · Redes Urbanas/Pedanías */#mapa[hidden],
#horarios[hidden]{
  display:none !important;
}

/* busmurcia30 · conservar selector circular original */
.line-picker{
  display:flex;
  flex-wrap:nowrap;
  gap:8px;
  overflow-x:auto;
  padding:14px 2px 10px;
}
.line-picker button{
  flex:0 0 44px;
  width:44px;
  min-width:44px;
  height:44px;
  padding:0;
  border-radius:50%;
}

/* busmurcia37 · Horarios L36 Pedanías */
.data-schedule-card{margin-top:14px}
.data-schedule-card[hidden]{display:none!important}
#dataScheduleCard .schedule-tabs{
  max-width:580px;
  margin-top:0;
  margin-bottom:20px;
}
#dataScheduleCard .schedule-sheet{
  margin-top:0;
  border:1px solid #d7dce2;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
}
#dataScheduleCard .schedule-sheet-head{
  padding:16px 18px 14px;
  text-align:center;
  border-bottom:1px solid #d7dce2;
}
#dataScheduleCard .schedule-sheet-head strong{
  display:block;
  font-size:1.35rem;
}
#dataScheduleCard .schedule-sheet-head span{
  display:block;
  margin-top:6px;
  font-size:1rem;
  font-weight:800;
}
#dataScheduleCard .schedule-columns{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:20px!important;
  padding:20px!important;
  align-items:start;
}
#dataScheduleCard .day-schedule{
  border:1px solid #cfd5dc;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}
#dataScheduleCard .day-schedule h3{
  margin:0;
  padding:14px 8px;
  text-align:center;
  font-size:1rem;
  border-bottom:1px solid #cfd5dc;
  background:#fafafa;
}
#dataScheduleCard .day-schedule table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}
#dataScheduleCard .day-schedule th,
#dataScheduleCard .day-schedule td{
  width:50%;
  padding:6px 4px;
  text-align:center;
  border-right:1px solid #d7dce2;
  border-bottom:1px solid #d7dce2;
  white-space:nowrap;
}
#dataScheduleCard .day-schedule th:last-child,
#dataScheduleCard .day-schedule td:last-child{border-right:0}
#dataScheduleCard .day-schedule tbody tr:last-child td{border-bottom:0}
#dataScheduleCard .day-schedule th{
  background:#f1f3f5;
  font-size:.84rem;
  font-weight:800;
}
#dataScheduleCard .day-schedule td{
  font-size:.9rem;
  font-weight:700;
}
@media (max-width:850px){
  #dataScheduleCard .schedule-columns{
    grid-template-columns:1fr!important;
    gap:14px!important;
    padding:14px!important;
  }
}

/* busmurcia38 · horario vinculado a la parada seleccionada */
#dataScheduleIdaBtn:disabled,
#dataScheduleVueltaBtn:disabled{
  opacity:.55;
  cursor:not-allowed;
}
.schedule-empty-state{
  margin-top:0;
  min-height:300px;
  border:1px solid #d7dce2;
  border-radius:18px;
  background:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:34px 20px;
}
.schedule-empty-label{
  display:block;
  margin-bottom:14px;
  font-size:.88rem;
  font-weight:800;
  color:#596574;
  text-transform:uppercase;
}
.schedule-empty-state strong{
  display:block;
  font-size:1.2rem;
  margin-bottom:8px;
}
.schedule-empty-state p{
  max-width:520px;
  margin:0;
  color:#667281;
  line-height:1.5;
}

/* busmurcia39 · Selector modal de líneas para Murcia - Pedanías */
#linea{
  position:relative;
}
body:has(.network-option[data-network="pedanias"].selected) #linea{
  cursor:pointer;
}
body:has(.network-option[data-network="pedanias"].selected) #linea:hover{
  border-color:#d7dbe1;
}
.line-selector-modal{
  width:min(94vw,720px)!important;
  max-height:min(86vh,760px);
  display:flex;
  flex-direction:column;
}
.line-selector-options{
  display:grid;
  gap:10px;
  overflow-y:auto;
  padding-right:4px;
  overscroll-behavior:contain;
}
.line-selector-option{
  width:100%;
  min-height:72px;
  border:1px solid #e1e5e9;
  border-radius:14px;
  background:#fff;
  display:grid;
  grid-template-columns:52px minmax(0,1fr) 34px;
  align-items:center;
  gap:14px;
  padding:12px 14px;
  text-align:left;
  cursor:pointer;
}
.line-selector-option:hover,
.line-selector-option:focus-visible{
  border-color:#b72027;
  background:#fffafa;
}
.line-selector-option.selected{
  border-color:#b72027;
  background:#fff7f7;
}
.line-selector-number{
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border-radius:50%;
  border:1px solid #d7dbe1;
  background:#fff;
  font-weight:800;
  color:#1d2125;
}
.line-selector-option.selected .line-selector-number{
  background:#b72027;
  border-color:#b72027;
  color:#fff;
}
.line-selector-text{
  min-width:0;
  font-size:.95rem;
  line-height:1.35;
  font-weight:700;
  color:#202428;
}
.line-selector-check{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:50%;
  background:#b72027;
  color:#fff;
  font-weight:800;
}
@media (max-width:600px){
  .line-selector-modal{
    width:min(96vw,720px)!important;
    max-height:88vh;
    padding:14px!important;
  }
  .line-selector-option{
    grid-template-columns:44px minmax(0,1fr) 28px;
    gap:10px;
    padding:10px;
  }
  .line-selector-number{
    width:40px;
    height:40px;
  }
  .line-selector-text{
    font-size:.88rem;
  }
}







/* busmurcia45: recorrido de cabecera con la misma negrita visual que RECORRIDO / Paradas */
.hero p,
.hero .subtitle,
.hero-subtitle,
.route-name {
  font-weight: 800 !important;
  color: #111317 !important;
  opacity: 1 !important;
}

/* busmurcia47 · horarios L01 consultados directamente en TMP */
.schedule-loading-state{min-height:240px}
.no-service-cell{
  padding:18px 8px!important;
  font-weight:800!important;
  color:#667281!important;
  background:#fafafa!important;
}

/* busmurcia48 · estado de horario TMP siempre visible */
.schedule-source-link{
  margin-top:18px;
}
#dataScheduleContent:empty::before{
  content:"Cargando horario…";
  display:block;
  min-height:180px;
  padding:40px 20px;
  text-align:center;
  color:#667281;
}

/* busmurcia49 · acceso oficial TMP permanente */
.permanent-tmp-actions{
  display:flex;
  justify-content:center;
  margin-top:18px;
}
.permanent-tmp-link{
  min-width:220px;
}
@media (max-width:650px){
  .permanent-tmp-actions{
    display:block;
  }
  .permanent-tmp-link{
    width:100%;
  }
}

/* busmurcia53 · cache local de horarios */
.schedule-cache-note{
  margin:14px auto 0;
  text-align:center;
  color:#667281;
  font-size:.85rem;
}

/* busmurcia56 · horarios locales instantáneos */
.schedule-empty-state .permanent-tmp-link{
  margin-top:18px;
}

/* busmurcia59 · base de horarios 100% local */
.no-data-cell{
  padding:18px 8px!important;
  font-weight:800!important;
  color:#667281!important;
  background:#fafafa!important;
}
