/* ==========================================================================
   OTA H5 样式
   设计基调：黑白单色，颜色仅用于状态与主按钮；细分隔线 + 留白组织内容。
   变量优先取 vercel-brand.css 的 --vbg-*，不存在时回退到内置值。
   ========================================================================== */

:root {
  --text: var(--vbg-text-primary, #0a0a0a);
  --text-2: var(--vbg-text-secondary, #666666);
  --border: var(--vbg-border-default, #e5e5e5);
  --border-sub: var(--vbg-border-subtle, #f0f0f0);
  --surface-2: var(--vbg-bg-surface-secondary, #fafafa);
  --focus: var(--vbg-focus, #0a0a0a);
  --success: var(--vbg-color-success, #067647);
  --warning: var(--vbg-color-warning, #b54708);
  --error: var(--vbg-color-error, #d92d20);
  --radius: var(--vbg-radius, 8px);
  --fs-xs: var(--vbg-type-xs, 12px);
  --fs-sm: var(--vbg-type-sm, 13px);
  --fs-md: var(--vbg-type-md, 15px);
  --fs-lg: var(--vbg-type-lg, 17px);
  --fs-xl: var(--vbg-type-xl, 22px);
  --sp-2: var(--vbg-space-sm, 8px);
  --sp-3: var(--vbg-space-md, 12px);
  --sp-4: var(--vbg-space-lg, 16px);
  --sp-5: var(--vbg-space-xl, 24px);
  --font: 'Geist', -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --tabbar-h: 56px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
  /* 禁止 iOS 双击缩放（如首页 tab 快速点两下时页面被放大） */
  touch-action: manipulation;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; }
a { color: var(--text); }
button { -webkit-tap-highlight-color: transparent; }

/* 可点元素的按压反馈 */
.btn:active, .chip:active, .seg-btn:active, .seg-sm-btn:active, .sort-btn:active,
.pseudo-input:active, .swap-btn:active, .step-btn:active, .brand-card:active,
.tabbar a:active, .link-row:active {
  opacity: 0.6;
}
.hotel:active, .order:active, .flight-main:active, .suggest-item:active {
  background: var(--surface-2);
}

/* 列表选中态：浅底色标记当前所选（航班/酒店卡片） */
.flight.selected, .hotel.selected {
  background: var(--vbg-gray-alpha-200, #f0f0f0);
}

/* ---------------------------------------------------------------- 布局壳 */
.shell {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-sub);
  border-right: 1px solid var(--border-sub);
}
@media (max-width: 480px) {
  .shell { border: none; }
}

.main {
  flex: 1;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--sp-5));
  overflow-wrap: break-word;
  animation: page-in 180ms ease-out;
}
/* 二级页面隐藏底部 Tab Bar 时收回其占位空间 */
.main.no-tabbar {
  padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom));
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .main { animation: none; }
  .sheet-mask, .sheet { transition: none !important; }
  .skel, .load-dots i, .btn-load-more.is-loading::after { animation: none; }
}

/* -------------------------------------------------------------- 顶部标题 */
.pheader {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--border-sub);
  padding-top: env(safe-area-inset-top);
}
.pheader-inner {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 var(--sp-2);
}
.pheader-brand {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.pheader-title { font-size: var(--fs-lg); font-weight: 600; }
.pheader-logo { height: 22px; display: block; }
.back-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.back-placeholder { width: 44px; height: 44px; flex: none; }

/* -------------------------------------------------------------- 底部 Tab */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid var(--border-sub);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 30;
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--tabbar-h);
  font-size: var(--fs-xs);
  color: var(--text-2);
  text-decoration: none;
}
.tabbar a svg { width: 22px; height: 22px; display: block; }
.tabbar a.active { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------- 通用 */
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-xs); }
.center { text-align: center; }
.ok { color: var(--success); }
.warn { color: var(--warning); }
.err { color: var(--error); }
.pad { padding: var(--sp-4); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }

.price {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: var(--fs-lg);
}
.price-sub { font-size: var(--fs-xs); color: var(--text-2); }

.section { padding: var(--sp-4); border-bottom: 1px solid var(--border-sub); }
.section-title { font-size: var(--fs-sm); color: var(--text-2); margin: 0 0 var(--sp-3); }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 var(--sp-4);
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--fs-md);
  cursor: pointer;
  text-decoration: none;
  background: none;
  color: var(--text);
}
.btn-primary { background: #0a0a0a; color: #fff; width: 100%; }
.btn-primary:disabled { background: #9e9e9e; cursor: not-allowed; }
.btn-outline { background: #fff; border-color: var(--text); width: 100%; }
.btn-ghost { background: #fff; border-color: var(--border); }
.btn-danger { background: #fff; border-color: var(--error); color: var(--error); }
.btn-sm { min-height: 36px; padding: 0 var(--sp-3); font-size: var(--fs-sm); width: auto; }
.link-btn {
  background: none;
  border: none;
  font: inherit;
  font-size: var(--fs-xs);
  color: var(--text-2);
  cursor: pointer;
  padding: 4px;
  text-decoration: underline;
}

/* ---------------------------------------------------------------- 表单 */
.form .field:last-of-type { margin-bottom: var(--sp-4); }
.field { margin-bottom: var(--sp-3); }
.field label { display: block; font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 6px; }
.field-row { display: flex; gap: var(--sp-3); align-items: flex-end; }
.grow { flex: 1; min-width: 0; }

.input {
  width: 100%;
  height: 44px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: var(--fs-md);
  color: var(--text);
  background: #fff;
}
textarea.input { height: auto; min-height: 72px; padding: var(--sp-3); resize: vertical; }
.input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--text); }
select.input { appearance: auto; }

/* 伪输入框（点击打开弹层的触发器，外观与 input 一致） */
.pseudo-input {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 6px var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  font-size: var(--fs-md);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.pseudo-input .placeholder { color: var(--text-2); }
.city-btn { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }
.city-name { font-weight: 600; }
.city-ap { font-size: var(--fs-xs); color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.swap-btn {
  flex: none;
  width: 44px;
  height: 44px;
  margin-bottom: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
}

.date-row { display: flex; gap: var(--sp-2); align-items: center; }
.date-row .input,
.date-row .pseudo-input { flex: 1; min-width: 0; }
.date-chips { display: flex; gap: 6px; flex: none; }
.nights-tag {
  flex: none;
  margin-bottom: var(--sp-3);
  height: 44px;
  display: flex;
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--text-2);
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  cursor: pointer;
}

/* ---------------------------------------------------------------- chips */
.chip-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip-grid { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip-grid .chip { flex: 1 0 28%; text-align: center; justify-content: center; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 4px var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  cursor: pointer;
}
.chip-sm { min-height: 28px; padding: 2px var(--sp-2); font-size: var(--fs-xs); }
.chip.active { border-color: var(--text); background: #0a0a0a; color: #fff; }
.chip.active .muted { color: rgba(255, 255, 255, 0.7); }
.chip-static { cursor: default; }
.chip-x {
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  padding: 0 0 0 2px;
  opacity: 0.6;
}

/* 联想下拉 */
.suggest { position: relative; }
.suggest-drop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 240px;
  overflow: auto;
  z-index: 40;
}
.suggest-item { padding: 10px var(--sp-3); cursor: pointer; font-size: var(--fs-sm); }
.suggest-item:hover { background: var(--surface-2); }
.suggest-item .sub { color: var(--text-2); font-size: var(--fs-xs); }

/* ---------------------------------------------------------------- 首页 */
/* 分销推荐角标（「由 XX 推荐」，轻量展示，不遮挡搜索主流程） */
.dist-badge {
  display: inline-block;
  margin: var(--sp-3) var(--sp-4) 0;
  padding: 4px var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--fs-xs);
  color: var(--text-2);
}

.seg { display: flex; border-bottom: 1px solid var(--border-sub); }
.seg-btn {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font: inherit;
  font-size: var(--fs-md);
  padding: var(--sp-3);
  cursor: pointer;
  color: var(--text-2);
}
.seg-btn.active { color: var(--text); font-weight: 600; border-bottom-color: var(--text); }

/* 小型分段控件（单程/往返） */
.seg-sm { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--sp-4); overflow: hidden; }
.seg-sm-btn {
  border: none;
  background: #fff;
  font: inherit;
  font-size: var(--fs-sm);
  padding: 6px var(--sp-4);
  cursor: pointer;
  color: var(--text-2);
}
.seg-sm-btn.active { background: #0a0a0a; color: #fff; }

/* 酒店搜索行：城市按钮 + 关键词输入 */
.city-kw-row { display: flex; gap: var(--sp-2); }
.city-kw-row .input { flex: 1; min-width: 0; }
.city-select-btn {
  flex: none;
  width: 104px;
  justify-content: space-between;
  gap: 6px;
}
.city-select-btn .city-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-arrow { flex: none; color: var(--text-2); font-size: var(--fs-xs); }

/* 酒店日期伪输入框：只显示 M月D日，窄宽度避免手机端互相遮挡 */
.date-fields { align-items: flex-end; }
.date-fields .field { flex: none; }
.date-btn { width: auto; min-width: 92px; justify-content: center; }
.date-fields .nights-tag { margin-left: auto; }

/* 酒店入住/离店区间日历弹层 */
.cal-status { align-self: center; white-space: nowrap; }
.cal-month { margin-bottom: var(--sp-4); }
.cal-title { font-weight: 600; padding: var(--sp-2) 0; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-week span { text-align: center; font-size: var(--fs-xs); color: var(--text-2); padding: 4px 0; }
.cal-day {
  height: 40px;
  border: none;
  background: none;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  padding: 0;
}
.cal-day:disabled { color: var(--text-2); opacity: .4; cursor: default; }
.cal-day.in-range { background: #f5f5f5; border-radius: 0; }
.cal-day.sel { background: #0a0a0a; color: #fff; }
.cal-blank { height: 40px; }
.route-kw { font-weight: 400; font-size: var(--fs-md); }
.hist-sec .section-title { margin: 0; }
.hist-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.home-footer {
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  color: var(--text-2);
  font-size: var(--fs-xs);
}
.footer-links { margin-bottom: var(--sp-2); font-size: var(--fs-sm); }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:active { color: var(--text); }

/* 内容页（服务协议 / 隐私政策 / 关于我们 / 常见问题） */
.doc { padding-bottom: var(--sp-5); }
.doc-title { font-size: var(--fs-lg); font-weight: 600; margin-bottom: var(--sp-2); }
.doc-update { font-size: var(--fs-xs); color: var(--text-2); margin: 0 0 var(--sp-4); }
.doc h3 { font-size: var(--fs-md); font-weight: 600; margin: var(--sp-4) 0 var(--sp-2); }
.doc p { font-size: var(--fs-sm); line-height: 1.8; margin: 0 0 var(--sp-2); color: var(--text); }
.doc ul { margin: 0 0 var(--sp-2); padding-left: 1.2em; }
.doc li { font-size: var(--fs-sm); line-height: 1.8; }

.auth-agree { margin: var(--sp-3) 0 0; text-align: center; }
.auth-agree a { color: var(--text); }
.pay-note { margin: var(--sp-3) 0 0; }

/* 首页底部服务能力 */
.caps {
  display: flex;
  margin: var(--sp-6) var(--sp-4) 0;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border-sub);
}
.cap { flex: 1; text-align: center; min-width: 0; }
.cap-value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--fs-xl); font-weight: 600; }
.cap-unit { font-size: var(--fs-sm); font-weight: 400; }
.cap-label { margin-top: 2px; font-size: var(--fs-xs); color: var(--text-2); }

/* 品牌榜单横滑 */
.brand-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.brand-head .section-title { margin: 0; }
.brand-head .chip-row { flex-wrap: nowrap; }
.brand-scroll {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
  -webkit-overflow-scrolling: touch;
}
.brand-card {
  flex: none;
  width: 128px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: var(--sp-3);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.brand-name { font-weight: 600; font-size: var(--fs-sm); }

/* 城市选择器 */
.city-search { margin-bottom: var(--sp-3); }
.city-results { border-top: 1px solid var(--border-sub); }
.city-sec { margin-top: var(--sp-4); }

/* -------------------------------------------------------------- 列表通用 */
.route-bar {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--border-sub);
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.route-cities { font-weight: 600; font-size: var(--fs-lg); }
.route-dates { background: none; border: 0; padding: 0; font: inherit; font-family: var(--mono); font-variant-numeric: tabular-nums; cursor: pointer; text-align: left; }
.link-mod { margin-left: auto; font-size: var(--fs-sm); color: var(--text-2); }

/* 机票列表顶部日期切换栏：横向滑动，选中项高亮，过期日期置灰（随内容滚动，吸顶仍由筛选工具栏承担） */
.date-bar {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-sub);
}
.date-bar::-webkit-scrollbar { display: none; }
.date-bar-sub { padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--border-sub); }
.date-chip {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 56px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.date-chip:disabled { color: var(--text-2); opacity: .5; cursor: default; }
.date-chip.active { background: #0a0a0a; border-color: #0a0a0a; color: #fff; }
.date-chip-d { font-size: var(--fs-sm); font-weight: 600; }
.date-chip-w { font-size: var(--fs-xs); opacity: .8; }

.list-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--border-sub);
  position: sticky;
  top: calc(52px + env(safe-area-inset-top));
  background: #fff;
  z-index: 10;
}
.sort-bar { display: flex; gap: var(--sp-4); flex: 1; min-width: 0; overflow-x: auto; }
.sort-btn {
  border: none;
  background: none;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text-2);
  cursor: pointer;
  padding: var(--sp-2) 0;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.sort-btn.active { color: var(--text); font-weight: 600; border-bottom-color: var(--text); }
.filter-btn {
  flex: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  font-size: var(--fs-sm);
  padding: 6px var(--sp-3);
  cursor: pointer;
  color: var(--text);
}

.leg-title {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-sub);
}
.leg-block + .leg-block { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--border-sub); }

.state-box { padding: var(--sp-5) var(--sp-4); text-align: center; }
.state-box .btn { margin-top: var(--sp-3); }
/* 空状态插画：缓慢上下浮动， prefers-reduced-motion 时静止 */
.empty-illust { width: 132px; margin: 0 auto var(--sp-2); animation: empty-float 3.2s ease-in-out infinite; }
@keyframes empty-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .empty-illust { animation: none; } }
.state-icon { font-family: var(--mono); font-size: 40px; line-height: 1.2; }
.state-title { font-size: var(--fs-lg); font-weight: 600; margin-top: var(--sp-2); }
.state-actions { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-4); }

