/* =========================================================================
 * 东航趣游卡 · 里程票可兑换查询 — 自定义样式
 * 大部分样式由 Tailwind Play CDN 提供，此处仅补充 Tailwind 不便表达的部分。
 * 视觉规范：克制数据风；圆角卡片 12px、控件 8px；触摸目标 ≥ 44px。
 * ========================================================================= */

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #335cff;
  --brand-dark: #2445d8;
  --navy: #0b1220;
  --panel: rgba(255,255,255,.94);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.03), 0 8px 24px rgba(15,23,42,.045);
  --shadow-md: 0 18px 45px rgba(15,23,42,.09);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(51,92,255,.075), transparent 24rem),
    radial-gradient(circle at 94% 28%, rgba(14,165,233,.055), transparent 22rem),
    #f6f8fc !important;
}

::selection { background: rgba(51,92,255,.18); color: #142c92; }

.app-header {
  background: rgba(11,18,32,.94);
  border-bottom: 1px solid rgba(148,163,184,.16);
  box-shadow: 0 8px 30px rgba(2,6,23,.12);
  backdrop-filter: blur(18px);
}

.brand-mark {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(145deg, #5f7bff, #2f55ef 58%, #2442bd);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 20px rgba(51,92,255,.35);
  letter-spacing: -.03em;
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  right: -9px; top: -9px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
}

.app-header button,
.app-header a {
  color: #dbe4f3 !important;
  border-color: rgba(148,163,184,.22) !important;
  background: rgba(255,255,255,.06) !important;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.app-header button:hover,
.app-header a:hover {
  color: #fff !important;
  border-color: rgba(148,163,184,.38) !important;
  background: rgba(255,255,255,.11) !important;
}

#sceneTabs {
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid rgba(226,232,240,.86);
  box-shadow: 0 4px 18px rgba(15,23,42,.025);
  backdrop-filter: blur(18px);
}
#sceneTabs > div { height: 52px; }
.scene-tab {
  position: relative;
  min-width: 76px;
  border-radius: 10px !important;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.scene-tab:hover { transform: translateY(-1px); }
.scene-tab.bg-brand {
  color: #fff !important;
  background: linear-gradient(135deg, #4268ff, #2f55e9) !important;
  box-shadow: 0 7px 16px rgba(51,92,255,.24);
}

.search-shell {
  border-color: rgba(226,232,240,.85) !important;
  background: var(--panel) !important;
  box-shadow: var(--shadow-sm) !important;
  backdrop-filter: blur(14px);
}

label { letter-spacing: .01em; }
input:not([type="range"]):not([type="checkbox"]),
select {
  border-color: #dbe2ec !important;
  background-color: rgba(255,255,255,.92) !important;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.025);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:not([type="range"]):not([type="checkbox"]):hover,
select:hover { border-color: #b9c5d6 !important; }
input:not([type="range"]):not([type="checkbox"]):focus,
select:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(51,92,255,.12), 0 5px 16px rgba(15,23,42,.045) !important;
  background: #fff !important;
}

input[type="range"] {
  height: 5px;
  border-radius: 999px;
  accent-color: var(--brand);
}

#searchBtn,
#rtSearchBtn {
  height: 48px !important;
  border-radius: 11px !important;
  background: linear-gradient(135deg, #4268ff, #2f55e9 60%, #2949ca) !important;
  box-shadow: 0 10px 22px rgba(51,92,255,.25), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
#searchBtn:hover,
#rtSearchBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 27px rgba(51,92,255,.32);
  filter: saturate(1.08);
}
#searchBtn:active,
#rtSearchBtn:active { transform: translateY(0); }

button, a { transition-duration: .18s; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(51,92,255,.2);
  outline-offset: 2px;
}

/* 隐藏滚动条但保留滚动（星期芯片横向滚动） */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* 范围滑块主色（accent 在部分浏览器需补充） */
input[type="range"] { cursor: pointer; }

/* 移动端抽屉内面板可独立滚动 */
#searchPanel.overflow-y-auto { -webkit-overflow-scrolling: touch; }

/* 下拉建议滚动条（轻量） */
#originDropdown::-webkit-scrollbar,
#destDropdown::-webkit-scrollbar { width: 6px; }
#originDropdown::-webkit-scrollbar-thumb,
#destDropdown::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* 触摸目标最小高度（移动端友好） */
@media (max-width: 1023px) {
  #searchBtn, #openDrawerBtn { min-height: 44px; }
  #originInput, #destInput, #singleDate, #rangeStart, #rangeEnd { min-height: 44px; }
}

/* 结果卡片 hover 过渡（阴影/边框由 Tailwind hover: 类控制） */
#resultList article { transition: box-shadow .15s ease, border-color .15s ease; }

/* 防止长文本溢出 */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 数字等宽对齐（日期 / 概率） */
#resultList article .date-num { font-variant-numeric: tabular-nums; }

/* 快捷区间 pill（内联样式由 JS 控制激活态，此处仅定义默认外观） */
.preset-pill {
  display: inline-flex; align-items: center; height: 2rem; padding: 0 0.75rem;
  border-radius: 999px; border: 1px solid #dbe2ec; background: #fff; color: #526174;
  font-size: 0.875rem; cursor: pointer; white-space: nowrap;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.preset-pill:hover {
  color: var(--brand);
  border-color: rgba(51,92,255,.34);
  background: rgba(51,92,255,.055);
  transform: translateY(-1px);
}

/* 日历日格可交互 */
/* 日历日格字体与视觉精修 */
#resultList .cal-day {
  cursor: default;
  border-radius: 7px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  transition: filter .12s, transform .15s ease, box-shadow .15s ease;
}
#resultList .cal-day:hover {
  filter: brightness(0.98);
  transform: translateY(-1px) scale(1.035);
  box-shadow: 0 5px 12px rgba(15,23,42,.1);
  z-index: 2;
}
/* 今日：内描边蓝环（§16.3 B1） */
.cal-today { box-shadow: inset 0 0 0 2px var(--brand); border-color: transparent !important; }
/* 日历卡片与月历全宽铺满 */
.cal-month { width: 100% !important; max-width: 100% !important; flex: 1 1 100% !important; }
.cal-month .grid { gap: 4px; width: 100%; }
.cal-month .grid > div:empty { background: transparent; }

/* 航线轨：严格单行横向滑动 */
#routeTrack {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
  gap: 6px !important;
  padding-bottom: 2px !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}
#routeTrack::-webkit-scrollbar {
  display: none !important;
}
.route-track-chip {
  flex-shrink: 0 !important;
  height: 26px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  border-radius: 9999px !important;
  cursor: pointer;
}
.scene-tab { cursor: pointer; }

/* 地图容器最小高度兜底 */
#mapChart { min-height: 320px; }

/* 结果区工具栏：紧凑单行 */
#viewOneway > .flex:first-child,
#viewRound > .flex:first-child {
  min-height: 30px !important;
  padding: 0 !important;
  margin-bottom: 6px !important;
}

