/* 前台 H5 样式：手机优先，桌面居中 */
:root { --primary: #2f6bff; --line: #eceff3; --muted: #6b7280; --bg: #f5f6f8; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body.h5 { margin: 0; background: var(--bg); color: #1c1f26; padding-bottom: 60px;
  font: 15px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  height: 46px; padding: 0 12px; background: var(--primary); color: #fff; }
.topbar .title { font-size: 16px; font-weight: 600; }
.topbar a { color: #fff; text-decoration: none; font-size: 14px; }
.topbar .back { font-size: 22px; line-height: 1; width: 24px; }
.h5-main { max-width: 720px; margin: 0 auto; padding: 12px 12px 20px; }
.flash { padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 10px; }
.flash-success { background: #e8f7ee; color: #14663a; }
.flash-error { background: #fdecec; color: #a11d1d; }
.flash-info { background: #eef3ff; color: #24459a; }
.card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
.card h3 { margin: 0 0 10px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.row2 { display: flex; gap: 8px; }
.row2 > * { flex: 1; }
input, textarea, select { width: 100%; padding: 10px 12px; font: inherit; color: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
textarea { min-height: 64px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); background: #fff; }
.btn { display: inline-block; width: 100%; padding: 12px; border: 0; border-radius: 10px; font: inherit; font-weight: 600;
  color: #fff; background: var(--primary); text-align: center; text-decoration: none; cursor: pointer; }
.btn-plain { background: #eef1f5; color: #374151; }
.btn-mini { width: auto; padding: 7px 14px; font-size: 13px; font-weight: 500; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.price { color: #e5484d; font-weight: 700; }
.price .unit { font-size: 12px; font-weight: 400; }
.channel { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.channel:last-child { border-bottom: 0; }
.channel .logo { width: 38px; height: 38px; border-radius: 9px; background: #eef3ff; color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.channel .info { flex: 1; min-width: 0; }
.channel .info b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel .info span { display: block; font-size: 12px; color: var(--muted); }
.tag { display: inline-block; padding: 1px 6px; margin-left: 6px; font-size: 11px; border-radius: 5px;
  background: #fff1f0; color: #d4380d; vertical-align: middle; }
.tag-blue { background: #eef3ff; color: var(--primary); }
.list-item { display: flex; justify-content: space-between; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .l { flex: 1; min-width: 0; }
.list-item .r { text-align: right; flex: 0 0 auto; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.kv .k { color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.steps li { position: relative; padding: 0 0 14px 12px; font-size: 13px; }
.steps li:before { content: ''; position: absolute; left: -21px; top: 5px; width: 8px; height: 8px;
  border-radius: 50%; background: #d0d5dd; }
.steps li:first-child:before { background: var(--primary); }
.steps li .t { display: block; color: var(--muted); font-size: 12px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #fff; border-top: 1px solid var(--line); }

/* 电脑端（≥900px）：内容本来就是居中的 720px 画布，底栏也得跟着同宽 ——
 * 否则宽屏上"内容在中间、底栏横跨整屏"（客户 2026-10-01 反馈"电脑端布局不合适"）。 */
@media (min-width: 900px) {
  .tabbar { max-width: 720px; margin: 0 auto; border-radius: 12px 12px 0 0; }
}
.tabbar a { flex: 1; padding: 10px 0 12px; text-align: center; font-size: 12px; color: var(--muted); text-decoration: none; }
.tabbar a.on { color: var(--primary); font-weight: 600; }
.empty { padding: 26px 0; text-align: center; color: var(--muted); font-size: 13px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tool { text-align: center; padding: 10px 0; font-size: 12px; color: #374151; text-decoration: none; }
.tool i { display: block; font-size: 20px; font-style: normal; margin-bottom: 4px; }
.plan { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; }
.plan.on { border-color: var(--primary); background: #f5f8ff; }
.plan b { display: block; font-size: 16px; }
.plan span { font-size: 12px; color: var(--muted); }
.banner { display: block; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.banner img { display: block; width: 100%; }
/* 只填了标题、没传图的横幅：用主题色渐变顶上，后台不用先做图也能挂一条活动 */
.banner .banner-text {
    display: block;
    padding: 18px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #ffffff));
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

/* ─────────────────────────────────────────────────────────
   首页（门面页）：头图 / 比价卡片 / 六宫格 / 滚动通知 / 客服浮标
   ───────────────────────────────────────────────────────── */

.hero {
    margin: -10px -12px 12px;
    padding: 16px 16px 22px;
    border-radius: 0 0 18px 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 62%, #7aa2ff));
}
.hero-search {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .22);
    border-radius: 999px; padding: 9px 14px;
    color: #fff; font-size: 13px;
}
.hero-search .ico { font-size: 14px; }
.hero-title {
    margin: 16px 0 10px;
    font-size: 30px; font-weight: 800; letter-spacing: 2px;
    text-align: center;
}
.hero-tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.hero-tags span {
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 999px; padding: 4px 12px; font-size: 12px;
}
.hero-sub { margin: 12px 0 0; text-align: center; font-size: 14px; letter-spacing: 1px; opacity: .95; }

/*
 * 顶部公告条（客户要求：公告置顶、别占一大块）
 *
 * 以前"消息公告"是页面底部一张大卡片（占了大半屏），滚动通知又单占一行。
 * 现在合成顶部这一条：一行高度、轮播公告标题与脱敏成交通知，点一下去公告列表。
 */
.top-notice {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .92); color: #1c1f26;
    border-radius: 10px; padding: 7px 12px; margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
}
.top-notice-label { flex: 0 0 auto; }
.top-notice-track {
    display: block; flex: 1 1 auto; min-width: 0; height: 20px; overflow: hidden;
    transition: transform .45s ease;
}
.top-notice-track .ticker-item {
    display: block; height: 20px; line-height: 20px; font-size: 12px; color: #4b5563;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.top-notice-more { flex: 0 0 auto; color: #9aa3b5; font-size: 16px; line-height: 1; }

.compare-card { margin-top: -6px; }
.compare-head { display: flex; align-items: baseline; justify-content: space-between; }
.compare-head b { font-size: 15px; }
/*
 * 渠道墙：圆形品牌徽标（首字 + 品牌色），一排看过去就像"能比好几家"。
 *
 * 客户反馈「上面快递品牌需要并排」—— 原来是 flex 自动换行 + 固定 52px 宽，
 * 6 家会排成"5 个一行 + 1 个孤零零在第二行"。改成**栅格**：列数由页面按渠道数量算
 * （最多 6 列，见 site/index.php），每个徽标等宽，多出来的按整行往下排，永远对齐。
 */
.brand-wall {
    display: grid; gap: 14px 6px;
    margin: 14px 0 4px; justify-items: center;
}
.brand-badge {
    display: inline-flex; flex-direction: column; align-items: center;
    width: 100%; min-width: 0; text-align: center;
}
.brand-badge i {
    width: 38px; height: 38px; line-height: 38px; border-radius: 50%;
    color: #fff; font-style: normal; font-size: 15px; font-weight: 700;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .14);
}
.brand-badge b {
    display: block; margin-top: 4px; font-size: 11px; font-weight: 500; color: #4b5563;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brand-chip {
    border: 1px solid var(--line, #e6e8ec);
    border-radius: 8px; padding: 5px 10px;
    font-size: 12px; color: #374151; background: #fff;
}

.grid6 {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin-bottom: 12px;
}
.grid-cell {
    background: #fff; border-radius: 12px; padding: 14px 8px;
    text-align: center; color: inherit;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
}
.grid-cell i { display: block; font-size: 22px; font-style: normal; margin-bottom: 6px; }
.grid-cell b { display: block; font-size: 13px; margin-bottom: 2px; }
.grid-cell span { font-size: 11px; }

.ticker {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border-radius: 12px; padding: 8px 12px;
    margin-bottom: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
}
.ticker-label { flex: 0 0 auto; }
.ticker-track { flex: 1 1 auto; height: 20px; overflow: hidden; transition: transform .45s ease; }
.ticker-item { height: 20px; line-height: 20px; font-size: 12px; color: #4b5563; }

/*
 * 右下角那个悬浮「客服」按钮已按客户要求去掉（2026-09-29）。
 * 首页宫格里已经有「问题咨询」，点它弹的是同一个客服弹层 —— 浮动按钮纯属挡内容。
 * .service-mask / .service-box 是那个弹层，保留。
 */
.service-mask {
    position: fixed; inset: 0; z-index: 30;
    background: rgba(15, 23, 42, .45);
    display: none; align-items: flex-end;
}
.service-mask.on { display: flex; }
.service-box {
    width: 100%; background: #fff; border-radius: 16px 16px 0 0;
    padding: 18px 16px 26px;
}
.service-box h3 { margin: 0 0 12px; font-size: 16px; }

.timeline { padding-left: 6px; }
.timeline-item { display: flex; gap: 10px; padding: 8px 0; }
.timeline-item .dot {
    flex: 0 0 auto; width: 8px; height: 8px; margin-top: 6px;
    border-radius: 50%; background: var(--primary);
}
.timeline-item .body { font-size: 13px; }
.prose { font-size: 13px; line-height: 1.8; color: #374151; }

/* 优惠券：左边一块金额、右边说明、最右一个按钮 */
.coupon { display: flex; align-items: center; gap: 12px; }
.coupon-left {
    flex: 0 0 84px; text-align: center;
    border-right: 1px dashed var(--line, #e6e8ec); padding-right: 10px;
}
.coupon-value { font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.coupon-value span { font-size: 13px; font-weight: 600; margin-left: 2px; }
.coupon-body { flex: 1 1 auto; min-width: 0; }
.coupon-body b { display: block; font-size: 14px; margin-bottom: 2px; }
.coupon-act { flex: 0 0 auto; text-align: right; }
.coupon-off { opacity: .55; }

/* 常见问题：用 details/summary，不用写 JS */
.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.faq summary::-webkit-details-marker { color: var(--primary); }

/* ─────────── 寄件页：省市区三级联动 + 常用地址 + 粘贴识别 ─────────── */

/* 省/市/区一行三个；手机太窄时省自己占一行、市和区并排，别把字挤没 */
.row3 { display: flex; flex-wrap: wrap; gap: 8px; }
.row3 > .field { flex: 1 1 0; min-width: 0; }
.row3 select { padding-left: 8px; padding-right: 4px; }
@media (max-width: 400px) {
    .row3 > .field:nth-child(1) { flex: 1 1 100%; }
    .row3 > .field:nth-child(2),
    .row3 > .field:nth-child(3) { flex: 1 1 calc(50% - 4px); }
}

.addr-card .btn-mini { width: auto; flex: 0 0 auto; }

/*
 * 折叠式寄件人 / 收件人（客户要求：「寄件页面需要这样折叠的，不是平摊展示所有信息」）
 *
 * 收起时就是一行：左边"寄/收"圆点、中间"新建寄件人 + 请选择详细地址信息"（填过就显示
 * 张三 / 138****0000 / 广东省深圳市… 的摘要）、右边一个箭头。点这一行才展开表单。
 */
.addr-sum {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 4px 0; margin: 0;
    background: none; border: 0; color: inherit; font: inherit; text-align: left;
}
/*
 * 「点它展开填新的」那半边（客户 2026-10-04：右边那颗「地址簿」点了没反应 ——
 * 原来它跟"展开"挤在同一个 <button> 里，点哪儿都只会展开）。
 * 现在左边是按钮、右边是链接，两个目标各自可点。
 */
.addr-sum-main {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px;
    padding: 0; margin: 0; background: none; border: 0; color: inherit;
    font: inherit; text-align: left; cursor: pointer;
}
.addr-pill {
    flex: 0 0 auto; width: 26px; height: 26px; line-height: 26px;
    border-radius: 50%; text-align: center; font-style: normal;
    font-size: 13px; font-weight: 700; color: #fff; background: var(--primary);
}
.addr-sum-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.addr-sum-txt b { font-size: 15px; font-weight: 600; }
.addr-sum-txt .js-sum-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-book-link {
    flex: 0 0 auto; font-size: 12px; color: var(--primary);
    padding: 4px 8px; border-radius: 8px; background: rgba(47, 107, 255, .08);
    text-decoration: none; white-space: nowrap; cursor: pointer;
}

/*
 * 查快递页的「路线」那一行：寄件城市 ➜ 收件城市 + 状态
 * （客户要求：查快递不用输单号，直接看到"在运输的路线"）
 */
.route-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.route-line b { font-size: 16px; font-weight: 600; }
.route-line .arrow { color: var(--primary); font-size: 14px; }
.addr-chev {
    flex: 0 0 auto; color: #9aa3b5; font-size: 18px; line-height: 1;
    transition: transform .2s ease;
}
/*
 * 点寄件人 / 收件人 → 盖满屏的"新建地址"页
 *
 * 客户原话：「点寄件地址和收件地址都应该是……有一个额外的输入地方，不是折叠起来」——
 * 所以输入区做成一个全屏面板（观感和单独一页一样），保存 / 返回才回到寄件页。
 * 输入框仍留在同一个 <form> 里，提交、地址簿、省市区联动都不用改。
 */
.addr-sheet {
    position: fixed; inset: 0; z-index: 50;
    background: #f5f7fb; display: flex; flex-direction: column;
}
.addr-sheet[hidden] { display: none !important; }
body.sheet-open { overflow: hidden; }
.sheet-head {
    display: flex; align-items: center; gap: 8px;
    background: #fff; padding: 10px 14px; border-bottom: 1px solid #e9eef6;
}
.sheet-head .sheet-back {
    width: 30px; height: 30px; border: 0; background: none;
    font-size: 22px; line-height: 1; color: #374151; padding: 0;
}
.sheet-head b { font-size: 16px; }
.sheet-head .sheet-tip { margin-left: auto; font-size: 12px; color: #9aa3b5; }
.sheet-body { flex: 1 1 auto; overflow: auto; padding: 12px 12px 96px; }
.sheet-body .card { margin-bottom: 10px; }
.sheet-hint {
    background: #eef4ff; color: #3b5bdb; border-radius: 10px;
    padding: 8px 12px; margin-bottom: 10px; font-size: 12px; line-height: 1.6;
}
.sheet-foot {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff; border-top: 1px solid #e9eef6;
}

/**
 * 「新建地址」页的内容壳
 *
 * 手机端：撑满整屏（.addr-sheet 本来就是 fixed/inset:0）——和以前完全一样；
 * 电脑端：下面那段 @media 把它收成一个 720px 的居中对话框。
 * .sheet-foot 是 absolute，所以这一层必须有 position:relative 兜住它。
 */
.sheet-wrap {
    position: relative; display: flex; flex-direction: column;
    flex: 1 1 auto; min-height: 0;
}

/* 电脑端（≥900px）：整屏面板 → 居中对话框（客户 2026-10-03：「页面太大了」） */
@media (min-width: 900px) {
  .addr-sheet {
    align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .38);
    padding: 28px;
  }
  .sheet-wrap {
    flex: 0 1 auto; width: 720px; max-width: 100%; max-height: 100%;
    background: #f5f7fb; border-radius: 14px; overflow: hidden;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .28);
  }
  .sheet-head { border-radius: 14px 14px 0 0; padding: 12px 18px; }
  .sheet-body { padding: 18px 18px 90px; }
  /* 卡片里两列排：姓名 / 手机号 并排，省市区和详细地址仍占满一行 */
  .grid2-desk { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .grid2-desk > .row3,
  .grid2-desk > .field.full,
  .grid2-desk > .card-title,
  .grid2-desk > p { grid-column: 1 / -1; }
  /* 粘贴并识别那两个按钮：电脑上别拉满整行，靠右排一行更像回事 */
  .sheet-body .btn-row { justify-content: flex-end; }
  .sheet-body .btn-row .btn { flex: 0 0 auto; width: auto; min-width: 150px; padding: 10px 22px; }
  /* 客服弹层同理：电脑上收成中间一个小卡片，不要从屏幕最左拉到最右 */
  .service-mask { align-items: center; justify-content: center; padding: 28px; }
  .service-box { width: 420px; max-width: 100%; border-radius: 14px; }
}

.addr-book {
    background: #f7f9fc; border: 1px solid #e9eef6; border-radius: 10px;
    padding: 10px; margin-bottom: 12px;
}
.addr-book .book-title {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 8px; font-size: 12px; color: #6b7280; margin-bottom: 8px;
}
.addr-book .book-title span:first-child { font-weight: 600; color: #374151; }

/* 常用地址：一条一张小卡，点一下填进表单 */
.book-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.addr-chip {
    position: relative; flex: 0 1 auto; max-width: 100%;
    display: flex; align-items: center; gap: 6px;
    padding: 7px 26px 7px 12px; border: 1px solid #dbe4f0; border-radius: 999px;
    background: #fff; color: #1c1f26; font: inherit; font-size: 12px;
    cursor: pointer; text-align: left;
}
.addr-chip:active { background: #eef3ff; }
.addr-chip b { font-size: 13px; font-weight: 600; }
.addr-chip span { color: #6b7280; }
.addr-chip i {
    font-style: normal; color: #6b7280; max-width: 96px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.addr-chip .chip-del {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; line-height: 16px; text-align: center;
    border-radius: 50%; font-style: normal; font-size: 14px;
    color: #98a2b3; background: #f1f3f7;
}
.addr-chip .chip-del:hover { color: #b42318; background: #fdecec; }

/* 粘贴识别：默认收起，点「粘贴识别」才展开 */
.js-parse-box {
    background: #f7f9fc; border: 1px dashed #c7d4e8; border-radius: 10px;
    padding: 10px; margin-bottom: 12px;
}
.js-parse-box textarea { min-height: 72px; background: #fff; }
.js-parse-msg { color: #14663a; }