.skel { background: var(--border-sub); border-radius: var(--radius); animation: pulse 1.2s ease-in-out infinite; }
.skel-line { height: 14px; margin: var(--sp-4); }
.skel-block { height: 88px; margin: var(--sp-4); }
.skel-frow { height: 96px; margin: var(--sp-3) var(--sp-4); background: var(--border-sub); border-radius: var(--radius); animation: pulse 1.2s ease-in-out infinite; }
.skel-chip { width: 72px; height: 34px; display: inline-block; }
.skel-brand { width: 128px; height: 64px; flex: none; }
@keyframes pulse { 50% { opacity: 0.45; } }

/* -------------------------------------------------------------- 航班列表 */
.flight { border-bottom: 1px solid var(--border-sub); }
.flight-main {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
  background: none;
  border: none;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.t-block { min-width: 64px; }
.t-block.right { text-align: right; }
.t-time { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--fs-xl); font-weight: 600; }
.t-ap { font-size: var(--fs-xs); color: var(--text-2); max-width: 96px; }
.t-mid { flex: 1; min-width: 48px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.t-dur, .t-stop { font-size: var(--fs-xs); color: var(--text-2); }
.t-line { width: 100%; height: 1px; background: var(--border); }
.t-price { text-align: right; margin-left: auto; }
/* 机票价格用强调橙，黑白基调中更醒目（仅限机票列表：航班最低价 + 舱位价） */
.t-price .price, .cabin-right .price { color: var(--warning); }
.flight-sub { padding: 0 var(--sp-4) var(--sp-3); font-size: var(--fs-xs); color: var(--text-2); }
.meal-tag { margin-left: var(--sp-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }

.cabins { border-top: 1px dashed var(--border); }
.cabin {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-sub);
}
.cabin:last-child { border-bottom: none; }
.cabin-info { flex: 1; min-width: 0; }
.cabin-name { font-size: var(--fs-md); }
.cabin-meta { font-size: var(--fs-xs); color: var(--text-2); margin-top: 2px; }
.cabin-right { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-2); flex: none; }
.rules summary { cursor: pointer; color: var(--text-2); font-size: var(--fs-xs); margin-top: 4px; }
.rules-body { white-space: pre-line; font-size: var(--fs-xs); color: var(--text-2); padding-top: 4px; }