/* 航线地图工具栏：严格单行横向排布 */
#mapToolbar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
  padding: 6px 10px !important;
  gap: 6px !important;
  border-color: rgba(226,232,240,.88) !important;
  background: rgba(255,255,255,.95) !important;
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}
#mapToolbar::-webkit-scrollbar { display: none !important; }

/* 往返星期芯片：高精排版与字体风格统一 */
.wd-chip {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 26px !important;
  min-height: 26px !important;
  min-width: 0 !important;
  width: 100% !important;
  border-radius: 6px !important;
  transition: all 0.12s ease !important;
  cursor: pointer !important;
}

#rtDepPresetAll, #rtDepPresetWorkday, #rtDepPresetWeekend, #rtDepPresetClear,
#rtRetPresetAll, #rtRetPresetWorkday, #rtRetPresetWeekend, #rtRetPresetClear {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

/* 往返结果紧凑卡片 */
.round-card {
  padding: 6px 10px !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.035) !important;
  transition: border-color .15s ease, box-shadow .15s ease !important;
}
.round-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.06) !important;
}

#routeTrack,
#roundRouteTrack { row-gap: 8px; }
.route-track-chip {
  border-radius: 999px !important;
  transition: transform .16s ease, box-shadow .16s ease, color .16s ease;
}
.route-track-chip:hover { transform: translateY(-1px); }

#statusSummary > span {
  border: 1px solid rgba(226,232,240,.8);
  box-shadow: 0 2px 8px rgba(15,23,42,.035);
}

