/* ============================================================
   骑遇骑行 App v2.0 · 设计系统
   风格:「铺」暖木车铺 — 暖纸底 / 深林绿 / 辙迹橙 / 衬线标题
   Liquid Glass 玻璃用于导航与控件;内容实心分层
   ============================================================ */
:root {
  --bg: #f6f1e7;
  --card: #fffdf7;
  --line: #e6dcc8;
  --text: #241d12;
  --soft: #4f4636;
  --sub: #7a6f5d;
  --brand: #1e4d3b;
  --brand-soft: #e7efe6;
  --accent: #b45309;
  --price: #9a3412;
  --danger: #dc2626;
  --head-bg: #f6f1e7;
  --head-text: #241d12;
  --btn-bg: #1e4d3b;
  --btn-text: #f6f1e7;
  --glass-bg: rgba(255, 251, 242, .66);
  --glass-bg-strong: rgba(255, 251, 242, .8);
  --glass-border: rgba(120, 100, 60, .18);
  --glass-highlight: rgba(255, 255, 255, .9);
  --glass-shadow: 0 10px 28px rgba(80, 60, 30, .14);
  --glass-blur: 24px;
  --glass-saturate: 170%;
  --ambient-opacity: .4;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font-head: Georgia, 'Songti SC', 'SimSun', serif;
  --font-body: -apple-system, 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --t-fast: 180ms ease;
  --t-med: 260ms cubic-bezier(.32,.72,.24,1);
  --radius: 14px; --radius-lg: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14100a; --card: #1d1810; --line: #33291a; --text: #efe8d8; --soft: #cfc4ac; --sub: #96896e;
    --brand: #d9a441; --brand-soft: #2a2413; --accent: #d97706; --price: #e5a050;
    --head-bg: #14100a; --head-text: #efe8d8; --btn-bg: #d9a441; --btn-text: #14100a;
    --glass-bg: rgba(24, 19, 11, .6); --glass-bg-strong: rgba(24, 19, 11, .78);
    --glass-border: rgba(255, 255, 255, .12); --glass-highlight: rgba(255, 255, 255, .14);
    --glass-shadow: 0 10px 28px rgba(0, 0, 0, .5);
    --ambient-opacity: .25;
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass-bg: var(--card); --glass-bg-strong: var(--card); --glass-blur: 0px; --ambient-opacity: 0; }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body { min-height: 100%; background: #14100a; color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }
.ic { width:20px; height:20px; flex:none; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

#app { max-width: 430px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
#phone-inner { position: relative; z-index: 1; padding-top: env(safe-area-inset-top, 0px); }

.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: var(--ambient-opacity);
  background:
    radial-gradient(340px 340px at 10% 6%, rgba(30, 77, 59, .3), transparent 70%),
    radial-gradient(320px 320px at 92% 20%, rgba(180, 83, 9, .2), transparent 70%),
    radial-gradient(280px 280px at 65% 88%, rgba(217, 164, 65, .14), transparent 70%);
  filter: blur(30px); }

.view { display: none; padding-bottom: calc(96px + var(--safe-b)); }
.view.on { display: block; animation: viewin 260ms cubic-bezier(.32,.72,.24,1); }
@keyframes viewin { from { opacity: .35; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.foot { text-align: center; color: var(--sub); font-size: 11px; padding: 18px 0 8px; }
.blk { margin: 20px 14px 10px; display: flex; align-items: baseline; justify-content: space-between; }
.blk h2 { font-family: var(--font-head); font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.blk span { font-size: 11px; color: var(--sub); }

/* ---- 液态玻璃 Dock(5槽,中心发布) ---- */
.dock { position: fixed; bottom: calc(14px + var(--safe-b)); left: 50%; transform: translateX(-50%);
  width: calc(100% - 28px); max-width: 402px; height: 60px; border-radius: 30px; z-index: 500;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%); backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight), inset 0 -1px 1px rgba(255,255,255,.2);
  display: flex; }
.dock > div { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; font-size: 10px; color: var(--sub); cursor: pointer; }
.dock svg { width: 19px; height: 19px; position: relative; z-index: 2; }
.dock span { position: relative; z-index: 2; }
.dock .on { color: var(--brand); font-weight: 700; }
.dock .on::before { content: ''; position: absolute; inset: 5px 10px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,251,242,.92), rgba(255,251,242,.45));
  box-shadow: 0 5px 14px rgba(20,26,28,.1), inset 0 1px 0 #fff; }
.pub-slot .pub-plus { width: 40px; height: 40px; margin: -14px 0 2px; border-radius: 50%;
  background: linear-gradient(160deg, #2e6b52, #1e4d3b); color: #f6f1e7; font-size: 22px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(30, 77, 59, .45), inset 0 1px 0 rgba(255,255,255,.35); }
.pub-slot span:last-child { color: var(--brand); font-weight: 700; }

/* ---- 首页品牌行 + 购物车按钮 ---- */
.home-top { display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 16px 10px; }
.home-brand b { display: block; font-family: var(--font-head); font-size: 19px; font-weight: 800; letter-spacing: .5px; }
.home-brand span { display: block; font-size: 10px; color: var(--sub); margin-top: 1px; }
.cart-fab { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(20,26,28,.08); }
.cart-fab svg { width: 19px; height: 19px; }
.cart-fab .badge { position: absolute; top: -4px; right: -6px; min-width: 17px; height: 17px;
  border-radius: 9px; background: var(--accent); color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px; font-weight: 700; }

/* ---- 搜索 ---- */
.search-row { padding: 4px 14px 2px; }
.search-pill { display: flex; align-items: center; gap: 8px; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; padding: 9px 14px;
  color: var(--sub); font-size: 13px; cursor: pointer; transition: border-color var(--t-fast); }
.search-pill:hover { border-color: var(--brand); }
.search-pill svg { width: 15px; height: 15px; flex-shrink: 0; }
.search-input { display: none; width: 100%; background: var(--card); border: 1.5px solid var(--brand);
  border-radius: 20px; padding: 9px 14px; font-size: 13px; color: var(--text); outline: none; }

/* ---- Hero ---- */
.hero { margin: 4px 14px 0; border-radius: 18px; padding: 22px 20px; display: flex;
  align-items: center; gap: 18px; overflow: hidden; position: relative;
  background: var(--card); border: 1px solid var(--line); }
.hero .h-label { display: block; font-size: 12px; letter-spacing: 2.5px; color: var(--brand);
  font-weight: 800; margin-bottom: 10px; }
.hero .h-title { font-family: var(--font-head); font-size: 24px; font-weight: 700; line-height: 1.25; }
.hero .h-sub { font-size: 12px; color: var(--sub); margin-top: 7px; }
.hero .h-cta { display: inline-block; margin-top: 14px; border: 1.5px solid var(--brand);
  color: var(--brand); font-size: 12px; font-weight: 700; border-radius: 20px; padding: 6px 16px; cursor: pointer; }
.hero .h-img { width: 128px; height: 128px; object-fit: cover; border-radius: 8px; border: 4px solid #fff;
  box-shadow: 0 10px 26px rgba(80, 60, 30, .3); transform: rotate(-2deg); flex-shrink: 0;
  cursor: pointer; background: var(--line); }

/* ---- 分类 ---- */
.chips { display: flex; gap: 7px; padding: 14px 14px 2px; flex-wrap: wrap; }
.pill { padding: 6px 15px; border-radius: 15px; background: var(--card); border: 1px solid var(--line);
  color: var(--sub); font-size: 12px; cursor: pointer; transition: all var(--t-fast);
  min-height: 30px; display: inline-flex; align-items: center; }
.pill.on { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); font-weight: 600; }

/* ---- 商品 ---- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px; }
.p { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform var(--t-med), box-shadow var(--t-med); }
.p:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(80,60,30,.12); }
.p img { width: 100%; height: 150px; object-fit: cover; background: var(--color-muted, #e6efe8); display: block; }
.p .info { padding: 8px 10px 11px; }
.p .n { font-size: 13px; line-height: 18px; height: 36px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.p .r { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.p .price { color: var(--price); font-weight: 800; font-size: 17px; }
.p .price em { font-style: normal; font-size: 11px; margin-right: 1px; }
.p .sold { font-size: 10px; color: var(--sub); }
.p .ct { display: inline-block; font-size: 10px; color: var(--brand); background: var(--brand-soft);
  border-radius: 4px; padding: 1px 6px; margin-top: 5px; font-weight: 600; }

/* ---- 线路 ---- */
.thead { background: var(--card); border-bottom: 1px solid var(--line); padding: 16px 16px 14px; }
.thead .t { font-family: var(--font-head); font-size: 22px; font-weight: 700; }
.thead .s { font-size: 11px; color: var(--sub); margin-top: 4px; }
.modes { display: inline-flex; background: var(--bg); border: 1px solid var(--line);
  border-radius: 14px; padding: 3px; margin-top: 10px; }
.modes div { font-size: 12px; padding: 5px 18px; border-radius: 11px; color: var(--sub); cursor: pointer; }
.modes div.on { background: var(--btn-bg); color: var(--btn-text); font-weight: 700; }
.route-tools { display:flex; gap:8px; padding:12px 14px 0; }
.route-search { flex:1; min-width:0; display:flex; align-items:center; gap:7px; background:var(--card);
  border:1px solid var(--line); border-radius:11px; padding:0 11px; }
.route-search input { width:100%; border:0; outline:0; background:transparent; color:var(--text); padding:10px 0; font:inherit; font-size:12px; }
#route-type { max-width:100px; border:1px solid var(--line); border-radius:11px; background:var(--card);
  color:var(--text); padding:0 9px; font-size:12px; }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; cursor: pointer; transition: transform var(--t-fast); }
