/* ============================================================
 * TRANSIT LIVE · 实时公交
 * Awwwards 级先锋视觉 · 移动端优先 · 桌面端 ≥860px 切换
 * ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  /* 配色 */
  --ink: #1A1A1A;
  --ink-2: #5C5C5C;
  --ink-3: #CCCCCC;
  --ink-4: #E5E5E5;
  --paper: #FFFFFF;
  --violet: #5200FF;
  --violet-08: rgba(82, 0, 255, 0.08);
  --mint: #10B981;

  /* 字体 */
  --f-display: "Syne", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-cn: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", "Menlo", "Consolas", monospace;

  /* 排版 */
  --letter-cn: -1%;
  --letter-mono: 4%;

  /* 间距 */
  --pad-x: 20px;
  --gap-row: 28px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-cn);
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
input:focus { outline: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
svg { display: block; flex-shrink: 0; }

/* ---------- 视图切换 ---------- */
.view { display: none; }
.view.is-active { display: flex; }

/* =========================================================
 * LOGIN 登录页（移动端 390 优先）
 * ========================================================= */
.view-login {
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  background: var(--paper);
}

.l-top-block {
  padding: 28px var(--pad-x) 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.l-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.l-logo-mark {
  width: 32px; height: 32px;
  background: var(--ink);
  display: inline-flex;
  align-items: center; justify-content: center;
}
.l-secure-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--ink);
  background: var(--paper);
}
.l-secure-chip svg { color: var(--mint); }
.l-secure-chip span {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--letter-mono);
}

.l-kicker {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: var(--letter-mono);
}

.l-type-stage {
  position: relative;
  height: 186px;
  overflow: hidden;
}
.l-mega {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 66px;
  letter-spacing: -4%;
  line-height: 1;
  color: var(--ink);
  position: relative;
  z-index: 2;
}
.l-mega span:first-child { margin-bottom: 4px; }
.l-ghost-glyph {
  position: absolute;
  top: 24px; right: 0;
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 100px;
  color: var(--violet);
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

/* ----- Form ----- */
.l-form-block {
  padding: 0 var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.l-title {
  margin: 0;
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: var(--letter-cn);
  color: var(--ink);
}
.l-sub {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 175%;
}

.l-field { display: flex; flex-direction: column; gap: 10px; }
.l-label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: var(--letter-mono);
}
.l-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  transition: border-color 120ms;
}
.l-input:focus-within { border-color: var(--violet); }
.l-input-icon { flex-shrink: 0; }
.l-input input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 20%;
  color: var(--ink);
  padding: 0;
  min-width: 0;
}
.l-input input::placeholder { color: transparent; }
.l-input.is-filled input { letter-spacing: 20%; }
.l-input input:not(:placeholder-shown) { letter-spacing: 20%; }

.l-eye {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
}

.l-hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 0;
}
.l-hint { font-size: 12px; color: var(--ink-2); }
.l-link { font-size: 12px; color: var(--violet); }

.l-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 17px 16px;
  background: var(--violet);
  color: #FFFFFF;
  font-weight: 500;
  font-size: 15px;
  transition: opacity 120ms, transform 120ms;
}
.l-submit:active { opacity: 0.85; transform: scale(0.99); }
.l-submit[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ----- Footer ----- */
.l-foot {
  padding: 0 var(--pad-x) 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.l-foot-hairline {
  height: 1px;
  background: var(--ink-4);
  width: 100%;
}
.l-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: var(--letter-mono);
}

/* 错误态：密码错时输入框转红 + 抖动 */
.l-input.is-error { border-color: #E5383B; animation: shake 0.32s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* =========================================================
 * APP 主页面（移动端 390 优先）
 * ========================================================= */
.view-app {
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  background: var(--paper);
}

/* ----- Nav ----- */
.m-nav {
  padding: 12px var(--pad-x) 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--paper);
}
.m-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.m-logo-mark {
  width: 32px; height: 32px;
  background: var(--ink);
  display: inline-flex;
  align-items: center; justify-content: center;
}
.m-nav-right { display: flex; align-items: center; gap: 8px; }

.m-city-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.m-city-btn svg { flex-shrink: 0; }

.m-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 6%;
}
.m-live-dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

