#busmap-root{
    --sea:#C9DCEA; --land:#F2EFE7; --bord:#B9C4CE; --grid:#AFC8DA;
    --bg:#EDF1F4; --panelbg:#FFFFFF; --ink:#1A2530; --muted:#5D6B77;
    --border:#D3DCE2; --hl:#101820; --chipbg:#E3E9EE; --halo:#F2EFE7;
    --warn:#C43A2E; --shadow:0 8px 28px rgba(16,30,42,.15);
  }
  @media (prefers-color-scheme: dark){
    #busmap-root{
      --sea:#0E1726; --land:#223862; --bord:rgba(255,255,255,.75); --grid:#31517C;
      --bg:#0D141B; --panelbg:#131C24; --ink:#EAF0F6; --muted:#93A3B4;
      --border:#243039; --hl:#FFFFFF; --chipbg:#1D2933; --halo:#223862;
      --warn:#FF7A6B; --shadow:0 8px 28px rgba(0,0,0,.5);
    }
  }
  :root[data-theme="light"] #busmap-root{
    --sea:#C9DCEA; --land:#F2EFE7; --bord:#B9C4CE; --grid:#AFC8DA;
    --bg:#EDF1F4; --panelbg:#FFFFFF; --ink:#1A2530; --muted:#5D6B77;
    --border:#D3DCE2; --hl:#101820; --chipbg:#E3E9EE; --halo:#F2EFE7;
    --warn:#C43A2E; --shadow:0 8px 28px rgba(16,30,42,.15);
  }
  :root[data-theme="dark"] #busmap-root{
    --sea:#0E1726; --land:#223862; --bord:rgba(255,255,255,.75); --grid:#31517C;
    --bg:#0D141B; --panelbg:#131C24; --ink:#EAF0F6; --muted:#93A3B4;
    --border:#243039; --hl:#FFFFFF; --chipbg:#1D2933; --halo:#223862;
    --warn:#FF7A6B; --shadow:0 8px 28px rgba(0,0,0,.5);
  }
  #busmap-root *{box-sizing:border-box}
  #busmap-root,#busmap-root{height:100%; overscroll-behavior:none}
  #busmap-root{margin:0; background:var(--bg); color:var(--ink);
    font:14px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
    display:flex; flex-direction:column; overflow:hidden}
  
  #busmap-root .seo-idx{position:absolute; width:1px; height:1px; overflow:hidden;
    clip-path:inset(50%); white-space:nowrap}
  #busmap-root .cond{font-family:"Avenir Next Condensed","Arial Narrow",system-ui,sans-serif}

  #busmap-root header{flex:0 0 auto; display:flex; align-items:baseline; gap:14px;
    padding:10px 18px 9px; border-bottom:1px solid var(--border)}
  #busmap-root header h1{font-family:"Avenir Next Condensed","Arial Narrow",system-ui,sans-serif;
    font-size:19px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; margin:0}
  #busmap-root header .sub{color:var(--muted); font-size:12.5px}
  #busmap-root header .tag{margin-left:auto; font-size:10.5px; letter-spacing:.12em; text-transform:uppercase;
    color:var(--muted); border:1px solid var(--border); border-radius:999px; padding:3px 10px; white-space:nowrap}

  #busmap-root .stage{flex:1 1 auto; display:flex; min-height:0; position:relative}
  #busmap-root .mapwrap{flex:1 1 auto; position:relative; min-width:0; overflow:hidden}
  #busmap-root svg{display:block; width:100%; height:100%; cursor:grab; touch-action:none; background:var(--sea);
    user-select:none; -webkit-user-select:none; -webkit-tap-highlight-color:transparent}
  #busmap-root svg.dragging{cursor:grabbing}
  
  #busmap-root svg.pgscroll{touch-action:pan-y}

  
  #busmap-root .GRID path,#busmap-root .GRID line{stroke:var(--grid); stroke-width:.6; fill:none; vector-effect:non-scaling-stroke; opacity:.7}
  #busmap-root .LAND path{fill:var(--land); stroke:none}
  #busmap-root .BORDERS path{fill:none; stroke:var(--bord); stroke-width:.9; vector-effect:non-scaling-stroke}
  #busmap-root svg.z5 .GRID{display:none}

  
  #busmap-root .route .hit{fill:none; stroke:#000; stroke-opacity:0; stroke-width:9; vector-effect:non-scaling-stroke; cursor:pointer; outline:none}
  #busmap-root .route.fout{display:none}
  #busmap-root .route .line{fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
    vector-effect:non-scaling-stroke; pointer-events:none}
  #busmap-root .route.hover .line{stroke-width:3; filter:drop-shadow(0 0 2px var(--hl))}
  #busmap-root .route.sel .line{stroke:var(--hl); stroke-width:3.2}
  
  #busmap-root svg.selmode .route:not(.sel){display:none}
  #busmap-root svg.selmode .city text,#busmap-root svg.selmode .stn text{opacity:.55}
  #busmap-root .route .hit:focus-visible + .line{stroke-width:3.4}

  
  #busmap-root .cp .cs{transform:scale(var(--inv,1))}
  #busmap-root .cp rect.dia{fill:var(--panelbg); stroke:#E8A020; stroke-width:1.6}
  #busmap-root .cp text.cpn{fill:var(--ink); font-size:9px; font-weight:500;
    font-family:"Avenir Next Condensed","Arial Narrow",system-ui,sans-serif; letter-spacing:.03em;
    paint-order:stroke; stroke:var(--halo); stroke-width:3px; stroke-linejoin:round; display:none}
  #busmap-root svg.z2 .cp text.cpn{display:block}
  #busmap-root .cp .chip{display:none}
  #busmap-root .cp.on .chip{display:block}
  #busmap-root .cp .chip rect{fill:var(--ink); rx:4}
  #busmap-root .cp .chip text{fill:var(--bg); font-size:9.5px; font-weight:700;
    font-family:ui-monospace,Menlo,monospace}

  
  
  #busmap-root .bus .cs{transform:scale(var(--invb,var(--inv,1)))}
  #busmap-root .bus{cursor:pointer}
  #busmap-root .bus .halo{fill:currentColor; opacity:.25; transform-origin:0 0; animation:bpulse 2.6s ease-in-out infinite}
  #busmap-root .bus .body{stroke:var(--bg); stroke-width:.9}
  #busmap-root .bus .win{fill:#EAF4FF; opacity:.92}
  #busmap-root .bus .wh{fill:#26313B; stroke:var(--bg); stroke-width:.5}
  #busmap-root .bus .veh{transition:transform 1.1s linear}
  #busmap-root .bus .ok{display:none}
  #busmap-root .bus.ec .ok{display:block}
  #busmap-root .bus.ec .halo{fill:#E8A020; opacity:.45; animation-duration:1.5s}
  #busmap-root .bus.dim{opacity:.55}
  @keyframes bpulse{0%,100%{transform:scale(1);opacity:.28}50%{transform:scale(1.55);opacity:.05}}

  
  #busmap-root .gbus .cs{transform:scale(var(--invb,var(--inv,1)))}
  #busmap-root .gbus{cursor:pointer}
  #busmap-root .gbus .ring{fill:none; stroke:#12A5AA; stroke-width:1.4; transform-origin:0 0;
    animation:gping 2.4s ease-out infinite}
  @keyframes gping{0%{transform:scale(.55);opacity:.85}70%,100%{transform:scale(1.7);opacity:0}}
  #busmap-root .gbus .body{fill:#EAF7F8; stroke:#0E7C80; stroke-width:1.1}
  #busmap-root .gbus .win{fill:#12A5AA; opacity:.9}
  #busmap-root .gbus .wh{fill:#26313B}
  #busmap-root .gbus .veh{transition:transform .6s linear}
  #busmap-root .gbus .sat circle{fill:#0E7C80}
  #busmap-root .gbus.stale .ring{animation:none; stroke:#96A2AE; stroke-opacity:.55}
  #busmap-root .gbus.stale .body{fill:var(--panelbg); stroke:#96A2AE}
  #busmap-root .gbus.stale .win{fill:#96A2AE}
  #busmap-root .gbus.stale .sat circle{fill:#96A2AE}
  #busmap-root .gbus.sel .body{stroke-width:2}
  
  #busmap-root .gtrack{fill:none; stroke:#12A5AA; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round;
    vector-effect:non-scaling-stroke; pointer-events:none}
  #busmap-root .gtrack.done{stroke:#96A2AE; stroke-width:1.7; stroke-opacity:.6; stroke-dasharray:4 4}
  
  #busmap-root .gline{fill:none; stroke:#12A5AA; stroke-width:1.2; stroke-opacity:.30;
    stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:7 5;
    vector-effect:non-scaling-stroke; pointer-events:none; transition:stroke-opacity .15s ease}
  #busmap-root .gline.hl{stroke-opacity:.85; stroke-width:1.9; stroke-dasharray:none}
  #busmap-root .GLINES.dim .gline{stroke-opacity:.12}
  #busmap-root .GLINES.dim .gline.hl{stroke-opacity:.5}
  #busmap-root .legend .gsw{width:10px; height:10px; border-radius:50%; background:#EAF7F8;
    border:2px solid #0E7C80; flex:0 0 auto; margin-right:-1px}
  #busmap-root .gage{font-weight:700}

  
  #busmap-root .nbus .cs{transform:scale(var(--invb,var(--inv,1)))}
  #busmap-root .nbus{cursor:pointer}
  #busmap-root .nbus .ring{fill:none; stroke:#6248E5; stroke-width:1.4; transform-origin:0 0;
    animation:gping 2.4s ease-out infinite}
  #busmap-root .nbus .body{fill:#6248E5; stroke:#3A2AA8; stroke-width:1.1}
  #busmap-root .nbus .win{fill:#EDEAFF; opacity:.95}
  #busmap-root .nbus .wh{fill:#26313B}
  #busmap-root .nbus .veh{transition:transform .6s linear}
  #busmap-root .nbus .nbadge circle{fill:#3A2AA8}
  #busmap-root .nbus.stale .ring{animation:none; stroke:#96A2AE; stroke-opacity:.55}
  #busmap-root .nbus.stale .body{fill:#96A2AE; stroke:#7C8894}
  #busmap-root .nbus.stale .win{fill:var(--panelbg)}
  #busmap-root .nbus.stale .nbadge circle{fill:#7C8894}
  #busmap-root .nbus.sel .body{stroke-width:2.4; stroke:#1B1160}
  #busmap-root .legend .nsw{width:10px; height:10px; border-radius:50%; background:#6248E5;
    border:2px solid #3A2AA8; flex:0 0 auto; margin-right:-1px}

  
  #busmap-root .tag .ldot{display:inline-block; width:7px; height:7px; border-radius:50%;
    background:#E33B2E; margin-right:6px; animation:ldot 1.2s ease-in-out infinite; vertical-align:1px}
  @keyframes ldot{50%{opacity:.2}}
  #busmap-root .tag #liveclock{font-variant-numeric:tabular-nums}
  
  #busmap-root .flowline{fill:none; stroke:var(--hl); stroke-opacity:.9; stroke-width:2.6; stroke-linecap:round;
    stroke-dasharray:.5 16; animation:dashflow 1.3s linear infinite; pointer-events:none}
  @keyframes dashflow{to{stroke-dashoffset:-16.5}}
  
  #busmap-root .inc .cs{transform:scale(var(--inv,1))}
  #busmap-root .inc circle{fill:#D93025; fill-opacity:.85; stroke:var(--bg); stroke-width:.8; cursor:pointer;
    animation:ipulse 3.2s ease-in-out infinite}
  @keyframes ipulse{50%{fill-opacity:.4}}
  #busmap-root .ecrow{color:#1B9E4B; font-weight:600}
  #busmap-root .ecplates{color:var(--muted); font-size:11px; font-family:ui-monospace,Menlo,monospace}
  #busmap-root .inc.sev2 circle{fill:#B3120A}
  #busmap-root .inc text{display:none; fill:#C5221F; font-size:8px; font-weight:600;
    font-family:"Avenir Next Condensed","Arial Narrow",system-ui,sans-serif;
    paint-order:stroke; stroke:var(--halo); stroke-width:3px; stroke-linejoin:round}
  #busmap-root svg.z2 .inc text{display:block}
  
  #busmap-root .cp.tf1 rect.dia{stroke:#E8641A}
  #busmap-root .cp.tf2 rect.dia{stroke:#D93025; stroke-width:2.2}

  
  #busmap-root .RSTOPS .cs{transform:scale(var(--inv,1))}
  #busmap-root .RSTOPS circle{fill:var(--hl); stroke:var(--bg); stroke-width:1.2}
  #busmap-root .RSTOPS circle.bc{fill:#E8A020}

  
  #busmap-root .city .cs{transform:scale(var(--inv,1))}
  #busmap-root .city circle.dot{fill:var(--bg); stroke:var(--ink); stroke-width:2; cursor:pointer}
  #busmap-root .city text{fill:var(--ink); font-size:11px; font-weight:600; letter-spacing:.05em; text-transform:uppercase;
    font-family:"Avenir Next Condensed","Arial Narrow",system-ui,sans-serif;
    paint-order:stroke; stroke:var(--halo); stroke-width:3px; stroke-linejoin:round; cursor:pointer}
  #busmap-root .city text .cnt{fill:var(--muted); font-weight:500}
  #busmap-root svg.z5 .city.hasst circle.dot{fill:none; stroke:var(--muted); stroke-width:1; stroke-dasharray:2 2}
  #busmap-root .stn{display:none}
  #busmap-root svg.z5 .stn{display:block}
  #busmap-root .stn .cs{transform:scale(var(--inv,1))}
  #busmap-root .stn rect.sq{fill:var(--ink); stroke:var(--bg); stroke-width:1.2}
  #busmap-root .stn text{fill:var(--ink); font-size:9.5px; font-weight:600; letter-spacing:.02em;
    font-family:system-ui,sans-serif;
    paint-order:stroke; stroke:var(--halo); stroke-width:3px; stroke-linejoin:round}
  #busmap-root .leash{display:none; stroke:var(--muted); stroke-width:1; stroke-dasharray:2 3;
    vector-effect:non-scaling-stroke; fill:none}
  #busmap-root svg.z5 .leash{display:block}

  
  #busmap-root .ovl{position:absolute; z-index:5}
  
  #busmap-root .legend{left:14px; bottom:14px; background:var(--panelbg);
    background:color-mix(in srgb, var(--panelbg) 92%, transparent);
    -webkit-backdrop-filter:blur(7px); backdrop-filter:blur(7px);
    border:1px solid var(--border); border-radius:10px; padding:7px 10px 8px;
    box-shadow:0 1px 3px rgba(16,24,32,.09); font-size:11.5px; max-width:214px}
  #busmap-root .legend .hd{display:flex; align-items:center; gap:6px; margin-bottom:5px; cursor:pointer}
  #busmap-root .legend .t{flex:1 1 auto; font-size:9.5px; letter-spacing:.1em; text-transform:uppercase;
    color:var(--muted); line-height:1.35}
  #busmap-root .legend .tmin{display:none}
  #busmap-root .legend .lgtog{flex:0 0 auto; width:20px; height:20px; margin:-2px -4px -2px 0; padding:0;
    border:0; background:none; color:var(--muted); border-radius:5px; cursor:pointer;
    font-size:13px; line-height:1; display:flex; align-items:center; justify-content:center}
  #busmap-root .legend .lgtog:hover{background:var(--chipbg); color:var(--ink)}
  #busmap-root .legend .lgtog:focus-visible{outline:2px solid var(--hl); outline-offset:1px}
  #busmap-root .legend.min{max-width:none; padding:5px 7px 5px 11px}
  #busmap-root .legend.min .lgbody{display:none}
  #busmap-root .legend.min .hd{margin-bottom:0}
  #busmap-root .legend.min .t{display:none}
  #busmap-root .legend.min .tmin{display:block; flex:1 1 auto; font-size:11px; font-weight:600;
    color:var(--ink); white-space:nowrap}
  #busmap-root .legend .row{display:flex; align-items:center; gap:7px; padding:3px 4px; margin:0 -4px;
    cursor:pointer; user-select:none; border-radius:5px; line-height:1.3}
  #busmap-root .legend .row:hover{background:var(--chipbg)}
  #busmap-root .legend .row.off{opacity:.34}
  #busmap-root .legend .row .n{margin-left:auto; color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums}
  #busmap-root .legend .showall{display:none; margin-top:6px; font-size:10.5px; color:var(--muted);
    cursor:pointer; text-decoration:underline; text-underline-offset:2px}
  #busmap-root .legend.filtered .showall{display:block}
  #busmap-root .legend .sw{width:16px; height:0; border-top:3px solid; border-radius:2px; flex:0 0 auto}
  #busmap-root .legend .keys{display:flex; flex-wrap:wrap; gap:2px 10px; margin-top:7px; padding-top:6px;
    border-top:1px solid var(--border); color:var(--muted); font-size:10px; line-height:1.5}
  #busmap-root .legend .note{margin-top:6px; padding-top:6px; border-top:1px solid var(--border);
    color:var(--muted); font-size:10px; line-height:1.45}
  #busmap-root .legend .dash{width:14px; border-top:3px dashed var(--muted); display:inline-block; vertical-align:middle; margin-right:5px}
  #busmap-root .legend .dia{display:inline-block; width:7px; height:7px; border:2px solid #E8A020; transform:rotate(45deg);
    background:var(--panelbg); margin:0 7px 0 2px; vertical-align:-1px}
  #busmap-root .zoomctl{right:14px; top:14px; display:flex; flex-direction:column; gap:6px}
  #busmap-root .zoomctl button{width:32px; height:32px; border-radius:7px; border:1px solid var(--border);
    background:var(--panelbg); color:var(--ink); font-size:16px; cursor:pointer; box-shadow:var(--shadow)}
  #busmap-root .zoomctl button:hover{background:var(--chipbg)}
  #busmap-root .zoomctl button:focus-visible{outline:2px solid var(--hl); outline-offset:1px}
  #busmap-root .hint{left:50%; top:12px; transform:translateX(-50%); background:var(--panelbg); border:1px solid var(--border);
    border-radius:999px; padding:5px 14px; font-size:11.5px; color:var(--muted); box-shadow:var(--shadow); white-space:nowrap}
  
  #busmap-root .clearchip{display:none; left:50%; top:12px; transform:translateX(-50%);
    align-items:center; gap:7px; background:var(--ink); color:var(--bg);
    border:0; border-radius:999px; padding:6px 14px; font-size:11.5px; font-weight:600;
    box-shadow:var(--shadow); cursor:pointer; white-space:nowrap; z-index:11}
  #busmap-root .clearchip:hover{opacity:.88}
  #busmap-root .clearchip .x{font-size:13px; line-height:1}
  #busmap-root .mapwrap.filtered .clearchip{display:inline-flex}
  #busmap-root .credit{right:14px; bottom:10px; font-size:10px; color:var(--muted); font-style:italic;
    background:none; text-align:right; line-height:1.5}
  #busmap-root .credit a{color:var(--muted)}

  #busmap-root .tip{position:fixed; z-index:20; pointer-events:none; display:none; background:var(--ink); color:var(--bg);
    border-radius:6px; padding:4px 9px; font-size:11.5px; font-weight:600; white-space:nowrap; max-width:320px}

  
  #busmap-root aside{flex:0 0 340px; width:340px; border-left:1px solid var(--border); background:var(--panelbg);
    display:flex; flex-direction:column; min-height:0}
  #busmap-root aside.hidden{display:none}
  #busmap-root .p-head{display:flex; align-items:center; gap:10px; padding:14px 16px 10px}
  #busmap-root .p-head .opsw{width:26px; height:8px; border-radius:3px; flex:0 0 auto}
  #busmap-root .p-head .opname{font-family:"Avenir Next Condensed","Arial Narrow",system-ui,sans-serif;
    font-size:17px; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
  #busmap-root .p-btn{border:1px solid var(--border); background:none; color:var(--muted); border-radius:999px;
    font-size:10px; letter-spacing:.14em; text-transform:uppercase; padding:4px 11px; cursor:pointer; flex:0 0 auto}
  #busmap-root .p-btn:hover{color:var(--ink); background:var(--chipbg)}
  #busmap-root .p-btn:focus-visible{outline:2px solid var(--hl); outline-offset:1px}
  #busmap-root #p-close{margin-left:auto}
  #busmap-root .p-body{flex:1 1 auto; overflow-y:auto; padding:0 16px 16px}
  #busmap-root .p-rel{font-size:12px; color:var(--muted); margin:0 0 4px}
  #busmap-root .p-name{font-size:15px; font-weight:700; margin:0 0 12px}
  #busmap-root .card{border:1px solid var(--border); border-radius:8px; padding:9px 11px; margin-bottom:8px}
  #busmap-root .card .hd{display:flex; align-items:baseline; gap:8px; font-size:10px; letter-spacing:.14em;
    text-transform:uppercase; color:var(--muted); margin-bottom:5px}
  #busmap-root .kv{display:flex; gap:10px; font-size:12.5px; padding:2px 0}
  #busmap-root .kv .k{flex:0 0 108px; color:var(--muted)}
  #busmap-root .kv .tm{font-family:ui-monospace,Menlo,monospace; font-variant-numeric:tabular-nums; font-weight:600}
  #busmap-root .kv .warn{color:var(--warn); font-weight:600}
  #busmap-root .carrier{font-size:12.5px; padding:2px 0}
  
  #busmap-root .carrier a.cname{color:var(--ink); text-decoration:underline; text-underline-offset:2px;
    text-decoration-color:var(--border)}
  #busmap-root .carrier a.cname:hover{text-decoration-color:var(--ink)}
  
  #busmap-root .kv a.cplink{color:var(--ink); text-decoration:underline; text-underline-offset:2px;
    text-decoration-color:var(--border)}
  #busmap-root .kv a.cplink:hover{text-decoration-color:var(--ink)}
  #busmap-root .carrier .edr{color:var(--muted); font-size:11px; font-family:ui-monospace,Menlo,monospace}
  #busmap-root .carrier .stars{color:#E8A020; font-weight:700}
  #busmap-root .carlinks{font-size:11.5px; margin:2px 0 5px}
  #busmap-root .carlinks a{color:var(--muted)}
  #busmap-root .carlinks a:hover{color:var(--ink)}
  #busmap-root .sect{font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin:14px 0 6px}
  #busmap-root .more{display:block; width:100%; margin-top:14px; padding:10px; border:0; border-radius:7px;
    background:var(--ink); color:var(--bg); font-size:11.5px; font-weight:700; letter-spacing:.14em;
    text-transform:uppercase; cursor:pointer; text-align:center; text-decoration:none}
  #busmap-root .more:hover{opacity:.85}
  #busmap-root .more:focus-visible{outline:2px solid var(--hl); outline-offset:2px}
  
  #busmap-root .choose{list-style:none; margin:0; padding:0}
  #busmap-root .choose li{padding:7px 4px; border-bottom:1px dotted var(--border); cursor:pointer; font-size:12.5px}
  #busmap-root .choose li:hover{background:var(--chipbg)}
  #busmap-root .choose .mini{display:inline-block; width:22px; height:5px; border-radius:2px; margin-right:8px; vertical-align:2px}
  #busmap-root .choose .num{font-weight:700; margin-right:6px}
  #busmap-root .choose .op{display:block; color:var(--muted); font-size:11px; margin:2px 0 0 30px}

  
  #busmap-root .sched .dirsw{display:flex; gap:0; margin-bottom:7px; border:1px solid var(--border); border-radius:7px; overflow:hidden}
  #busmap-root .sched .dirsw button{flex:1; border:0; background:none; color:var(--muted); font-size:11px;
    letter-spacing:.08em; text-transform:uppercase; padding:6px 4px; cursor:pointer}
  #busmap-root .sched .dirsw button.act{background:var(--ink); color:var(--bg); font-weight:700}
  #busmap-root .sched ol{list-style:none; margin:0; padding:0; max-height:250px; overflow-y:auto}
  #busmap-root .sched li{display:flex; gap:9px; padding:2.5px 0; font-size:12px; border-bottom:1px dotted var(--border); align-items:baseline}
  #busmap-root .sched li:last-child{border-bottom:0}
  #busmap-root .sched .tm{flex:0 0 42px; font-family:ui-monospace,Menlo,monospace; font-variant-numeric:tabular-nums; color:var(--muted)}
  #busmap-root .sched li.end{font-weight:700}
  #busmap-root .sched li.end .tm{color:var(--ink)}
  #busmap-root .sched li.bcrow .tm{color:#E8A020; font-weight:700}
  #busmap-root .sched li.bcrow{color:#B07708}
  :root[data-theme="dark"] #busmap-root .sched li.bcrow,#busmap-root .sched li.bcrow.dk{color:#E8A020}
  #busmap-root .sched .day{font-size:9.5px; color:var(--warn); margin-left:4px}

  
  #busmap-root .mtools{left:10px; top:10px; display:none; gap:7px}
  #busmap-root .mbtn{display:inline-flex; align-items:center; gap:6px; min-height:36px;
    border:1px solid var(--border); background:var(--panelbg); color:var(--ink);
    border-radius:999px; padding:7px 14px; font-size:12.5px; font-weight:600;
    cursor:pointer; box-shadow:var(--shadow); -webkit-tap-highlight-color:transparent}
  #busmap-root .mbtn.on{background:var(--ink); color:var(--bg); border-color:var(--ink)}
  
  #busmap-root .toast{position:absolute; left:50%; bottom:calc(20px + env(safe-area-inset-bottom));
    transform:translateX(-50%); z-index:13; background:var(--ink); color:var(--bg);
    border-radius:999px; padding:8px 16px; font-size:12.5px; font-weight:600;
    box-shadow:var(--shadow); pointer-events:none; opacity:0; transition:opacity .3s ease;
    white-space:nowrap; max-width:92%; overflow:hidden; text-overflow:ellipsis}
  #busmap-root .toast.on{opacity:.95}
  
  #busmap-root .mbk{position:absolute; inset:0; z-index:8; background:rgba(0,0,0,.28); display:none}
  #busmap-root .mbk.on{display:block}
  
  #busmap-root .rsearch{width:100%; margin:2px 0 10px; padding:10px 12px; font-size:16px;
    border:1px solid var(--border); border-radius:9px; background:var(--bg); color:var(--ink)}
  #busmap-root .rsearch:focus{outline:2px solid var(--hl); outline-offset:1px}
  #busmap-root .rempty{color:var(--muted); font-size:12.5px; padding:10px 2px}
  #busmap-root .more.cityf{margin:0 0 10px; padding:11px 10px; background:var(--chipbg); color:var(--ink)}
  #busmap-root .more.cityf.clr{background:none; border:1px solid var(--border); color:var(--muted)}
  #busmap-root .cgrp{font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted);
    margin:12px 0 4px; position:sticky; top:0; background:var(--panelbg); padding:4px 0 3px}

  #busmap-root .grab{display:none}
  @media (max-width:760px){
    #busmap-root header{padding:7px 12px 6px; gap:8px}
    #busmap-root header .sub,#busmap-root header h1 .hlong{display:none}
    #busmap-root header h1{font-size:14px; letter-spacing:.02em; white-space:nowrap;
      overflow:hidden; text-overflow:ellipsis; flex:0 1 auto}
    #busmap-root header .tag{font-size:9.5px; padding:2px 8px; letter-spacing:.08em}
    #busmap-root .stage{flex-direction:column}
    #busmap-root .mapwrap{order:1; flex:1 1 auto; height:100%}
    
    #busmap-root aside{position:absolute; left:0; right:0; bottom:0; z-index:14; order:2;
      width:auto; flex:none; height:46%; max-height:92%;
      border-left:0; border-top:1px solid var(--border);
      border-radius:16px 16px 0 0; box-shadow:0 -6px 30px rgba(0,0,0,.28);
      padding-bottom:env(safe-area-inset-bottom);
      transition:height .24s cubic-bezier(.32,.72,0,1)}
    #busmap-root aside.drag{transition:none}
    #busmap-root aside.peek .p-body{display:none}
    #busmap-root .grab{display:block; position:absolute; left:50%; top:7px; transform:translateX(-50%);
      width:40px; height:5px; border-radius:3px; background:var(--border)}
    #busmap-root .p-head{position:relative; padding:19px 14px 10px; cursor:grab;
      touch-action:none; -webkit-tap-highlight-color:transparent}
    #busmap-root .p-head .opname{font-size:16px}
    #busmap-root .p-btn{padding:7px 12px; font-size:10px}
    #busmap-root .p-body{padding:0 14px 20px}
    #busmap-root .sched ol{max-height:none}
    #busmap-root .kv .k{flex:0 0 96px}
    #busmap-root .hint{display:none}
    #busmap-root .clearchip{top:56px; font-size:12px; padding:8px 15px}
    #busmap-root .legend{display:none; left:10px; right:10px; max-width:none; z-index:9;
      bottom:auto; top:56px; max-height:calc(100% - 76px); overflow-y:auto;
      border-radius:12px; padding:12px 14px; font-size:13px}
    #busmap-root .legend .t{font-size:10.5px}
    #busmap-root .legend .hd{margin-bottom:8px}
    #busmap-root .legend .row{padding:9px 4px; min-height:40px}
    #busmap-root .legend .showall,#busmap-root .legend .note,#busmap-root .legend .keys{font-size:12px}
    #busmap-root .legend .lgtog{width:34px; height:34px; margin:-6px -8px -6px 0; font-size:16px}
    #busmap-root .legend.open{display:block}
    
    #busmap-root .legend.min{padding:12px 14px}
    #busmap-root .legend.min .lgbody{display:block}
    #busmap-root .legend.min .t{display:block}
    #busmap-root .legend.min .tmin{display:none}
    #busmap-root .legend.min .hd{margin-bottom:8px}
    #busmap-root .mtools{display:flex}
    #busmap-root .credit{display:none}
    #busmap-root .zoomctl{top:10px; right:10px; gap:8px}
  }
  
  @media (min-width:761px) and (max-height:520px){
    #busmap-root header{padding:6px 14px 5px} #busmap-root header h1{font-size:15px} #busmap-root header .sub{display:none}
    #busmap-root .hint,#busmap-root .credit{display:none}
    #busmap-root .legend{display:none; left:10px; top:52px; bottom:auto; z-index:9;
      max-height:calc(100% - 64px); overflow-y:auto}
    #busmap-root .legend.open{display:block}
    #busmap-root .legend.min{padding:7px 10px 8px}
    #busmap-root .legend.min .lgbody{display:block}
    #busmap-root .legend.min .t{display:block}
    #busmap-root .legend.min .tmin{display:none}
    #busmap-root .legend.min .hd{margin-bottom:5px}
    #busmap-root .mtools{display:flex}
    #busmap-root aside{flex:0 0 300px; width:300px}
    #busmap-root .p-head{padding:10px 14px 8px}
    #busmap-root .zoomctl{top:8px; right:8px; gap:5px}
  }
  
  @media (pointer:coarse), (max-width:760px){
    #busmap-root .route .hit{stroke-width:22}
    #busmap-root .route .line{stroke-width:2.4}
    #busmap-root .route.sel .line{stroke-width:4}
    #busmap-root .city .tap{pointer-events:auto}
    #busmap-root .zoomctl button{width:42px; height:42px; font-size:19px}
    #busmap-root .choose li{padding:12px 4px; font-size:13.5px}
    #busmap-root .sched li{padding:5px 0; font-size:12.5px}
  }
  #busmap-root .city .tap{pointer-events:none}
  @media (prefers-reduced-motion:reduce){
    #busmap-root .bus .halo,#busmap-root .inc circle,#busmap-root .tag .ldot,#busmap-root .flowline{animation:none}
    #busmap-root .bus .veh,#busmap-root aside{transition:none}
  }
/* --- site integration (added by site_build.py) --- */
#busmap-root{height:min(78vh,820px); min-height:440px; position:relative;border:1px solid var(--border); border-radius:10px; overflow:hidden}
@media (max-width:760px){#busmap-root{height:80vh; min-height:520px;border-radius:0; border-left:0; border-right:0}}
.coach-map-page .breadcrumb{flex-wrap:wrap}