/* 往返汇总条 */
.sum-spacer { height: 76px; }
.sum-bar {
  position: fixed;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  z-index: 25;
}
.sum-info { flex: 1; min-width: 0; }
.sum-line { display: flex; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--text-2); }
.sum-total { font-size: var(--fs-sm); }
.sum-btn { width: auto; flex: none; padding: 0 var(--sp-5); }
/* 二级页面无底部 Tab Bar 时，汇总条贴底：背景延伸覆盖底部安全区（修微信浏览器底部漏空） */
.main.no-tabbar .sum-bar {
  bottom: 0;
  padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom));
}
/* 占位高度同步加上安全区，避免页面末尾内容被加高后的汇总条遮挡 */
.main.no-tabbar .sum-spacer { height: calc(76px + env(safe-area-inset-bottom)); }

/* -------------------------------------------------------------- 填写页 */
.book-summary .t-time { font-size: var(--fs-xl); }
.book-route-line { display: flex; align-items: baseline; gap: var(--sp-3); }
.book-price { margin-top: var(--sp-3); }
.price-detail { margin-bottom: var(--sp-4); }
.price-detail summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--fs-md);
}
.price-detail summary::marker { content: ''; }

.pax { border-top: 1px solid var(--border-sub); padding-top: var(--sp-3); margin-top: var(--sp-3); }
.pax:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.pax-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-2); }
.pax-title { font-size: var(--fs-sm); font-weight: 600; }
.traveler-sec .chip { cursor: pointer; }