/* ----- Search ----- */
.m-search {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}
.m-search-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  min-width: 0;
}
.m-search-icon { flex-shrink: 0; }
.m-search-input input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  padding: 0;
  min-width: 0;
}
.m-search-input input::placeholder { color: var(--ink-2); }
.m-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  background: var(--violet);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
@keyframes bus-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.m-search.shake { animation: bus-shake 320ms ease; }
.m-nav-hairline {
  height: 1px;
  background: var(--ink);
  margin: 0 calc(var(--pad-x) * -1);
}

/* ----- Section kicker / title ----- */
.m-section-kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--violet);
  letter-spacing: 8%;
  text-transform: none;
}
.m-section-title {
  margin: 12px 0 0;
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 30px;
  line-height: 130%;
  letter-spacing: var(--letter-cn);
  color: var(--ink);
}

/* ----- 实时轨道 ----- */
.m-track-sec {
  padding: 28px var(--pad-x) 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.m-track-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.m-track-head-meta { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.m-track-head-meta .m-section-title { margin-top: 12px; }
.m-dir-toggle {
  display: inline-flex;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}
.m-dir-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: background 120ms, color 120ms;
}
.m-dir-btn.is-active { background: var(--ink); color: #FFFFFF; }

.m-track-stage {
  position: relative;
  width: 100%;
  min-height: 320px;
  overflow: visible;
}
.m-track-rail {
  position: relative;
}
.m-track-ghost {
  position: absolute;
  right: 0;
  top: 220px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 60px;
  color: var(--ink);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  letter-spacing: -2%;
  line-height: 1;
}
.m-track-line {
  position: absolute;
  left: 32px;
  top: 16px;
  bottom: 16px;
  width: 3px;
  background: var(--ink);
  z-index: 1;
}
.m-track-line::after {
  content: "";
  position: absolute;
  left: -1px; top: 0;
  width: 5px;
  height: var(--prog, 0);
  background: var(--violet);
  transition: height 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.m-track-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0 8px 0;
}
.m-stn {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  min-height: 36px;
  cursor: pointer;
  padding: 6px 0;
}
.m-stn-dot {
  width: 11px; height: 11px;
  border-radius: 6px;
  background: var(--violet);
  justify-self: center;
  position: relative;
  z-index: 2;
}
.m-stn.is-empty .m-stn-dot { background: var(--paper); border: 2px solid var(--ink); }
.m-stn.is-current .m-stn-dot {
  width: 15px; height: 15px;
  border-radius: 8px;
  background: var(--paper);
  border: 3px solid var(--violet);
  box-shadow: 0 0 0 4px var(--violet-08);
}
.m-stn.is-start .m-stn-dot { background: var(--violet); }
.m-stn.is-end .m-stn-dot { background: var(--violet); }
.m-stn.is-end { padding-bottom: 16px; }
.m-stn-name {
  font-family: var(--f-cn);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-2);
  padding-left: 24px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.m-stn.is-current .m-stn-name { color: var(--violet); font-weight: 700; font-size: 17px; }
.m-stn.is-end .m-stn-name { color: var(--ink); font-weight: 700; }
.m-stn-idx {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0;
}
/* 当前站点 ETA + 提醒按钮（合并为一个 popover） */
.m-stn-eta-pop {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin-top: 4px;
}
/* 移动端：作为当前站点的右侧信息组（列3、与站名同一排、右对齐），与「当前站」标签、ETA、提醒按钮成组；
   选哪站就出现在哪站右侧，切换站点即跟随切换 */
.m-stn-eta-pop {
  grid-column: 3;
  justify-self: end;
  align-self: center;
  align-items: flex-end;
  text-align: right;
  padding-left: 0;
}
.m-stn-eta {
  display: block;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--violet);
  animation: eta-in 400ms ease;
}
@keyframes eta-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

/* 当前站点「提醒」按钮 */
.m-stn-remind-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid #E2E2E2;
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--f-cn);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.m-stn-remind-btn:hover { border-color: var(--violet); color: var(--violet); }
.m-stn-remind-btn.is-on { background: var(--violet); border-color: var(--violet); color: #FFFFFF; }
.m-stn-remind-btn svg { display: block; }

/* 到站提醒弹窗 */
.m-remind-body {
  padding: 6px var(--pad-x) 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.m-remind-desc {
  font-family: var(--f-cn);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 6px 0 0;
}
.m-remind-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.m-remind-preset {
  padding: 15px 0;
  border: 1px solid #E6E6E6;
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--f-cn);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.m-remind-preset:hover { border-color: var(--violet); color: var(--violet); }
.m-remind-preset:active { background: var(--violet); border-color: var(--violet); color: #FFFFFF; }
.m-remind-custom {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.m-remind-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 14px;
  height: 48px;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: border-color 160ms ease;
}
.m-remind-input:focus { border-color: var(--violet); }
.m-remind-input::placeholder { color: #B5B5B5; font-family: var(--f-cn); font-size: 14px; }
/* 隐藏 number 输入的步进箭头 */
.m-remind-input::-webkit-outer-spin-button,
.m-remind-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.m-remind-input[type="number"] { -moz-appearance: textfield; }
.m-remind-unit {
  display: flex;
  align-items: center;
  font-family: var(--f-cn);
  font-size: 14px;
  color: var(--ink-2);
}
.m-remind-ok {
  flex: 0 0 auto;
  padding: 0 22px;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--violet);
  color: #FFFFFF;
  font-family: var(--f-cn);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 160ms ease;
}
.m-remind-ok:active { opacity: 0.85; }
.m-remind-cancel {
  margin-top: 2px;
  padding: 13px 0;
  border: none;
  border-radius: 12px;
  background: #FBE9E9;
  color: #D23B3B;
  font-family: var(--f-cn);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Toast */
.m-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--f-cn);
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 999px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  max-width: 86vw;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  transition: opacity 240ms ease, transform 240ms ease;
}
.m-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

.m-bus {
  position: absolute;
  z-index: 5;
  width: 48px; height: 44px;
  background: var(--ink);
  display: flex;
  align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(82, 0, 255, 0.35);
  transition: top 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.m-bus.is-arrive { background: var(--violet); }
.m-bus::after {
  content: "";
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: var(--ink);
}
.m-bus-tip {
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--violet);
  white-space: nowrap;
}

.m-track-empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 32px 0 64px 56px;
  text-align: left;
}
.m-track-stage[data-empty="1"] .m-track-list,
.m-track-stage[data-empty="1"] .m-track-ghost,
.m-track-stage[data-empty="1"] .m-track-line { display: none; }
.m-track-stage:not([data-empty="1"]) .m-track-empty { display: none; }
.m-track-empty-h { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.m-track-empty-s { margin: 0; font-size: 13px; color: var(--ink-2); }

/* ----- 线路信息栏 ----- */
.m-linebar {
  background: var(--ink);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px var(--pad-x);
  overflow-x: auto;
  white-space: nowrap;
  font-family: var(--f-mono);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.m-linebar::-webkit-scrollbar { display: none; }
.m-linebar-item {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  flex-shrink: 0;
}
.m-linebar-k {
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}
.m-linebar-v {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
}
.m-linebar-v.is-fare { color: var(--mint); }
.m-linebar-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

/* ----- 收藏线路 ----- */
.m-fav-sec {
  padding: 56px var(--pad-x) 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.m-fav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.m-fav-mng {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
}
.m-fav-list { display: flex; flex-direction: column; gap: 12px; }

.m-fav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  transition: transform 120ms;
}
.m-fav-card:active { transform: scale(0.99); }
.m-fav-card-no {
  width: 48px; height: 48px;
  background: var(--ink);
  display: inline-flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 20px;
  color: #FFFFFF;
}
.m-fav-card.is-accent .m-fav-card-no { background: var(--violet); }
.m-fav-card-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.m-fav-card-t { font-weight: 700; font-size: 16px; color: var(--ink); }
.m-fav-card-d { font-size: 12px; color: var(--ink-2); }
.m-fav-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.m-fav-card-e { font-family: var(--f-mono); font-weight: 700; font-size: 18px; color: var(--violet); }
.m-fav-card:not(.is-accent) .m-fav-card-e { color: var(--ink); }
.m-fav-card-s { font-family: var(--f-mono); font-size: 11px; color: var(--ink-2); }
.m-fav-group-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  margin: 6px 2px -2px;
}
.m-fav-group-title:first-child { margin-top: 0; }
.m-fav-card-star {
  flex-shrink: 0;
  align-self: center;
  color: var(--violet);
  background: none;
  border: none;
  padding: 4px;
  margin-left: 2px;
  cursor: pointer;
  display: inline-flex;
  border-radius: 8px;
  transition: transform 120ms, background 120ms;
}
.m-fav-card-star:hover { background: rgba(82, 0, 255, 0.08); }
.m-fav-card-star:active { transform: scale(0.9); }

.m-fav-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px dashed #CCCCCC;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 13px;
  transition: border-color 120ms;
}
.m-fav-add:active { border-color: var(--ink); }

/* ----- 到站预报 ----- */
.m-board-sec {
  padding: 56px var(--pad-x) 72px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.m-board-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 28px;
}
.m-board-head .m-section-title { margin: 0; }
.m-board-divider-top {
  height: 2px;
  background: var(--ink);
  width: 100%;
}
.m-board-list { display: flex; flex-direction: column; }
.m-board-empty {
  list-style: none;
  padding: 22px 8px;
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}
.m-board-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0;
}
.m-board-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.m-board-name {
  font-family: var(--f-cn);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: var(--letter-cn);
  color: var(--ink);
}
.m-board-eta {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 26px;
  color: var(--violet);
}
.m-board-row + .m-board-divider + .m-board-row .m-board-eta,
.m-board-row:not(:first-of-type) .m-board-eta { color: var(--ink); }
.m-board-meta {
  font-size: 13px;
  color: var(--ink-2);
}
.m-board-divider {
  height: 1px;
  background: var(--ink-4);
}
.m-refresh-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 24px 0 0;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 6%;
}

