:root{--bg:#eef1f6;--card:#fff;--text:#121620;--muted:#5d6573;--line:#e1e5ec;--brand:#ffc72c;--on-brand:#1b1b1b;--brand-soft:#fff3cc;--accent:#8a5300;--route-line:#c26a00;--special:#b3261e;--special-soft:#fdecea;--ok:#17803a;--idle:#8c1d18;--shadow:0 1px 2px #1018280f, 0 1px 3px #10182814;--shadow-lg:0 12px 32px #1018282e;--radius:16px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--bg:#0d1016;--card:#171b23;--text:#e8eaef;--muted:#9aa1ad;--line:#2a303b;--brand:#f2b705;--on-brand:#1b1b1b;--brand-soft:#3a300c;--accent:#ffd666;--route-line:#ffad33;--special:#f2b8b5;--special-soft:#3a1f1d;--ok:#7fd49b;--idle:#f2b8b5;--shadow:0 1px 2px #0006;--shadow-lg:0 12px 32px #00000080}}*{box-sizing:border-box}html,body{background:var(--bg);color:var(--text);margin:0}body{-webkit-tap-highlight-color:transparent;font-family:system-ui,-apple-system,PingFang HK,Noto Sans HK,Microsoft JhengHei,sans-serif;font-size:16px;line-height:1.45}a{color:var(--accent);text-decoration:none}button{font:inherit;color:inherit}main{max-width:720px;margin:0 auto}h1{margin:0;font-size:1.5rem}.muted{color:var(--muted);font-size:.875rem}.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow)}.badge{background:var(--brand-soft);color:var(--accent);white-space:nowrap;border-radius:999px;padding:0 8px;font-size:.75rem;font-weight:600;line-height:1.6;display:inline-block}.badge.special{background:var(--special-soft);color:var(--special)}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}header.top{background:var(--brand);color:var(--on-brand);padding:10px 16px}header.top a{color:var(--on-brand);letter-spacing:.02em;font-weight:800}:is(body:has(.home),body:has(.route-page)){flex-direction:column;height:100dvh;display:flex;overflow:hidden}.home{flex-direction:column;flex:1;width:100%;min-height:0;display:flex}.seg{background:var(--line);border-radius:12px;flex:none;gap:4px;margin:10px 12px 0;padding:4px;display:flex}.seg button{color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:9px;flex:1;padding:8px;font-weight:600}.seg button[aria-selected=true]{background:var(--card);color:var(--text);box-shadow:var(--shadow)}.search-bar{flex:none;padding:10px 12px}.search-field{all:unset;box-sizing:border-box;background:var(--card);width:100%;min-height:48px;box-shadow:var(--shadow);cursor:text;border-radius:14px;align-items:center;gap:8px;padding:0 8px 0 16px;display:flex}.search-field input{min-width:0;color:var(--text);background:0 0;border:0;outline:0;flex:1;padding:12px 0;font-size:1.0625rem}.search-code{letter-spacing:.04em;flex:1;font-size:1.5rem;font-weight:800}.search-placeholder{color:var(--muted);flex:1;font-size:1.0625rem}.search-clear{background:var(--bg);min-width:36px;height:36px;color:var(--muted);cursor:pointer;border:0;border-radius:10px;flex:none;place-items:center;padding:0 8px;font-size:.875rem;font-weight:700;display:grid}.route-list{overscroll-behavior:contain;background:var(--card);border-radius:var(--radius) var(--radius) 0 0;min-height:0;box-shadow:var(--shadow);flex:1;margin:0 12px;padding:0;list-style:none;overflow-y:auto}.route-item{color:var(--text);border-bottom:1px solid var(--line);align-items:center;gap:14px;padding:12px 16px;display:flex}.route-item:active{background:var(--bg)}.route-num{letter-spacing:.02em;width:64px;color:var(--text);flex:none;font-size:1.375rem;font-weight:800}.route-num.sm{width:52px;font-size:1.125rem}.route-id{flex-direction:column;flex:none;width:82px;line-height:1.15;display:flex}.route-id .route-num{width:auto}.co{letter-spacing:.04em;white-space:nowrap;border-radius:6px;align-self:flex-start;margin-top:3px;font-size:.6875rem;font-weight:800;line-height:1.4;display:inline-flex;overflow:hidden}.co-part{align-items:center;gap:3px;padding:1px 5px;display:inline-flex}.co-part:first-child{padding-left:5px}.co-compact{font-size:.6875rem}.route-text{flex-direction:column;flex:1;min-width:0;display:flex}.route-to{white-space:nowrap;text-overflow:ellipsis;font-weight:600;overflow:hidden}.route-ends{-webkit-line-clamp:2;-webkit-box-orient:vertical;font-weight:600;line-height:1.35;display:-webkit-box;overflow:hidden}.route-arrow{color:var(--accent);margin:0 2px;font-weight:800}.route-from{color:var(--muted);white-space:nowrap;text-overflow:ellipsis;font-size:.8125rem;overflow:hidden}.empty,.loading-more,.list-end{text-align:center;color:var(--muted);padding:20px 16px}.list-end{font-size:.8125rem;line-height:1.7}.keypad{padding:8px 12px calc(8px + env(safe-area-inset-bottom));background:var(--bg);border-top:1px solid var(--line);flex:none;gap:6px;display:flex}.keypad-digits{flex:3;grid-template-columns:repeat(3,1fr);align-content:start;gap:6px;display:grid}.keypad-letters{overscroll-behavior:contain;flex:2;grid-template-columns:repeat(2,1fr);grid-auto-rows:44px;align-content:start;gap:6px;max-height:194px;display:grid;overflow-y:auto}.keypad button{background:var(--card);height:44px;box-shadow:var(--shadow);cursor:pointer;border:0;border-radius:10px;font-size:1.25rem;font-weight:700}.keypad button:active:not(:disabled){background:var(--brand-soft)}.keypad button:disabled{opacity:.3;cursor:default;box-shadow:none}.keypad .key-fn{color:var(--accent);font-size:1rem;font-weight:600}.keypad-letters button{color:var(--accent)}.nearby,.nearby-empty{min-height:0;padding:10px 12px calc(16px + env(safe-area-inset-bottom));flex:1;overflow-y:auto}.nearby-empty{text-align:center;color:var(--muted);flex-direction:column;justify-content:center;align-items:center;gap:8px;display:flex}.nearby-empty .error{color:var(--special)}.primary-btn{background:var(--brand);color:var(--on-brand);cursor:pointer;border:0;border-radius:12px;padding:12px 22px;font-size:1rem;font-weight:700}.primary-btn:disabled{opacity:.6}.link-btn{color:var(--accent);cursor:pointer;background:0 0;border:0;font-weight:600}.nearby-head{justify-content:space-between;align-items:center;padding:0 4px 8px;display:flex}.nearby-list{flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex}.nearby-stop{overflow:hidden}.nearby-stop-head{all:unset;box-sizing:border-box;cursor:pointer;justify-content:space-between;gap:12px;width:100%;padding:12px 16px;display:flex}.nearby-stop-name{font-weight:700}.nearby-routes{border-top:1px solid var(--line);margin:0;padding:0;list-style:none}.nearby-route{color:var(--text);border-bottom:1px solid var(--line);align-items:center;gap:10px;padding:10px 16px;display:flex}.nearby-routes li:last-child .nearby-route{border-bottom:0}.nearby-route .route-to{flex:1;min-width:0;font-weight:500}.nearby-eta{text-align:right;font-variant-numeric:tabular-nums;flex:none}.nearby-eta b{color:var(--accent);font-size:1.25rem}body:has(.route-page)>header.top{display:none}.route-page{flex-direction:column;flex:1;width:100%;min-height:0;display:flex}.route-top{background:var(--bg);flex-direction:column;flex:none;gap:8px;padding:0 12px 8px;display:flex}.route-bar{background:var(--brand);color:var(--on-brand);align-items:center;gap:8px;margin:0 -12px;padding:8px 8px 8px 4px;display:flex}.route-bar .back{width:40px;height:40px;color:var(--on-brand);flex:none;place-items:center;font-size:1.75rem;line-height:1;display:grid}.route-bar h1{letter-spacing:.02em;flex:none;font-size:1.75rem;font-weight:800;line-height:1}.route-bar h1 small{opacity:.8;letter-spacing:0;margin-bottom:2px;font-size:.6875rem;font-weight:600;display:block}.route-dest{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:1.0625rem;font-weight:700;overflow:hidden}.route-dest small{opacity:.85;margin-right:4px;font-weight:500}.swap{width:40px;height:40px;color:var(--on-brand);background:#00000014;border-radius:12px;flex:none;place-items:center;font-size:1.25rem;display:grid}.variant-picker{z-index:1000;position:relative}button.variant{all:unset;box-sizing:border-box;cursor:pointer;align-items:flex-start;gap:12px;width:100%;padding:10px 14px;display:flex}button.variant.variant-current{background:var(--card);box-shadow:var(--shadow);border-radius:14px;align-items:center;padding:9px 14px}.variant-current:disabled{cursor:default}.variant{color:var(--text)}.variant-menu{box-shadow:var(--shadow-lg);position:absolute;top:calc(100% + 6px);left:0;right:0;overflow:hidden}.variant-menu .variant{border-bottom:1px solid var(--line);gap:12px;padding:12px 14px;display:flex}.variant-menu .variant:last-child{border-bottom:0}.variant.active{background:var(--brand-soft);box-shadow:inset 4px 0 0 var(--accent)}.variant-no{width:24px;height:24px;color:var(--bg);background:var(--idle);border-radius:50%;flex:none;place-items:center;font-size:.8125rem;font-weight:800;display:grid}.variant-no.running{background:var(--ok)}.variant-body{flex-direction:column;gap:2px;min-width:0;display:flex}.variant-title{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.variant-status{font-size:.875rem;font-weight:600}.variant-status.running{color:var(--ok)}.variant-status.idle{color:var(--idle)}.variant-status.unknown{color:var(--muted)}.variant-line{white-space:nowrap;flex:1;align-items:baseline;gap:8px;min-width:0;display:flex;overflow:hidden}.variant-line strong{text-overflow:ellipsis;flex:none;max-width:60%;overflow:hidden}.variant-line strong.special{color:var(--special)}.variant-line .variant-status{text-overflow:ellipsis;flex:0 auto;min-width:0;overflow:hidden}.variant-chevron{color:var(--muted);align-self:center;margin-left:auto;font-size:.75rem}.route-map-wrap{z-index:2;position:relative}.route-map{background:var(--line);z-index:0;height:clamp(150px,26dvh,280px);overflow:hidden}.map-help-btn{z-index:500;background:var(--card);width:30px;height:30px;box-shadow:var(--shadow);cursor:pointer;border:0;border-radius:50%;font-weight:800;position:absolute;top:8px;right:8px}.map-help-backdrop{z-index:3000;background:#00000073;justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.map-help{width:min(420px,100%);max-height:80dvh;box-shadow:var(--shadow-lg);padding:14px 16px;font-size:.9rem;line-height:1.55;overflow-y:auto}.map-help p,.map-help ul{margin:6px 0}.map-help ul{padding-left:18px}.map-help-close{background:var(--brand-soft);color:var(--accent);cursor:pointer;border:0;border-radius:8px;margin-left:auto;padding:6px 14px;font-weight:700;display:block}.map-arrow,.map-bus{background:0 0;border:0}.map-bus>span{border:2px solid #fff;border-radius:50%;place-items:center;width:28px;height:28px;display:grid;box-shadow:0 1px 4px #0006}.route-stops{overscroll-behavior:contain;border-radius:var(--radius) var(--radius) 0 0;flex:1;min-height:0;margin:0 12px;overflow-y:auto}.stops{margin:0;padding:6px 0;list-style:none}.stop{position:relative}.stop>button{all:unset;box-sizing:border-box;cursor:pointer;align-items:center;gap:0;width:100%;min-height:52px;padding:6px 14px 6px 0;display:flex}.stop>button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.stop.open{background:var(--brand-soft)}.seq{text-align:right;width:34px;color:var(--muted);font-variant-numeric:tabular-nums;flex:none;font-size:.75rem}.stop{--tl-x:52px;--tl-dot-y:32px}.stop:before{content:"";left:calc(var(--tl-x) - 3px);background:var(--line-color,var(--route-line));width:6px;position:absolute;top:0;bottom:0;box-shadow:inset 1px 0 #00000040,inset -1px 0 #00000040}.stop:first-child:before{top:var(--tl-dot-y)}.stop:last-child:before{height:var(--tl-dot-y);bottom:auto}.tl{flex:none;align-self:stretch;width:36px;position:relative}.tl-dot{left:50%;top:calc(var(--tl-dot-y) - 6px);background:var(--card);border:3px solid var(--line-color,var(--route-line));z-index:1;border-radius:50%;width:14px;height:14px;margin:-7px 0 0 -7px;position:absolute;box-shadow:0 0 0 1px #00000059}.stop.terminus .tl-dot{background:var(--card);border:5px solid var(--text);width:18px;height:18px;margin:-9px 0 0 -9px}.tl-bus.is-schedule,.map-bus.is-schedule>span{opacity:.5}.tl-bus{left:var(--tl-x);color:#fff;background:var(--line-color,var(--route-line));border:2px solid var(--card);z-index:2;pointer-events:none;border-radius:50%;place-items:center;width:26px;height:26px;margin:-13px 0 0 -13px;display:grid;position:absolute;box-shadow:0 1px 4px #00000059}.stop-name{flex-direction:column;flex:1;min-width:0;padding-left:4px;font-size:1rem;display:flex}.stop.open .stop-name{font-weight:700}.travel{color:var(--accent);font-variant-numeric:tabular-nums;font-size:.8125rem;font-weight:600}.travel .muted{font-weight:400;font-size:inherit}.etas{padding:2px 14px 14px 74px}.eta-next{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.eta-big{color:var(--accent);font-variant-numeric:tabular-nums;font-size:2.25rem;font-weight:800;line-height:1.1}.eta-big small{margin-left:2px;font-size:1rem;font-weight:700}.eta-next .eta-time{color:var(--muted);font-variant-numeric:tabular-nums;font-size:.9375rem}.where{color:var(--muted);font-size:.8125rem}.eta-next .where{color:var(--text);flex-basis:100%;font-size:.875rem;font-weight:600}.eta-more{border-top:1px dashed var(--line);flex-direction:column;gap:4px;margin:8px 0 0;padding:8px 0 0;list-style:none;display:flex}.eta-more li{grid-template-columns:52px 44px 1fr;align-items:baseline;column-gap:8px;display:grid}.eta-meta{flex-wrap:nowrap;align-items:center;gap:6px;min-width:0;display:flex}.eta-meta>*{flex:none}.eta-meta .where{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;overflow:hidden}.eta-more .eta-min{font-variant-numeric:tabular-nums;min-width:52px;font-size:1.0625rem;font-weight:700}.eta-more .eta-time{color:var(--muted);font-variant-numeric:tabular-nums;font-size:.8125rem}.eta-row-other{opacity:.5}.stop.open .badge{background:var(--card)}.source{text-align:center;padding:16px 16px calc(16px + env(safe-area-inset-bottom));margin:0}.scheduled{border:1px solid var(--line);color:var(--muted);border-radius:6px;padding:0 6px;font-size:.75rem;font-weight:700}.eta-next .co,.eta-more .co{align-self:center;margin-top:0}.eta-failed{background:var(--special-soft);color:var(--special);border-radius:8px;margin-top:8px;padding:6px 10px;font-size:.8125rem}.route-item{align-items:stretch;padding:0}.route-item .route-id{color:var(--text);padding:12px 0 12px 16px}.route-dirs{flex-direction:column;flex:1;min-width:0;display:flex}.route-dir{min-height:44px;color:var(--text);flex-direction:column;flex:1;justify-content:center;padding:6px 32px 6px 4px;display:flex;position:relative}.route-dir+.route-dir{border-top:1px dashed var(--line)}.route-dir:active{background:var(--bg)}.route-dir-to{white-space:nowrap;text-overflow:ellipsis;font-weight:600;line-height:1.3;overflow:hidden}.route-dir-to small{color:var(--muted);margin-right:2px;font-weight:500}.route-dir-sub{color:var(--muted);white-space:nowrap;text-overflow:ellipsis;font-size:.8125rem;overflow:hidden}.route-dir-go{color:var(--muted);font-size:1.375rem;position:absolute;top:50%;right:12px;transform:translateY(-50%)}.nearest-bar{z-index:3;background:var(--card);border-bottom:1px solid var(--line);align-items:center;gap:10px;padding:6px 14px;display:flex;position:sticky;top:0}.nearest-btn{background:var(--brand);color:var(--on-brand);cursor:pointer;border:0;border-radius:999px;flex:none;padding:6px 12px;font-size:.875rem;font-weight:700}.nearest-btn:disabled{opacity:.6}.nearest-text{min-width:0;color:var(--muted);white-space:nowrap;text-overflow:ellipsis;flex:1;font-size:.875rem;overflow:hidden}.nearest-text b{color:var(--text)}.nearest-bar .link-btn{flex:none;font-size:.875rem}.nearest-tag{background:var(--brand);color:var(--on-brand);vertical-align:2px;border-radius:6px;margin-left:6px;padding:0 6px;font-size:.75rem;font-weight:700;display:inline-block}.fare{font-variant-numeric:tabular-nums;flex-direction:column;flex:none;align-items:flex-end;margin-left:8px;line-height:1.2;display:flex}.fare-adult{color:var(--text);font-size:.875rem;font-weight:700}.fare-joy{color:var(--ok);white-space:nowrap;font-size:.6875rem;font-weight:600}.route-dest{flex-direction:column;justify-content:center;line-height:1.25;display:flex}.route-dest-to{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.route-service{opacity:.8;white-space:nowrap;text-overflow:ellipsis;font-size:.75rem;font-weight:600;overflow:hidden}.timetable-btn{width:44px;height:40px;color:var(--on-brand);cursor:pointer;background:#00000014;border:0;border-radius:12px;flex:none;align-content:center;place-items:center;gap:0;font-size:1rem;line-height:1;display:grid}.timetable-btn small{margin-top:2px;font-size:.625rem;font-weight:700}.drawer-backdrop{z-index:3000;background:#00000059;animation:.15s ease-out fade-in;position:fixed;inset:0}.drawer{background:var(--card);width:min(86vw,360px);color:var(--text);box-shadow:var(--shadow-lg);padding-bottom:env(safe-area-inset-bottom);flex-direction:column;animation:.2s ease-out slide-in;display:flex;position:absolute;top:0;bottom:0;right:0}@keyframes slide-in{0%{transform:translate(100%)}to{transform:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.drawer,.drawer-backdrop{animation:none}}.drawer-head{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;padding:14px 16px;font-size:1.0625rem;display:flex}.drawer-close{background:var(--bg);width:36px;height:36px;color:var(--muted);cursor:pointer;border:0;border-radius:10px;font-weight:700}.drawer-select{border:1px solid var(--line);background:var(--card);color:var(--text);font:inherit;border-radius:10px;margin:12px 16px 0;padding:10px 12px;font-weight:600}.drawer-tabs{flex-wrap:wrap;gap:6px;padding:12px 16px 0;display:flex}.drawer-tabs button{border:1px solid var(--line);background:var(--card);color:var(--text);cursor:pointer;border-radius:10px;flex-direction:column;flex:none;align-items:center;padding:6px 12px;font-size:.875rem;font-weight:600;display:flex}.drawer-tabs button[aria-selected=true]{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}.drawer-tabs small{opacity:.8;font-size:.625rem;font-weight:700}.drawer-note{margin:10px 16px 4px;font-size:.75rem}.periods{flex:1;min-height:0;margin:0;padding:0 0 16px;list-style:none;overflow-y:auto}.periods li{border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums;align-items:baseline;gap:10px;padding:10px 16px;display:flex}.period-time{flex:1;font-weight:600}.period-freq{color:var(--muted);white-space:nowrap;font-size:.875rem}.periods li.now{background:var(--brand-soft);box-shadow:inset 4px 0 0 var(--brand)}.periods li.now .period-freq{color:var(--text);font-weight:600}.period-tag{background:var(--brand);color:var(--on-brand);border-radius:6px;flex:none;padding:0 6px;font-size:.6875rem;font-weight:800}@media (min-width:768px){.route-page{grid-template:"bar bar""variant map""stops map"1fr/minmax(360px,440px) 1fr;max-width:none;display:grid}.route-top{display:contents}.route-bar{grid-area:bar;margin:0;padding-left:12px;padding-right:12px}.variant-picker{grid-area:variant;margin:12px 12px 8px}.route-stops{grid-area:stops;margin:0 12px}.route-map-wrap,.route-page>.route-top>.route-map{grid-area:map;min-height:0;margin:12px 12px 12px 0}.route-map-wrap .route-map{height:100%}.home{max-width:1100px;margin:0 auto}.route-list:has(>li.route-item){background:var(--line);grid-template-columns:1fr 1fr;align-content:start;column-gap:1px;display:grid}.route-list>li{background:var(--card)}.route-list>li.empty,.route-list>li.loading-more,.route-list>li.list-end{grid-column:1/-1}.keypad{border-top:0;width:100%;max-width:560px;margin:0 auto}.nearby-list{grid-template-columns:1fr 1fr;align-items:start;gap:12px;display:grid}}@media (hover:hover) and (pointer:fine) and (min-width:1024px){.keypad{display:none}.route-list:has(>li.route-item){grid-template-columns:1fr 1fr 1fr}.route-dir:hover,.route-item .route-id:hover{background:var(--bg)}}