.cal-card,
#resultList article,
#resultListRound article {
  position: relative;
  overflow: hidden;
  border-color: rgba(218,226,237,.9) !important;
  border-radius: 15px !important;
  box-shadow: var(--shadow-sm) !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, opacity .2s ease;
}
.cal-card:hover,
#resultList article:hover,
#resultListRound article:hover {
  transform: translateY(-2px);
  border-color: rgba(171,185,205,.9) !important;
  box-shadow: var(--shadow-md) !important;
}
.cal-card::after,
#resultList article::after,
#resultListRound article::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent);
}
.cal-head {
  min-height: 34px !important;
  transition: background .18s ease;
}
.cal-head:hover { background: #fafbfe !important; }

/* 航线卡标题栏：监控与只看按钮统一字体与质感 */
.notify-route-btn,
.focus-btn {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 22px !important;
  padding: 0 6px !important;
  border-radius: 5px !important;
  letter-spacing: normal !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
}
.notify-route-btn {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
}
.notify-route-btn:hover {
  background: #dbeafe !important;
}
.focus-btn {
  background: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}
.focus-btn:hover {
  background: #f8fafc !important;
  color: #1e293b !important;
  border-color: #94a3b8 !important;
}

#statusSummary, #rtStatusSummary {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 3px !important;
  width: 100% !important;
}
.status-summary-pill {
  height: 22px !important;
  min-height: 22px !important;
  font-size: 10px !important;
  padding: 0 1px !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}
.cal-month {
  padding: 9px 10px 10px;
  border: 1px solid #edf1f6;
  border-radius: 11px;
  background: #fbfcfe;
}

.empty-panel {
  min-height: 410px;
  padding-left: 24px;
  padding-right: 24px;
  border: 1px dashed #cfd9e7;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255,255,255,.82), rgba(255,255,255,.82)),
    radial-gradient(circle at 50% 20%, rgba(51,92,255,.16), transparent 45%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.empty-orbit {
  width: 70px; height: 70px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  color: #fff;
  font-size: 25px;
  background: linear-gradient(145deg, #5575ff, #2e52e4);
  box-shadow: 0 15px 35px rgba(51,92,255,.25);
}
.empty-orbit::before,
.empty-orbit::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(51,92,255,.2);
  border-radius: 50%;
}
.empty-orbit::after {
  inset: -20px;
  border-color: rgba(51,92,255,.1);
}
.empty-kicker {
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
}
.empty-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 28px auto 0;
  color: #64748b;
  font-size: 12px;
}
.empty-steps span { display: inline-flex; align-items: center; gap: 6px; }
.empty-steps b {
  display: grid;
  place-items: center;
  width: 25px; height: 25px;
  border-radius: 50%;
  color: var(--brand);
  background: rgba(51,92,255,.08);
  font-size: 9px;
  letter-spacing: .04em;
}
.empty-steps i { width: 25px; height: 1px; background: #dbe2ec; }

#viewMap > .grid {
  overflow: hidden;
  border-color: rgba(218,226,237,.9) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow-sm);
  background: #fff;
}
#mapInfo { background: rgba(255,255,255,.92); }
#mapInfo .route-row {
  border-radius: 9px;
  transition: background .16s ease, transform .16s ease;
}
#mapInfo .route-row:hover { transform: translateX(2px); }

#dayTip {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px !important;
  background: rgba(11,18,32,.96) !important;
  box-shadow: 0 14px 35px rgba(2,6,23,.28) !important;
  backdrop-filter: blur(10px);
}
#dayTip.is-locked {
  border-color: rgba(96,165,250,.85);
  box-shadow: 0 0 0 2px rgba(59,130,246,.22),0 14px 35px rgba(2,6,23,.28) !important;
}
.cal-day.is-tip-locked { outline: 2px solid var(--brand); outline-offset: 2px; }
#toast > div {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px !important;
  background: rgba(11,18,32,.95) !important;
  box-shadow: 0 16px 38px rgba(2,6,23,.24) !important;
}

.app-footer {
  border-top: 1px solid rgba(226,232,240,.72);
  padding-top: 18px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1023px) {
  #searchPanel {
    box-shadow: 24px 0 60px rgba(2,6,23,.18);
  }
  #searchPanel > div {
    min-height: 100%;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 20px !important;
  }
  #drawerOverlay { backdrop-filter: blur(4px); }
  #openDrawerBtn {
    height: 50px;
    border: 1px solid rgba(255,255,255,.25);
    background: linear-gradient(135deg, #4268ff, #2f55e9) !important;
    box-shadow: 0 14px 30px rgba(51,92,255,.35) !important;
  }
  #mapChart { height: 420px !important; }
  #mapInfo { height: 420px !important; }
}