/* ----- Sheet 浮层（搜索结果 / 城市） ----- */
.m-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
}
.m-sheet-back {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  animation: fade-in 160ms ease;
}
.m-sheet-card {
  position: relative;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  max-height: 80vh;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  animation: slide-up 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.m-sheet-handle {
  width: 40px; height: 4px;
  margin: 10px auto 0;
  border-radius: 2px;
  background: var(--ink-4);
}
.m-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--pad-x) 8px;
}
.m-sheet-kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--violet);
  letter-spacing: 8%;
}
.m-sheet-close {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border: 1px solid var(--ink);
}
.m-sheet-tabs {
  display: flex;
  gap: 0;
  padding: 0 var(--pad-x);
}
.m-sheet-tab {
  flex: 1;
  padding: 12px 0;
  border-bottom: 2px solid var(--ink-4);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  transition: border-color 120ms, color 120ms;
}
.m-sheet-tab.is-active {
  border-color: var(--ink);
  color: var(--ink);
}
.m-sheet-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px var(--pad-x) 24px;
}
.m-sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-4);
  cursor: pointer;
  transition: background 120ms;
}
.m-sheet-row:last-child { border-bottom: 0; }
.m-sheet-row:active { background: #FAFAFA; }
.m-sheet-row-name { font-size: 16px; font-weight: 500; color: var(--ink); }
.m-sheet-row-meta { font-size: 12px; color: var(--ink-2); font-family: var(--f-mono); }
.m-sheet-row-star { color: var(--violet); padding: 4px; }
.m-sheet-empty { padding: 32px 0; text-align: center; color: var(--ink-2); font-size: 13px; }

.m-sheet-search {
  margin: 0 var(--pad-x);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--ink);
}
.m-sheet-search input {
  flex: 1; border: 0; background: transparent;
  font-size: 13px; color: var(--ink); padding: 0; min-width: 0;
}
.m-city-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px var(--pad-x) 24px;
}
.m-city-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--ink-4);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 120ms;
}
.m-city-list li:active { color: var(--violet); }
.m-city-list li.is-active { color: var(--violet); font-weight: 700; }
.m-city-list .m-city-key {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-2);
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* =========================================================
 * DESKTOP 桌面端（≥860px）
 * ========================================================= */
