/* ============================================================
   实时公交 Web 版 —— 样式 
   设计 token：
     主色 #006efa ｜ 强调橙 #ff5a00 ｜ 紫 #5b3aff
     背景 #f4f6fa ｜ 卡片 #ffffff
   ============================================================ */
:root {
  --primary: #006efa;
  --primary-8: rgba(0, 110, 250, .08);
  --primary-10: rgba(0, 110, 250, .12);
  --primary-6: rgba(0, 110, 250, .06);
  --pill-blue: #d0e5ff;
  --lightblue: #e8f1ff;
  --orange: #ff5a00;
  --purple: #5b3aff;
  --green: #00ae77;
  --t1: #1a1a1a;
  --t2: #666;
  --t3: #999;
  --t4: #b0b0b0;
  --disable: #aaa;
  --split: #f4f4f4;
  --split-strong: #ebebeb;
  --bg: #f4f6fa;
  --card: #fff;
  --shadow: 0 4px 14px 0 rgba(0, 0, 0, .06);
  --shadow2: 0 2px 10px 0 rgba(0, 0, 0, .04);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "PingFangSC-Regular", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--t1);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 560px) {
  body { max-width: 420px; margin: 0 auto; min-height: 100vh; position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, .08); background: var(--bg); }
}
button, input { font-family: inherit; outline: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }

/* ===== 视图容器 ===== */
.view { min-height: 100vh; display: none; }
.view.active { display: block; }