/* -------------------------------------------------------------- 酒店 */
.hotel { position: relative; display: flex; gap: var(--sp-3); padding: var(--sp-4); border-bottom: 1px solid var(--border-sub); cursor: pointer; }
.hotel-img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); flex: none; }
.hotel-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hotel-name { font-weight: 600; font-size: var(--fs-md); }
.hotel-name.big { font-size: var(--fs-lg); }
.hotel-side { flex: none; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; }
.hotel-price { text-align: right; white-space: nowrap; }
.hotel.soldout { opacity: .55; cursor: default; }
.hotel.soldout:active { background: none; }
/* 售罄盖章：灰色圆形印章，盖在卡片右上角，略微倾斜 */
.soldout-tag {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  z-index: 1;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 2px;
  text-indent: 2px;
  color: var(--text-2);
  border: 2px solid var(--text-2);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .8);
  transform: rotate(-12deg);
  pointer-events: none;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
  font-weight: 600;
}
/* 详情页滚动渐显顶部栏：滑过相册后从顶部渐入 */
.dt-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%);
  width: 100%;
  max-width: 480px;
  z-index: 21;
  display: flex;
  align-items: center;
  padding: calc(env(safe-area-inset-top) + 4px) var(--sp-2) 4px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-sub);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
.dt-header.visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.dt-header-back { flex: none; }
.dt-header-title {
  flex: 1;
  min-width: 0;
  padding-right: 44px; /* 与返回键同宽，保持标题视觉居中 */
  font-weight: 600;
  font-size: var(--fs-md);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 详情页属性小标签：灰色信息 / 绿色利好 / 警示色不利 / 黑底最低价 */
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  font-size: var(--fs-xs);
  line-height: 1.6;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-2);
}
.tag-ok { background: rgba(6, 118, 71, .08); color: var(--success); }
.tag-warn { background: rgba(181, 71, 8, .08); color: var(--warning); }
.tag-best { margin-left: 6px; background: #0a0a0a; color: #fff; font-weight: 600; }

.score-badge.hot { background: #0a0a0a; border-color: #0a0a0a; color: #fff; }

/* 加载更多：胶囊按钮居中；点击后收缩成旋转小圆环 */
.btn-load-more {
  border-radius: 999px;
  padding-left: var(--sp-5);
  padding-right: var(--sp-5);
  position: relative;
  overflow: hidden;
  transition: width .3s ease, height .3s ease, padding .3s ease, color .15s ease, background .3s ease;
}
.btn-load-more.is-loading {
  width: 38px;
  height: 38px;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  color: transparent;
  background: none;
  pointer-events: none;
}
.btn-load-more.is-loading::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--text);
  animation: load-more-spin .7s linear infinite;
}
@keyframes load-more-spin { to { transform: rotate(360deg); } }
/* 加载中的三点跳动 */
.load-dots { display: flex; gap: 6px; justify-content: center; padding: var(--sp-4); }
.load-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-2);
  animation: load-dot-bounce 1s ease-in-out infinite;
}
.load-dots i:nth-child(2) { animation-delay: .15s; }
.load-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes load-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .35; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* 酒店详情顶部相册：横向滑动（scroll-snap）+ 点击查看大图 */
.gallery { position: relative; margin-bottom: var(--sp-3); }
/* 沉浸式（详情页有图时）：通栏无圆角无边距，返回键悬浮在图片左上角 */
.gallery-full { margin: 0 0 var(--sp-3); }
.gallery-full .gallery-track { border-radius: 0; }
.gallery-back {
  position: absolute;
  top: calc(env(safe-area-inset-top) + var(--sp-3));
  left: var(--sp-3);
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0 0 2px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img {
  width: 100%;
  flex: none;
  scroll-snap-align: start;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  cursor: zoom-in;
  background: var(--surface-2);
}
.gallery-idx {
  position: absolute;
  right: var(--sp-3);
  bottom: var(--sp-3);
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: 10px;
  pointer-events: none;
}

/* 全屏看图 */
.lightbox { position: fixed; inset: 0; background: #000; z-index: 200; display: flex; flex-direction: column; }
.lightbox-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--sp-3) + env(safe-area-inset-top)) var(--sp-4) var(--sp-3);
  z-index: 1;
}
.lightbox-idx { color: #fff; font-size: var(--fs-sm); }
.lightbox-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.lightbox-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  flex: 1;
}
.lightbox-track::-webkit-scrollbar { display: none; }
.lightbox-cell {
  width: 100%;
  height: 100%;
  flex: none;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-cell img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hotel-desc summary { font-size: var(--fs-sm); }

.room { border-bottom: 1px solid var(--border-sub); padding: var(--sp-4); }
.room-head { display: flex; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.room-img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); flex: none; }
.room-name { font-weight: 600; }
.prod {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--border-sub);
}
.prod-info { flex: 1; min-width: 0; }
.prod-right { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-2); flex: none; }