.tcard:active { transform: scale(.98); }
.tcard .cimg { position: relative; }
.tcard .cimg img { width: 100%; height: 96px; object-fit: cover; display: block; background: var(--line); }
.tcard .lb { position: absolute; top: 6px; right: 7px; font-size: 9px; color: #fff;
  padding: 1px 7px; border-radius: 8px; }
.tcard .bd { padding: 7px 9px 9px; }
.tcard .nm { font-size: 12.5px; font-weight: 700; display: block; margin-bottom: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard .st { display: flex; gap: 8px; font-size: 10.5px; color: var(--sub); margin-top: 4px; }
.tcard .st b { font-size: 11px; }
.tcard .ar2 { font-size: 10px; color: var(--sub); margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 自研地图 ---- */
#mapbox { position: relative; }
#map { height: 400px; margin: 12px 14px 0; border-radius: var(--radius); z-index: 1;
  position: relative; overflow: hidden; background: #dfe6e2; touch-action: none; }
.tiles, .tiles2 { position: absolute; inset: 0; }
.tiles img, .tiles2 img { position: absolute; width: 256px; height: 256px; user-select: none;
  -webkit-user-drag: none; }
.track { position: absolute; inset: 0; width: 100%; height: 100%; }
.mzoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.mzoom button { width: 34px; height: 34px; border: none; border-radius: 10px;
  background: rgba(255,255,255,.95); font-size: 17px; font-weight: 700; color: #191d1f;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.mstyle { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; z-index: 5; }
.mstyle button { border: 1px solid var(--glass-border); border-radius: 9px;
  background: var(--glass-bg-strong); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 12px; font-weight: 600; color: var(--text); cursor: pointer; padding: 6px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.16); }
.mstyle button.on { background: var(--color-accent, #b45309); color: #fff; }
.mlabel { font-size: 11px; font-weight: 600; paint-order: stroke; stroke: #000;
  stroke-width: 3px; fill: #fff; cursor: pointer; }
.mattr { position: absolute; right: 6px; bottom: 4px; font-size: 9px; color: #5d6f6a; z-index: 5;
  background: rgba(255,255,255,.75); border-radius: 4px; padding: 1px 5px; }
.mlocate { position:absolute; right:10px; bottom:26px; z-index:6; width:38px; height:38px;
  border:0; border-radius:50%; background:rgba(255,255,255,.96); color:#17352c; font-size:22px;
  box-shadow:0 2px 9px rgba(0,0,0,.22); cursor:pointer; }
.mroute-marker { fill:#fff; stroke:#244d3e; stroke-width:3; cursor:pointer; }
.mroute-marker.on { fill:#f05a28; stroke:#fff; }
.mcluster { cursor:pointer; }
.mcluster circle { fill:#173f33; stroke:#fff; stroke-width:3; }
.mcluster text { fill:#fff; font-size:11px; font-weight:800; pointer-events:none; }
.muser-pulse { fill:rgba(40,121,255,.22); stroke:rgba(40,121,255,.22); stroke-width:8; }
.muser { fill:#2879ff; stroke:#fff; stroke-width:2; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px 0; }
.strip div { flex-shrink: 0; padding: 5px 13px; border-radius: 14px; background: var(--card);
  border: 1px solid var(--line); font-size: 12px; color: var(--sub); cursor: pointer; }
.strip div.on { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); font-weight: 600; }
.selinfo { margin: 10px 14px 0; background: var(--card); border: 1px solid var(--line);
  font-size: 12px; border-radius: 12px; padding: 12px; }
.trail-summary { display: grid; gap: 3px; }
.trail-summary b { color: var(--brand); font-size: 14px; line-height: 1.4; }
.trail-summary span, .nav-hint { color: var(--sub); line-height: 1.5; }
.track-alert { margin-top: 9px; padding: 8px 10px; border-left: 3px solid #d97706;
  background: #fff7ed; color: #9a3412; border-radius: 5px; line-height: 1.5; }
.trail-actions { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.trail-action { min-height: 38px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg);
  color: var(--text); font-size: 12px; font-weight: 700; text-decoration: none; }
.trail-action.primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.trail-action:focus-visible { outline: 3px solid rgba(234,88,12,.28); outline-offset: 2px; }
.nav-hint { margin-top: 8px; font-size: 10.5px; }

/* ---- 路线详情 ---- */
.route-detail { z-index:650; padding-bottom:84px; }
.page-back { min-height:38px; display:inline-flex; align-items:center; justify-content:center; gap:4px;
  padding:0 11px 0 9px; border:1px solid var(--line); border-radius:5px; background:var(--card);
  color:var(--brand); font-size:12px; line-height:1; font-weight:800; white-space:nowrap; cursor:pointer; }
.page-back > span:first-child { font-size:20px; line-height:1; transform:translateY(-1px); }
.page-back:active { transform:translateY(1px); }
.rd-head { position:sticky; top:0; z-index:8; display:flex; align-items:center; gap:12px;
  padding:calc(10px + env(safe-area-inset-top)) 14px 10px; background:rgba(249,246,238,.94);
  backdrop-filter:blur(14px); border-bottom:1px solid var(--line); }
.rd-head button { flex:none; }
.rd-head div { min-width:0; flex:1; }
.rd-head small { display:block; color:var(--sub); font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rd-head h1 { margin-top:2px; font-size:17px; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rd-map { height:310px; position:relative; overflow:hidden; background:#dfe6e2; touch-action:none; }
.rd-body { padding:14px 14px 30px; }
.rd-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; }
.rd-stat { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:10px 6px; text-align:center; }
.rd-stat b { display:block; font-size:15px; color:var(--brand); }
.rd-stat span { display:block; margin-top:2px; font-size:9px; color:var(--sub); }
.rd-section { margin-top:12px; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:13px 14px; }
.rd-section h2 { font-size:13px; margin-bottom:7px; }
.rd-section p { font-size:12px; line-height:1.7; color:var(--soft); white-space:pre-line; }
.rd-points { display:grid; gap:8px; font-size:11px; color:var(--soft); }
.rd-points b { color:var(--text); margin-right:7px; }
.rd-source { margin:12px 2px 0; color:var(--sub); font-size:10px; line-height:1.5; }
.rd-actions { position:fixed; z-index:670; bottom:0; left:50%; right:auto; width:100%; max-width:430px;
  transform:translateX(-50%); display:flex; gap:8px;
  padding:9px 12px calc(9px + var(--safe-b)); background:rgba(249,246,238,.96); backdrop-filter:blur(16px); border-top:1px solid var(--line); }
.rd-actions a,.rd-actions button { flex:1; min-height:42px; display:flex; align-items:center; justify-content:center;
  border:1px solid var(--line); border-radius:11px; background:var(--card); color:var(--text); font-size:12px; font-weight:700; text-decoration:none; }
.rd-actions .primary { flex:1.35; background:var(--btn-bg); border-color:var(--btn-bg); color:var(--btn-text); }

/* ---- 详情(全屏) ---- */
.detail-page { position: fixed; top:0; bottom:0; left:50%; right:auto; width:100%; max-width:430px;
  transform:translateX(-50%); z-index: 600; background: var(--bg);
  overflow-y: auto; display: none; -webkit-overflow-scrolling: touch; }
.detail-page.on { display: block; }
.d-gallery { position: relative; height: 56vh; background: var(--line); }
.d-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
#d-back { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 14px; z-index: 5;
  display: flex; align-items: center; gap: 3px; border-radius: 5px; padding: 9px 14px 9px 10px;
  background: rgba(255, 255, 255, .96); color: #111; font-size: 14px; font-weight: 800;
  box-shadow: 0 3px 10px rgba(0,0,0,.24); transition: transform var(--t-fast); }
#d-back:active { transform: scale(.95); }
#d-back .bk-arrow { font-size: 19px; line-height: 1; margin-top: -2px; }
.d-viewtag { position: absolute; bottom: 12px; right: 14px; font-size: 11px; color: #fff;
  background: rgba(0,0,0,.45); border-radius: 12px; padding: 3px 10px; }
.d-body { padding: 14px 16px 130px; }
.d-price-row { display: flex; align-items: baseline; justify-content: space-between; }
.d-price { color: var(--price); font-weight: 800; font-size: 30px; }
.d-price em { font-style: normal; font-size: 15px; }
.d-meta { font-size: 12px; color: var(--sub); }
.d-title { font-size: 18px; font-weight: 700; line-height: 1.45; margin-top: 8px; }
.d-tags { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.d-tags span { font-size: 11px; color: var(--brand); background: var(--brand-soft);
  border-radius: 5px; padding: 2px 8px; font-weight: 600; }
.d-desc-block { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; }
.d-desc-block h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--soft); }
.d-desc-block p { font-size: 13px; line-height: 1.7; color: var(--text); white-space: pre-line; }
.d-foot-space { height: 40px; }
.d-actions { position: fixed; left:50%; right:auto; bottom:0; width:100%; max-width:430px;
  transform:translateX(-50%); z-index:620; display:flex; gap:8px;
  padding: 10px 12px calc(10px + var(--safe-b));
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border-top: 1px solid var(--glass-border); }
.d-contact-btn { width: 92px; flex: none; display: flex; align-items: center; justify-content: center;
  gap: 5px; background: var(--card); border: 1px solid var(--line); color: var(--text);
  border-radius: 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.d-contact-btn svg { width: 16px; height: 16px; }
.d-cart-btn { flex: 1.2; background: var(--btn-bg); color: var(--btn-text); border: none;
  border-radius: 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.d-buy-btn { flex: 1.4; background: var(--accent); color: #fff; border: none;
  border-radius: 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.d-foot-space { height: 40px; }

/* ---- 论坛 ---- */
.fhead { background: var(--card); border-bottom: 1px solid var(--line);
  padding: calc(16px + env(safe-area-inset-top)) 16px 14px; }
.fhead .t { font-family: var(--font-head); font-size: 22px; font-weight: 700; }
.fhead .s { font-size: 11px; color: var(--sub); margin-top: 4px; }
.f-new-btn { margin-top: 12px; width: 100%; border: none; border-radius: 12px; padding: 11px 0;
  background: var(--btn-bg); color: var(--btn-text); font-size: 14px; font-weight: 700; cursor: pointer; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin: 10px 14px 0; cursor: pointer; transition: transform var(--t-fast); }
.pcard:active { transform: scale(.985); }
.pcard .p-head { display: flex; align-items: center; gap: 9px; }
.pcard .p-avatar { width: 38px; height: 38px; border-radius: 50%; color: #f6f1e7;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
  flex-shrink: 0; }
.pcard .p-author { font-size: 13px; font-weight: 700; }
.pcard .p-time { font-size: 10.5px; color: var(--sub); margin-left: auto; }
.pcard .p-title { font-size: 14.5px; font-weight: 700; margin-top: 9px; }
.pcard .p-content { font-size: 13px; color: var(--soft); line-height: 1.55; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .p-imgs { display: flex; gap: 5px; margin-top: 8px; }
.pcard .p-imgs img { width: 32%; height: 74px; object-fit: cover; border-radius: 8px;
  background: var(--line); }
.pcard .p-foot { display: flex; gap: 16px; margin-top: 9px; font-size: 11px; color: var(--sub); }

/* ---- 论坛:发帖 ---- */
.compose { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 12px 14px 0; padding: 12px; }
.compose-head { font-size: 14px; font-weight: 700; margin-bottom: 9px; }
.c-input, .c-area { width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; font-size: 13px; color: var(--text);
  outline: none; margin-bottom: 9px; font-family: inherit; resize: vertical; }
.c-input:focus, .c-area:focus { border-color: var(--brand); }
.c-imgs { display: flex; gap: 6px; flex-wrap: wrap; }
.c-imgs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.c-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 4px; }
.c-actions .ghost { background: none; border: 1px solid var(--line); color: var(--sub);
  border-radius: 9px; padding: 7px 14px; font-size: 12.5px; cursor: pointer; }
.c-actions .primary { background: var(--btn-bg); color: var(--btn-text); border: none;
  border-radius: 9px; padding: 7px 18px; font-size: 12.5px; font-weight: 700; cursor: pointer; }

/* ---- 帖子详情(全屏) ---- */
#v-post { position:fixed; top:0; bottom:0; left:50%; right:auto; width:100%; max-width:430px;
  transform:translateX(-50%); z-index:600; background:var(--bg);
  overflow-y: auto; display: none; -webkit-overflow-scrolling: touch; }
#v-post.on { display: block; }
.pv-head { display: flex; align-items: center; gap: 10px;
  padding: calc(16px + env(safe-area-inset-top)) 16px 12px;
  background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5; }
.pv-head .p-avatar { width:36px; height:36px; flex:none; }
.pv-head b { font-size: 14px; display: block; }
.pv-head i { font-style: normal; font-size: 11px; color: var(--sub); }
.pv-head .pv-author { flex:1; min-width:0; }
.like-pill { border: 1px solid var(--line); background: var(--card); color: var(--sub);
  border-radius: 16px; padding: 6px 14px; font-size: 12px; cursor: pointer; }
.like-pill.liked { color: var(--accent); border-color: var(--accent); }
.pv-body { padding: 14px 16px calc(90px + var(--safe-b)); }
.pv-body h1 { font-size: 19px; font-weight: 800; line-height: 1.4; }
.pv-content { font-size: 14px; line-height: 1.75; color: var(--soft); margin-top: 10px; white-space: pre-line; }
.pv-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.pv-imgs img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; background: var(--line); }
.pv-replies { margin-top: 18px; }
.pv-replies h3 { font-size: 13px; color: var(--sub); font-weight: 600; margin-bottom: 8px; }
.reply-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; margin-bottom: 7px; }
.reply-item b { font-size: 12px; }
.reply-item p { font-size: 13px; margin-top: 3px; color: var(--soft); }
.reply-row { display: flex; gap: 8px; margin-top: 10px; }
.reply-row input { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-size: 13px; color: var(--text); outline: none; }
.reply-row button { background: var(--btn-bg); color: var(--btn-text); border: none;
  border-radius: 10px; padding: 8px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pv-back { flex:none; }

.map-back { margin:12px 14px 10px; }

/* ---- 购物车(全屏覆盖) ---- */
#v-cart.overlay { position: fixed; inset: 0; z-index: 640; background: var(--bg);
  overflow-y: auto; display: block; }
.cart-head { position: sticky; top: 0; background: var(--card); border-bottom: 1px solid var(--line);
  padding: 14px 16px; font-size: 16px; font-weight: 800; font-family: var(--font-head);
  display: flex; align-items: center; justify-content: space-between; z-index: 5; }
.cart-close { font-size:12px; }
.cwrap { padding: 12px 14px; }
.citem { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.citem img { width: 62px; height: 62px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.citem .cn { font-size: 13px; flex: 1; }
.citem .cp { color: var(--price); font-weight: 800; font-size: 15px; margin-top: 4px; }
.citem .qty { display: flex; align-items: center; gap: 8px; }
.citem .qty b { width: 30px; height: 30px; border-radius: 8px; background: var(--bg);
  border: 1px solid var(--line); color: var(--text); display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-weight: 600; font-size: 14px; }
.citem .qty i { font-style: normal; min-width: 20px; text-align: center; font-weight: 600; }
.citem .del { color: var(--sub); font-size: 15px; cursor: pointer; }
.empty { text-align: center; color: var(--sub); padding: 60px 0; font-size: 13px; }

/* ---- 状态反馈 ---- */
.state-panel { grid-column:1 / -1; margin:14px; padding:34px 22px; border:1px solid var(--line);
  border-radius:5px; background:var(--card); text-align:center; color:var(--sub); }
.state-panel.compact { margin:10px 0; padding:24px 16px; }
.state-mark { width:38px; height:38px; margin:0 auto 12px; display:flex; align-items:center;
  justify-content:center; border:1px solid var(--line); border-radius:50%; color:var(--brand);
  font-family:var(--font-head); font-size:11px; font-weight:800; letter-spacing:.08em; }
.state-panel b { display:block; color:var(--text); font-family:var(--font-head); font-size:16px; }
.state-panel p { margin-top:6px; font-size:12px; line-height:1.65; }
.state-action { min-height:38px; margin-top:15px; padding:0 15px; border:1px solid var(--brand);
  border-radius:4px; background:transparent; color:var(--brand); font-size:12px; font-weight:800; }

/* ---- 店铺与规则说明 ---- */
.info-page { z-index:680; }
.info-head { position:sticky; top:0; z-index:4; display:flex; align-items:center; gap:12px;
  padding:calc(10px + env(safe-area-inset-top)) 14px 10px; border-bottom:1px solid var(--line);
  background:var(--bg); }
.info-head > div { flex:1; min-width:0; }
.info-head small { display:block; color:var(--sub); font-size:9px; letter-spacing:.16em; }
.info-head h1 { margin-top:2px; font-family:var(--font-head); font-size:18px; line-height:1.3; }
.info-body { padding:22px 18px calc(44px + var(--safe-b)); }
.info-lead { padding-bottom:20px; border-bottom:1px solid var(--line); color:var(--text);
  font-family:var(--font-head); font-size:18px; line-height:1.7; }
.info-body section { padding:19px 0; border-bottom:1px solid var(--line); }
.info-body section h2 { margin-bottom:7px; color:var(--brand); font-family:var(--font-head); font-size:15px; }
.info-body section p,.info-body section li { color:var(--soft); font-size:13px; line-height:1.85; }
.info-body section ul { padding-left:19px; }
.info-note { margin-top:18px; padding:13px 14px; border-left:3px solid var(--brand); background:var(--card); }
.info-note b,.info-note span { display:block; }
.info-note b { font-size:12px; color:var(--brand); }
.info-note span { margin-top:3px; color:var(--soft); font-size:12px; }
.info-date { margin-top:18px; color:var(--sub); font-size:10px; }

/* ---- 骑行账号 ---- */
.account-page { z-index:690; }
.account-body { padding:22px 18px calc(48px + var(--safe-b)); }
.account-intro { display:flex; align-items:center; gap:13px; padding-bottom:20px; border-bottom:1px solid var(--line); }
.account-intro > span,.account-avatar { width:52px; height:52px; flex:none; display:flex; align-items:center;
  justify-content:center; border-radius:50%; background:var(--brand-soft); color:var(--brand); font:800 20px var(--font-head); }
.account-intro h2,.account-card h2 { font:700 20px var(--font-head); }
.account-intro p,.account-card p,.account-card small { margin-top:3px; color:var(--sub); font-size:11px; line-height:1.55; }
.account-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin-top:20px; padding:3px;
  border:1px solid var(--line); border-radius:7px; background:var(--card); }
.account-tabs button { min-height:38px; border:0; border-radius:4px; background:transparent; color:var(--sub); font-weight:700; }
.account-tabs button.on { background:var(--btn-bg); color:var(--btn-text); }
.account-form { margin-top:18px; }
.account-form label,.account-delete-box label { display:block; margin:12px 0 5px; color:var(--soft); font-size:11px; font-weight:800; }
.account-form input,.account-delete-box input { width:100%; min-height:44px; border:1px solid var(--line); border-radius:5px;
  padding:9px 11px; background:var(--card); color:var(--text); font:inherit; font-size:13px; outline:none; }
.account-form input:focus,.account-delete-box input:focus { border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-soft); }
.email-code-row { display:flex; gap:8px; }
.email-code-row input { flex:1; min-width:0; }
.email-code-row button { flex:none; min-width:102px; border:1px solid var(--brand); border-radius:5px; background:transparent; color:var(--brand); font-size:11px; font-weight:800; }
.email-code-row button:disabled { opacity:.55; cursor:not-allowed; }
.account-captcha-wrap { margin-top:12px; }
.account-captcha-wrap altcha-widget { display:block; width:100%; max-width:100%; }
.form-error { min-height:18px; margin-top:7px; color:var(--danger); font-size:11px; }
.account-primary,.account-secondary { width:100%; min-height:44px; border:1px solid var(--btn-bg); border-radius:5px;
  background:var(--btn-bg); color:var(--btn-text); font-size:13px; font-weight:800; }
.account-secondary { margin-top:14px; background:transparent; color:var(--brand); }
.account-footnote { margin-top:14px; color:var(--sub); font-size:10px; line-height:1.65; }
.account-card { display:flex; align-items:center; gap:13px; padding:18px; border:1px solid var(--line); border-radius:8px; background:var(--card); }
.account-copy { margin-top:14px; padding:15px; border-left:3px solid var(--brand); background:var(--card); }
.account-copy h3,.account-danger h3 { color:var(--brand); font-size:13px; }
.account-copy p,.account-danger p { margin-top:6px; color:var(--soft); font-size:12px; line-height:1.7; }
.account-danger { margin-top:26px; padding-top:20px; border-top:1px solid var(--line); }
.account-danger > button { margin-top:12px; border:0; background:transparent; color:var(--danger); font-size:12px; font-weight:800; }
.account-delete-box { margin-top:12px; padding:14px; border:1px solid color-mix(in srgb,var(--danger) 40%,var(--line)); border-radius:6px; background:var(--card); }
.account-delete-box > div { display:flex; justify-content:flex-end; gap:8px; }
.account-delete-box button { min-height:36px; padding:0 13px; border:1px solid var(--line); border-radius:4px; background:var(--bg); color:var(--text); font-weight:700; }
#account-delete-confirm { border-color:var(--danger); background:var(--danger); color:#fff; }
.pub-identity { margin-bottom:10px; padding:9px 11px; border-left:3px solid var(--brand); background:var(--brand-soft); color:var(--soft); font-size:12px; }
.pub-identity b { color:var(--brand); }
.cbar { position: fixed; bottom: calc(14px + var(--safe-b)); left: 50%; transform: translateX(-50%);
  width: calc(100% - 28px); max-width: 402px; background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border); border-radius: 16px;
  box-shadow: 0 8px 24px rgba(20,26,28,.14);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; z-index: 90; }
.cbar .sum { font-size: 12px; color: var(--sub); }
.cbar .sum b { color: var(--price); font-size: 19px; font-weight: 800; }
.cbar button { background: var(--btn-bg); color: var(--btn-text); border: none;
  border-radius: 18px; padding: 9px 26px; font-size: 13px; font-weight: 700; cursor: pointer; }
.go-index { width: 200px; margin: 0 auto; text-align: center; background: var(--btn-bg);
  color: var(--btn-text); font-size: 13px; font-weight: 600; border-radius: 20px;
  padding: 10px 0; cursor: pointer; }

/* ---- 我的 ---- */
.me { background: var(--head-bg); color: var(--head-text);
  padding: calc(24px + env(safe-area-inset-top)) 20px 26px;
  display: flex; align-items: center; gap: 14px; }
.me .av { width: 54px; height: 54px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; }
.me .mn { font-size: 16px; font-weight: 700; }
.me .ms { font-size: 11px; opacity: .7; margin-top: 4px; }
.mcell { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 12px 14px 0; overflow: hidden; }
.mcell .row { display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.mcell .row:last-child { border-bottom: none; }
.mcell .arr { margin-left: auto; color: var(--sub); }
.mcell .sub { margin-left: auto; font-size: 12px; color: var(--sub); }
.oitem { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--soft); }
.oitem b { color: var(--price); }

/* ---- 支付 / 弹层 ---- */
#mask, #pay-mask { position: fixed; inset: 0; background: rgba(6,30,22,.45);
  display: none; z-index: 9; }
#pay-mask { z-index:700; }
#sheet, #paysheet { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 430px; background: var(--card);
  border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + var(--safe-b));
  max-height:calc(100vh - 20px); overflow-y:auto; z-index:710; display:none;
  box-shadow:0 -10px 40px rgba(6,40,28,.25); }
#sheet img.hero { width: 100%; height: 220px; object-fit: cover; border-radius: 12px; }
#sheet .price { font-size: 25px; font-weight: 800; color: var(--price); }
#sheet .price em { font-style: normal; font-size: 13px; }
#sheet .name { font-size: 16px; font-weight: 700; margin-top: 6px; }
#sheet .desc { font-size: 13px; color: var(--sub); line-height: 20px; margin-top: 8px; white-space: pre-line; }
#sheet .svs { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--sub); }
#sheet .svs span::before { content: '✓ '; color: var(--brand); font-weight: 700; }
#sheet .btns { display: flex; gap: 10px; margin-top: 14px; }
#sheet .btns button { flex: 1; border: none; border-radius: 12px; padding: 12px 0;
  font-size: 14px; font-weight: 700; cursor: pointer; }
#buy, #pay-confirm { background: var(--accent); color: #fff; }
#addc, #pay-done { background: var(--btn-bg); color: var(--btn-text); }
#close, #pay-close { position: absolute; right: 14px; top: 10px; font-size: 22px;
  color: var(--sub); cursor: pointer; background: none; border: none; }
.cform label { display:block; margin:9px 0 4px; color:var(--soft); font-size:11px; font-weight:700; }
.cform input { display:block; width:100%; min-height:38px; padding:8px 10px; border:1px solid var(--line);
  border-radius:5px; background:var(--bg); color:var(--text); font:inherit; font-size:13px; outline:none; }
.cform input:focus { border-color:var(--brand); }
.pay-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.pay-item img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.pay-item .pi-n { flex: 1; font-size: 13px; }
.pay-item .pi-p { font-weight: 700; color: var(--price); font-size: 14px; }
.pay-qty { display: flex; align-items: center; gap: 8px; }
.pay-qty b { width: 28px; height: 28px; border-radius: 8px; background: var(--bg);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-weight: 600; color: var(--text); }
.pay-qty span { min-width: 20px; text-align: center; font-weight: 600; }
.ferr { display: none; font-size: 11px; color: var(--danger); margin: -4px 0 8px 2px; }
.ferr.show { display: block; }
input[aria-invalid="true"] { border-color: var(--danger); }
.reservation-code { margin:10px auto; padding:10px 14px; width:max-content; max-width:100%; border:1px dashed var(--brand); border-radius:8px; color:var(--brand); font-size:15px; font-weight:800; letter-spacing:.04em; }
.reservation-code:empty { display:none; }
.pickup-card { margin:10px 0; padding:11px 13px; border-radius:8px; background:var(--bg); color:var(--soft); font-size:12px; line-height:1.7; text-align:left; white-space:pre-line; }
.pay-success-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:12px 0 16px; }
.pay-success-actions a { border:1px solid var(--brand); border-radius:20px; padding:9px 14px; color:var(--brand); font-size:13px; font-weight:700; }

/* ---- Toast / 离线 ---- */
.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: var(--ink, #241d12); color: var(--bg); font-size: 13px;
  padding: 9px 18px; border-radius: 8px; z-index: 999; }
.offline-bar { display: none; background: var(--danger); color: #fff; text-align: center;
  font-size: 12px; padding: 6px; }
.offline-bar.show { display: block; }
.update-bar { background:var(--brand); color:var(--btn-text); padding:9px 14px; font-size:12px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.update-bar a { flex:none; border-bottom:1px solid currentColor; font-weight:700; }
.sk { background: linear-gradient(90deg, var(--line) 25%, var(--card) 50%, var(--line) 75%);
  background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
.empty { text-align: center; color: var(--sub); padding: 60px 0; font-size: 13px; }

/* 与店员的会话：沿用暖纸色和深绿，不缓存私人消息。 */
.support-panel{position:fixed;inset:0;z-index:850;max-width:760px;margin:auto;background:var(--bg,#f5f2e9);display:flex;flex-direction:column;padding-top:var(--safe-t,0px)}
.support-panel[hidden]{display:none}.support-panel header{display:flex;gap:14px;align-items:center;padding:16px;border-bottom:1px solid var(--line)}
.support-panel button{min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:5px;background:var(--card);color:var(--ink);cursor:pointer}
.support-panel h2{font-size:18px;margin:0}.support-panel header p{margin:4px 0 0;color:var(--sub);font-size:12px}.support-status{padding:10px 16px;color:var(--sub);font-size:12px;border-bottom:1px solid var(--line)}
.support-messages{flex:1;min-height:0;overflow:auto;padding:18px;overscroll-behavior:contain}.support-message{max-width:85%;margin:0 auto 18px 0;white-space:pre-wrap;overflow-wrap:anywhere}.support-message.customer{margin-left:auto;margin-right:0}.support-message small{font-size:11px;color:var(--sub)}.support-message p{margin:5px 0 0;padding:12px 14px;background:var(--card);border:1px solid var(--line);border-radius:5px;font-size:14px}.support-message.customer p{background:var(--brand-soft)}
.support-empty{color:var(--sub);font-size:14px;line-height:1.8}.support-panel form{display:flex;gap:10px;padding:12px 16px calc(12px + var(--safe-b));border-top:1px solid var(--line)}.support-panel textarea{flex:1;min-width:0;resize:none;padding:10px;font:inherit;border:1px solid var(--line);background:var(--card);border-radius:5px;color:var(--ink)}.support-panel form button{background:var(--color-primary);color:#fff;padding:0 18px}.support-panel button:disabled{opacity:.5}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.feedback-dialog{border:1px solid var(--line);border-radius:6px;padding:24px;background:var(--card);color:var(--ink);width:calc(100% - 32px);max-width:440px}.feedback-dialog::backdrop{background:#06251cb0}.feedback-dialog h2{font-size:19px;margin:0 0 12px}.feedback-dialog p{font-size:13px;color:var(--sub);line-height:1.7}.feedback-dialog textarea{box-sizing:border-box;width:100%;margin-top:8px;border:1px solid var(--line);padding:12px;border-radius:4px;font:inherit;resize:vertical}.feedback-dialog form>div{display:flex;justify-content:flex-end;gap:8px}.feedback-dialog button,.community-actions button,.route-feedback{border:1px solid var(--line);background:var(--card);color:var(--color-primary);border-radius:4px;min-height:44px;padding:8px 14px;cursor:pointer}.community-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.route-operations{font-size:13px;padding:12px;background:var(--brand-soft);line-height:1.7;margin:12px 0}.route-operations[data-status="closed"],.route-operations[data-status="warning"]{background:#fff0d5;color:#753b18}