@media (min-width: 860px) {

  :root { --pad-x: 48px; }

  .view-login { max-width: 1440px; padding: 0; }
  .l-top-block { padding: 56px var(--pad-x) 0; gap: 40px; }
  .l-top-bar { padding: 0; }
  .l-type-stage { height: 360px; }
  .l-mega { font-size: 120px; }
  .l-mega span:first-child { margin-bottom: 12px; }
  .l-ghost-glyph { top: 48px; font-size: 220px; }
  .l-form-block { padding: 0 var(--pad-x); max-width: 560px; }
  .l-foot { padding: 0 var(--pad-x) 40px; }

  .view-app { max-width: 1440px; }

  /* Nav */
  .m-nav {
    padding: 22px var(--pad-x);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 80px;
  }
  .m-nav-top {
    flex: 0 0 auto;
    gap: 0;
  }
  .m-search {
    width: 480px;
    margin: 0;
  }
  .m-nav-hairline {
    margin: 0 calc((var(--pad-x) - 0px) * -1);
    height: 1px;
    background: var(--ink);
  }

  /* Track stage 横向 */
  .m-track-sec {
    padding: 96px var(--pad-x) 96px;
    gap: 0;
  }
  .m-track-head { padding-bottom: 64px; align-items: flex-end; }
  .m-track-head-meta .m-section-title { font-size: 48px; margin-top: 16px; }
  .m-track-stage {
    min-height: 380px;
    height: 380px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--ink-3) transparent;
  }
  .m-track-stage::-webkit-scrollbar { height: 6px; }
  .m-track-stage::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 3px; }
  .m-track-stage::-webkit-scrollbar-track { background: transparent; }
  .m-track-ghost {
    top: 100px;
    right: 80px;
    font-size: 220px;
    letter-spacing: -2%;
  }
  .m-track-rail {
    position: relative;
    height: 100%;
    width: max-content;
  }
  .m-track-line {
    left: 0; right: 0;
    top: 188px;
    bottom: auto;
    width: auto;
    height: 3px;
  }
  .m-track-line::after {
    left: 0; top: -1px;
    width: var(--prog, 0); height: 5px;
    transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  .m-track-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, max-content);
    align-items: stretch;
    gap: 0;
    padding: 0;
    height: 100%;
    width: max-content;
  }
  .m-stn {
    display: block;
    position: relative;
    height: 100%;
    min-height: 0;
    padding: 0;
  }
  /* 桌面端：圆点悬浮在线路上方、与线保持清晰间距；站名下移到圆点下方留出呼吸感 */
  .m-stn-dot {
    position: absolute;
    top: 160px;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
  }
  .m-stn-name {
    position: absolute;
    top: 216px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-left: 0;
    white-space: nowrap;
    text-align: center;
  }
  .m-stn.is-current .m-stn-name { flex-direction: row; }
  .m-bus {
    position: absolute;
    top: 110px;
    left: 0;
    transform: translateX(-50%);
  }
  .m-bus::after {
    bottom: -6px; left: 50%;
    transform: translateX(-50%) rotate(45deg);
  }
  .m-bus-tip {
    left: 0;
    top: 82px;
    transform: translateX(-50%);
  }

  /* 当前站点 ETA + 提醒按钮：桌面绝对定位在线路下方、当前站点水平居中 */
  .m-stn-eta-pop {
    position: absolute;
    align-items: center;
    grid-column: auto;
    padding-left: 0;
    margin-top: 0;
    z-index: 6;
  }

  /* 线路信息栏 */
  .m-linebar {
    padding: 16px var(--pad-x);
    gap: 18px;
  }
  .m-linebar-k { font-size: 12px; }
  .m-linebar-v { font-size: 15px; }

  /* Favorites */
  .m-fav-sec {
    padding: 88px var(--pad-x) 0;
    gap: 28px;
  }
  .m-fav-list {
    flex-direction: row;
    gap: 24px;
  }
  .m-fav-card { flex: 1; padding: 20px 22px; }
  .m-fav-card-no { width: 56px; height: 56px; font-size: 24px; }
  .m-fav-card-t { font-size: 18px; }
  .m-fav-card-e { font-size: 22px; }
  .m-fav-add { flex: 1; padding: 20px 22px; }

  /* Board */
  .m-board-sec { padding: 96px var(--pad-x) 96px; }
  .m-board-head { flex-direction: row; justify-content: space-between; align-items: flex-end; padding-bottom: 40px; }
  .m-board-head .m-section-title { font-size: 48px; }
  .m-board-row { padding: 28px 8px; }
  .m-board-row-main { flex-direction: row; align-items: center; }
  .m-board-name { font-size: 40px; }
  .m-board-eta { font-size: 40px; }

  /* Tabs on desktop */
  .m-board-tabs { display: inline-flex; gap: 0; }
}

/* =========================================================
 * 工具类
 * ========================================================= */
[hidden] { display: none !important; }

/* iOS 安全区 */
@supports (padding: max(0px)) {
  .view-login, .view-app { padding-bottom: max(0px, env(safe-area-inset-bottom)); }
}