/* ===== 顶部栏 - 首页 ===== */
.app-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: 44px; background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
}
@media (min-width: 560px) {
  .app-topbar { left: 50%; transform: translateX(-50%); width: 100%; max-width: 420px; }
}
.city { display: flex; align-items: center; gap: 3px; cursor: pointer; }
.city-name { color: #000; font-size: 17px; font-weight: 600; }
.arrow-down { color: #000; font-size: 14px; line-height: 1; }

.top-actions { display: flex; align-items: center; gap: 14px; }
.top-ico {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f1f3f6; border-radius: 50%;
  color: #4a4a4a; font-size: 12px; cursor: pointer;
}
.top-ico.solid { background: #2a2a2a; color: #fff; }
.top-ico.dot {
  width: 22px; height: 22px; border-radius: 4px;
  background: #2a2a2a; color: #fff; font-size: 11px;
}

/* ===== 子页面顶部 ===== */
.page-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: 44px; background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
}
@media (min-width: 560px) {
  .page-nav { left: 50%; transform: translateX(-50%); width: 100%; max-width: 420px; }
}
.nav-back { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; color: #1a1a1a; cursor: pointer; }
.nav-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 17px; font-weight: 600; color: #1a1a1a; }
.nav-actions { display: flex; align-items: center; gap: 14px; }

/* ===== 底部 Tab ===== */
.bottom-tab {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 58;
  height: 58px; background: #fff; border-top: 1px solid var(--split);
  display: flex; justify-content: space-around; align-items: center;
}
@media (min-width: 560px) {
  .bottom-tab { left: 50%; transform: translateX(-50%); width: 100%; max-width: 420px; }
}
.tab-item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: #888; cursor: pointer; flex: 1; padding: 8px 0; }
.tab-ico { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.tab-item.active { color: var(--primary); }
.tab-item.active .tab-ico::before { content: ''; }

/* 通用图标（用纯 CSS / svg） */
.ico { display: inline-block; vertical-align: middle; }

/* ============================================================
   首页
   ============================================================ */
.view-home { background: var(--bg); padding-top: 0; }
.home-scroll { padding: 50px 0 80px; }

.top-section { background: #fff; padding: 6px 12px 12px; }

/* 搜索栏（灰胶囊 + 天气） */
.search-bar {
  background: #f1f3f6; border-radius: 22px; height: 42px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; cursor: pointer;
}
.search-bar .sb-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; }
.search-bar .sb-left input { flex: 1; min-width: 0; width: 100%; }
.search-bar .placeholder { color: var(--t3); font-size: 14px; line-height: 22px; }
.search-bar .icon-search { width: 16px; height: 16px; flex: none; color: var(--t3); }
.weather { display: flex; align-items: center; gap: 6px; color: #222; }
.weather .temperature { display: flex; align-items: flex-start; font-weight: 500; font-size: 14px; }
.weather .condition { font-size: 13px; color: #444; }

/* 我的收藏 */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  color: #000; font-size: 18px; font-weight: 600;
  padding: 22px 16px 14px;
}
.section-head .more { color: var(--t2); font-size: 13px; display: flex; align-items: center; }
.section-head .more .enter { margin-left: 2px; font-size: 14px; }

.fav-card {
  background: #fff; border-radius: 16px; margin: 0 12px 10px;
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.fav-card::before {
  content: ''; position: absolute; right: -30px; top: -20px;
  width: 120px; height: 120px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 110, 250, .04) 0%, rgba(0, 110, 250, .1) 100%);
}

/* 附近站点/历史线路 tab */
.tabs { display: flex; align-items: center; gap: 24px; padding: 4px 16px 10px; }
.tag-item { color: var(--t3); font-size: 16px; cursor: pointer; position: relative; padding: 6px 0; }
.tag-active { color: #000; font-size: 19px; font-weight: 700; }
.tag-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, #4aa3ff 100%); border-radius: 2px;
}

/* 定位蓝色提示条 */
.local-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--primary); color: #fff; font-size: 13px;
  height: 44px; padding: 0 14px; margin: 4px 12px 6px; border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 110, 250, .25);
}
.local-bar .lb-left { display: flex; align-items: center; gap: 8px; }
.local-bar .lb-ico { width: 14px; height: 14px; }
.local-bar .lb-btn {
  background: #fff; border-radius: 18px; color: var(--primary);
  font-size: 12px; font-weight: 600; height: 26px; padding: 0 14px;
  border: 0; cursor: pointer;
}
.local-bar.linedetail {
  background: var(--primary-10); color: var(--primary);
  height: 38px; box-shadow: none; font-size: 12px;
}
.local-bar.linedetail .lb-btn { background: var(--primary); color: #fff; }
.local-bar.fav {
  background: var(--primary-10); color: var(--primary);
  height: 38px; box-shadow: none; font-size: 13px;
  margin: 12px 12px 6px;
}
.local-bar.fav .lb-btn { background: var(--primary); color: #fff; }

/* 白色卡片 */
.card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; margin: 0 12px 10px; }

/* 站点卡片标题 */
.card .title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 14px; border-bottom: 1px solid var(--split);
}
.card .title .left { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.card .title .name { color: var(--t1); font-size: 16px; font-weight: 600; }
.card .title .meta { color: var(--t3); font-size: 13px; }
.card .title .ic-arrow { color: #d0d0d0; font-size: 16px; }

.ic-stop {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex: none; color: var(--primary);
}

/* ===== 线路行 station-line（首页收藏 / 附近站点 / 同站线路 共用）===== */
.sl-card { border-top: 1px solid var(--split); margin: 0 14px; }
.sl-card:first-child { border-top: 0; }
.sl-item { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 18px; }
.sl-left { flex: 1; min-width: 0; max-width: 60%; }
.sl-line-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.sl-name {
  color: var(--t1); font-size: 16px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sl-tag {
  display: inline-flex; align-items: center;
  border-radius: 4px; border: 1px solid var(--primary);
  color: var(--primary); font-size: 10px; padding: 1px 4px;
  background: #fff; flex: none;
}
.sl-tag.purple { border-color: var(--purple); color: var(--purple); background: rgba(91, 58, 255, .08); }
.sl-stop {
  color: var(--t2); font-size: 12px; line-height: 18px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sl-stop + .sl-stop { margin-top: 2px; }

.sl-right { flex: 1; max-width: 40%; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.sl-time { display: inline-flex; align-items: baseline; color: var(--primary); font-weight: 700; }
.sl-time-v {
  font-size: 28px; line-height: 30px; margin-right: 2px;
  position: relative; letter-spacing: -0.5px;
}
.sl-time-v .sl-wifi {
  position: absolute; right: -10px; top: 0;
  width: 10px; height: 10px;
  object-fit: contain;
  pointer-events: none;
}
.sl-time-u { font-size: 11px; line-height: 1; font-weight: 500; opacity: 0.75; }
.sl-dist { color: var(--t2); font-size: 12px; margin-top: 4px; }

.sl-item.muted .sl-time, .sl-item.muted .sl-time-v, .sl-item.muted .sl-time-u { color: var(--t3); }
.sl-item.highlight .sl-time, .sl-item.highlight .sl-time-v, .sl-item.highlight .sl-time-u { color: var(--orange); }

/* 已到站 */
.state-arrived { color: var(--orange); font-size: 18px; font-weight: 600; text-align: right; }
.state-empty { display: flex; flex-direction: column; align-items: flex-end; }
.state-empty .line-1 { color: var(--t1); font-size: 15px; font-weight: 600; line-height: 20px; }
.state-empty .line-2 { color: var(--t2); font-size: 12px; line-height: 17px; margin-top: 4px; }

/* ============================================================
   路线规划
   ============================================================ */
.view-plan { background: var(--bg); padding: 44px 0 70px; }
.plan-card {
  background: #fff; border-radius: 14px; margin: 12px 14px;
  padding: 22px 18px; position: relative; box-shadow: var(--shadow);
}
.plan-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.plan-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  box-shadow: 0 0 0 4px rgba(0, 174, 119, .15);
}
.plan-dot.green { background: var(--green); box-shadow: 0 0 0 4px rgba(0, 174, 119, .18); }
.plan-dot.orange { background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 90, 0, .15); }
.plan-label { font-size: 16px; color: var(--t1); font-weight: 500; }
.plan-linker {
  position: absolute; left: 26px; top: 38px; bottom: 38px;
  width: 0; border-left: 1.5px dashed #e0e0e0;
}
.plan-swap {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: #f4f6fa;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--primary); cursor: pointer;
}

.plan-history { margin: 0 14px; }
.plan-history-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600; color: var(--t1);
  padding: 16px 6px 10px;
}
.clear-history { color: #c0c0c0; font-size: 16px; cursor: pointer; }
.plan-history-item {
  background: #fff; border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; gap: 10px; font-size: 14px;
  box-shadow: var(--shadow); margin-bottom: 8px; cursor: pointer;
}
.plan-history-item .ph-ico { color: var(--primary); font-size: 18px; }
.plan-history-item .ph-from { color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42%; }
.plan-history-item .ph-arrow { color: #c0c0c0; flex: none; }
.plan-history-item .ph-to { color: var(--t1); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42%; }

/* 起终点行可点击 */
.plan-row { cursor: pointer; border-radius: 10px; padding: 12px 8px; margin: 0 -8px; }
.plan-row:active { background: var(--primary-6); }
.plan-label.muted { color: var(--t3); }

/* 策略 tab */
.plan-tabs {
  display: flex; align-items: center; gap: 6px;
  margin: 10px 14px 4px; overflow-x: auto; scrollbar-width: none;
}
.plan-tabs::-webkit-scrollbar { display: none; }
.pt-item {
  flex: none; background: #fff; color: var(--t2);
  border-radius: 18px; font-size: 13px; padding: 8px 16px;
  box-shadow: var(--shadow); cursor: pointer;
}
.pt-item.active { background: var(--primary); color: #fff; font-weight: 600; }

/* 方案结果 */
.plan-result-loading { padding: 40px; text-align: center; color: var(--t3); font-size: 14px; }
.plan-empty { background: #fff; border-radius: 14px; margin: 12px 14px; padding: 40px; text-align: center; color: var(--t3); font-size: 14px; }
.plan-summary {
  display: flex; align-items: center; justify-content: space-between;
  margin: 10px 14px 0; padding: 0 2px; font-size: 13px; color: var(--t2);
}
.plan-summary b { color: var(--primary); font-size: 16px; }
.tcard {
  background: #fff; border-radius: 14px; margin: 8px 14px;
  padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer;
}
.tcard-head { display: flex; align-items: center; justify-content: space-between; }
.tcard-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tcard .t-card-lines { display: flex; align-items: center; gap: 6px; overflow: hidden; }
.tcard-line-badge {
  background: var(--primary-8); color: var(--primary);
  border-radius: 6px; font-size: 13px; font-weight: 700;
  padding: 3px 8px; flex: none;
}
.tcard-line-badge.metro { background: rgba(91,58,255,.1); color: var(--purple); }
.tcard-line-badge.walk { background: #f2f3f5; color: var(--t3); }
.tcard .arrow-c { color: #c0c0c0; font-size: 13px; flex: none; }
.tcard-duration { color: var(--t1); font-size: 17px; font-weight: 700; }
.tcard-tag {
  display: inline-block; color: var(--orange); font-size: 11px;
  border: 1px solid var(--orange); border-radius: 8px; padding: 1px 6px;
  margin-left: 8px; vertical-align: 2px; flex: none;
}
.tcard-meta { color: var(--t3); font-size: 12px; margin-top: 8px; }
.tcard-foot { display: flex; align-items: center; gap: 4px; margin-top: 10px; overflow: hidden; }
.tcard-foot .line-name { font-size: 13px; color: var(--t2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-foot .sep { color: #d0d0d0; flex: none; }

/* 分段详情 */
.seg-wrap { margin-top: 12px; border-top: 1px dashed var(--split); padding-top: 12px; }
.seg-item { display: flex; gap: 10px; }
.seg-left { display: flex; flex-direction: column; align-items: center; flex: none; width: 18px; }
.seg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 5px; flex: none; }
.seg-dot.green { background: var(--green); }
.seg-dot.walk { background: #ccc; }
.seg-line { flex: 1; width: 2px; background: #e6ebf1; margin: 2px 0; flex: none; }
.seg-main { padding-bottom: 14px; min-width: 0; }
.seg-title { font-size: 14px; color: var(--t1); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.seg-sub { font-size: 12px; color: var(--t3); margin-top: 3px; line-height: 18px; }
.seg-sub .hl { color: var(--t2); }

/* POI 搜索弹层 */
.poi-list { overflow-y: auto; padding: 4px 0 12px; }
.poi-row {
  padding: 13px 18px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--split); cursor: pointer;
}
.poi-row:active { background: var(--primary-8); }
.poi-row .ico { color: var(--primary); font-size: 15px; flex: none; }
.poi-row .main { flex: 1; min-width: 0; }
.poi-row .sn { font-size: 15px; color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poi-row .addr { font-size: 12px; color: var(--t3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poi-hint {
  padding: 14px 18px; font-size: 15px; color: var(--primary);
  border-bottom: 1px solid var(--split); cursor: pointer;
}

/* ============================================================
   路线详细
   ============================================================ */
.view-line { background: var(--bg); padding: 50px 0 90px; }

/* 路线详细：基本信息卡 */
.info-card { background: #fff; border-radius: 14px; margin: 10px 12px 0; box-shadow: var(--shadow); padding: 16px 14px 0; }
.line-profile { display: flex; align-items: center; justify-content: space-between; }
.lp-main { flex: 1; min-width: 0; }
.lp-route {
  display: flex; align-items: center; gap: 6px;
  font-size: 17px; font-weight: 700; color: var(--t1);
}
.lp-route .from, .lp-route .to { max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-route .arrow { color: #c0c0c0; font-size: 14px; }
.lp-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--t3); margin-top: 4px;
}
.lp-meta .time-pill {
  background: var(--pill-blue); color: var(--primary);
  font-size: 11px; font-weight: 500;
  padding: 2px 6px; border-radius: 8px;
}
.act-direction {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 4px 6px; cursor: pointer;
}
.act-direction .act-icon { font-size: 18px; color: var(--t1); }
.act-direction .act-label { font-size: 12px; color: var(--t1); }

/* 实时车辆卡片 */
.bus-profile {
  background: linear-gradient(180deg, #eaf3ff 0%, #d6e8ff 100%);
  border-radius: 12px; margin: 12px 0 6px;
  height: 92px;
  display: flex; align-items: stretch;
  position: relative; overflow: hidden;
}
.bp-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 8px;
}
.bp-time { display: inline-flex; align-items: baseline; color: var(--primary); font-weight: 700; }
.bp-time-v { position: relative; font-size: 30px; line-height: 32px; margin-right: 2px; letter-spacing: -0.5px; }
.bp-time-u { font-size: 11px; line-height: 1; font-weight: 500; opacity: 0.75; }
.bp-dist { font-size: 12px; font-weight: 500; color: var(--primary); margin-top: 4px; }
/* 即将到站：数字与距离转橙色强调（配 wifi-orange.gif 角标） */
.bp-time.highlight, .bp-time.highlight .bp-time-v, .bp-time.highlight .bp-time-u { color: var(--orange); }
.bp-time.highlight + .bp-dist { color: var(--orange); }
/* wifi 角标：定位在顶层大数字右上角 */
.bp-time-v .bp-wifi {
  position: absolute; right: -10px; top: 0;
  width: 10px; height: 10px;
  object-fit: contain;
  pointer-events: none;
}
.bp-divider {
  width: 1px; align-self: center; height: 56px;
  background: rgba(255, 255, 255, .7);
}
.bp-more {
  flex: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 0 14px; cursor: pointer;
}
.bp-more .label { color: var(--primary); font-size: 13px; font-weight: 600; line-height: 16px; }
.bp-more .icon { color: var(--primary); font-size: 14px; line-height: 16px; margin-top: 2px; }
.bp-none {
  width: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.bp-none .line-1 { color: var(--t1); font-size: 15px; font-weight: 600; line-height: 20px; }
.bp-none .line-2 { color: var(--t3); font-size: 12px; line-height: 17px; margin-top: 4px; }

/* 黄色广告卡 */
.ad-card {
  margin: 10px 12px 4px; border-radius: 10px;
  background: #fff7e8; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .04);
}
.ad-card .ad-icon { color: var(--orange); font-size: 18px; flex: none; }
.ad-card .ad-text { flex: 1; font-size: 12px; color: var(--t1); }
.ad-card .ad-text b { color: var(--orange); }
.ad-card .ad-btn {
  background: var(--orange); color: #fff; border: 0;
  border-radius: 16px; font-size: 12px; font-weight: 600;
  padding: 6px 12px; cursor: pointer;
}

/* 站点横向条：绿色轨道 + 当前站站牌 + 公交车 + 底部滑块（对齐官方 UI） */
.routes-wrap { position: relative; background: #fff; margin: 8px 12px 0; border-radius: 14px; box-shadow: var(--shadow); padding: 10px 0 2px; overflow: hidden; }
.routes-scroll { display: flex; overflow-x: auto; padding: 10px 0 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.routes-scroll::-webkit-scrollbar { display: none; }
.routes-inner { position: relative; display: flex; flex: none; padding: 0 28px; }
/* 贯穿整条滚动内容的绿色轨道线（首站前/末站后不留多余横线） */
.routes-track-line { position: absolute; left: 67px; right: 67px; top: 28px; height: 4px; border-radius: 2px; background: #2eaf7d; }
/* 站点之间的白色行驶方向箭头（指向行车方向） */
.route-item + .route-item::before {
  content: ''; position: absolute; left: 0; top: 30px; z-index: 1;
  width: 0; height: 0;
  border-left: 8px solid #fff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: translate(-50%, -50%);
}
/* 有车运行时：白色箭头沿行车方向依次点亮流动（纯 opacity，GPU 友好） */
@keyframes rtArrowFlow { 0%, 100% { opacity: 1; } 45%, 80% { opacity: .2; } }
.routes-wrap.flow-on .route-item + .route-item::before {
  animation: rtArrowFlow 1.6s linear infinite;
  animation-delay: calc(var(--i, 0) * -0.18s);
}
@media (prefers-reduced-motion: reduce) {
  .routes-wrap.flow-on .route-item + .route-item::before { animation: none; }
}
/* 公交车图标层：定位到车辆所在站附近 */
.routes-buses { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.rt-bus { position: absolute; top: 8px; width: 32px; height: 16px; }

.route-item {
  flex: none; width: 78px; display: flex; flex-direction: column; align-items: center;
  position: relative; z-index: 1;
}
.route-item .rt-order {
  font-size: 15px; font-weight: 700; color: var(--t1);
  line-height: 18px; height: 18px; z-index: 1;
}
.route-item .rt-marker {
  height: 20px; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.route-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid #c9d4de;
}
.route-item.selected .route-dot { border-color: var(--primary); }
/* 首末站点：绿色实心圈，直观看到终点 */
.route-item.terminal .route-dot { background: #2eaf7d; border-color: #2eaf7d; }
.route-item.selected .rt-order,
.route-item.selected .rt-name { color: var(--primary); }
/* 当前定位站的站台标识（替换圆点） */
.rt-board { width: 22px; height: 22px; }
.rt-name {
  font-size: 14px; color: var(--t1);
  margin-top: 6px; line-height: 16px;
  writing-mode: vertical-rl; text-orientation: upright;
  white-space: nowrap;   /* 站名一列到底，不折成两列 */
  text-align: center;
}

/* 底部滑块：指示横向滚动位置，可拖动 */
.routes-slider { position: relative; height: 16px; margin: 2px 16px 0; touch-action: none; }
.routes-thumb {
  position: absolute; top: 5px; left: 0;
  min-width: 24px; height: 5px; border-radius: 3px;
  background: #dfe3e8; will-change: transform;
}

/* 当前定位站滚出可视区时的贴边站牌（点击回中） */
.routes-edge-badge {
  position: absolute; top: 16px; z-index: 5;
  width: 26px; padding: 6px 0 8px; border: 0; cursor: pointer;
  background: var(--primary); color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 110, 250, .35);
}
.routes-edge-badge.left { left: 0; border-radius: 0 8px 8px 0; }
.routes-edge-badge.right { right: 0; border-radius: 8px 0 0 8px; }
.routes-edge-badge img { width: 14px; height: 14px; }
.routes-edge-badge .reb-name {
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: 11px; line-height: 12px; max-height: 72px; overflow: hidden;
}

/* 底部操作栏（路线详细） */
.line-actions {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 55;
  background: #fff; border-top: 1px solid var(--split);
  height: 64px; display: none; align-items: center;
  padding: 0 8px;
}
@media (min-width: 560px) {
  .line-actions { left: 50%; transform: translateX(-50%); width: 100%; max-width: 420px; }
}
.line-actions.active { display: flex; }
.la-left { flex: 1; display: flex; align-items: center; gap: 2px; }
.la-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer;
  padding: 6px 0; border-radius: 8px;
}
.la-ico { font-size: 18px; color: var(--t2); margin-bottom: 4px; }
.la-img { width: 20px; height: 20px; margin-bottom: 4px; object-fit: contain; }
.ad-text { transition: opacity .25s ease; }
.la-label { color: var(--t2); font-size: 11px; line-height: 14px; text-align: center; }
.la-item.active .la-ico,
.la-item.active .la-label { color: var(--purple); }
.la-right { display: flex; align-items: center; }
/* 刷新按钮：与底部其它按钮统一样式（图标+文字上下排列，无胶囊底色） */
.la-refresh {
  background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 6px 14px;
  font-size: 11px; color: var(--primary); font-weight: 600;
}
.la-refresh img { width: 20px; height: 20px; }

/* 底部 AI 大字广告 */
.big-ad {
  margin: 12px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, #d8e6ff 0%, #b9d2ff 100%);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
  position: relative; min-height: 92px;
}
.big-ad .ad-info { display: flex; flex-direction: column; justify-content: center; }
.big-ad .ad-tag { font-size: 11px; color: var(--primary); font-weight: 600; margin-bottom: 6px; display: inline-flex; align-items: center; gap: 4px; }
.big-ad .ad-tag .badge { background: var(--primary); color: #fff; padding: 1px 4px; border-radius: 3px; font-size: 10px; }
.big-ad .ad-title { color: var(--primary); font-size: 22px; font-weight: 800; line-height: 1.2; }
.big-ad .ad-title small { font-size: 14px; font-weight: 600; }
.big-ad .ad-sub { color: var(--t2); font-size: 12px; margin-top: 6px; }
.big-ad .ad-mini {
  position: relative; width: 92px; height: 70px;
  background: #fff; border-radius: 10px; padding: 6px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  display: flex; flex-direction: column; gap: 3px;
}
.big-ad .ad-mini .mini-row { display: flex; align-items: center; gap: 4px; }
.big-ad .ad-mini .mini-dot { width: 8px; height: 8px; border-radius: 50%; background: #ffd84a; flex: none; }
.big-ad .ad-mini .mini-bar { height: 4px; background: #cfd8e5; border-radius: 2px; flex: 1; }
.big-ad .close-ad { position: absolute; right: 6px; top: 6px; font-size: 12px; color: #888; background: rgba(255, 255, 255, .7); border-radius: 50%; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* ============================================================
   我的收藏
   ============================================================ */
.view-fav { background: var(--bg); padding: 50px 0 100px; }
.fav-list-page { padding: 0; }
.add-fav-wrap {
  position: fixed; bottom: 20px; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center;
}
@media (min-width: 560px) {
  .add-fav-wrap { left: 50%; transform: translateX(-50%); width: 420px; }
}
.add-fav {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(0, 110, 250, .85); border: 0; border-radius: 23px;
  height: 46px; padding: 0 26px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 110, 250, .35);
}
.add-fav .img { color: #fff; font-size: 14px; }
.add-fav .btn { color: #fff; font-size: 16px; font-weight: 600; }

/* ============================================================
   同站线路
   ============================================================ */
.view-stop { position: relative; background: var(--bg); padding: 0 0 80px; }
.stop-map {
  position: relative; height: 320px; overflow: hidden;
  background: #e6e8eb;
}
/* 必须自成层叠上下文：地图 SDK 会往内部注入 z-index 高达 100~1000+ 的图层，
   不隔离的话这些图层会盖住返回键、缩放键等浮在地图上的控件 */
.stop-map-canvas { width: 100%; height: 100%; display: block; position: relative; z-index: 0; }
/* 地图加载占位 */
.stop-map-canvas.map-loading {
  display: flex; align-items: center; justify-content: center;
  color: var(--t3); font-size: 13px;
}

.nav-back-float {
  position: absolute; left: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%;
  background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); z-index: 100;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
  pointer-events: auto;
}
.stop-toolbar {
  position: absolute; right: 12px; top: 12px; z-index: 10;
  display: flex; gap: 6px;
}
.stop-toolbar .dot-btn {
  background: #fff; border-radius: 50%; width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18); color: #555;
}
.locate-me-fab {
  position: absolute; right: 12px; bottom: 12px; z-index: 10;
  width: 40px; height: 40px; border-radius: 8px;
  background: #fff; color: #1a1a1a; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25); cursor: pointer;
}

.stop-container {
  background: #fff; padding: 14px 16px 16px;
  border-bottom: 8px solid var(--bg);
}
.stop-flex { display: flex; align-items: center; justify-content: space-between; }
.stop-name-row { display: flex; align-items: center; gap: 8px; }
.icon-board { color: var(--primary); font-size: 18px; }
.stop-name { color: var(--t1); font-size: 19px; font-weight: 700; }
.transmit {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid var(--primary); border-radius: 18px;
  color: var(--primary); height: 32px; padding: 0 14px; background: #fff;
  font-size: 13px; cursor: pointer;
}
.stop-tips { color: var(--t2); font-size: 12px; margin-top: 8px; }
.stop-lines { padding: 0; }

/* ============================================================
   更多车辆
   ============================================================ */
.view-buses { background: var(--bg); padding: 50px 0 80px; }
.buses-profile {
  background: #fff; padding: 18px 18px 20px;
  border-bottom: 1px solid var(--split);
}
.buses-line-name { color: var(--t1); font-size: 19px; font-weight: 700; }
.buses-dir {
  color: var(--t2); font-size: 14px; font-weight: 400; margin-top: 8px;
  display: flex; align-items: center; gap: 6px;
}
.buses-dir .icon { width: 14px; height: 4px; background: #d4d4d4; border-radius: 2px; }
.buses-stop-row {
  color: var(--t1); font-size: 14px;
  height: 48px; line-height: 48px; padding-left: 18px;
  background: #fff;
}
.buses-stop-row .stop-name { color: var(--primary); font-weight: 600; }
.buses-list { padding: 12px 12px 0; }
.bus-card {
  background: #fff; border-radius: 14px; padding: 16px 14px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.bus-top { display: flex; align-items: center; gap: 8px; }
.bus-licence {
  display: flex; align-items: center; color: var(--t1);
  font-size: 15px; font-weight: 600; gap: 8px;
}
.bus-licence .icon { color: var(--primary); font-size: 18px; }
.bus-foot { border-top: 1px solid var(--split); margin-top: 14px; padding-top: 12px; }
.bus-flex { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bus-info { color: var(--t2); font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.bus-next {
  color: #999; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 220px;
}
.bus-time { color: var(--primary); font-size: 17px; font-weight: 700; position: relative; }
.bus-time .bus-wifi {
  position: absolute; right: -10px; top: 0;
  width: 10px; height: 10px;
  object-fit: contain;
  pointer-events: none;
}
.bus-time .bus-tomorrow {
  font-size: 11px;
  color: var(--orange);
  margin-right: 4px;
  vertical-align: middle;
}
.bus-light { color: var(--orange); font-size: 17px; font-weight: 600; }

/* ============================================================
   弹窗 / Toast / FAB
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .35);
}
.modal-mask { position: absolute; inset: 0; }
.modal-panel {
  position: relative; background: #fff; width: 100%; max-width: 420px;
  max-height: 78vh; border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-head {
  padding: 16px; font-size: 17px; font-weight: 700;
  border-bottom: 1px solid var(--split);
  display: flex; flex-direction: column; gap: 10px;
}
.modal-head input {
  border: 1px solid var(--split); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; outline: 0;
}
.city-list { overflow-y: auto; padding: 8px 0; }
.city-row { padding: 13px 18px; font-size: 15px; cursor: pointer; }
.city-row:active { background: var(--primary-8); }
.city-row .tag { font-size: 12px; color: var(--t3); margin-left: 8px; }
.city-row.hot { color: var(--primary); font-weight: 600; }

.set-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.set-body label { font-size: 13px; color: var(--t3); margin-top: 6px; }
.set-body input {
  border: 1px solid var(--split); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; outline: 0;
}
/* 地图服务商选择 */
.map-opt {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--split); border-radius: 12px;
  padding: 12px 14px; cursor: pointer;
}
.map-opt .mo-radio {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 1px solid #cfcfcf; position: relative;
}
.map-opt.active { border-color: var(--primary); background: var(--primary-8); }
.map-opt.active .mo-radio { border-color: var(--primary); }
.map-opt.active .mo-radio::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--primary);
}
.map-opt .mo-main { flex: 1; min-width: 0; }
.map-opt .mo-name { font-size: 15px; color: var(--t1, #222); }
.map-opt .mo-desc { font-size: 12px; color: var(--t3); margin-top: 3px; }
.set-tip { font-size: 12px; color: var(--t3); line-height: 1.5; }

/* 搜索历史 */
.sh-head { padding: 16px 16px 10px; color: #333; font-size: 15px; font-weight: 600; }
.sh-card { background: #fff; border-radius: 14px; margin: 0 12px; box-shadow: var(--shadow); overflow: hidden; }
.sh-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--split); cursor: pointer; }
.sh-row:active { background: var(--primary-8); }
.sh-ico { font-size: 15px; }
.sh-name { flex: 1; min-width: 0; font-size: 14px; color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-star { color: var(--orange); font-size: 14px; flex: none; }
.sh-clear { padding: 13px; text-align: center; color: var(--t3); font-size: 13px; cursor: pointer; }
.sh-clear:active { background: #f7f8fa; }

/* 居中对话框（定位权限引导） */
.modal.center { align-items: center; }
.dialog {
  position: relative; z-index: 1; background: #fff;
  border-radius: 16px; width: 78%; max-width: 320px;
  padding: 26px 20px 20px; text-align: center;
}
.dlg-title { font-size: 17px; font-weight: 600; color: var(--t1); }
.dlg-text { font-size: 13px; color: var(--t3); margin-top: 10px; line-height: 1.6; }
.dlg-btns { display: flex; gap: 12px; margin-top: 22px; }
.dlg-btn { flex: 1; height: 38px; border-radius: 19px; border: 0; font-size: 14px; cursor: pointer; }
.dlg-btn.ghost { background: #f2f3f5; color: #666; }
.dlg-btn.primary { background: var(--primary); color: #fff; font-weight: 600; }

/* 规划页定位失败兜底 */
.plan-locfail { display: flex; flex-direction: column; align-items: center; padding: 70px 20px; text-align: center; }
.plan-locfail .plf-icon { font-size: 56px; }
.plan-locfail .plf-text { color: #666; font-size: 14px; margin-top: 12px; }
.plan-locfail .plf-retry {
  margin-top: 18px; background: var(--primary); color: #fff; border: 0;
  border-radius: 20px; height: 36px; padding: 0 34px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}

/* 发车预测 */
.fc-list { overflow-y: auto; max-height: 56vh; }
.fc-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--split); cursor: pointer;
}
.fc-row:last-child { border-bottom: 0; }
.fc-row .fc-ico { font-size: 14px; }
.fc-row .fc-range { font-size: 14px; color: var(--t1); }
.fc-tag { font-size: 11px; color: var(--orange); border: 1px solid var(--orange); border-radius: 4px; padding: 1px 4px; }
.fc-arrow { margin-left: auto; color: var(--t4); font-size: 12px; transition: transform .2s; }
.fc-row.open .fc-arrow { transform: rotate(180deg); }
.fc-detail { flex-basis: 100%; font-size: 12px; color: var(--t2); line-height: 1.6; }
/* 每班的发车时刻（4 列网格） */
.fc-times { flex-basis: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 6px; padding: 12px 2px 6px; }
.fc-times span { font-size: 13px; color: var(--t2); text-align: center; }
.fc-times span.next { color: var(--primary); font-weight: 700; }
.fc-times span.passed { color: #c3c8cf; }

/* 右上角菜单 */
.menu-list { padding: 6px 0; }
.menu-row { padding: 14px 18px; font-size: 15px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.menu-row:active { background: var(--primary-8); }
.menu-row .mr-ico { color: var(--primary); width: 18px; text-align: center; }

/* 线路地图全屏页（点「地图」按钮进入） */
.view-map { background: #e6e8eb; }
.map-full { position: fixed; inset: 0; }
/* 同 .stop-map-canvas：隔离地图 SDK 的高 z-index 图层，保证返回键/控件可点 */
.map-full-canvas { width: 100%; height: 100%; position: relative; z-index: 0; }
.map-placeholder {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  color: var(--t3); font-size: 13px; background: #eef1f5;
}
.map-back {
  position: absolute; left: 12px; top: 14px; z-index: 10;
  height: 36px; min-width: 36px; padding: 0 12px; border-radius: 18px;
  background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; color: #333; cursor: pointer;
}
.map-title {
  position: absolute; top: 20px; left: 64px; right: 64px; z-index: 10;
  text-align: center; color: #333; font-size: 15px; font-weight: 600;
  text-shadow: 0 1px 4px rgba(255, 255, 255, .9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
.map-ctrls { position: absolute; right: 12px; bottom: 96px; z-index: 10; display: flex; flex-direction: column; gap: 10px; }
.map-ctrls .dot-btn {
  background: #fff; border-radius: 50%; width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; color: #555;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.set-tip a { color: var(--primary); }
.set-save {
  margin-top: 8px; border: 0; background: var(--primary); color: #fff;
  padding: 12px; border-radius: 10px; font-size: 15px; cursor: pointer;
}

.fab {
  position: fixed; right: 14px; bottom: 80px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: #fff; color: var(--primary);
  font-size: 18px; z-index: 60;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .15); cursor: pointer;
}
@media (min-width: 560px) {
  .fab { right: calc(50% - 210px + 14px); }
}

.toast {
  position: fixed; left: 50%; top: 30%; transform: translateX(-50%);
  background: rgba(0, 0, 0, .8); color: #fff;
  padding: 10px 18px; border-radius: 10px;
  font-size: 14px; z-index: 300; max-width: 80%; text-align: center;
}

/* ============================================================
   我的
   ============================================================ */
.view-mine { background: var(--bg); padding: 44px 0 80px; }
.mine-header {
  background: #fff; padding: 24px 18px 20px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 8px solid var(--bg);
}
.mine-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary-10); color: var(--primary);
  font-size: 28px; display: inline-flex; align-items: center; justify-content: center;
}
.mine-name { font-size: 18px; font-weight: 700; }
.mine-city { font-size: 13px; color: var(--t3); margin-top: 4px; }
.mine-group { margin: 10px 12px 0; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.mine-cell {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px; cursor: pointer; position: relative;
  border-bottom: 1px solid var(--split);
}
.mine-cell:last-child { border-bottom: 0; }
.mine-cell:active { background: var(--primary-6); }
.mine-cell .cell-ico { font-size: 18px; color: var(--primary); width: 22px; text-align: center; }
.mine-cell .cell-arrow { margin-left: auto; color: #c8c8c8; font-size: 16px; }
.mine-tip { text-align: center; color: var(--t4); font-size: 12px; padding: 30px 20px; line-height: 1.7; }

/* ============================================================
   地图容器（线路详情 / 同站）
   ============================================================ */
.line-map-card { margin: 10px 12px 4px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: #e6e8eb; height: 240px; position: relative; }
#lineMapCanvas { width: 100%; height: 100%; }
.map-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--t3); font-size: 12px; text-align: center; padding: 20px; z-index: 1;
  background: #e6e8eb;
}