/* -------------------------------------------------------------- 订单 */
.order { padding: var(--sp-4); border-bottom: 1px solid var(--border-sub); cursor: pointer; }
.order-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.order-type { font-size: var(--fs-sm); font-weight: 600; }
.order-status { font-size: var(--fs-sm); color: var(--text-2); }
.order-status.big { font-size: var(--fs-lg); font-weight: 600; color: var(--text); }
.order-line { font-size: var(--fs-md); }
.order-bottom { display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--sp-2); }
.order-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.order .btn { margin-top: var(--sp-3); }
.order-tabs .seg-btn { font-size: var(--fs-sm); padding: var(--sp-2); }

.order-actions { display: flex; flex-direction: column; gap: var(--sp-3); }
.order-amount { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2); }

/* 键值对信息块 */
.kv-box { background: var(--surface-2); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); margin: var(--sp-3) 0; }
.kv { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 6px 0; font-size: var(--fs-sm); }
.kv-k { color: var(--text-2); flex: none; }
.kv-v { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; word-break: break-all; }
.pre-line { white-space: pre-line; }

/* -------------------------------------------------------------- 认证/我的 */
.auth-box { max-width: 340px; margin: 0 auto; padding-top: var(--sp-5); }
.auth-title { font-size: var(--fs-xl); font-weight: 600; margin-bottom: var(--sp-4); }
.auth-alt { margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--text-2); text-align: center; }
.me-email { font-size: var(--fs-md); }
.link-list a.link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) 0;
  text-decoration: none;
  font-size: var(--fs-md);
}
.link-arrow { color: var(--text-2); }