@media (max-width: 639px) {
  main { padding-top: 16px !important; }
  #sceneTabs > div { justify-content: center; }
  .scene-tab { flex: 1; max-width: 116px; }
  .empty-panel { min-height: 360px; padding-top: 54px !important; }
  .empty-steps { gap: 7px; }
  .empty-steps i { width: 10px; }
  .empty-steps span { flex-direction: column; gap: 4px; }
  .app-footer > div { justify-content: center; text-align: center; }
}

/* Professional light workspace theme */
:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-hover: #f1f5f9;
  --line: #dfe7f1;
  --line-strong: #cbd7e6;
  --ink: #16243a;
  --text-2: #52647a;
  --muted: #7a8ba0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --panel: rgba(255,255,255,.97);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.03), 0 10px 28px rgba(38,55,77,.055);
  --shadow-md: 0 24px 64px rgba(29,45,68,.16);
}
html {
  background: var(--bg);
  color-scheme: light;
}
body {
  color: var(--ink) !important;
  background-color: var(--bg) !important;
  background-image:
    radial-gradient(circle at 8% 0%, rgba(37,99,235,.055), transparent 28rem),
    linear-gradient(180deg, #f8fafc 0, var(--bg) 24rem) !important;
  background-attachment: fixed;
  font-family: "Segoe UI Variable", "Noto Sans SC", "Microsoft YaHei UI", sans-serif !important;
}
.app-header {
  background: rgba(255,255,255,.94) !important;
  border-color: var(--line) !important;
  box-shadow: 0 1px 0 rgba(15,23,42,.025), 0 8px 28px rgba(38,55,77,.055);
}
.app-header h1 { color: var(--ink) !important; letter-spacing: -.02em; }
.app-header p { color: var(--muted) !important; }
.app-header button,
.app-header a {
  color: var(--text-2) !important;
  border-color: var(--line) !important;
  background: var(--surface) !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.035);
}
.app-header button:hover,
.app-header a:hover {
  color: var(--brand-dark) !important;
  border-color: #b9cae2 !important;
  background: #f7faff !important;
}
.brand-mark {
  color: #fff !important;
  border-radius: 12px;
  background: linear-gradient(145deg, #3b82f6, #2563eb 58%, #1d4ed8) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 18px rgba(37,99,235,.22) !important;
}
.auth-avatar {
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 8px; color: #fff; background: var(--brand);
  font: 700 12px/1 "Cascadia Mono", Consolas, monospace;
}
#sceneTabs {
  background: rgba(248,250,252,.92) !important;
  border-color: var(--line) !important;
  box-shadow: 0 4px 18px rgba(38,55,77,.035);
}
.scene-rail {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 3px;
  width: min(100%,430px); padding: 4px;
  border: 1px solid var(--line); border-radius: 11px;
  background: #edf2f8;
}
.scene-tab {
  min-width: 0; min-height: 42px;
  border-radius: 8px !important; border-color: transparent !important;
  color: var(--text-2) !important; background: transparent !important;
  letter-spacing: .01em;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}
.scene-tab:hover {
  transform: none !important;
  color: var(--ink) !important;
  background: rgba(255,255,255,.66) !important;
}
.scene-tab.bg-brand {
  color: var(--brand-dark) !important;
  border-color: #d5e2f6 !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(38,55,77,.09), inset 0 -2px 0 var(--brand) !important;
}
.search-shell,
#filterPanel,
#mapToolbar,
.cal-card,
#resultList article,
#resultListRound article,
#mapInfo,
#mapChart,
.bg-white,
.bg-slate-50 {
  color: var(--ink) !important;
  border-color: var(--line) !important;
  background-color: var(--surface) !important;
}
body.bg-slate-50 { background-color: var(--bg) !important; }
.search-shell,
#filterPanel,
.cal-card,
#resultList article,
#resultListRound article,
#mapInfo { box-shadow: var(--shadow-sm); }
.text-slate-800,.text-slate-700 { color: var(--ink) !important; }
.text-slate-600 { color: var(--text-2) !important; }
.text-slate-500,.text-slate-400 { color: var(--muted) !important; }
.border-slate-100,.border-slate-200,.border-slate-300 { border-color: var(--line) !important; }
input:not([type="range"]):not([type="checkbox"]),
select {
  color: var(--ink) !important;
  border-color: var(--line-strong) !important;
  background-color: var(--surface) !important;
  color-scheme: light;
}
input::placeholder { color: #8a9aae !important; }
input:not([type="range"]):not([type="checkbox"]):focus,
select:focus {
  background: #fff !important; border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.13) !important;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline-color: rgba(37,99,235,.42) !important;
}
#searchBtn,#rtSearchBtn,.primary-action {
  min-height: 44px; border: 1px solid #1d4ed8; border-radius: 10px;
  color: #fff !important; font-weight: 700;
  background: linear-gradient(135deg,#3b82f6,#2563eb 58%,#1d4ed8) !important;
  box-shadow: 0 8px 20px rgba(37,99,235,.2) !important;
}
.secondary-action {
  min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--text-2); background: var(--surface);
}
#routeTrack,#roundRouteTrack {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
  gap: 6px !important;
  padding: 2px 0 4px !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}