/* -------------------------------------------------------------- 确认弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}
@media (min-width: 481px) {
  .modal-mask { align-items: center; }
}
.modal {
  background: #fff;
  width: 100%;
  max-width: 440px;
  border-radius: 12px 12px 0 0;
  padding: var(--sp-4);
  padding-bottom: calc(var(--sp-4) + env(safe-area-inset-bottom));
}
@media (min-width: 481px) {
  .modal { border-radius: 12px; padding-bottom: var(--sp-4); }
}
.modal-title { font-size: var(--fs-lg); font-weight: 600; }
.modal-body { margin-top: var(--sp-3); font-size: var(--fs-sm); }
.modal-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.modal-actions .btn { flex: 1; }

/* ------------------------------------------------------ bottom sheet 弹层 */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 90;
  transition: background 200ms ease;
}
.sheet-mask.show { background: rgba(0, 0, 0, 0.4); }
.sheet {
  background: #fff;
  width: 100%;
  max-width: 480px;
  max-height: 82dvh;
  border-radius: 12px 12px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 200ms ease;
}
.sheet-mask.show .sheet { transform: none; }
.sheet-full {
  max-height: none;
  height: 100dvh;
  border-radius: 0;
  padding-top: env(safe-area-inset-top);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-sub);
  flex: none;
}
.sheet-title { font-size: var(--fs-lg); font-weight: 600; }
.sheet-close {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 22px;
  color: var(--text-2);
  cursor: pointer;
}
.sheet-body { padding: var(--sp-4); overflow-y: auto; flex: 1; }
.sheet-actions {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-sub);
  flex: none;
}
.sheet-actions .btn { flex: 1; }
.sheet-full .sheet-body { padding-bottom: calc(var(--sp-4) + env(safe-area-inset-bottom)); }

/* stepper（人数选择） */
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-sub);
}
.stepper-row:last-child { border-bottom: none; }
.stepper { display: flex; align-items: center; gap: var(--sp-3); }
.step-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
}
.step-val { min-width: 24px; text-align: center; font-weight: 600; }

/* 筛选弹层分区 */
.filter-sec { margin-bottom: var(--sp-4); }

/* -------------------------------------------------------------- toast */
.toast {
  position: fixed;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: #0a0a0a;
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  z-index: 200;
  max-width: 85%;
  text-align: center;
}