.route-track-chip {
  flex: 0 0 auto !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 9999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.035);
}
  border-color: #9fbae4 !important;
  background: #eef5ff !important;
  box-shadow: inset 0 -2px 0 var(--brand), 0 3px 10px rgba(37,99,235,.08);
}
.cal-head:hover { background: var(--surface-hover) !important; }
.cal-month { color: var(--ink); border-color: var(--line); background: var(--surface); }
.empty-panel { border-color: var(--line); background: rgba(255,255,255,.72); }
#mapChart {
  background: radial-gradient(circle at 50% 38%,rgba(37,99,235,.05),transparent 56%),#f8fafc !important;
}
.app-modal { background: rgba(15,23,42,.42); backdrop-filter: blur(10px); }
.modal-card {
  color: var(--ink); border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow-md);
}
.modal-head {
  min-height: 72px; padding: 14px 20px; display: flex;
  align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
.eyebrow {
  margin: 0; color: var(--brand-dark);
  font: 700 11px/1.3 "Cascadia Mono",Consolas,monospace; letter-spacing: .14em;
}
.icon-btn { width: 44px; height: 44px; border-radius: 10px; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-hover); }
.modal-input { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 0 12px; border-radius: 10px; }
.field-hint { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.form-error { color: #dc2626; font-size: 13px; }
.mail-banner {
  margin: 16px 20px 0; padding: 12px 14px;
  border: 1px solid #f4d58a; border-radius: 10px;
  color: #8a5708; background: #fff8e8; font-size: 13px;
}
.notify-explainer {
  margin: 12px 20px 0; padding: 10px 14px; border-radius: 10px;
  color: #315375; background: #eef5ff; font-size: 13px; line-height: 1.55;
}
.notify-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 0; }
.notify-list-panel,#notifyForm { min-height: 420px; padding: 20px; }
.notify-list-panel { border-right: 1px solid var(--line); background: #f8fafc; }
.notify-list-panel h3,.notify-form-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.notify-list-head,.notify-form-head,.notify-rule-top,.notify-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.notify-list-head { margin-bottom: 14px; }
.notify-list-head p,.notify-form-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.notify-form-head { align-items: flex-start; padding-bottom: 2px; }
.notify-rule {
  padding: 13px; margin-bottom: 10px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--surface); box-shadow: 0 2px 8px rgba(38,55,77,.035);
}
.notify-rule-top strong { color: var(--ink); font-size: 14px; }
.notify-rule-top strong span { color: var(--brand); }
.notify-rule p { margin: 7px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.notify-rule .notify-match { color: #0369a1; }
.notify-rule .notify-invalidated { color: #64748b; }
.notify-rule .notify-created { color: #64748b; }
.notify-rule .notify-error-detail { color: #9a3412; }
.notify-status {
  flex: 0 0 auto; padding: 3px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.notify-status.is-active { color: #166534; background: #dcfce7; }
.notify-status.is-matched { color: #075985; background: #e0f2fe; }
.notify-status.is-sent { color: #1e40af; background: #dbeafe; }
.notify-status.is-warning { color: #9a3412; background: #ffedd5; }
.notify-status.is-muted { color: #64748b; background: #e2e8f0; }
.notify-actions { justify-content: flex-end; margin-top: 9px; padding-top: 8px; border-top: 1px solid #edf2f7; }
.notify-actions button { min-height: 36px; padding: 0 9px; color: var(--brand-dark); font-size: 12px; font-weight: 600; }
.notify-actions button.is-danger { color: #b42318; }
.notify-empty {
  display: flex; flex-direction: column; gap: 5px; padding: 28px 16px;
  border: 1px dashed var(--line-strong); border-radius: 11px;
  color: var(--muted); text-align: center; font-size: 12px; background: #fff;
}
.notify-empty strong { color: var(--text-2); font-size: 14px; }
.notify-route-grid { display: grid; grid-template-columns: 1fr 28px 1fr; align-items: end; }
.notify-arrow { display: grid; place-items: center; min-height: 44px; color: var(--brand); font-weight: 700; }
.notify-type-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 2px;
  padding: 0; border: 0;
}
.notify-type-switch legend { margin-bottom: 7px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.notify-type-switch label {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--text-2);
  background: #fff; font-size: 13px; cursor: pointer;
}
.notify-type-switch label:has(input:checked) { border-color: #8eb4ef; color: var(--brand-dark); background: #eef5ff; }
.notify-type-switch input { accent-color: var(--brand); }
.notify-kind {
  display: inline-flex; margin-right: 5px; padding: 2px 6px; border-radius: 999px;
  color: var(--brand-dark); background: #eef5ff; font-size: 11px; font-weight: 700;
}
.notify-dropdown {
  position: absolute; z-index: 60; top: 100%; left: 0; right: 0;
  max-height: 220px; overflow-y: auto; margin-top: 4px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  box-shadow: 0 14px 32px rgba(29,45,68,.16);
}
.route-code,.tabular-nums {
  font-family: "Cascadia Mono","SFMono-Regular",Consolas,monospace;
  font-variant-numeric: tabular-nums;
}
.preset-pill {
  color: var(--text-2) !important; border-color: var(--line-strong) !important;
  background: var(--surface) !important;
}
.preset-pill:hover { color: var(--brand-dark) !important; background: #eef5ff !important; }
#mapRefreshBtn,#mapMode button.bg-brand {
  color: #fff !important;
  background: var(--brand) !important;
}
@media (max-width:639px) {
  body { background-image: linear-gradient(180deg,#f8fafc 0,var(--bg) 18rem) !important; }
  .app-header .max-w-7xl { padding-left: 10px; padding-right: 10px; }
  .app-header .gap-3 { gap: 6px; }
  .app-header button,.app-header a { min-width: 38px; min-height: 38px; padding-left: 7px; padding-right: 7px; }
  #helpLink { display: none; }
  .app-header .brand-mark { width: 32px; height: 32px; font-size: 11px; }
  .app-header .brand-copy { display: block !important; min-width: 0; }
  .app-header .brand-copy h1 { font-size: 14px !important; line-height: 1.2 !important; margin: 0; }
  #topSyncStatus { font-size: 10px !important; line-height: 1.2 !important; margin-top: 1px; color: var(--muted) !important; display: flex !important; }
  #authBtn { max-width: 105px; font-size: 12px; }
  #authBtnText { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  #notifyOpenBtn { font-size: 12px; }
  #sceneTabs>div { height: 62px; padding-left: 12px; padding-right: 12px; }
  .scene-rail { width: 100%; }
  .scene-tab { padding-inline: 7px !important; font-size: 12px !important; max-width: none; }
  #authModal { align-items: flex-start; padding: 8px; overflow-y: auto; }
  #authModal .modal-card { max-height: calc(100svh - 16px); overflow-y: auto !important; }
  #authForm,#accountPanel { padding-bottom: max(20px,env(safe-area-inset-bottom)); }
  #notifyModal { align-items: flex-start; padding: 8px; overflow-y: auto; }
  #notifyModal .modal-card { max-height: calc(100svh - 16px); overflow-y: auto !important; }
  .notify-grid { grid-template-columns: 1fr; max-height: none; overflow: visible; }
  .notify-list-panel { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  #notifyForm { min-height: auto; }
  .notify-explainer { margin-left: 12px; margin-right: 12px; }
  .notify-actions button { min-height: 44px; }
  #dayTip {
    left: 12px !important; right: 12px !important; top: auto !important;
    bottom: max(12px,env(safe-area-inset-bottom)) !important; max-width: none !important;
  }
  .round-card-main { align-items: stretch !important; flex-direction: column; }
  .round-legs { width: 100%; gap: 10px; }
  .round-meta {
    width: 100%; flex-wrap: wrap; justify-content: space-between;
    padding-top: 8px; border-top: 1px solid var(--line);
  }
  button,.text-action { touch-action: manipulation; }
  #openDrawerBtn {
    right: max(16px,env(safe-area-inset-right));
    bottom: max(16px,env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important; }
}

/* V1.4 mobile search, history and monitoring */
.mobile-date-stack { display: grid; gap: 10px; }
.mobile-date-stack label { color: var(--text-2); font-size: 12px; }
.mobile-date-stack input {
  display: block; width: 100%; min-height: 48px; margin-top: 5px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 10px;
}
.search-history {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.search-history-head, .search-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.search-history-head {
  margin-bottom: 6px;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
}
.search-history-head button {
  font-size: 11px;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}
.search-history-head button:hover {
  color: #e11d48;
}
.search-history-row {
  height: 28px;
  padding: 0 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: all 0.15s ease;
}
.search-history-row:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.search-history-row button:first-child {
  min-width: 0;
  flex: 1;
  font-size: 11.5px;
  font-weight: 500;
  color: #334155;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.search-history-row button:first-child:hover {
  color: #2563eb;
}
.search-history-row button:last-child {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #94a3b8;
  font-size: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}
.search-history-row button:last-child:hover {
  color: #e11d48;
  background: #ffe4e6;
}
.route-title { min-width: 0; flex-wrap: wrap; }
.route-endpoint { color: var(--ink); font-weight: 650; white-space: normal; overflow-wrap: anywhere; }
.monitor-btn {
  min-height: 36px; padding: 0 10px; border: 1px solid #93b4e8; border-radius: 9px;
  color: var(--brand-dark); background: #eef5ff; font-size: 12px; font-weight: 650; white-space: nowrap;
}
.open-jaw-note {
  margin-top: 8px; padding: 7px 9px; border-radius: 8px;
  color: #9a5700; background: #fff7e6; font-size: 12px;
}
@media (min-width:640px) { .mobile-date-stack { display: none; } }
#includedOrigins,#includedDests,#rtIncludedOrigins,#rtIncludedDests { max-height: 70px; overflow: hidden; }
#includedOrigins.is-expanded,#includedDests.is-expanded,#rtIncludedOrigins.is-expanded,#rtIncludedDests.is-expanded { max-height: none; overflow: visible; }
.candidate-toggle { min-height: 36px; padding: 0 9px; color: var(--brand-dark); font-size: 12px; white-space: nowrap; }
#includedOrigins:focus-within,#includedDests:focus-within,#rtIncludedOrigins:focus-within,#rtIncludedDests:focus-within { max-height: none; }

@media (max-width:639px) {
  .cal-head {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    padding: 6px 8px !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }
  .cal-head > div:first-child {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    min-width: 0 !important;
    gap: 4px !important;
    overflow: hidden !important;
  }
  .cal-head > div:last-child {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
  }
  .route-title {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 3px !important;
    min-width: 0 !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  .monitor-btn { min-height: 24px !important; padding: 0 5px !important; font-size: 10.5px !important; }
  #mapChart { height: clamp(340px,52svh,460px) !important; min-height: 340px; }
  #mapInfo { height: auto !important; max-height: none; overflow: visible; }
}

/* =========================================================================
 * 专业级条件选择框 & 交互美学规范 (QY Flight Radar Pro UI)
 * ========================================================================= */

/* 始发/到达卡片容器 */
.route-selector-box {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.route-selector-box:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.route-selector-box.is-origin {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-color: #dbeafe;
}
.route-selector-box.is-dest {
  background: linear-gradient(180deg, #fffbf5 0%, #ffffff 100%);
  border-color: #fef3c7;
}

/* 始发/到达头部与徽章 */
.route-badge-dep {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #0369a1;
  letter-spacing: 0.02em;
}
.route-badge-arr {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  letter-spacing: 0.02em;
}

/* 互换始发到达按钮 (Swap Route Button) - 悬浮在卡片间缝，不占用独立行高 */
.swap-route-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 0;
  margin: 0;
  position: relative;
  z-index: 35;
}
.swap-route-btn {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.swap-route-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}
.swap-route-btn:active {
  transform: translate(-50%, -50%) scale(0.95);
}

/* 始发 / 到达卡片堆叠上下文 */
.route-selector-box.is-origin {
  position: relative;
  z-index: 30;
}
.route-selector-box.is-dest {
  position: relative;
  z-index: 20;
}

/* 城市下拉建议浮层置顶 */
#originDropdown, #destDropdown, #rtOriginDropdown, #rtDestDropdown, .notify-dropdown {
  z-index: 1000 !important;
}

/* 选中的 Chips 胶囊标签展示区 - 固定高度 38px，横向滚动，永不变形 */
.chips-display-area {
  display: flex;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 5px;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.chips-display-area::-webkit-scrollbar {
  display: none;
}
.chips-display-area:hover, .chips-display-area:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.08);
}
.chip-item {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 25px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  user-select: none;
  white-space: nowrap;
  animation: chipFadeIn 0.18s cubic-bezier(0, 0, 0.2, 1);
}
@keyframes chipFadeIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* 始发端 Chip 样式 */
.chip-item.chip-dep {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
/* 到达端 Chip 样式 */
.chip-item.chip-dest {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
/* 省份专属 Chip 样式 */
.chip-item.chip-province {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}
.chip-prov-badge {
  display: inline-block;
  padding: 0 3px;
  border-radius: 4px;
  background: #4338ca;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  line-height: 14px;
  margin-right: 2px;
}
.chip-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  opacity: 0.65;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip-remove-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.12);
}

/* 半径控制器：严格单行横向排布 (Row 3 of card) */
.radius-controller-wrap {
  padding: 4px 8px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  transition: all 0.2s ease;
}
.radius-controller-wrap input[type="range"] {
  flex: 1 1 auto !important;
  min-width: 60px !important;
  height: 6px !important;
}
.radius-controller-wrap input[type="number"] {
  width: 44px !important;
  height: 24px !important;
}
.radius-controller-wrap.is-disabled {
  opacity: 0.7;
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}
.radius-controller-wrap.is-disabled input {
  pointer-events: none;
  cursor: not-allowed;
}

/* 4 个未来周期快捷按钮网格 (Month Presets) */
#rangePicker, #rtRangePicker {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  height: 34px !important;
}

.month-presets-wrap {
  margin-top: 4px;
}
.presets-sub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.preset-month-btn {
  width: 100%;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-sizing: border-box;
}
.preset-month-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}
.preset-month-btn.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25);
}

/* 城市 / 省份全能选择弹窗 */
.city-modal-wrap {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.city-modal-wrap.hidden {
  display: none !important;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.city-modal-content {
  width: 100% !important;
  max-width: 540px !important;
  height: 600px !important;
  min-height: 600px !important;
  max-height: 600px !important;
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid #cbd5e1;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.4);
  z-index: 100001 !important;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

#cityModalGrid {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

#cityModalSearch {
  font-size: 13px !important;
  height: 34px !important;
  line-height: 1.2 !important;
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding-left: 28px !important;
  padding-right: 28px !important;
  color: #1e293b !important;
}
#cityModalSearch:focus {
  background: #ffffff !important;
  border-color: #2563eb !important;
}

.city-modal-tab {
  transition: all 0.15s ease;
}
.city-modal-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  font-weight: 700;
}

/* 省份卡片 */
.prov-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  transition: all 0.15s ease;
}
.prov-card:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.prov-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.prov-header-btn:hover {
  border-color: #3b82f6;
  color: #2563eb;
}
.prov-header-btn.is-selected {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

.prov-cities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.city-select-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}
.city-select-chip:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
}
.city-select-chip.is-selected {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

/* 已纳入城市标签：严格限制2行 */
#includedOrigins, #includedDests, #rtIncludedOrigins, #rtIncludedDests {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  max-height: 56px !important;
  overflow-y: auto !important;
  align-content: flex-start !important;
  padding: 2px 0 !important;
}
.inc-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 7px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

/* =========================================================================
 * 移动端专属适配 (Mobile Viewport Optimization)
 * ========================================================================= */
@media (max-width: 639px) {
  /* 移动端全屏/底部抽屉式省市选择弹窗 */
  .city-modal-wrap {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  /* 移动端固定高度 85vh/85dvh，无论内容多少高度永不伸缩 */
  .city-modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 85vh !important;
    height: 85dvh !important;
    min-height: 85vh !important;
    min-height: 85dvh !important;
    max-height: 85vh !important;
    max-height: 85dvh !important;
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    animation: mobileSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  @keyframes mobileSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  /* 移动端快捷月份网格与日期框 */
  .presets-sub-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
  }
  .preset-month-btn {
    height: 30px !important;
    font-size: 11px !important;
    padding: 0 1px !important;
  }
  #rangePicker, #rtRangePicker {
    height: 32px !important;
    font-size: 12px !important;
  }

  /* 移动端始发到达卡片及按钮触控尺寸 */
  .route-selector-box {
    padding: 8px 10px !important;
  }
  .chip-item {
    font-size: 11.5px !important;
    padding: 0 6px !important;
    height: 24px !important;
  }
  .chip-remove-btn {
    width: 15px !important;
    height: 15px !important;
  }
}


