/* 宠契 · 对齐芥子盐选气质：奶油底 · 森绿主色 · 金色价签 */
:root {
  --bg: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #FFFEFA;
  --text: #2C2C2C;
  --text-muted: #666666;
  --text-light: #999999;
  --primary: #3D6B4F;
  --primary-mid: #4E9478;
  --primary-light: #E8F2E5;
  --accent: #C4A962;
  --accent-dark: #B8995A;
  --accent-soft: #F5EFD9;
  --green: #3D6B4F;
  --green-soft: #E8F2E5;
  --blue: #4a7a8c;
  --blue-soft: #e8f1f4;
  --brown: #8b7355;
  --brown-soft: #f3efe9;
  --purple: #7a6b8a;
  --purple-soft: #f3eef5;
  --danger: #c0392b;
  --border: #EEEEEE;
  --shadow: 0 4px 18px rgba(45, 70, 55, 0.05);
  --shadow-lg: 0 10px 32px rgba(45, 70, 55, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --topbar-h: 52px;
  --tabbar-h: 58px;
  --font: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  /* 原生 App 经 MainActivity 注入 --native-safe-*；WebView 上 env() 常为 0 */
  --native-safe-top: 0px;
  --native-safe-bottom: 0px;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--native-safe-top));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--native-safe-bottom));
}

/* Capacitor 壳：在原生 inset 未到前先留底，避免 Tab 文字被切 */
html.is-native:not(.has-native-safe-area) {
  --native-safe-bottom: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overscroll-behavior: none;
}

.app {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Topbar — 固定在壳顶，不随内容滚动 */
.topbar {
  position: relative;
  flex-shrink: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar[hidden] { display: none !important; }

.topbar-inner {
  display: flex;
  align-items: center;
  height: var(--topbar-h);
  padding: 0 12px;
  gap: 8px;
}

.topbar-back,
.topbar-action {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.topbar-back svg,
.topbar-action svg { width: 22px; height: 22px; }

.topbar-back:active,
.topbar-action:active { background: var(--border); }

.topbar-brand {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar--channel .brand-icon { display: none; }
.topbar--channel .brand-name {
  font-size: 17px;
  font-weight: 700;
}
.topbar--shop-cs .topbar-inner {
  position: relative;
}
.topbar--shop-cs .topbar-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  justify-content: center;
  max-width: 60%;
  pointer-events: none;
}
.topbar--shop-cs .brand-icon,
.topbar--shop-cs .sync-dot {
  display: none !important;
}
.topbar--shop-cs .brand-name {
  text-align: center;
}
.topbar--track .topbar-inner {
  position: relative;
}
.topbar--track .topbar-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  justify-content: center;
  max-width: 60%;
  pointer-events: none;
}
.topbar--track .brand-icon,
.topbar--track .sync-dot {
  display: none !important;
}
.topbar--track .brand-name {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
}

.topbar-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.topbar-search-field[hidden] { display: none !important; }
.topbar-search-field svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.topbar-search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.topbar-search-field input::placeholder { color: var(--text-light); }
.topbar-stack-search {
  flex: 1;
  background: #f4f4f4;
  border: none;
}
.topbar-stack-search[hidden] { display: none !important; }
.topbar-manage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 40px;
  padding: 0 6px;
  border: none;
  background: transparent;
  color: #333;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
}
.topbar-manage[hidden] { display: none !important; }
.topbar-manage span {
  font-size: 15px;
  color: inherit;
}
.topbar-manage.is-done,
.topbar-manage.is-done span { color: var(--primary, #2f6b4f); font-weight: 600; }
.topbar-manage:active { opacity: 0.55; }
.topbar--orders .topbar-brand,
.topbar--cart .topbar-brand,
.topbar--stack-search .topbar-brand { display: none !important; }
.topbar--orders .sync-dot,
.topbar--cart .sync-dot,
.topbar--stack-search .sync-dot,
.topbar--detail .sync-dot { display: none !important; }

.order-mall-card.is-manage {
  position: relative;
  padding-left: 36px;
}
.order-mall-card .om-check {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.order-mall-card .om-check .coll-check { margin: 0; }
.order-mall-card.is-selected {
  outline: 1px solid rgba(255, 106, 42, 0.35);
}
html.is-order-manage .view-orders {
  padding-bottom: 88px;
}
.topbar--home-search .topbar-inner {
  gap: 0;
}
.topbar--home-search .topbar-search-field {
  flex: 1;
  width: 100%;
  max-width: none;
}

.topbar--home-immersive {
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar--home-immersive .topbar-inner {
  display: none;
  height: 0;
}

.topbar--profile .topbar-inner {
  gap: 2px;
}
.topbar--profile .topbar-brand {
  flex: 1;
}
.topbar--profile .topbar-action {
  width: 40px;
}

.brand-icon { font-size: 22px; }

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.topbar-back[hidden],
.topbar-action[hidden],
.topbar-brand[hidden] { display: none !important; }

/* Main — 唯一滚动区 */
.main {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.main::-webkit-scrollbar { display: none; }

/* 全屏搜索：盖住 main / tabbar，避免透出首页与商城 */
html.is-searching .main,
html.is-searching .tabbar,
html.is-searching .pdp-bar {
  visibility: hidden !important;
  pointer-events: none !important;
}
html.is-searching .topbar {
  visibility: hidden !important;
  pointer-events: none !important;
}

.search-overlay {
  position: absolute;
  inset: 0;
  z-index: 320;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  background: var(--bg);
  padding-top: var(--safe-top);
}
.search-overlay[hidden] { display: none !important; }

.search-overlay-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  height: var(--topbar-h);
  padding: 0 12px;
  border-bottom: none;
  background: var(--bg);
}

.search-overlay-back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.search-overlay-back svg { width: 22px; height: 22px; }
.search-overlay-back:active { background: var(--border); }

.search-overlay-field {
  flex: 1;
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--text-muted);
}
.search-overlay-field svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.search-overlay-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.search-overlay-field input::placeholder { color: var(--text-light); }

.search-clear {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 0;
}
.search-clear[hidden] { display: none !important; }

.search-submit {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 4px 8px 2px;
  cursor: pointer;
}

.search-overlay-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(12px + var(--safe-bottom));
}

.search-pane {
  padding: 16px;
}
.search-pane[hidden] { display: none !important; }
.search-pane--results {
  padding-top: 8px;
}

.search-section {
  margin-bottom: 22px;
}
.search-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.search-section-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.search-section-head h3 .muted-ico {
  opacity: 0.7;
  font-size: 13px;
}
.search-section-action {
  border: none;
  background: transparent;
  color: var(--text-light);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-tag {
  border: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.search-tag:active { background: var(--accent-soft); border-color: var(--accent); }
.search-tag--hot {
  position: relative;
}
.search-tag--hot::after {
  content: "热";
  margin-left: 4px;
  font-size: 10px;
  color: #e04b4b;
  font-weight: 700;
}

.search-discover-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.search-discover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 6px 0;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.search-discover-item .badge {
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 4px;
  flex-shrink: 0;
}

.search-hot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.search-hot-card {
  border: none;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
}
.search-hot-card .rank {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.search-hot-card .emoji { font-size: 22px; line-height: 1.2; }
.search-hot-card .title {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.3;
}

.search-suggest-query {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 4px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.search-suggest-query strong { color: var(--accent); font-weight: 600; }

.search-hit {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border: none;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: pointer;
  font: inherit;
  border: 1px solid transparent;
}
.search-hit:active { border-color: var(--border); }
.search-hit strong { display: block; font-size: 14px; color: var(--text); }
.search-hit span { font-size: 12px; color: var(--text-muted); }

.search-result-toolbar {
  margin-bottom: 8px;
}
.search-result-toolbar .filter-chips {
  margin-bottom: 4px;
  border-bottom: none;
  padding-bottom: 4px;
}
.search-result-toolbar .sort-row {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 6px;
}
.search-result-toolbar .catalog-count {
  border-top: none;
  border-bottom: none;
  margin-top: 2px;
}

html.is-pdp .main {
  padding-bottom: calc(76px + max(var(--safe-bottom), 28px) + 16px);
}

html.is-stack:not(.is-pdp) .main {
  padding-bottom: calc(20px + max(var(--safe-bottom), 16px));
}

html.is-stack .cart-footer,
html.is-stack .checkout-footer {
  bottom: calc(8px + max(var(--safe-bottom), 12px));
}

html.is-stack .toast {
  bottom: calc(24px + max(var(--safe-bottom), 16px));
}

.view {
  padding: 16px;
  animation: fadeIn 0.25s ease;
}

.view[hidden] { display: none !important; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ?? Hero ?? */
.hero {
  padding: 8px 4px 20px;
}

.hero-eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-title {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.hero-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ?? Quick grid ?? */
.home-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.home-mode {
  border: none;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.home-mode.is-active {
  background: var(--accent);
  color: #fff;
}
.pet-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.form-card .is-invalid,
.form-card input.is-invalid,
.form-card select.is-invalid,
.form-card textarea.is-invalid {
  border-color: #c44 !important;
  box-shadow: 0 0 0 2px rgba(204, 68, 68, 0.15);
}
#btnExpandCats {
  margin: -8px 0 18px;
}
.pin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.pin-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
}
.pin-item:active { transform: scale(0.97); }
.pin-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.pin-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
}

.home-shortcut-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 0 22px;
}
.home-shortcut {
  border: none;
  border-radius: 999px;
  padding: 10px 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  color: var(--text);
  cursor: pointer;
}
.home-shortcut:active { transform: scale(0.97); }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.quick-grid--compact {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.quick-item--compact {
  padding: 12px 4px;
}
.quick-item--compact .quick-icon {
  width: 40px;
  height: 40px;
  font-size: 18px;
}
.quick-item--compact .quick-label {
  font-size: 11px;
  text-align: center;
  line-height: 1.25;
}
.quick-item--compact .quick-desc { display: none; }

.service-cat-hub {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.service-hub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.menu-group-title {
  padding: 14px 4px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.menu-group-title--clickable {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu-group-title--clickable::-webkit-details-marker,
.menu-group-title--clickable::marker { display: none; }
.menu-group-title--clickable::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--text-light);
  border-bottom: 1.6px solid var(--text-light);
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.2s ease;
}
.menu-section[open] > .menu-group-title--clickable::after,
.menu-admin[open] > .menu-group-title--clickable::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}
.menu-admin {
  border-top: 1px solid var(--border, #ebe4dc);
  border-bottom: 1px solid var(--border, #ebe4dc);
  margin: 4px 0;
}

.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s;
}

.quick-item:active { transform: scale(0.97); }

.quick-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.quick-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.quick-desc {
  font-size: 11px;
  color: var(--text-light);
}

@media (min-width: 420px) {
  .quick-grid:not(.quick-grid--compact) { grid-template-columns: repeat(4, 1fr); }
}

/* ?? Section head ?? */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.link-btn {
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

/* ?? Cards scroll ?? */
.card-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.card-scroll::-webkit-scrollbar { display: none; }

.service-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: none;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform 0.15s;
}

.service-card:active { transform: scale(0.98); }

.service-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 8px;
}

.service-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.service-card p {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.service-card-meta .price {
  font-weight: 700;
  color: var(--accent);
}

.service-card-meta .rating {
  color: var(--text-muted);
  font-size: 12px;
}

/* ?? Trust bar ?? */
.trust-bar {
  display: flex;
  justify-content: space-around;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-top: 8px;
}

.trust-item {
  text-align: center;
}

.trust-item strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.trust-item span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ?? Filter chips — 芥子式：主类下划线 + 子类圆角胶囊 ?? */
.filter-chips {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 2px 10px;
  scrollbar-width: none;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
}

.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  position: relative;
  padding: 10px 14px;
  border: none;
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
}

.chip.is-active {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 700;
}

.chip.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}

/* 子筛选：胶囊 */
.sort-chips,
#shopKindFilters {
  border-bottom: none;
  gap: 8px;
  padding-bottom: 8px;
}
.sort-chips .chip,
#shopKindFilters .chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}
.sort-chips .chip.is-active,
#shopKindFilters .chip.is-active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: rgba(61, 107, 79, 0.35);
  font-weight: 600;
}
.sort-chips .chip.is-active::after,
#shopKindFilters .chip.is-active::after { display: none; }

.sort-row .chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 12px;
}
.sort-row .chip.is-active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: rgba(61, 107, 79, 0.35);
}
.sort-row .chip.is-active::after { display: none; }

/* ?? Service list ?? */
.service-list { display: flex; flex-direction: column; gap: 10px; }

.list-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  width: 100%;
  transition: transform 0.15s;
}

.list-item:active { transform: scale(0.99); }

.list-item-body { flex: 1; min-width: 0; }

.list-item-body h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.list-item-body p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.list-item-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-light);
}

.list-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
}

.list-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.list-item-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

/* ?? Module banners ?? */
.module-banner {
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 20px;
  color: #fff;
}

.module-banner h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}

.module-banner p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

.module-banner--funeral { background: linear-gradient(135deg, #8b7355, #6b5344); }
.module-banner--transport { background: linear-gradient(135deg, #4a90a4, #3a7080); }
.module-banner--pharmacy { background: linear-gradient(135deg, #5b8c5a, #4a7049); }
.module-banner--shop { background: linear-gradient(135deg, #e8724a, #d05a32); }

/* ?? Info cards ?? */
.info-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.info-card-icon { font-size: 24px; margin-bottom: 6px; }
.info-card h4 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.info-card p { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ?? Packages ?? */
.package-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

.package-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  position: relative;
}

.package-card.is-hot {
  border-color: var(--accent);
}

.package-badge {
  position: absolute;
  top: -1px;
  right: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0 0 8px 8px;
}

.package-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.package-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.package-price small { font-size: 13px; font-weight: 500; }

.package-items {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.package-items li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 3px 0;
  padding-left: 16px;
  position: relative;
}

.package-items li::before {
  content: "?";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 12px;
}

/* ?? Product grid — 芥子式软白卡片 ?? */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  border: none;
  background: var(--bg-card);
  border-radius: 14px;
  padding: 0 0 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.product-card-media {
  position: relative;
  margin: 0 0 8px;
  border-radius: 0;
  overflow: hidden;
  background: var(--primary-light);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.product-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
}
.product-card-badge.hot { background: var(--accent-dark); }

.topbar--stack .brand-icon { display: none; }
.topbar--cat-panel .brand-name,
.topbar--cat-panel .brand-icon,
.topbar--cat-panel .sync-dot { display: none !important; }
.topbar--cat-panel .topbar-brand {
  flex: 1;
  min-width: 0;
  pointer-events: none;
}

.product-card:active { transform: scale(0.98); }

.product-emoji {
  width: 100%;
  height: 100%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  margin: 0;
}

.product-card h4 {
  margin: 0 10px 2px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin: auto 10px 0;
  min-width: 0;
}
.product-card .price {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-dark);
  flex-shrink: 0;
}
.product-card .sales {
  margin: 0;
  font-size: 11px;
  color: var(--text-light);
  white-space: nowrap;
  text-align: right;
}

.product-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ?? Quote form ?? */
.quote-form {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quote-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.quote-form input,
.quote-form select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--bg);
  outline: none;
}

.quote-form input:focus,
.quote-form select:focus { border-color: var(--accent); }

.quote-result {
  background: var(--green-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
}

.quote-result strong { color: var(--green); font-size: 20px; }

/* ?? Alert ?? */
.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.alert-info {
  background: var(--blue-soft);
  color: #3a6070;
}

.alert strong { display: block; margin-bottom: 2px; }

/* ?? Vet list ?? */
.vet-list { display: flex; flex-direction: column; gap: 10px; }

.vet-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  width: 100%;
}

.vet-avatar { font-size: 36px; }

.vet-info { flex: 1; }
.vet-info h4 { margin: 0; font-size: 15px; font-weight: 700; }
.vet-info p { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); }

.vet-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.vet-status.online { background: var(--green-soft); color: var(--green); }
.vet-status.offline { background: #f0eeec; color: var(--text-light); }

.vet-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

/* ?? Posts ?? */
.post-list { display: flex; flex-direction: column; gap: 10px; }

.post-list.compact .post-card { padding: 12px 14px; }

.post-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}

.post-card:active { transform: none; background: rgba(45, 70, 55, 0.04); }

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.post-body {
  min-width: 0;
}

.post-header {
  display: block;
  margin: 0 0 6px;
}

.post-author {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.post-time {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-light);
}

.post-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.post-card p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  margin-top: 4px;
}
.post-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #9aa3ad;
  line-height: 1;
}
.post-meta-ico {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

/* 论坛：无卡片、无分割线，仅留白；左头像右内容 */
#viewCommunity {
  padding: 0 0 24px;
  background: var(--bg-card);
  min-height: calc(100dvh - var(--tabbar-h) - var(--safe-bottom));
}
#viewCommunity .browse-head {
  margin: 0;
  padding: calc(var(--safe-top) + 6px) 8px 0 4px;
}
.community-feed-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 4px 6px 8px;
}
.community-feed-tabs {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  min-width: 0;
}
.community-feed-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 2px 10px;
  margin: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
  line-height: 1.2;
}
.community-feed-tab.is-active {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.community-feed-tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}
.community-feed-search {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.community-feed-search svg {
  width: 22px;
  height: 22px;
}
.community-feed-search:active {
  background: rgba(45, 70, 55, 0.06);
}
.post-list--feed {
  gap: 0;
}
.post-list--feed .post-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 16px 16px 20px;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
}
.post-list--feed .post-card:active {
  background: rgba(45, 70, 55, 0.035);
}
.post-list--feed .post-avatar {
  width: 42px;
  height: 42px;
  font-size: 23px;
}
.post-list--feed .post-card-img {
  border-radius: 8px;
  margin: 8px 0 10px;
}
.post-list--feed .post-card p {
  -webkit-line-clamp: 4;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

/* ?? FAB ?? */
.fab {
  position: fixed;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  right: max(16px, calc(50% - 240px + 16px));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 50;
  transition: transform 0.15s;
}

.fab:active { transform: scale(0.95); }

/* ?? Profile ?? */
#viewProfile.view {
  padding-top: 0;
  padding-left: 12px;
  padding-right: 12px;
}
.profile-hero {
  margin: 0 -12px 8px;
  padding: max(2px, var(--safe-top)) 12px 10px;
  background:
    radial-gradient(ellipse 90% 80% at 100% 0%, rgba(196, 169, 98, 0.16), transparent 55%),
    linear-gradient(165deg, var(--primary-light) 0%, #F3F7F0 42%, var(--accent-soft) 100%);
  border-radius: 0 0 16px 16px;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 2px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
}
.profile-header.is-guest { cursor: pointer; }
.profile-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding-top: 0;
}
.profile-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  align-self: stretch;
  padding: 2px 0;
}
.profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 0;
  margin: 0;
}
.profile-actions .topbar-action {
  width: 34px;
  height: 34px;
}
.profile-edit-btn {
  flex-shrink: 0;
  border: none;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  white-space: nowrap;
}
.profile-edit-btn:active {
  background: #f5f5f5;
}
.profile-id-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.profile-hi {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}
.profile-info {
  min-width: 0;
  flex: 1;
}
.profile-info h2 {
  font-size: 15px;
}
.profile-info p {
  font-size: 11px;
  margin-top: 1px;
}
.profile-social {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 0;
}
.profile-social-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-width: 2em;
}
.profile-social-item strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}
.profile-social-item span {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.2;
}
.profile-social-item:active strong {
  color: var(--primary);
}

.avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
  overflow: hidden;
  align-self: center;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.avatar.has-img {
  background: #fff6e8;
  font-size: 0;
}
.avatar.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.35);
  display: none;
}
.avatar-sheet-mask.is-open {
  display: block;
}
.avatar-sheet {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 121;
  width: min(100% - 24px, 480px);
  display: none;
  flex-direction: column;
  gap: 8px;
}
.avatar-sheet.is-open {
  display: flex;
}
.avatar-sheet[hidden],
.avatar-sheet-mask[hidden] {
  display: none !important;
}
.avatar-sheet-group {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}
.avatar-sheet-group > button {
  width: 100%;
  border: none;
  background: #fff;
  color: #1a1a18;
  font: inherit;
  font-size: 16px;
  padding: 15px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  display: block;
}
.avatar-sheet-group > button:last-child {
  border-bottom: none;
}
.avatar-sheet-group > button:active {
  background: #f3f3f3;
}
.avatar-sheet-presets {
  padding: 14px 16px 16px;
}
.avatar-sheet-presets[hidden] {
  display: none !important;
}
.avatar-sheet-presets-title {
  margin: 0 0 12px;
  text-align: center;
  font-size: 13px;
  color: #8a8a86;
}
.avatar-sheet-presets .avatar-picker {
  justify-content: center;
}
.avatar-sheet .avatar-sheet-cancel {
  width: 100%;
  border: none;
  background: #fff;
  color: #1a1a18;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 16px;
  cursor: pointer;
  border-radius: 14px;
  margin-top: 0;
}
.avatar-sheet .avatar-sheet-cancel:active {
  background: #f3f3f3;
}
html.cw-native-app .avatar-sheet-mask,
html.cw-native-app .avatar-sheet {
  max-width: 480px;
}
html.cw-native-app .avatar-sheet-mask {
  left: 50%;
  right: auto;
  width: min(100%, 480px);
  transform: translateX(-50%);
}
.profile-edit-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 0 8px;
}
.profile-edit-avatar {
  width: 88px;
  height: 88px;
  font-size: 40px;
}
.profile-edit-change {
  border: none;
  background: transparent;
  color: #e89a3c;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.profile-edit-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.profile-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  box-sizing: border-box;
}
.profile-edit-row:last-child {
  border-bottom: none;
}
.profile-edit-row > span:first-child {
  flex-shrink: 0;
  width: 5.5em;
  color: #1a1a18;
  font-size: 15px;
}
.profile-edit-row input,
.profile-edit-row select,
.profile-edit-row em {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: #333;
  text-align: right;
  outline: none;
}
.profile-edit-row em {
  font-style: normal;
  color: #666;
}
.profile-edit-row input::placeholder {
  color: #b0b0b0;
}
.profile-edit-row--hint em {
  color: #999;
}
.profile-edit-row--link {
  cursor: pointer;
  justify-content: space-between;
}
.profile-edit-row--link i {
  color: #bbb;
  font-style: normal;
  font-size: 18px;
}
.profile-edit-copy {
  flex-shrink: 0;
  border: 1px solid #e5e5e5;
  background: #fafafa;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
  color: #666;
}
.avatar-picker {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.avatar-pick {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--accent-soft, #fff3e0);
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.avatar-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-pick.is-on {
  border-color: var(--accent, #f0a050);
  box-shadow: 0 0 0 2px rgba(240, 160, 80, 0.25);
}
.avatar-pick:active {
  transform: scale(0.96);
}

.profile-info h2 { margin: 0; font-size: 15px; font-weight: 700; }
.profile-info p { margin: 1px 0 0; font-size: 11px; color: var(--text-muted); }

.pet-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.pet-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pet-card-emoji { font-size: 32px; }
.pet-card-info h4 { margin: 0; font-size: 15px; font-weight: 700; }
.pet-card-info p { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); }

.menu-list {
  margin-top: 20px;
  /* 外层不再铺白底，避免快捷入口与下方分组粘连、底部多出一截白边 */
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg); }

.menu-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(61, 107, 79, 0.1);
  color: var(--primary);
  font-size: 0;
}
.menu-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}
.menu-item[data-menu="orders"] .menu-icon { background: rgba(139, 105, 70, 0.14); color: #7a5a38; }
.menu-item[data-menu="cart"] .menu-icon { background: rgba(61, 107, 79, 0.12); color: var(--primary); }
.menu-item[data-menu="favorites"] .menu-icon { background: rgba(196, 90, 90, 0.12); color: #b04a4a; }
.menu-item[data-menu="help"] .menu-icon { background: rgba(196, 90, 90, 0.12); color: #b04a4a; }
.menu-label { flex: 1; font-size: 15px; font-weight: 500; }

.menu-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.menu-arrow { width: 18px; height: 18px; color: var(--text-light); }

/* ?? Detail ?? */
.detail-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}

.detail-content:has(.post-detail) {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 8px 4px 20px;
}

.post-detail {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  margin-bottom: 8px;
}
.post-detail > .post-avatar {
  width: 42px;
  height: 42px;
  font-size: 23px;
}
.post-detail .post-body {
  min-width: 0;
}
.post-detail .post-header {
  margin-bottom: 8px;
}
.detail-content .post-detail-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.post-detail-text {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.65;
}
.post-detail .post-card-img {
  margin: 8px 0 12px;
  border-radius: 8px;
}
.post-detail .post-footer {
  margin-top: 2px;
}
.post-meta.is-action {
  cursor: pointer;
}
.post-meta.is-action:active {
  color: var(--accent-dark);
}
.post-meta.is-liked {
  color: #e85d4c;
}
.post-meta.is-liked .post-meta-ico path {
  fill: currentColor;
}

.detail-content h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.detail-content .detail-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

.detail-content .detail-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.detail-actions {
  display: flex;
  gap: 10px;
}
.detail-actions--svc {
  display: block;
}
.detail-actions--svc .btn-block {
  width: 100%;
}
.vet-price small {
  font-size: 0.7em;
  font-weight: 600;
  margin-left: 1px;
  opacity: 0.85;
}

/* 服务详情（顶图布局对齐商品 PDP） */
.svc-detail-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.svc-detail-cat,
.svc-detail-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.svc-detail-cat {
  background: rgba(61, 107, 79, 0.12);
  color: var(--primary);
}
.svc-detail-tag {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.svc-detail-rating {
  margin: -4px 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.svc-detail-body {
  margin-top: -4px;
}
html.is-pdp.is-svc-bar .main {
  padding-bottom: calc(76px + max(var(--safe-bottom), 28px) + 16px);
}

/* 宠物身份证 · 仿居民身份证正反面 */
.petid-preview-block {
  margin: 0 0 16px;
}
.petid-preview-block > h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}
.petid-stage {
  perspective: 1200px;
  max-width: 360px;
  margin: 0 auto;
}
.petid-stage--img {
  max-width: 100%;
}
.petid-flip {
  position: relative;
  width: 100%;
  aspect-ratio: 85.6 / 54;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
}
.petid-stage--img .petid-flip {
  aspect-ratio: 946 / 528;
}
.petid-stage.is-back .petid-flip {
  transform: rotateY(180deg);
}
.petid-face {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(30, 40, 50, 0.14);
  box-sizing: border-box;
}
.petid-stage--img .petid-face {
  border: 0 !important;
  box-shadow: 0 6px 18px rgba(30, 40, 50, 0.12);
  border-radius: 4.2% / 7.5%;
  background: transparent !important;
}
/* 正面：浅底 + 淡红波纹；头像偏上略小；号码横贯信息与照片下方 */
.petid-face--front {
  padding: 12px 14px 10px 16px;
  color: #222;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 90% 70% at 55% 45%, rgba(232, 120, 140, 0.18), transparent 62%),
    repeating-radial-gradient(circle at 50% 48%, transparent 0 6px, rgba(180, 200, 220, 0.07) 6px 7px),
    linear-gradient(118deg, #f7f9fc 0%, #eef3f8 38%, #f6eef2 72%, #e8f0f6 100%);
  border: 1px solid rgba(120, 140, 160, 0.28);
}
.petid-face--back {
  transform: rotateY(180deg);
  padding: 12px 14px 14px;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 60% at 40% 50%, rgba(160, 190, 210, 0.22), transparent 65%),
    repeating-radial-gradient(circle at 42% 52%, transparent 0 7px, rgba(120, 160, 190, 0.08) 7px 8px),
    linear-gradient(125deg, #eef6f8 0%, #e4eef4 45%, #f2eef2 100%);
  border: 1px solid rgba(120, 140, 160, 0.28);
}
.petid-front-main {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 12px;
  align-items: start;
  flex: 1;
  min-height: 0;
}
.petid-face--img {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
.petid-face-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 0;
  margin: 0;
  padding: 0;
  vertical-align: top;
}
.petid-fields {
  min-width: 0;
  display: block !important;
  padding-top: 10px;
}
.petid-line {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box;
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 8px;
  border: 0;
}
.petid-line:last-child { margin-bottom: 0; }
.petid-line i {
  display: inline-block;
  font-style: normal;
  font-size: 11px;
  color: #5b7ea0;
  min-width: 2em;
  font-weight: 500;
  margin-right: 8px;
}
.petid-line b {
  font-weight: 600;
  color: #1c1c1c;
  word-break: break-all;
}
.petid-line--name {
  display: block !important;
}
.petid-line--sex {
  display: block !important;
}
.petid-line--sex > span {
  display: inline-flex;
  align-items: center;
  margin-right: 18px;
}
.petid-line--addr b {
  font-size: 11.5px;
  line-height: 1.45;
  font-weight: 600;
}
/* 兼容旧 class */
.petid-row {
  display: block !important;
  width: 100%;
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 8px;
}
.petid-row i {
  display: inline-block;
  font-style: normal;
  font-size: 11px;
  color: #5b7ea0;
  min-width: 2em;
  margin-right: 8px;
}
.petid-row b { font-weight: 600; color: #1c1c1c; }
.petid-row--2,
.petid-row--sexbreed {
  display: block !important;
}
.petid-row--2 span,
.petid-row--sexbreed span {
  display: inline-flex;
  align-items: center;
  margin-right: 18px;
  gap: 8px;
}
.petid-photo {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: 2px;
  background: #f3f5f7;
  margin-top: 0;
  justify-self: end;
}
.petid-photo--empty {
  display: grid;
  place-items: center;
  font-size: 26px;
  color: #9aa8b5;
  border: 0;
}
.petid-no-block {
  margin-top: auto;
  padding-top: 8px;
  border: 0;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 12px;
  width: 100%;
}
.petid-no-block i {
  font-style: normal;
  font-size: 11px;
  color: #5b7ea0;
  font-weight: 500;
  flex: 0 0 auto;
  white-space: nowrap;
}
.petid-no-block strong {
  flex: 1;
  font-size: 13px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #111;
  min-width: 0;
}
/* 背面：徽章在左，标题在上方（对齐居民证国名/证名位置），签发信息居中 */
.petid-back-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 2px 4px 0;
}
.petid-back-emblem {
  position: static;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 2px 6px rgba(140, 30, 30, 0.2);
  background: #fff;
}
.petid-back-head {
  position: static;
  flex: 1;
  text-align: center;
  padding-top: 2px;
  padding-right: 48px; /* 视觉上把标题推向卡片上方中部 */
}
.petid-back-cn {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #111;
  margin-bottom: 4px;
}
.petid-back-id {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #111;
}
.petid-back-fields {
  position: static;
  margin-top: auto;
  margin-bottom: 6px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.petid-face--back .petid-line,
.petid-face--back .petid-row {
  display: flex !important;
  gap: 8px;
  font-size: 12px;
  justify-content: center;
  width: auto;
  margin-bottom: 8px;
}
.petid-face--back .petid-line i,
.petid-face--back .petid-row i {
  color: #333;
  min-width: 4.2em;
  text-align: right;
}
.petid-face--back .petid-line b,
.petid-face--back .petid-row b {
  color: #111;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}
.petid-stage.is-flipable {
  cursor: pointer;
}
.petid-rule {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted, #7a8580);
}
.svc-detail-block {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(61, 107, 79, 0.05);
}
.svc-detail-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.svc-detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}
.svc-detail-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.svc-detail-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}
.svc-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.svc-detail-packages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.svc-detail-packages li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.svc-detail-packages strong {
  color: var(--text);
  font-weight: 600;
}
.svc-detail-packages span {
  color: var(--accent-dark);
  font-weight: 700;
}
.svc-detail-packages em {
  grid-column: 1 / -1;
  font-style: normal;
  color: var(--text-muted);
  font-size: 12px;
}
.svc-detail-notice {
  margin-bottom: 14px;
}
.svc-detail-hub-hint {
  margin: 10px 0 0;
  text-align: center;
}

/* ?? Buttons ?? */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-mid); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }

/* ?? Tabbar ?? */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  min-height: calc(var(--tabbar-h) + var(--safe-bottom));
  height: auto;
  padding-top: 8px;
  padding-bottom: max(var(--safe-bottom), 16px);
  display: flex;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--primary-light);
  z-index: 100;
  box-sizing: border-box;
  box-shadow: none;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  border: none;
  background: none;
  color: var(--text-light);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 0 2px;
  transition: color 0.2s ease;
  overflow: visible;
  line-height: 1.2;
  position: relative;
}

.tab svg,
.tab-ico {
  width: 24px;
  height: 24px;
  overflow: visible;
  flex-shrink: 0;
  transition: transform 0.22s ease;
  transform-origin: center bottom;
}

/* 「我的」猫头：与其它 tab 一样，选中放大；浅绿铺在脸形上 */
.tab-ico-face {
  fill: none;
}
.tab.is-active .tab-ico-face {
  fill: rgba(61, 107, 79, 0.16) !important;
}
.tab-ico-ink {
  fill: currentColor;
}

.tab span {
  display: block;
  line-height: 1.15;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, font-weight 0.2s ease;
}

.tab.is-active {
  color: var(--primary);
  font-weight: 700;
}

/* 选中：略放大 + 轮廓微填，不叠背景块 */
.tab.is-active .tab-ico {
  transform: scale(1.1);
}

.tab.is-active .tab-ico path[stroke]:not([fill="none"]),
.tab.is-active .tab-ico rect[stroke],
.tab.is-active .tab-ico ellipse[stroke],
.tab.is-active .tab-ico circle[stroke]:not([fill]) {
  fill: rgba(61, 107, 79, 0.16);
  stroke-width: 1.9;
}

.tab.is-active .tab-ico circle[fill="currentColor"],
.tab.is-active .tab-ico ellipse[fill="currentColor"],
.tab.is-active .tab-ico path[fill="currentColor"] {
  fill: currentColor;
}

.tabbar[hidden] { display: none !important; }

.tab-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e85d4c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  font-style: normal;
  pointer-events: none;
}
.tab-badge[hidden] { display: none !important; }

.view-messages {
  position: relative;
  padding-top: calc(var(--safe-top) + 6px);
  padding-bottom: 8px;
  background: #fff;
}
.messages-head {
  margin-bottom: 12px;
}

/* 消息页 · 顶栏 / 会话列表 / 搜索 / 更多菜单 */
.msg-page-head {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 4px;
  padding: 4px 2px 10px;
}
.msg-page-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  pointer-events: none;
}
.msg-page-title-row .msg-clear-unread {
  pointer-events: auto;
}
.msg-page-title-row h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.msg-clear-unread {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: none;
  border-radius: 999px;
  background: #f3f3f3;
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}
.msg-clear-unread svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.msg-clear-unread:active { background: #e8e8e8; }
.msg-page-actions {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  pointer-events: auto !important;
}
.msg-ico-btn {
  position: relative;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #222;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
  pointer-events: auto !important;
  touch-action: manipulation;
}
.msg-ico-btn svg,
.msg-ico-btn img {
  width: 24px;
  height: 24px;
  display: block;
  pointer-events: none;
  object-fit: contain;
}
.msg-ico-btn:active { opacity: 0.55; }
.msg-channel-ico {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  background: #f5f5f5;
}

.msg-more-mask {
  position: absolute;
  inset: 0;
  z-index: 350;
  display: none;
  background: transparent;
  pointer-events: none;
}
.msg-more-menu {
  position: absolute;
  top: calc(var(--safe-top) + 48px);
  right: 10px;
  z-index: 360;
  display: none;
  min-width: 168px;
  padding: 6px 0;
  border-radius: 12px;
  background: #2a3140;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  pointer-events: auto;
}
.msg-more-mask.is-open {
  display: block !important;
  pointer-events: auto !important;
}
.msg-more-menu.is-open {
  display: block !important;
}
.msg-more-menu[hidden],
.msg-more-mask[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.msg-more-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.msg-more-menu button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.msg-more-menu button:active { background: rgba(255, 255, 255, 0.08); }

.msg-sub-row--btn {
  width: 100%;
  border: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.msg-sub-row--btn:active { background: #fafafa; }

.msg-channel-list,
.msg-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.msg-list-divider {
  height: 8px;
  margin: 0 -16px;
  background: #f5f5f5;
  border: none;
}
.msg-list-divider[hidden] { display: none !important; }

.msg-row,
.msg-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 2px;
  border: none;
  border-bottom: 1px solid #f2f2f2;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.msg-row:last-child,
.msg-contact-item:last-child { border-bottom: none; }
.msg-row:active,
.msg-contact-item:active { background: #fafafa; }
.msg-row.is-unread .msg-row-main strong::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: #ff5a3a;
  vertical-align: middle;
}
.msg-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #eef1f4;
  overflow: hidden;
}
.msg-avatar svg {
  width: 28px;
  height: 28px;
  display: block;
}
.msg-avatar.is-logistics { background: #ffe4cc; }
.msg-avatar.is-aftersale { background: #dcecff; }
.msg-avatar.is-promo { background: #ffe0e0; color: #e24b4b; }
.msg-avatar.is-support { background: #d9f3ea; color: #2f9d82; }
.msg-avatar.is-order {
  background: linear-gradient(145deg, #f0e2b8, #e4c98a);
  color: #8a6a28;
}
.msg-avatar.is-order svg {
  width: 24px;
  height: 24px;
  color: #8a6a28;
}
.msg-avatar.is-official {
  border-radius: 50%;
  background: #1c1c1c;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.msg-avatar.is-remind { background: #fff1cc; color: #d4a017; }
.msg-avatar.is-sys { background: #e8ebf0; color: #6f7888; }
.msg-avatar.is-consult { background: #dceee5; color: #1f3d34; }
.msg-title-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
.msg-official-badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: #2ec4b6;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
}
.msg-row--order .msg-row-main em {
  color: #9aa0a6;
}
.msg-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.msg-row-main strong,
.msg-contact-item strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-row-main em,
.msg-contact-item em {
  font-style: normal;
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-row-meta {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-light);
}

.msg-search-sheet {
  position: absolute;
  inset: 0;
  z-index: 380;
  display: none;
  flex-direction: column;
  background: #fff;
  padding: calc(var(--safe-top) + 8px) 12px 12px;
  box-sizing: border-box;
  pointer-events: auto;
}
.msg-search-sheet.is-open,
.msg-search-sheet:not([hidden]) {
  display: flex !important;
}
.msg-search-sheet[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.msg-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 12px;
}
.msg-search-back {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.msg-search-back svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.msg-search-back:active { opacity: 0.55; }
.msg-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f3f3f3;
}
.msg-search-field svg {
  width: 18px;
  height: 18px;
  color: var(--text-light);
  flex-shrink: 0;
}
.msg-search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--text);
}
.msg-search-go {
  flex-shrink: 0;
  padding: 0 14px;
  min-height: 38px;
  border: none;
  border-radius: 10px;
  background: #ff6a2b;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.msg-search-go:active { filter: brightness(0.95); }
.msg-search-body {
  flex: 1;
  overflow: auto;
  padding: 8px 4px 24px;
}
.msg-search-body h3 {
  margin: 8px 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}
.msg-search-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 8px;
  margin-bottom: 16px;
}
.msg-search-grid button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 8px;
  border: none;
  border-radius: 10px;
  background: #f5f5f5;
  color: #333;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.msg-search-grid button svg {
  width: 18px;
  height: 18px;
  color: #555;
  flex-shrink: 0;
}
.msg-search-grid button:active { background: #ebebeb; }
.msg-search-results {
  display: flex;
  flex-direction: column;
}

.msg-sub-block { margin: 0 0 10px; }
.msg-sub-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: #f2f3f5;
  color: #333;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.msg-sub-chip svg {
  width: 20px;
  height: 20px;
  color: #555;
}
.msg-sub-chip:active { filter: brightness(0.98); }
.msg-contacts-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}
.msg-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
  color: var(--text);
  background: #fff;
}
.msg-contacts-card .msg-sub-row:last-child { border-bottom: none; }
.msg-sub-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--text-light);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.msg-sub-link i { font-style: normal; }
.msg-contact-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.msg-contact-letter {
  padding: 8px 12px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  background: #f7f7f7;
}
.msg-contact-item {
  cursor: pointer;
  padding-left: 12px;
  padding-right: 12px;
  background: #fff;
}
.msg-poke-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: #f3f3f3;
  color: #555;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.msg-poke-btn:active { background: #e8e8e8; }

.view-msg-friends {
  background: #fff;
}
.view-msg-contacts {
  background: #f5f5f5;
  min-height: 100%;
}
.msg-friend-search {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  margin: 4px 0 16px;
  padding: 0 14px;
  border-radius: 10px;
  background: #f3f3f3;
}
.msg-friend-search svg {
  width: 18px;
  height: 18px;
  color: var(--text-light);
  flex-shrink: 0;
}
.msg-friend-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  text-align: left;
}
.msg-friend-account {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-muted);
}
.msg-friend-qr {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #ff6a2b;
  cursor: pointer;
}
.msg-friend-qr svg { width: 18px; height: 18px; }
.msg-friend-actions {
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}
.msg-friend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 2px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.msg-friend-item:last-child { border-bottom: none; }
.msg-friend-item:active { background: #fafafa; }
.msg-friend-item span:nth-child(2) {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.msg-friend-item strong { font-size: 15px; font-weight: 600; }
.msg-friend-item em {
  font-style: normal;
  font-size: 12px;
  color: var(--text-light);
}
.msg-friend-item > svg {
  width: 18px;
  height: 18px;
  color: #c8c8c8;
  flex-shrink: 0;
}
.msg-friend-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: #fff;
}
.msg-friend-ico svg {
  width: 24px;
  height: 24px;
}
.msg-friend-ico--orange { background: linear-gradient(145deg, #ff9a4a, #ff6a2b); }
.msg-friend-ico--gold { background: linear-gradient(145deg, #f0cf6a, #e0b23a); }

.view-msg-groups {
  background: #fff;
  min-height: 100%;
}
.msg-group-empty {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 72px 24px 40px;
  text-align: center;
}
.msg-group-empty-art {
  width: 120px;
  height: 110px;
}
.msg-group-empty-art svg { width: 100%; height: 100%; }
.msg-group-empty p {
  margin: 0;
  font-size: 15px;
  color: #999;
}
.view-msg-group-create {
  position: relative;
  background: #fff;
  min-height: 100%;
  padding-bottom: 72px;
}
.msg-pick-group-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin: 0 0 8px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #fff4e8;
  color: #ff7a2d;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.msg-pick-group-banner i { font-style: normal; }
.msg-pick-list {
  display: flex;
  flex-direction: column;
}
.msg-pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  border: none;
  border-bottom: 1px solid #f2f2f2;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.msg-pick-item strong { font-size: 15px; font-weight: 500; }
.msg-pick-check {
  width: 22px;
  height: 22px;
  border: 1.6px solid #c8c8c8;
  border-radius: 50%;
  flex-shrink: 0;
}
.msg-pick-item.is-selected .msg-pick-check {
  border-color: #ff8a3d;
  background: radial-gradient(circle at center, #ff8a3d 0 45%, transparent 48%);
}
.msg-pick-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: #fff;
  border-top: 1px solid #f0f0f0;
}
.msg-pick-bar .btn {
  min-width: 120px;
  border-radius: 999px;
  background: #ffc8a0;
  border-color: #ffc8a0;
  color: #fff;
}
.msg-pick-bar .btn.is-ready {
  background: #ff8a3d;
  border-color: #ff8a3d;
}

html.is-pet-arch .main {
  padding: 0;
  overflow: hidden;
  position: relative;
}

.view-pet-archive {
  display: flex;
  flex-direction: column;
  position: absolute;
  inset: 0;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: #f3f4f6;
  animation: none;
}
.pet-arch-hero {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding: 0;
  background: #ffe566;
  overflow: hidden;
}
.pet-arch-hero-img {
  display: block;
  width: 100%;
  height: 176px;
  object-fit: cover;
  object-position: center 32%;
  pointer-events: none;
}
.pet-arch-back {
  position: absolute;
  top: calc(var(--safe-top) + 8px);
  left: 8px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #222;
  cursor: pointer;
}
.pet-arch-back svg { width: 22px; height: 22px; }
.pet-arch-hero-title { display: none; }
.pet-arch-hero-title em { display: none; }
.pet-arch-panel {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: -20px 0 8px;
  padding: 0;
  border-radius: 18px;
  background: #fff;
  min-height: 0;
  overflow: hidden;
}
.view-pet-archive.is-editing .pet-arch-panel {
  margin: -20px 0 0;
  border-radius: 18px 18px 0 0;
  padding: 20px 22px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.view-pet-archive.is-editing .pet-arch-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.pet-arch-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 24px 24px 32px;
  background: transparent;
  text-align: center;
  color: #b0b4bb;
}
.pet-arch-empty-art {
  width: 132px;
  height: 132px;
  object-fit: contain;
  display: block;
}
.pet-arch-empty p {
  margin: 0;
  font-size: 13px;
  color: #b0b4bb;
}
.view-pet-archive:not(.is-editing) #petArchList {
  flex: 1;
  margin: 0;
  padding: 12px 16px;
  background: transparent;
}
.pet-arch-empty[hidden],
.pet-arch-form[hidden],
#petArchList[hidden],
.pet-arch-foot[hidden] {
  display: none !important;
}
.pet-arch-foot {
  position: relative;
  z-index: 5;
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
  padding: 10px 22px calc(12px + var(--safe-bottom));
  background: #f3f4f6;
  box-sizing: border-box;
}
.view-pet-archive.is-editing .pet-arch-foot {
  background: #fff;
}
.pet-arch-foot--form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 22px calc(14px + var(--safe-bottom));
  background: #fff;
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.04);
}
.pet-arch-foot-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pet-arch-btn-del,
.pet-arch-btn-save {
  min-height: 48px;
  border: none;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.pet-arch-btn-del {
  background: #f3f5f8;
  color: #222;
}
.pet-arch-btn-save {
  background: #f5c518;
  color: #222;
}
.pet-arch-add-btn {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 999px;
  background: #ffe566;
  color: #222;
  font-weight: 700;
  font-size: 16px;
}
.pet-arch-form { display: flex; flex-direction: column; gap: 18px; padding: 8px 0 12px; }
.pet-arch-kinds {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.pet-arch-kind {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.pet-arch-kind-ico {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  flex: none;
  border-radius: 16px;
  background: #eceff3;
  overflow: hidden;
}
.pet-arch-kind-ico img,
.pet-arch-kind-ico svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  height: 72%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  filter: grayscale(1) brightness(1.05);
}
.pet-arch-kind.is-active .pet-arch-kind-ico { background: #ffe45a; }
.pet-arch-kind.is-active .pet-arch-kind-ico img,
.pet-arch-kind.is-active .pet-arch-kind-ico svg {
  filter: none;
}
.pet-arch-kind em {
  font-style: normal;
  font-size: 13px;
  font-weight: 650;
  color: #1d1d1d;
}
.pet-arch-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pet-arch-row {
  display: grid;
  grid-template-columns: 5.4em minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  min-height: 0;
  padding: 0;
  border: none;
}
.pet-arch-row--avatar { align-items: start; }
.pet-arch-label {
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 650;
  line-height: 44px;
  white-space: nowrap;
}
.pet-arch-row--avatar .pet-arch-label { line-height: 72px; }
.pet-arch-label i {
  margin-left: 2px;
  color: #ff8a3d;
  font-style: normal;
  font-weight: 700;
}
.pet-arch-box,
.pet-arch-row input.pet-arch-box,
.pet-arch-row select.pet-arch-box {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: #f3f5f8;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: #333;
  appearance: none;
  box-sizing: border-box;
}
.pet-arch-row input.pet-arch-box::placeholder { color: #b4bac4; }
.pet-arch-row select.pet-arch-box {
  color: #b4bac4;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'><path d='M6 9l6 6 6-6' stroke='%23b4bac4' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.pet-arch-row select.pet-arch-box:valid { color: #333; }
.pet-arch-date {
  display: flex;
  align-items: center;
  position: relative;
  padding: 0;
  height: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'><path d='M6 9l6 6 6-6' stroke='%23b4bac4' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
/* 日期控件需可点；透明文字 + 全宽 calendar indicator，兼容手机 WebView */
.pet-arch-date input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 14px;
  border: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px; /* 避免 iOS 聚焦放大 */
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.pet-arch-date input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0.01; /* 勿用 0：部分 WebView 会禁用点击 */
  cursor: pointer;
}
.pet-arch-date em {
  position: relative;
  z-index: 1;
  padding: 0 14px;
  font-style: normal;
  font-size: 14px;
  color: #b4bac4;
  pointer-events: none;
}
.pet-arch-date.is-filled em { color: #333; }
.pet-arch-avatar {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border: none;
  border-radius: 14px;
  background: #f3f5f8;
  color: #9aa3af;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.pet-arch-chips {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.pet-arch-chips--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pet-arch-chips--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pet-arch-chips--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pet-arch-chips button {
  min-height: 40px;
  width: 100%;
  padding: 0 2px;
  border: none;
  border-radius: 12px;
  background: #f3f5f8;
  font: inherit;
  font-size: 13px;
  color: #8b93a0;
  cursor: pointer;
}
.pet-arch-chips button.is-active {
  background: #fff4cc;
  color: #222;
  font-weight: 650;
}
.pet-arch-agree {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: #5b6573;
  cursor: pointer;
  user-select: none;
}
.pet-arch-agree input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.pet-arch-check {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 1.5px solid #cfd5de;
  border-radius: 50%;
  background: #fff;
  box-sizing: border-box;
  position: relative;
}
.pet-arch-agree input:checked + .pet-arch-check {
  border-color: #f5c518;
  background: #f5c518;
}
.pet-arch-agree input:checked + .pet-arch-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.pet-arch-agree a {
  color: #3b4450;
  font-weight: 600;
  text-decoration: none;
}

.modal-pet-auth {
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.modal-pet-auth[open] {
  display: flex;
}
.modal-pet-auth::backdrop { background: rgba(0, 0, 0, 0.45); }
html:has(.modal-pet-auth[open]) .app,
html:has(.modal-pet-auth[open]) .main {
  overflow: hidden !important;
}
.pet-auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 12px 18px 24px;
  box-sizing: border-box;
}
.pet-auth-card {
  display: flex;
  flex-direction: column;
  width: min(86vw, 340px);
  max-height: min(62vh, 480px);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.pet-auth-card h3 {
  flex-shrink: 0;
  margin: 0;
  padding: 18px 16px 10px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  background: #fff;
}
.pet-auth-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px 8px;
  font-size: 13px;
  line-height: 1.7;
  color: #444;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pet-auth-body::-webkit-scrollbar { width: 0; height: 0; display: none; }
.pet-auth-body h4 { margin: 12px 0 6px; font-size: 14px; color: #222; }
.pet-auth-body p { margin: 0 0 8px; }
.pet-auth-foot {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 16px 16px;
  background: #fff;
}
.pet-auth-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #333;
}
.pet-auth-foot .btn-primary {
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb070, #ff8a3d);
  border: none;
  min-height: 42px;
}
.pet-auth-close {
  flex-shrink: 0;
  margin-top: 18px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #666;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

/* 逛逛头：搜索 + 单排横滑分类 */
.browse-head {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 8px;
  padding: calc(var(--safe-top) + 10px) 0 0;
  background: #fff;
}
.browse-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.browse-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--text-light);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.browse-search svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.browse-cart {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--primary);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.browse-cart svg { width: 20px; height: 20px; }
.browse-cart .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.browse-cats-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  margin: 0 -2px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  overflow: hidden;
}
/* 覆盖 .filter-chips 默认底边距，避免和入口高低不一 */
.browse-cats.filter-chips,
.filter-chips.browse-cats {
  flex: 1;
  min-width: 0;
  border-bottom: none !important;
  margin: 0 !important;
  padding: 0 6px 0 2px !important;
}
.browse-cats .chip {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
}
/* 与左侧 .chip 同一套字号/字重/色/内边距，水平基线对齐 */
.browse-cat-entry {
  position: relative;
  flex-shrink: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: -18px 0 14px 2px #fff;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  text-align: left;
  transform: none;
  -webkit-tap-highlight-color: transparent;
}
.browse-cat-entry .browse-cat-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
  overflow: visible;
}
.browse-cat-entry .browse-cat-label {
  display: block;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: inherit;
}
.browse-cat-entry::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 70%, #fff);
}

/* 分类全屏页：左右独立滚动，互不带动 */
html.is-cat-panel .main {
  overflow: hidden !important;
  overscroll-behavior: none;
}
.view-cat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  padding: 0 !important;
  background: #fff;
  overflow: hidden;
  overscroll-behavior: none;
}
.cat-panel-search-row {
  display: none !important;
}
.cat-panel-body {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-y;
}
.cat-panel-nav {
  flex: 0 0 88px;
  width: 88px;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  background: #f3f4f6;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 28px), transparent);
}
.cat-panel-nav::-webkit-scrollbar { display: none; }
.cat-nav-item {
  display: block;
  width: 100%;
  padding: 16px 8px;
  border: none;
  background: transparent;
  color: var(--text-light, #666);
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  word-break: break-all;
}
.cat-nav-item.is-active {
  background: #fff;
  color: var(--text);
  font-weight: 700;
  position: relative;
}
.cat-nav-item.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary, #2a9d8f);
  transform: translateX(-50%);
}
.cat-panel-main {
  flex: 1;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 14px 12px 28px;
  background: #fff;
  scrollbar-width: none;
}
.cat-panel-main::-webkit-scrollbar { display: none; }
.cat-panel-sec + .cat-panel-sec { margin-top: 22px; }
.cat-panel-sec-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.cat-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 8px;
}
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}
.cat-tile-ico {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f6f7f9;
  font-size: 28px;
  line-height: 1;
  overflow: hidden;
}
.cat-tile-ico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat-tile-name {
  max-width: 100%;
  padding: 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cat-panel-action {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.view-shop {
  padding-top: 0;
}
.view-book {
  padding-top: 0;
}
.service-shelf {
  padding: 0 4px 12px;
}
.view-shop.browse-is-services .browse-cart {
  display: none;
}

/* 旧 channel-hero 不再用于主 Tab */
.channel-hero { display: none; }


/* 商品详情成交条：替换五个 Tab */
.pdp-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 0;
  padding-bottom: max(28px, calc(var(--safe-bottom) + 14px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-sizing: border-box;
}
.pdp-bar[hidden] { display: none !important; }
.pdp-bar-icon {
  flex: 0 0 auto;
  width: 44px;
  border: none;
  background: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 2px 0 4px;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.pdp-bar-icon svg { width: 22px; height: 22px; }
.pdp-bar-icon.is-active {
  color: #c45a5a;
}
/* 收藏成功：心形与描边同色实心填充 */
.pdp-bar-icon.is-active svg path[stroke] {
  fill: currentColor;
  stroke: currentColor;
}
.pdp-bar-cart,
.pdp-bar-buy {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: none;
  border-radius: 20px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  margin-bottom: 2px;
}
.pdp-bar-cart {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.pdp-bar-buy {
  background: var(--accent);
  color: #fff;
}
.pdp-bar-cart:disabled,
.pdp-bar-buy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

html.is-native .pdp-bar {
  max-width: none;
  left: 0;
  transform: none;
  /* Android WebView 常拿不到 inset，保底抬高避免手势条压住按钮 */
  padding-bottom: max(36px, calc(var(--safe-bottom) + 20px));
}

/* ?? Toast ?? */
.toast {
  position: fixed;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(44, 36, 32, 0.88);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 200;
  max-width: 80%;
  text-align: center;
}

.toast.is-shown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ?? Modal ?? */
.modal {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 400px;
  width: calc(100% - 32px);
  box-shadow: var(--shadow-lg);
}

.modal::backdrop {
  background: rgba(44, 36, 32, 0.4);
}

.modal-inner {
  padding: 24px 20px;
}

.modal-inner h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
}

.modal-inner label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.modal-inner input,
.modal-inner select,
.modal-inner textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--bg);
  outline: none;
  resize: vertical;
}

.modal-inner input:focus,
.modal-inner select:focus,
.modal-inner textarea:focus { border-color: var(--accent); }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ?? Desktop ?? */
@media (min-width: 481px) {
  .app {
    box-shadow: 0 0 0 1px var(--border), var(--shadow-lg);
    min-height: 100vh;
  }
}

/* ?? Mobile native / PWA ?? */
html.is-native {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html.is-native input,
html.is-native textarea,
html.is-native select {
  user-select: text;
}

html.is-native .app,
html.is-native .tabbar {
  max-width: none;
}

html.is-native .tabbar {
  left: 0;
  transform: none;
  /* 灰条靠系统导航栏颜色解决，这里不额外垫高 */
  padding-bottom: max(var(--safe-bottom), 10px);
  min-height: calc(var(--tabbar-h) + max(var(--safe-bottom), 10px));
}

html.is-native .pdp-bar {
  padding-bottom: max(36px, calc(var(--safe-bottom) + 20px));
}

html.is-native .fab {
  right: 16px;
}

html.splash-active .app {
  visibility: hidden;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18vh 24px calc(10vh + var(--safe-bottom));
  box-sizing: border-box;
  gap: 0;
  background: #F7F5F0;
  transition: opacity 0.28s ease, visibility 0.28s;
}

.splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  justify-content: center;
}

/* 圆角放在包裹层：部分 Android WebView 对 img 自身 border-radius 裁剪失效 */
.splash-logo-wrap {
  width: 72px;
  height: 72px;
  margin: 0 0 16px;
  border-radius: 18px; /* 18/72 ≈ 25%，与 H5 启动比例一致 */
  overflow: hidden;
  background: transparent;
  animation: splash-rise 0.55s ease both;
}
.splash-logo {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  background: transparent;
  display: block;
}

.splash-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent);
  animation: splash-rise 0.55s ease 0.06s both;
}

.splash-tagline {
  margin: 12px 0 0;
  font-size: 14px;
  color: #666;
  letter-spacing: 0.14em;
  animation: splash-rise 0.55s ease 0.12s both;
}

.splash-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0;
  animation: splash-rise 0.55s ease 0.18s both;
}

.splash-foot-term {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.splash-foot-tip {
  margin: 8px 0 0;
  font-size: 12px;
  color: #888;
  letter-spacing: 0.1em;
}

@keyframes splash-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.offline-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  padding: calc(var(--safe-top) + 8px) 16px 8px;
  font-size: 13px;
  text-align: center;
}
.offline-bar[hidden] { display: none !important; }

.modal-onboard { max-width: 360px; }
.onboard-inner { text-align: center; }
.onboard-slide { display: none; padding: 8px 0 16px; }
.onboard-slide.is-active { display: block; animation: fadeIn 0.3s ease; }
.onboard-icon { font-size: 56px; margin-bottom: 16px; }
.onboard-slide h3 { margin: 0 0 10px; font-size: 20px; font-weight: 700; }
.onboard-slide p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.65; }
.onboard-dots { display: flex; justify-content: center; gap: 8px; margin: 16px 0; }
.onboard-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background 0.2s, transform 0.2s; }
.onboard-dot.is-active { background: var(--accent); transform: scale(1.2); }
.detail-actions { flex-wrap: wrap; }
.detail-actions .btn { flex: 1; min-width: 90px; }

@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
}

/* ?? v1.1: orders / cart / chat / profile ?? */
.module-banner--emergency {
  background: linear-gradient(135deg, #c44, #a33);
}
.module-banner--market { background: linear-gradient(135deg, #c47a3a, #a05e28); }
.module-banner--vaccine { background: linear-gradient(135deg, #3d8b7a, #2d6b5c); }
.module-banner--boarding { background: linear-gradient(135deg, #6b8e4e, #557240); }
.module-banner--training { background: linear-gradient(135deg, #5a6fa8, #455888); }
.module-banner--breeding { background: linear-gradient(135deg, #b85c7a, #944860); }
.module-banner--insurance { background: linear-gradient(135deg, #4a7c9b, #386278); }
.module-banner--hotel { background: linear-gradient(135deg, #7a6b9e, #5e5280); }
.module-banner--grooming { background: linear-gradient(135deg, #d47a8a, #b85c6c); }
.module-banner--homewash { background: linear-gradient(135deg, #5a9ea8, #457e88); }
.module-banner--neuter { background: linear-gradient(135deg, #6a8f6b, #547454); }
.module-banner--lost { background: linear-gradient(135deg, #c45c3a, #a0482c); }
.module-banner--chip { background: linear-gradient(135deg, #5c6b7a, #45525e); }
.module-banner--claims { background: linear-gradient(135deg, #4a7c9b, #2f5a72); }
.module-banner--merchant { background: linear-gradient(135deg, #8b6b4a, #6e5438); }
.module-banner--photo { background: linear-gradient(135deg, #6b7a9e, #535f7c); }
.module-banner--member { background: linear-gradient(135deg, #c9a227, #a8841c); }
.module-banner--support { background: linear-gradient(135deg, #4a8a7a, #38685c); }
.module-banner--reviews { background: linear-gradient(135deg, #e08a4a, #c06e35); }
.module-banner--clinic { background: linear-gradient(135deg, #4d8b6e, #3a6e56); }
.module-banner--license { background: linear-gradient(135deg, #6d7a8b, #556070); }
.module-banner--quarantine { background: linear-gradient(135deg, #5a7a9e, #446080); }
.module-banner--walk { background: linear-gradient(135deg, #7a9e5a, #5e7c44); }
.module-banner--events { background: linear-gradient(135deg, #c47a6b, #a05e52); }
.module-banner--iot { background: linear-gradient(135deg, #5a8aa8, #446c88); }
.module-banner--adopt { background: linear-gradient(135deg, #d4895a, #b36e42); }
.module-banner--friendly { background: linear-gradient(135deg, #5a9e8a, #447a6a); }
.module-banner--health { background: linear-gradient(135deg, #6b8f9e, #527280); }
.module-banner--dna { background: linear-gradient(135deg, #7a6b9e, #5e5280); }
.module-banner--rehab { background: linear-gradient(135deg, #4a8a9e, #386e80); }
.module-banner--nutrition { background: linear-gradient(135deg, #6b9e5a, #527c44); }
.module-banner--ambulance { background: linear-gradient(135deg, #c45a5a, #a04444); }
.module-banner--memorial { background: linear-gradient(135deg, #8b7a6b, #6e6156); }
.module-banner--exotic { background: linear-gradient(135deg, #5a8b6b, #446e54); }
.module-banner--policy { background: linear-gradient(135deg, #6b6b7a, #545460); }
.module-banner--finder { background: linear-gradient(135deg, #9e6b4a, #805436); }

.memorial-words {
  font-style: italic;
  line-height: 1.6;
  color: var(--text-muted);
}

.member-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.member-label { margin: 0; font-size: 13px; color: var(--text-muted); }
.member-hero strong { font-size: 32px; color: var(--accent); }

.chat-bubble small {
  display: block;
  margin-top: 4px;
  opacity: 0.65;
  font-size: 11px;
}

.form-card textarea {
  padding: 12px 14px;
  border: 1px solid var(--border, #e8e2da);
  border-radius: 10px;
  font: inherit;
  background: var(--bg, #faf8f5);
  color: var(--text);
  resize: vertical;
  min-height: 72px;
}

.form-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-card h3 { margin: 0 0 4px; font-size: 16px; }
.form-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.form-card input,
.form-card select {
  padding: 12px 14px;
  border: 1px solid var(--border, #e8e2da);
  border-radius: 10px;
  font: inherit;
  background: var(--bg, #faf8f5);
  color: var(--text);
}
.form-card input:focus,
.form-card select:focus { outline: none; border-color: var(--accent); }

.package-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.package-top strong { color: var(--accent); white-space: nowrap; }
.pkg-items {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 13px;
}
.product-emoji { font-size: 36px; }
.product-meta { font-size: 12px; color: var(--text-muted); margin: 4px 0 8px; }
.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.product-card h3 { margin: 0; font-size: 15px; }
.cert-card .cert-qr {
  margin-top: 12px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eee;
  color: #111;
  font-weight: 700;
  letter-spacing: 0.12em;
  border: 1px dashed #bbb;
}

@media (min-width: 420px) {
  .quick-grid:not(.quick-grid--compact) { grid-template-columns: repeat(4, 1fr); }
}

.btn-lg {
  padding: 16px 20px;
  font-size: 16px;
}

.empty-hint {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 16px;
  font-size: 14px;
}

.profile-stats {
  margin-bottom: 16px;
}
.profile-mall-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  overflow: visible;
}
.member-strip {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 58px;
  background: #fff;
  border-radius: 12px 12px 0 0;
  overflow: visible;
}
/* 左侧底板：整条白底，文案只占左段 */
.member-strip-base {
  flex: 1 1 auto;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 16px 12px;
  min-width: 0;
  color: #1f1f1f;
  display: flex;
  align-items: center;
  z-index: 0;
}
/* 右侧整块：叠在底板上，会员中心+88VIP 一体 */
.member-strip-panel {
  position: relative;
  flex: 0 0 62%;
  max-width: 250px;
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.06);
  margin-top: -2px;
  z-index: 1;
  overflow: hidden;
}
.member-strip-cell {
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 10px 8px;
  min-width: 0;
  color: #222;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  position: relative;
}
.member-strip-cell--main {
  flex: 1 1 46%;
  background: #fff1e8;
  gap: 0;
  padding: 10px 6px 10px 12px;
  justify-content: center;
}
.member-strip-cell--vip {
  flex: 1 1 54%;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 8px 8px 8px 8px;
  background: #fff;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}
.member-strip-ear {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 9px 0 0;
  border-color: #ff6a2b transparent transparent transparent;
  z-index: 2;
  pointer-events: none;
}
.member-strip-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: #1f1f1f;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.member-strip-title em {
  font-style: normal;
  font-size: 15px;
  font-weight: 800;
  margin: 0 1px;
}
.member-strip-chev {
  width: 12px;
  height: 12px;
  color: #bbb;
  flex-shrink: 0;
  margin-left: 1px;
  vertical-align: -1px;
}
.member-strip-kicker {
  font-size: 15px;
  font-weight: 800;
  color: #ff5000;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
}
.member-strip-kicker .member-strip-chev {
  color: #ff5000;
}
.member-strip-vip-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.member-strip-vip-text strong {
  font-size: 14px;
  font-weight: 800;
  color: #ff5000;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
}
.member-strip-vip-text .member-strip-chev {
  color: #ff5000;
}
.member-strip-tag { display: none; }
.member-strip-coupon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.member-strip-ticket {
  position: relative;
  width: 30px;
  height: 30px;
}
.member-strip-ticket svg {
  width: 30px;
  height: 30px;
  display: block;
}
.member-strip-bang {
  position: absolute;
  top: -3px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 0 0 1.5px #fff;
}
.member-strip-tag {
  font-size: 10px;
  font-weight: 600;
  color: #c87840;
  background: #f7ebe0;
  padding: 1px 5px;
  border-radius: 8px;
  white-space: nowrap;
}
.member-perk-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffe8ec;
  color: #d4384a;
  box-sizing: border-box;
}
.member-perk-bar:active { opacity: 0.92; }
.member-perk-bar-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.2;
}
.member-perk-bar-main strong {
  font-size: 13px;
  font-weight: 800;
  color: #c42b3c;
  flex-shrink: 0;
}
.member-perk-bar-main span {
  font-weight: 500;
  color: #c42b3c;
}
.member-perk-bar-sep {
  width: 1px;
  height: 12px;
  background: rgba(196, 43, 60, 0.28);
  flex-shrink: 0;
}
.member-perk-bar-chev {
  width: 14px;
  height: 14px;
  color: #c42b3c;
  flex-shrink: 0;
}
.order-hub {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 14px 12px 12px;
  position: relative;
}
.order-hub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.order-hub-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.order-hub-all {
  border: none;
  background: none;
  color: var(--text-light);
  font: inherit;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 0;
}
.order-hub-all svg { width: 16px; height: 16px; }
.order-hub-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.profile-quick-row {
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 4px 14px;
}
.profile-quick-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0;
  border: 1px solid #eee;
  overflow: hidden;
}
.order-hub-item {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0 2px;
  color: var(--text);
  font-size: 12px;
}
.order-hub-ico {
  position: relative;
  width: 28px;
  height: 28px;
  color: #8a8a8a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-hub-ico svg { width: 26px; height: 26px; display: block; }
.order-hub-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e24c3f;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}
.stat-pill {
  border: none;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 10px 4px 12px;
  text-align: center;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-ico {
  width: 22px;
  height: 22px;
  color: var(--primary);
  opacity: 0.85;
  margin-bottom: 2px;
}
.stat-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}

.stat-pill strong {
  display: block;
  font-size: 18px;
  color: var(--accent);
}

.stat-pill span {
  font-size: 11px;
  color: var(--text-muted);
}

.order-list,
.consult-list,
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.order-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.order-type { color: var(--text-muted); }

.order-status {
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.status-processing,
.status-shipping { background: var(--blue-soft); color: var(--blue); }
.status-done { background: var(--green-soft); color: var(--green); }
.status-cancelled { background: #f0eeec; color: var(--text-light); }
.status-unpaid { background: #fff0e8; color: var(--accent); }

/* 结算/购买弹层：地址卡片（参考主流电商） */
.checkout-addr-card { padding: 0; overflow: hidden; }
.addr-pick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 14px;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
}
.addr-pick-card.is-empty .addr-pick-body strong { color: var(--accent); }
.addr-pick-icon {
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
  opacity: 0.75;
}
.addr-pick-body {
  flex: 1;
  min-width: 0;
}
.addr-pick-body strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.addr-pick-body span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.addr-pick-chevron {
  flex-shrink: 0;
  font-size: 22px;
  color: var(--text-light);
  line-height: 1;
}
.addr-card.is-selected {
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.order-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.order-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.order-meta strong { color: var(--accent); font-size: 15px; }

.order-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.order-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
  padding: 8px 12px;
  background: #f4f4f4;
  border-radius: 20px;
  color: var(--text-light);
}
.order-search svg { width: 18px; height: 18px; flex-shrink: 0; }
.order-search input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  outline: none;
  min-width: 0;
}
.order-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.order-tab {
  flex: 1 1 0;
  min-width: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  padding: 10px 0 12px;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}
.order-tab.is-active {
  color: var(--primary);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--primary);
}
.order-mall-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
}
.om-shop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}
.om-shop-name { font-weight: 600; color: var(--text); }
.om-status { color: var(--accent); font-size: 13px; }
.om-goods {
  display: flex;
  gap: 10px;
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.om-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f3f3f3;
}
.om-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.om-info { flex: 1; min-width: 0; }
.om-info h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.om-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.om-tags span {
  font-size: 11px;
  color: var(--primary);
  background: var(--green-soft);
  padding: 1px 6px;
  border-radius: 4px;
}
.om-pay {
  margin: 10px 0 8px;
  text-align: right;
  font-size: 13px;
  color: var(--text);
}
.om-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  position: relative;
}
.om-more-wrap {
  position: relative;
  flex-shrink: 0;
}
.om-more-btn {
  border: none;
  background: none;
  padding: 6px 2px;
  font: inherit;
  font-size: 13px;
  color: #888;
  cursor: pointer;
}
.om-more-btn:active { opacity: 0.55; }
.om-more-pop {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  min-width: 108px;
  padding: 4px 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}
.om-more-pop[hidden] { display: none !important; }
.om-more-pop::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.04);
}
.om-more-pop button {
  display: block;
  width: 100%;
  border: none;
  background: none;
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  color: #222;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.om-more-pop button:active { background: #f5f5f5; }
.om-actions-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
  min-width: 0;
}
.om-act {
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-clip: padding-box;
}
.om-act:active { opacity: 0.7; }
.om-act--primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.om-act--accent {
  border-color: #ddd;
  color: #333;
  background: #fff;
}
.om-log {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.order-empty { padding: 8px 0 16px; }

.consult-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: none;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.consult-time {
  font-size: 11px;
  color: var(--text-light);
  flex-shrink: 0;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.chat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.chat-msgs {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 4px 16px;
}

.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}
.chat-row.vet { flex-direction: row; }
.chat-row.me { flex-direction: row-reverse; }
.chat-avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  user-select: none;
}
.chat-row.vet .chat-avatar {
  background: linear-gradient(145deg, #3d8b6e, #2a6b52);
  color: #fff;
  box-shadow: 0 2px 8px rgba(45, 107, 82, 0.28);
}
.chat-row.me .chat-avatar {
  background: linear-gradient(145deg, #f0e6d8, #e4d2bc);
  color: #6b4f35;
  box-shadow: inset 0 0 0 1px rgba(107, 79, 53, 0.12);
}
.chat-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: min(78%, 320px);
  min-width: 0;
}
.chat-row.me .chat-col { align-items: flex-end; }
.chat-row.vet .chat-col { align-items: flex-start; }
.chat-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 2px;
}

.chat-bubble {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-row.vet .chat-bubble {
  background: #fff;
  color: var(--text, #1a2421);
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 1px 2px rgba(23, 36, 31, 0.05), 0 6px 16px rgba(23, 36, 31, 0.05);
  border: 1px solid rgba(31, 61, 52, 0.07);
}

.chat-row.me .chat-bubble {
  background: linear-gradient(145deg, #3d8b6e 0%, #2f6f57 100%);
  color: #fff;
  border-radius: 16px 4px 16px 16px;
  box-shadow: 0 4px 14px rgba(45, 107, 82, 0.22);
}

/* 兼容旧结构（客服等仍用 .chat-bubble.me/.vet） */
.chat-bubble.vet {
  align-self: flex-start;
  max-width: 80%;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  border-radius: 4px 16px 16px 16px;
}

.chat-bubble.me {
  align-self: flex-end;
  max-width: 80%;
  background: linear-gradient(145deg, #3d8b6e 0%, #2f6f57 100%);
  color: #fff;
  border-radius: 16px 4px 16px 16px;
  box-shadow: 0 4px 14px rgba(45, 107, 82, 0.22);
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.chat-input-bar input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
  outline: none;
  background: var(--bg);
}

.chat-input-bar input:focus { border-color: var(--accent); }

.chat-composer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-send-btn[hidden],
.chat-plus-btn[hidden] {
  display: none !important;
}
.chat-pet-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.chat-pet-picker[hidden] { display: none !important; }
.chat-pet-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.chat-pet-pick:active {
  border-color: rgba(61, 139, 110, 0.45);
  background: #f5faf7;
}
.chat-pet-pick strong {
  display: block;
  font-size: 14px;
}
.chat-pet-pick span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}
.chat-pet-pick-empty {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}
.chat-pet-pick-empty button {
  margin-top: 6px;
}

.chat-plus-btn {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1.5px solid #333;
  border-radius: 50%;
  background: transparent;
  color: #222;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.chat-plus-btn.is-open {
  transform: rotate(45deg);
  border-color: #2f6f57;
  color: #2f6f57;
}
.chat-send-btn {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: #2f6f57;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.chat-plus-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 8px;
  padding: 12px 4px 4px;
}
.chat-plus-panel[hidden] { display: none !important; }
.chat-plus-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font: inherit;
  color: #333;
  cursor: pointer;
  padding: 0;
}
.chat-plus-ico {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.chat-plus-ico svg {
  width: 26px;
  height: 26px;
  color: #222;
}
.chat-plus-item em {
  font-style: normal;
  font-size: 12px;
  color: #555;
}
.chat-bubble img.chat-img {
  display: block;
  max-width: min(220px, 70vw);
  max-height: 220px;
  border-radius: 10px;
  object-fit: cover;
}

.view-shop-cs {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--topbar-h) - var(--safe-top));
  padding: 12px 16px 0 !important;
  box-sizing: border-box;
}
.view-shop-cs .chat-head {
  flex-shrink: 0;
  margin-bottom: 10px;
}
.view-shop-cs .chat-head .vet-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef3f0;
  font-size: 22px;
  flex-shrink: 0;
}
.view-shop-cs .chat-head .vet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.view-shop-cs .chat-head .vet-avatar.is-official-cs {
  border-radius: 50%;
  background: #1c1c1c;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.shop-cs-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  flex-shrink: 0;
}
.shop-cs-chip {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.shop-cs-chip:active {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.view-shop-cs .chat-msgs {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-bottom: 12px;
}
.view-shop-cs .chat-input-bar {
  position: sticky;
  bottom: 0;
  margin: 0 -16px 0;
  border-radius: 0;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
  padding: 10px 16px calc(10px + var(--safe-bottom));
  z-index: 6;
}
html.is-stack:has(#viewShopCs.is-active) .main {
  padding-bottom: 0;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cart-emoji { font-size: 32px; }
.cart-info { flex: 1; min-width: 0; }
.cart-info h4 { margin: 0 0 4px; font-size: 14px; }

.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-ctrl button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 16px;
  cursor: pointer;
}

.cart-footer {
  position: sticky;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.cart-footer[hidden],
.checkout-footer[hidden],
.cart-toolbar[hidden] {
  display: none !important;
}

.cart-total strong {
  color: var(--accent);
  font-size: 20px;
}

.fav-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.topbar-coll-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}
.topbar-coll-actions[hidden] { display: none !important; }

.view-coll {
  padding-bottom: 88px;
  background: #fff;
}
.coll-filters {
  display: flex;
  gap: 8px;
  padding: 8px 16px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.coll-filters::-webkit-scrollbar { display: none; }
.coll-chip {
  flex-shrink: 0;
  border: none;
  background: #f3f3f3;
  color: #333;
  font: inherit;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 16px;
  cursor: pointer;
}
.coll-chip.is-on {
  background: #fff4ec;
  color: #ff6a2a;
  font-weight: 600;
}

.fav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 28px;
}
.fav-list--tb { background: #fff; }
.fav-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.fav-row--tb {
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  padding: 14px 16px;
  border-bottom: 1px solid #f2f2f2;
  align-items: flex-start;
}
.fav-row--tb.is-manage { padding-left: 12px; }
.fav-row--tb.is-selected .fav-row-cover {
  outline: 2px solid #ff6a2a;
  outline-offset: -2px;
}
.fav-row-cover {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #eef3f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.fav-row--tb .fav-row-cover {
  width: 108px;
  height: 108px;
  border-radius: 8px;
  background: #f5f5f5;
}
.fav-row-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fav-row-emoji { font-size: 36px; line-height: 1; }
.fav-cover-tag {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  padding: 3px 6px;
  font-size: 10px;
  font-style: normal;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px 0 8px 0;
  line-height: 1.2;
}
.fav-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 108px;
}
.fav-row-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.fav-row-promo {
  margin: 0;
  font-size: 12px;
  color: #ff6a2a;
  line-height: 1.3;
}
.fav-row-price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}
.fav-row-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fav-row-price {
  color: #ff6a2a;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.fav-row-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fav-row-shop {
  font-size: 12px;
  color: #999;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fav-row-shop::after {
  content: " ›";
  color: #bbb;
}
.fav-row-acts {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.fav-mini-btn {
  border: 1px solid #e5e5e5;
  background: #fafafa;
  color: #666;
  font: inherit;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.fav-row-act {
  border: none;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  padding: 4px 0;
  cursor: pointer;
}

.coll-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  flex-shrink: 0;
  margin-top: 44px;
  box-sizing: border-box;
  background: #fff;
}
.fav-row--tb .coll-check { margin-top: 44px; margin-right: 2px; }
.fp-card .coll-check {
  position: absolute;
  left: 6px;
  top: 6px;
  margin: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
}
.coll-check.is-on {
  border-color: #ff6a2a;
  background: #ff6a2a;
  box-shadow: inset 0 0 0 3px #fff;
}
.fp-day-check {
  border: none;
  background: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.fp-day-check .coll-check { margin: 0; }

.coll-manage-bar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: #fff;
  border-top: 1px solid #eee;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}
.coll-manage-bar[hidden] { display: none !important; }
.coll-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  padding: 4px 0;
}
.coll-select-all .coll-check { margin: 0; }
.coll-bar-acts {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.coll-bar-btn {
  border: none;
  background: #f3f3f3;
  color: #333;
  font: inherit;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
  min-width: 72px;
}
.coll-bar-btn--warn {
  background: #fff4ec;
  color: #ff6a2a;
  font-weight: 600;
}
.coll-bar-btn--danger {
  background: #ff6a2a;
  color: #fff;
  font-weight: 600;
  margin-left: auto;
}

.fp-filter-row {
  padding: 8px 16px 4px;
}
.fp-filter-btn {
  border: none;
  background: #f3f3f3;
  color: #666;
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 14px;
  cursor: pointer;
}
.fp-filter-btn::after {
  content: " ▾";
  font-size: 10px;
  opacity: 0.7;
}
.fp-feed {
  padding: 4px 12px 28px;
}
.fp-day { margin-bottom: 18px; }
.fp-day-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 10px;
}
.fp-day-head strong {
  font-size: 15px;
  font-weight: 700;
  color: #222;
}
.fp-day-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 10px;
}
.fp-card.is-selected .fp-card-cover {
  outline: 2px solid #ff6a2a;
  outline-offset: -2px;
}
.fp-card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f5;
}
.fp-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fp-card-emoji {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 40px;
}
.fp-card-price {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  padding: 0 2px;
}

.product-card-btn {
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  width: 100%;
}

.about-card {
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  box-shadow: var(--shadow);
}

.about-logo { font-size: 56px; margin-bottom: 8px; }
.about-card h2 { margin: 0 0 4px; font-size: 24px; }
.about-ver { margin: 0 0 16px; color: var(--text-muted); font-size: 13px; }
.about-desc { margin: 0 0 20px; color: var(--text-muted); line-height: 1.6; font-size: 14px; }

.about-list {
  text-align: left;
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
}

.form-note {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-light);
}

.view[data-view="chat"],
.view-chat {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--topbar-h) - var(--safe-top));
  padding-bottom: 0 !important;
  box-sizing: border-box;
}

.view[data-view="chat"][hidden],
.view-chat[hidden] {
  display: none !important;
}

.view-chat .chat-head {
  flex-shrink: 0;
  margin-bottom: 10px;
}

.view-chat .chat-msgs {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-bottom: 12px;
}

.view-chat .chat-composer {
  position: sticky;
  bottom: 0;
  margin: 0 -16px 0;
  padding: 8px 16px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -4px 16px rgba(45, 70, 55, 0.04);
  z-index: 6;
}

.view-chat .chat-input-bar {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  gap: 8px;
}

.view-chat .chat-input-bar input {
  background: #fff;
  border-radius: 10px;
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.view-chat .chat-input-slot {
  position: relative;
  flex: 1;
  min-width: 0;
}
.view-chat .chat-input-slot input {
  width: 100%;
}
.view-chat .chat-input-slot.is-locked input {
  background: #e8ecea;
  color: transparent;
  caret-color: transparent;
  box-shadow: none;
  pointer-events: none;
}
.view-chat .chat-lock-hit {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  border: none;
  border-radius: 10px;
  background: #e8ecea;
  color: #5c6f66;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.view-chat .chat-lock-hit[hidden] { display: none !important; }
.view-chat .chat-lock-hit svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.view-chat .chat-lock-hit:active {
  background: #dde3e0;
}

.svc-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 100;
  display: flex;
  align-items: stretch;
  padding: 10px 16px 0;
  padding-bottom: max(20px, calc(var(--safe-bottom) + 10px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-sizing: border-box;
}
.svc-bar[hidden] { display: none !important; }
.svc-bar-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
.svc-bar-cta {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 22px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
html.is-svc-bar .main {
  padding-bottom: calc(72px + var(--safe-bottom));
}

/* 售后保障 */
.as-head { margin-bottom: 8px; }
.as-list { display: flex; flex-direction: column; gap: 12px; }
.as-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e8ecea);
  border-radius: 14px;
  padding: 14px 14px 12px;
}
.as-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.as-kind {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent, #2f6b57);
}
.as-status {
  font-size: 12px;
  color: #c45c26;
  font-weight: 600;
}
.as-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.35;
}
.as-amount {
  margin: 6px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #1a1f1c);
}
.as-steps {
  list-style: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5f7f6;
  display: grid;
  gap: 6px;
}
.as-steps li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted, #8a9490);
}
.as-steps li.is-done {
  color: var(--accent, #2f6b57);
  font-weight: 600;
}
.as-steps li em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted, #8a9490);
  font-size: 11px;
}
.as-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.buy-sheet-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.buy-sheet-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1a1f1c);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.buy-sheet-field input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--border, #e4e8e6);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  font-weight: 400;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.buy-sheet-field input[type="date"],
.buy-sheet-field input[type="time"],
.buy-sheet-field input[type="datetime-local"] {
  /* 原生日期/时间控件默认 min-width 过大，会顶出弹层被裁切 */
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.buy-sheet-field input:focus {
  border-color: var(--accent, #2f6b57);
  box-shadow: 0 0 0 2px rgba(47, 107, 87, 0.18);
}
.buy-sheet-portrait input[type="file"] {
  height: auto;
  padding: 10px 12px;
  font-size: 13px;
}
.buy-sheet-portrait-preview {
  display: block;
  width: 96px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border, #e4e8e6);
  background: #f5f7f6;
  margin-top: 4px;
}

html.is-stack:has(#viewChat.is-active) .main {
  padding-bottom: 0;
}

/* ?? v1.2 sync / track / pay ?? */
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #bbb;
  flex-shrink: 0;
}

.sync-dot.is-online { background: #5b8c5a; box-shadow: 0 0 0 3px #5b8c5a33; }
.sync-dot.is-offline { background: #c9a227; }

.track-bar {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0;
}

.track-bar.big { height: 10px; margin: 12px 0 20px; }

.track-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f0a080);
  border-radius: 99px;
}

.track-card { text-align: left; font: inherit; color: inherit; width: 100%; cursor: pointer; border: none; }

/* 物流列表：图二紧凑条 */
.trk-strip {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 12px 10px 12px 12px;
  border: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.trk-strip:active { opacity: 0.85; }
.trk-strip-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 52px;
  flex-shrink: 0;
  color: #c4a35a;
}
.trk-strip.is-done .trk-strip-status { color: #2f9d6a; }
.trk-strip-status svg {
  width: 22px;
  height: 22px;
  display: block;
}
.trk-strip-status em {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.trk-strip-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  margin-left: 10px;
  border-left: 1px solid #eee;
  font-size: 13px;
  color: #333;
  line-height: 1.35;
}
.trk-strip-main strong {
  font-weight: 600;
  flex-shrink: 0;
}
.trk-strip-phone {
  color: #333;
  flex-shrink: 0;
}
.trk-strip-eye {
  display: inline-flex;
  color: #bbb;
  flex-shrink: 0;
}
.trk-strip-eye svg { width: 14px; height: 14px; display: block; }
.trk-strip-addr {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #555;
}
.trk-strip-chev {
  flex-shrink: 0;
  color: #ccc;
  display: grid;
  place-items: center;
  width: 20px;
}
.trk-strip-chev svg { width: 16px; height: 16px; display: block; }

.track-nodes {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.track-nodes li {
  display: flex;
  gap: 12px;
  padding: 0 0 18px;
  position: relative;
}

.track-nodes li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.track-nodes li.is-done:not(:last-child)::before { background: var(--accent); }

.node-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  margin-top: 2px;
  z-index: 1;
}

.track-nodes li.is-done .node-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.node-time {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.track-list { display: flex; flex-direction: column; gap: 10px; }

.track-detail { padding-bottom: 24px; }
/* .track-list { display:flex } 会盖掉原生 hidden，导致详情叠在列表下面 */
.track-list[hidden],
.track-detail[hidden] {
  display: none !important;
}
.trk-page { display: flex; flex-direction: column; gap: 12px; }
.trk-map {
  margin: -4px -4px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #dceaf5;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  position: relative;
  touch-action: none;
}
.trk-map-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  object-fit: cover;
  object-position: center top;
  max-height: 280px;
}
.trk-lod { position: relative; }
.trk-lod-svg {
  display: block;
  width: 100%;
  height: 240px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.trk-lod-svg:active { cursor: grabbing; }
.trk-lod-tools {
  position: absolute;
  right: 10px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.trk-lod-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  cursor: pointer;
  padding: 0;
}
.trk-lod-hint {
  margin: 0;
  padding: 2px 10px 6px;
  font-size: 11px;
  color: #9aa3ab;
  text-align: center;
  background: transparent;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  pointer-events: none;
}
.trk-lod { padding-bottom: 0; }
.trk-ship-thumb { color: #1e2129; }
.trk-done-head {
  background: #fff;
  border-radius: 12px;
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
}
.trk-done-head h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: #222;
}
.trk-addr {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.trk-addr-ico { font-size: 16px; line-height: 1.4; flex-shrink: 0; }
.trk-addr strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
}
.trk-addr p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #888;
}
.trk-status-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.trk-status-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}
.trk-status-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: #ff6a2a;
  flex-shrink: 0;
}
.trk-status-row strong {
  display: block;
  font-size: 15px;
  color: #ff6a2a;
}
.trk-status-row p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #888;
  line-height: 1.4;
}
.trk-courier,
.trk-product {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.trk-courier {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.trk-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f3f3f3;
}
.trk-thumb--empty {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #f3f3f3;
  font-size: 22px;
}
.trk-courier-body { flex: 1; min-width: 0; }
.trk-courier-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #333;
}
.trk-courier-line.muted { color: #888; font-size: 12px; margin-top: 4px; }
.trk-pickup {
  margin-top: 8px;
  font-size: 13px;
  color: #2f6b4f;
}
.trk-pickup b { font-size: 18px; letter-spacing: 0.04em; }
.trk-copy {
  border: none;
  background: none;
  color: #2f6b4f;
  font: inherit;
  font-size: 12px;
  padding: 0 4px;
  cursor: pointer;
}
.trk-shop {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}
.trk-goods {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.trk-goods img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.trk-goods h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trk-goods p { margin: 4px 0 0; font-size: 12px; color: #999; }
.trk-price {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  flex-shrink: 0;
}
.trk-product-acts {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.trk-strip--static {
  pointer-events: none;
  margin: 0 0 10px;
}
.trk-strip--static .trk-strip-chev { display: none; }

.trk-bundle {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.trk-bundle .trk-strip { margin: 0; }
.trk-bundle .od-info-card,
.trk-bundle .od-goods-card { margin: 0; }

.od-goods-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px 10px;
  box-shadow: var(--shadow);
}
.od-goods-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.od-goods-row .od-goods-cover,
.od-goods-row img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f3f3f3;
  display: block;
}
.od-goods-cover--img,
.od-goods-cover--svg {
  padding: 16px;
  box-sizing: border-box;
  background: #f5f5f5;
  color: #1e2129;
}
.od-goods-body { flex: 1; min-width: 0; }
.od-goods-title-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.od-goods-title-line h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #222;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.od-goods-orig {
  flex-shrink: 0;
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}
.od-goods-spec {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #999;
}
.od-goods-spec em { font-style: normal; color: #888; }
.od-goods-tags {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: #2f9d6a;
}
.od-goods-paidline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
  color: #333;
}
.od-goods-paidline b {
  font-size: 16px;
  color: #e24b4a;
  font-weight: 700;
  margin-left: 2px;
}
.od-goods-note {
  border: none;
  background: none;
  color: #999;
  font: inherit;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}
.od-goods-acts {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.od-goods-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f2f2f2;
  font-size: 13px;
  color: #222;
  font-weight: 700;
}
.od-goods-sum i {
  font-style: normal;
  font-weight: 500;
  color: #e24b4a;
  background: #fff1f0;
  border: 1px solid #ffd6d4;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  font-size: 11px;
}
.od-goods-sum strong {
  font-size: 18px;
  font-weight: 700;
}

.od-info-card {
  background: #fff;
  border-radius: 12px;
  padding: 0 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.od-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 0 10px;
  border-bottom: 1px solid #f0f0f0;
}
.od-info-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #222;
  cursor: pointer;
}
.od-info-title strong {
  font-size: 14px;
  font-weight: 700;
}
.od-info-badge {
  font-size: 11px;
  color: #999;
  background: #f5f5f5;
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 1.4;
}
.od-info-chev {
  width: 14px;
  height: 14px;
  color: #bbb;
  transition: transform 0.2s ease;
}
.od-info-card.is-collapsed .od-info-chev {
  transform: rotate(-90deg);
}
.od-info-card.is-collapsed .od-info-body {
  display: none;
}
.od-info-oid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #888;
  min-width: 0;
}
.od-info-oid span {
  max-width: 11em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.od-info-oid .trk-copy {
  flex-shrink: 0;
  color: #666;
  border-left: 1px solid #e5e5e5;
  padding-left: 8px;
  margin-left: 2px;
}
.od-info-body {
  padding: 4px 0 8px;
}
.od-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  font-size: 13px;
  padding: 8px 0;
  color: #666;
}
.od-info-row em {
  font-style: normal;
  color: #999;
  text-align: right;
  max-width: 68%;
  word-break: break-all;
  line-height: 1.45;
}
.od-info-row.is-addr em {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  justify-content: flex-end;
}
.od-info-pin {
  font-style: normal;
  font-size: 12px;
  color: #bbb;
  flex-shrink: 0;
  line-height: 1.45;
}
.od-info-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 12px;
  color: #666;
}
.od-info-guard b {
  font-weight: 500;
  color: #e67a2e;
  background: #fff4eb;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 4px;
  font-size: 11px;
}
.od-info-snap {
  color: #999;
  white-space: nowrap;
}
.trk-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  padding: 4px 2px 0;
}
.trk-ship-card {
  background: #fff;
  border-radius: 12px;
  padding: 0 12px;
  box-shadow: var(--shadow);
}
.trk-ship-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.trk-ship-row:last-child { border-bottom: none; }
.trk-ship-row--addr { align-items: flex-start; }
.trk-ship-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: #1e2129;
  overflow: hidden;
}
.trk-ship-thumb .trk-parcel-img,
.trk-parcel-img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}
.trk-ship-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #999;
}
.trk-ship-ico svg { width: 22px; height: 22px; display: block; }
.trk-ship-main {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #333;
  line-height: 1.45;
}
.trk-ship-main p { margin: 0; }
.trk-ship-main p + p { margin-top: 4px; color: #666; }
.trk-ship-courier { color: #2f9d6a; font-weight: 600; }
.trk-ship-sep { margin: 0 2px; color: #999; }
.trk-ship-no {
  word-break: break-all;
  color: #333;
}
.trk-ship-card .trk-copy {
  flex-shrink: 0;
  color: #666;
  font-size: 13px;
}
.trk-ship-call {
  flex-shrink: 0;
  color: #2f6b4f;
  font-size: 13px;
  text-decoration: none;
}
.trk-timeline {
  background: #fff;
  border-radius: 12px;
  padding: 14px 14px 4px;
  box-shadow: var(--shadow);
}
.trk-timeline .node-detail {
  margin: 4px 0 0;
  font-size: 12px;
  color: #666;
  line-height: 1.45;
}
.trk-timeline li.is-current strong { color: #2f6b4f; }
.trk-timeline li.is-current .node-dot {
  border-color: #2f6b4f;
  background: #2f6b4f;
}
.trk-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 0 16px;
}
.track-detail--done .trk-map { display: none !important; }

/* ?? v1.3 rx / comments / legal ?? */
.rx-upload-box { margin-bottom: 14px; }
.rx-file-label { cursor: pointer; }
.rx-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin: 8px 0;
  background: var(--bg);
}

.comment-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 12px; }
.comment-section {
  margin-top: 8px;
  padding-top: 4px;
}
.comment-section-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.comment-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  padding: 12px 0 14px;
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
}
.comment-item .post-avatar {
  width: 36px;
  height: 36px;
  font-size: 18px;
}
.comment-body { min-width: 0; }
.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.comment-item .post-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0;
}
.comment-like {
  color: #9aa3ad;
  flex-shrink: 0;
  display: inline-flex;
}
.comment-like .post-meta-ico {
  width: 16px;
  height: 16px;
}
.comment-item p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.comment-item .post-time {
  margin-top: 0;
}
.comment-empty {
  margin: 0;
  padding: 20px 8px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
}

.comment-section {
  padding-bottom: calc(72px + var(--safe-bottom));
}

.comment-form {
  display: flex;
  align-items: center;
  gap: 8px;
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 100;
  margin: 0;
  padding: 10px 16px;
  padding-bottom: max(12px, calc(var(--safe-bottom) + 10px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
}
.comment-form input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 14px;
  font: inherit;
  outline: none;
  background: var(--bg);
  box-sizing: border-box;
}
.comment-form input:focus { border-color: var(--accent); }
.comment-form .btn {
  flex-shrink: 0;
  height: 40px;
  border-radius: 20px;
  padding: 0 16px;
}
html.is-post-detail .main {
  padding-bottom: calc(72px + var(--safe-bottom));
}

.legal-body {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  line-height: 1.7;
  font-size: 14px;
  color: var(--text-muted);
}
.legal-body h2 { margin: 0 0 8px; color: var(--text); font-size: 22px; }
.legal-body h3 { margin: 18px 0 8px; color: var(--text); font-size: 16px; }
.legal-body ul { padding-left: 18px; margin: 0; }
.legal-body li { margin-bottom: 6px; }

/* ?? v1.4 sms / cashier ?? */
.code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.code-row input { flex: 1; }
.code-row .btn { flex-shrink: 0; white-space: nowrap; }

.pay-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.pay-badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.pay-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 10px;
}

.pay-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.pay-channel.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pay-ch-icon {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  font-size: 28px;
  line-height: 1;
}
.pay-more-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.pay-more-link i { font-style: normal; }
.pay-badge[hidden] { display: none !important; }

.view-pay {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--topbar-h, 52px) - var(--safe-bottom));
  padding-bottom: 0 !important;
}
.view-pay .pay-card {
  flex: 1;
  margin-bottom: 0;
}
.pay-foot-bar {
  position: sticky;
  bottom: 0;
  margin: 0 -16px;
  padding: 12px 16px calc(10px + var(--safe-bottom));
  background: #fff;
  border-top: 1px solid #eee;
  z-index: 5;
}
.pay-foot-bar .btn + .btn { margin-top: 8px; }

.pay-status {
  margin: 12px 0 16px;
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.pay-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* inbox / address / post image */
.msg-item {
  width: 100%;
  text-align: left;
  border: none;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.msg-item.is-unread { border-left: 3px solid var(--accent); }
.msg-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-light);
}
.msg-top strong { color: var(--text); font-size: 14px; }
.msg-item p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.post-card-img,
.post-img-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin: 8px 0;
  background: var(--bg);
}

.check-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}






/* ???? 2.3 ops / a11y / timeline ???? */
.home-recent-row { margin: 0 0 16px; }
.home-recent-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.order-timeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border, #e8e4de);
}
.order-timeline--cancel { color: var(--text-muted); font-size: 12px; }
.ot-step {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bg, #f5f2ec);
  color: var(--text-muted);
}
.ot-step.is-done { background: #e6f4ea; color: #1a7f37; font-weight: 600; }
.ot-step.is-current { background: var(--accent); color: #fff; font-weight: 700; }
.ot-sep {
  width: 10px;
  height: 2px;
  background: #ddd;
  flex-shrink: 0;
}
.order-card--focus {
  outline: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(232, 120, 80, 0.15);
}
.settings-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.settings-card h3 { margin: 0 0 12px; font-size: 15px; }
.error-log {
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
  font-size: 11px;
  background: var(--bg);
  padding: 10px;
  border-radius: 8px;
}
.compliance-banner {
  margin-bottom: 12px;
  font-size: 13px;
}
.compliance-banner--strict {
  border-left: 3px solid #c44;
  background: #fff5f5;
}
.offline-queue-hint {
  text-align: center;
  font-size: 12px;
  padding: 6px 12px;
  background: #fff8e6;
  color: #8a5a00;
}
html.a11y-large {
  font-size: 112%;
}
html.a11y-large .pin-label,
html.a11y-large .quick-label,
html.a11y-large .menu-label { font-size: 1.05em; }
html.a11y-contrast {
  --text: #0a0a0a;
  --text-muted: #333;
  --bg: #fff;
  --bg-card: #fff;
  --accent: #0b5fff;
}
html.a11y-contrast .btn-primary { background: #0b5fff; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ???? 2.4 theme / skeleton / order detail / empty ???? */
html.theme-dark,
html[data-theme="dark"] {
  --bg: #1a1614;
  --bg-card: #2a2420;
  --bg-elevated: #322b26;
  --text: #f3ebe4;
  --text-muted: #b5a89e;
  --text-light: #8a7d74;
  --accent: #f08a62;
  --accent-dark: #e8724a;
  --accent-soft: #3d2a22;
  --border: #3d342e;
  --shadow: 0 2px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.45);
  --green-soft: #1e2e1e;
  --blue-soft: #1a2a30;
  --brown-soft: #2e2822;
  --purple-soft: #2c2230;
}
html.theme-dark .topbar,
html[data-theme="dark"] .topbar {
  background: rgba(26, 22, 20, 0.92);
}
html.theme-dark .tabbar,
html[data-theme="dark"] .tabbar {
  background: rgba(26, 22, 20, 0.96);
}
html.build-review [data-demo] { display: none !important; }

.home-skeleton { margin-bottom: 16px; }
.sk-row, .sk-line, .sk-card {
  background: linear-gradient(90deg, var(--border), var(--bg-card), var(--border));
  background-size: 200% 100%;
  animation: sk 1.2s ease-in-out infinite;
  border-radius: 12px;
}
.sk-pins { height: 88px; margin-bottom: 12px; }
.sk-grid { height: 120px; margin-bottom: 12px; }
.sk-line { height: 16px; width: 40%; margin-bottom: 10px; }
.sk-card { height: 100px; }
@keyframes sk {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sk-row, .sk-line, .sk-card { animation: none; }
}

.empty-state {
  text-align: center;
  padding: 36px 20px;
}
.empty-illus {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
  filter: grayscale(0.2);
}
.empty-state h3 { margin: 0 0 8px; font-size: 17px; }
.empty-state p { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; }

.order-detail-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.od-timeline {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  border-left: 2px solid var(--border);
}
.od-timeline li {
  position: relative;
  padding: 0 0 14px 16px;
  color: var(--text-muted);
  font-size: 13px;
}
.od-timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.od-timeline li.is-done { color: var(--text); font-weight: 600; }
.od-timeline li.is-done::before { background: var(--accent); }

.field-error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #c44;
}

/* ???? 2.5 maps / a11y ???? */
.geo-map-host, .geo-map { margin: 0 0 14px; }
.geo-map svg { display: block; border-radius: 12px; color: var(--text-muted); }
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  z-index: 9999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ???? 2.6 UI/UX ???? */
html.ux26 {
  --fs-title: 1.25rem;
  --fs-body: 0.95rem;
  --fs-meta: 0.78rem;
  --tap-min: 44px;
}
html.ux26 h2, html.ux26 .hero-title { font-size: var(--fs-title); }
html.ux26 .menu-label, html.ux26 .order-card h3 { font-size: var(--fs-body); }
html.ux26 .form-note, html.ux26 .order-meta, html.ux26 .empty-hint { font-size: var(--fs-meta); }
html.ux26 .menu-item,
html.ux26 .chip,
html.ux26 .home-shortcut,
html.ux26 .btn {
  min-height: var(--tap-min);
}
html.ux26 .chip { padding: 10px 14px; }

.menu-section {
  margin: 0;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid #eee;
  box-shadow: none;
  overflow: hidden;
}
.menu-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  margin: 0;
  box-shadow: none;
  background: transparent;
  min-height: 0;
  box-sizing: border-box;
}
.menu-section > summary.menu-group-title {
  /* 覆盖 .menu-group-title 的 14px 4px 6px，避免收起时底部多一截空白 */
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
}
.menu-section > summary::-webkit-details-marker { display: none; }
.menu-section .menu-item {
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid var(--border);
}

.goal-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.goal-card {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  cursor: pointer;
  display: grid;
  gap: 4px;
}
.goal-card strong { font-size: 15px; color: var(--text); }
.goal-card span { font-size: 12px; color: var(--text-muted); }
.goal-card:active { transform: scale(0.98); border-color: var(--accent); }

.book-steps-host { margin-bottom: 12px; }
.book-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  font-size: 12px;
}
.book-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.book-step i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--border);
  font-style: normal;
  font-size: 11px;
}
.book-step.is-current { color: var(--text); font-weight: 700; }
.book-step.is-current i,
.book-step.is-done i { background: var(--accent); color: #fff; }
.book-step-sep {
  flex: 1;
  height: 2px;
  background: var(--border);
  max-width: 28px;
}

.list-skeleton .sk-list-item {
  height: 88px;
  margin-bottom: 10px;
  border-radius: 12px;
}
.empty-hint--card {
  background: var(--bg-card);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
}

/* 订单详情底栏已移除：客服改顶栏图标 */
.order-sticky-bar { display: none !important; }
#viewOrderDetail .order-detail-scroll {
  padding-bottom: calc(24px + var(--safe-bottom));
}

.emergency-focus .module-banner--urgent {
  background: linear-gradient(135deg, #b42318, #e5483b);
  color: #fff;
  border-radius: 16px;
  padding: 20px 16px;
  box-shadow: none;
}
.urgent-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0.9;
}
.btn-urgent {
  background: #b42318 !important;
  border-color: #b42318 !important;
  font-size: 16px !important;
  min-height: 52px;
}

.offline-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  padding: 8px 12px;
}
.offline-bar--warn { background: #fff1f0; color: #a61d24; }
.offline-bar--info { background: #fff8e6; color: #8a5a00; }

/* 已关闭成功/失败全屏脉冲闪屏（支付成功曾闪红/橙） */
.ux-pulse {
  display: none !important;
}

html.theme-dark .topbar,
html[data-theme="dark"] .topbar {
  border-bottom-color: #4a4038;
  background: rgba(22, 18, 16, 0.94);
}
html.theme-dark .bg-card,
html.theme-dark .menu-section,
html.theme-dark .order-card,
html.theme-dark .settings-card,
html[data-theme="dark"] .menu-section,
html[data-theme="dark"] .order-card {
  border: 1px solid var(--border);
}
html.theme-dark .tabbar,
html[data-theme="dark"] .tabbar {
  border-top: 1px solid var(--border);
}

@media (prefers-reduced-motion: reduce) {
  .ux-pulse { display: none; }
  .goal-card:active { transform: none; }
}

/* ???? home cleanup ???? */
.hero--compact {
  padding: 12px 4px 8px;
  margin-bottom: 8px;
}
.hero--compact .hero-title {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 4px;
}
.hero--compact .hero-desc {
  margin: 0;
  font-size: 13px;
}
.home-pet-chip {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.home-pet-chip span { color: var(--text-muted); font-size: 13px; }
#homePetHub { display: grid; gap: 0; }

/* offline bar visual hierarchy */
.offline-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  padding: calc(var(--safe-top) + 6px) 12px 6px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  border-bottom: 1px solid transparent;
}
.offline-bar--soft {
  background: #f3f0ec;
  color: #6b635c;
  border-bottom-color: var(--border);
}
.offline-bar--warn {
  background: #f8ecea;
  color: #8a3b32;
  border-bottom-color: #efd2cc;
}
.offline-bar--info { /* legacy */
  background: #f3f0ec;
  color: #6b635c;
}
.offline-bar-action {
  margin-left: 6px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.home-lede {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

.home-mode-tabs {
  margin-bottom: 8px;
  box-shadow: none;
  border: 1px solid var(--border);
  background: transparent;
}
.home-mode {
  font-weight: 600;
}
.home-mode.is-active {
  background: var(--text);
  color: #fff;
}

.home-block { margin-bottom: 8px; }
.home-block--primary {
  margin-bottom: 22px;
}
.home-block--primary .pin-grid {
  gap: 8px;
  margin-bottom: 0;
}
.home-block--primary .pin-item {
  padding: 14px 4px 12px;
  box-shadow: 0 4px 16px rgba(44, 36, 32, 0.08);
  border: 1px solid transparent;
}
.home-block--primary .pin-icon {
  width: 46px;
  height: 46px;
  font-size: 22px;
  border-radius: 14px;
}
.home-block--primary .pin-label {
  font-size: 12px;
  font-weight: 700;
}

.home-block--secondary {
  margin-bottom: 18px;
  padding: 12px 10px 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
}
html.theme-dark .home-block--secondary,
html[data-theme="dark"] .home-block--secondary {
  background: rgba(42, 36, 32, 0.55);
}
.home-block--secondary .section-head {
  margin-bottom: 6px;
  padding: 0 2px;
}
.home-block--secondary .section-head h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.home-block--secondary .filter-chips {
  padding-bottom: 8px;
  margin-bottom: 0;
}
.home-block--secondary .chip {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
  font-weight: 500;
  color: var(--text-muted);
}
.home-block--secondary .chip.is-active {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-dark);
  font-weight: 700;
}
.home-block--secondary .quick-item,
.home-block--secondary .quick-item--compact {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 8px 2px;
}
.home-block--secondary .quick-icon {
  width: 36px;
  height: 36px;
  font-size: 16px;
  background: var(--bg) !important;
  border-radius: 10px;
}
.home-block--secondary .quick-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
#btnExpandCats {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.home-block--tertiary {
  margin: 4px 0 20px;
}
.home-block--tertiary .home-shortcut-row {
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2px 0;
  background: transparent;
  box-shadow: none;
}
.home-block--tertiary .home-shortcut {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border-right: 1px solid var(--border);
  padding: 12px 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.home-block--tertiary .home-shortcut:last-child { border-right: none; }
.home-block--tertiary .home-shortcut:active {
  color: var(--text);
  background: var(--bg-card);
}

.link-btn--quiet {
  color: var(--text-light);
  font-weight: 500;
}
.link-btn--quiet:active { color: var(--text-muted); }

.view-home .section-head h2 {
  font-size: 15px;
  font-weight: 700;
}
.view-home .trust-bar {
  box-shadow: none;
  border: 1px solid var(--border);
  background: transparent;
  margin-top: 20px;
}
.view-home .trust-item strong {
  color: var(--text);
  font-size: 16px;
}
.view-home .trust-item span {
  font-size: 11px;
}

html.theme-dark .home-mode.is-active,
html[data-theme="dark"] .home-mode.is-active {
  background: var(--accent);
}

/* Shop 2.7.1 — 排序为次级文字链，分类保持胶囊 */
.sort-chips { margin-top: -4px; margin-bottom: 8px; }
.sort-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 2px 2px 12px;
  margin-bottom: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sort-row::-webkit-scrollbar { display: none; }
.sort-link {
  flex-shrink: 0;
  border: none;
  background: none;
  padding: 4px 0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}
.sort-link.is-active {
  color: var(--accent);
  font-weight: 700;
}
.product-card.is-soldout { opacity: 0.55; }
.product-card .stock-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #9aa3af;
  vertical-align: middle;
}
.product-card .stock-badge.stock-low { background: #d97706; }
.product-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--bg-muted, #f0ebe4);
}
.product-card.is-featured .product-cover {
  box-shadow: inset 0 0 0 2px rgba(232, 114, 74, 0.35);
}
.pdp-hero { font-size: 64px; text-align: center; margin-bottom: 12px; }
.pdp-cover {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 auto;
  display: block;
}

/* 商品详情沉浸式：大图顶满红圈范围，返回/分享叠在图上 */
html.is-pdp .topbar.topbar--pdp {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  z-index: 40;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
html.is-pdp .topbar.topbar--pdp .topbar-brand {
  display: none !important;
}
html.is-pdp .topbar.topbar--pdp .topbar-back,
html.is-pdp .topbar.topbar--pdp .topbar-action {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: #1a1a1a;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.85));
}
html.is-pdp .topbar.topbar--pdp .topbar-back:active,
html.is-pdp .topbar.topbar--pdp .topbar-action:active {
  background: transparent;
  opacity: 0.7;
}
html.is-pdp .topbar.topbar--pdp .topbar-inner {
  justify-content: space-between;
}
html.is-pdp .main {
  padding-top: 0;
}
html.is-pdp #viewDetail.view {
  padding: 0 0 20px;
  animation: none;
}
html.is-pdp .detail-content {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}
html.is-pdp .pdp-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  background: #f3f5f4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0;
}
html.is-pdp .pdp-cover {
  width: 100%;
  max-width: none;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
}
html.is-pdp .pdp-hero-emoji {
  font-size: 96px;
  line-height: 1;
}
html.is-pdp .pdp-body {
  padding: 16px 16px 8px;
  background: var(--bg);
}
html.is-pdp .pdp-body h2 {
  margin: 0 0 6px;
  font-size: 20px;
}
html.is-pdp .pdp-body .detail-price {
  margin-bottom: 10px;
}
.home-page-hero {
  padding: 4px 4px 14px;
}
.home-page-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.home-page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.home-page-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.home-page-search {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-light);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.home-page-search svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.home-page-search:active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.home-hero-focus {
  padding: 4px 0 12px;
  margin-bottom: 4px;
}
.home-focus-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.home-focus-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 14px;
  border: none;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow, 0 2px 10px rgba(42, 36, 31, 0.06));
  text-align: left;
  cursor: pointer;
}
.home-focus-cta strong { font-size: 16px; color: var(--accent, #e8724a); }
.home-focus-cta span { font-size: 12px; color: var(--text-muted); }
.home-focus-cta:active { transform: scale(0.98); }
.offline-bar .link-btn {
  margin-left: 8px;
  color: inherit;
  text-decoration: underline;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}
.variant-row { margin: 12px 0 16px; }
.variant-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.variant-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-specs {
  margin: 8px 0 16px;
  padding: 12px 14px 12px 28px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 13px;
  color: var(--text);
}
.pdp-specs li { margin: 4px 0; }
.cart-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 2px;
}
.cart-check { display: flex; align-items: center; }
.cart-item.is-dim { opacity: 0.55; }
.cart-item .rx-badge { margin-left: 4px; font-size: 10px; }
.checkout-body { padding-bottom: 88px; }
.checkout-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}
.checkout-card h3 { margin: 0 0 10px; font-size: 15px; }
.checkout-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-size: 14px;
}
.checkout-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 6px 0;
}
.checkout-pay { font-size: 15px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--border); }
.checkout-footer { bottom: calc(var(--safe-bottom) + 8px); }

/* 立即购买 / 加购规格弹层（对齐手机壳 480px，与 tabbar/pdp-bar 同宽） */
.buy-sheet {
  position: fixed;
  inset: auto auto 0 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
  z-index: 300;
}
.buy-sheet::backdrop {
  background: rgba(20, 18, 16, 0.48);
}
.buy-sheet-panel {
  position: relative;
  background: var(--bg-card);
  border-radius: 18px 18px 0 0;
  padding: 18px 16px 0;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
  overflow: hidden;
  min-width: 0;
}
.buy-sheet-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.buy-sheet-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-right: 40px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.buy-sheet-emoji,
.buy-sheet-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: #f3f5f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 61, 52, 0.08);
}
.buy-sheet-emoji img,
.buy-sheet-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.buy-sheet-meta h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.3;
}
.buy-sheet-meta .detail-price {
  margin: 0;
  font-size: 20px;
}
.buy-sheet-meta .form-note { margin: 4px 0 0; }
.buy-sheet-head-qty { margin-top: 10px; }
.buy-sheet-panel.is-sku-step .buy-sheet-meta h3 { display: none; }
.buy-sku-block { padding: 4px 0 8px; }
.buy-sku-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #222;
}
.buy-sheet-body {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  padding: 2px 2px 8px 0;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.buy-sheet-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.buy-sheet-body .buy-sku-block {
  min-width: 0;
  max-width: 100%;
}
.buy-sheet-body .variant-chips {
  max-width: 100%;
  flex-wrap: wrap;
}
.buy-sheet-section {
  margin-bottom: 16px;
}
/* 购买弹层：标签左 / 内容右 */
.buy-sheet-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f2f2f2;
}
.buy-sheet-row:last-child { border-bottom: none; }
.buy-sheet-row--center { align-items: center; }
.buy-sheet-k {
  flex: 0 0 72px;
  margin: 0;
  padding-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}
.buy-sheet-row--center .buy-sheet-k { padding-top: 0; }
.buy-sheet-v {
  flex: 1;
  min-width: 0;
}
.buy-sheet-v--end {
  display: flex;
  justify-content: flex-end;
}
/* 仅上移右侧配送选项，左侧「配送方式」保持原位 */
.buy-sheet-v .variant-chips {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 4px 16px;
  margin-top: -10px;
}
.buy-sheet-v .variant-chips .chip {
  padding: 0 2px 2px;
  line-height: 1.3;
}
.buy-sheet-v .variant-chips .chip.is-active::after {
  bottom: 0;
  height: 2.5px;
}
.buy-sheet-v .addr-pick-card {
  padding: 0;
  border: none;
  background: transparent;
  min-height: 0;
}
.buy-sheet-v .addr-pick-card.is-empty {
  padding: 4px 0;
}
.buy-pay-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.buy-pay-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: #222;
  text-align: left;
  cursor: pointer;
}
.buy-pay-row .pay-ch-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}
.buy-pay-row span { flex: 1; }
.buy-pay-radio {
  width: 18px;
  height: 18px;
  border: 1.5px solid #ccc;
  border-radius: 50%;
  box-sizing: border-box;
  flex-shrink: 0;
}
.buy-pay-row.is-on .buy-pay-radio {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px #fff;
}
.buy-sheet-v .pay-more-link {
  margin: 2px 0 0;
  justify-content: flex-start;
  padding: 4px 0;
}
.buy-sheet-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.buy-sheet-addr {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font: inherit;
  cursor: pointer;
}
.buy-sheet-addr.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.buy-sheet-addr + .buy-sheet-addr { margin-top: 8px; }
.buy-sheet-addr strong { display: block; margin-bottom: 2px; font-size: 14px; }
.buy-sheet-addr span { font-size: 12px; color: var(--muted); }
.buy-sheet-foot {
  flex-shrink: 0;
  padding: 10px 0 calc(8px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
html.is-native .buy-sheet-foot {
  padding-bottom: calc(10px + var(--safe-bottom));
}
.buy-sheet-total,
.buy-sheet-total[hidden] {
  display: none !important;
}

/* 更多支付方式弹层 */
.pay-more-sheet {
  position: fixed;
  inset: auto auto 0 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
  z-index: 320;
}
.pay-more-sheet::backdrop { background: rgba(20, 18, 16, 0.48); }
.pay-more-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px 0;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}
.pay-more-amount {
  margin: 8px 40px 4px;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
}
.pay-more-timer {
  margin: 0 0 12px;
  text-align: center;
  font-size: 13px;
  color: #888;
}
.pay-more-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 8px;
}
.pay-more-sec {
  margin-bottom: 14px;
}
.pay-more-sec h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #999;
  font-weight: 600;
}
.pay-more-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  border: none;
  border-bottom: 1px solid #f2f2f2;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pay-more-row img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  background: transparent;
}
.pay-more-row span { flex: 1; font-size: 15px; color: #222; }
.pay-more-row em {
  font-style: normal;
  font-size: 12px;
  color: #aaa;
}
.pay-more-radio {
  width: 20px;
  height: 20px;
  border: 1.5px solid #ccc;
  border-radius: 50%;
  box-sizing: border-box;
  flex-shrink: 0;
}
.pay-more-row.is-on .pay-more-radio {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px #fff;
}
.pay-more-foot {
  flex-shrink: 0;
  padding: 10px 0 calc(8px + var(--safe-bottom));
  border-top: 1px solid #eee;
  background: #fff;
}

/* 微信/支付宝演示收银台（输密码）——与 buy-sheet 同系底部弹层，避免 dialog 高度塌陷只剩灰幕 */
.wx-pay-sheet {
  position: fixed;
  inset: auto auto 0 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
  z-index: 340;
}
.wx-pay-sheet::backdrop { background: rgba(12, 14, 18, 0.55); }
.wx-pay-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 14px 16px calc(10px + var(--safe-bottom));
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.16);
  box-sizing: border-box;
  max-height: 92vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.wx-pay-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #666;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.wx-pay-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 6px 40px 10px;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}
.wx-pay-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.wx-pay-amount {
  text-align: center;
  font-size: 34px;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.02em;
}
.wx-pay-merchant {
  margin: 6px 0 18px;
  text-align: center;
  font-size: 13px;
  color: #888;
}
.wx-pay-hint {
  margin: 0 0 12px;
  text-align: center;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}
.wx-pay-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.wx-pay-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid #bbb;
  background: transparent;
  box-sizing: border-box;
}
.wx-pay-dots i.is-on {
  background: #222;
  border-color: #222;
}
.wx-pay-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
.wx-pay-pad button {
  border: none;
  background: #f7f7f7;
  padding: 16px 0;
  font: inherit;
  font-size: 22px;
  font-weight: 500;
  color: #222;
  cursor: pointer;
}
.wx-pay-pad button:active:not(:disabled) {
  background: #ebebeb;
}
.wx-pay-pad button:disabled {
  background: #f0f0f0;
  cursor: default;
}
.wx-pay-demo {
  margin: 0;
  text-align: center;
  font-size: 11px;
  color: #aaa;
}

.od-pay-countdown {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #1f2a2e;
  color: #7ee0c8;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

/* 待付款订单底栏 */
.od-unpaid-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, 480px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px calc(8px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #eee;
  z-index: 36;
  box-sizing: border-box;
}
.od-unpaid-bar[hidden] { display: none !important; }
/* 仅订单详情展示待付款底栏，防止残留到客服/订单列表等页 */
body:not(:has(#viewOrderDetail.is-active)) .od-unpaid-bar {
  display: none !important;
}
#viewOrderDetail.is-unpaid .order-detail-scroll {
  padding-bottom: calc(72px + var(--safe-bottom));
}
.chip.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ── 收货地址簿（图一列表 / 图二弹层 / 图三管理） ── */
.view-addresses {
  padding-top: 4px;
  padding-bottom: calc(24px + var(--safe-bottom));
}
.view-addresses.is-managing {
  padding-bottom: calc(72px + var(--safe-bottom));
}
.topbar-addr-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.topbar-addr-actions[hidden] { display: none !important; }
.topbar-addr-text {
  border: none;
  background: transparent;
  padding: 0 2px;
  font: inherit;
  font-size: 14px;
  color: #222;
  cursor: pointer;
  white-space: nowrap;
}
.topbar-addr-text--accent { color: #ff6a2a; font-weight: 600; }
.topbar-addr-text[hidden] { display: none !important; }
.view-addr-search { padding-top: 4px; }
.addr-search-page-bar { margin-bottom: 12px; }
.addr-search-page-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  border-radius: 20px;
  background: #f3f3f3;
  color: #888;
}
.addr-search-page-field svg { width: 18px; height: 18px; flex-shrink: 0; }
.addr-search-page-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: #222;
  outline: none;
}
.addr-book-list {
  display: flex;
  flex-direction: column;
}
.addr-book-item {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
  background: transparent;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.addr-book-item:last-child { border-bottom: none; }
.addr-book-check {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  margin-top: 18px;
}
.addr-book-check input {
  width: 18px;
  height: 18px;
  accent-color: #ff6a2a;
}
.addr-book-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.addr-book-region {
  font-size: 12px;
  color: #9a9a9a;
  line-height: 1.4;
}
.addr-book-detail {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.35;
  word-break: break-word;
}
.addr-book-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 14px;
  color: #222;
}
.addr-book-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.addr-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
}
.addr-tag--default {
  background: #ff6a2a;
  color: #fff;
}
.addr-tag--label {
  background: #fff1e8;
  color: #ff6a2a;
}
.addr-book-edit {
  flex-shrink: 0;
  align-self: center;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: #b0b0b0;
  cursor: pointer;
}
.addr-book-edit svg { width: 20px; height: 20px; display: block; }
.addr-list-end {
  margin: 18px 0 8px;
  text-align: center;
  font-size: 12px;
  color: #bbb;
}
.addr-list-end[hidden] { display: none !important; }
.addr-manage-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, 480px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #eee;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.05);
  z-index: 35;
  box-sizing: border-box;
}
.addr-manage-bar[hidden] { display: none !important; }
.addr-manage-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  font-size: 14px;
  color: #333;
}
.addr-manage-all input {
  width: 18px;
  height: 18px;
  accent-color: #ff6a2a;
}

/* 地址弹层 */
.addr-sheet {
  position: absolute;
  inset: 0;
  z-index: 420;
  display: none;
  pointer-events: none;
}
.addr-sheet.is-open {
  display: block;
  pointer-events: auto;
}
.addr-sheet[hidden] { display: none !important; }
.addr-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.addr-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: max(48px, 8vh);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.addr-sheet-head {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 8px 48px;
  border-bottom: 1px solid #f2f2f2;
}
.addr-sheet-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
}
.addr-sheet-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #333;
  cursor: pointer;
}
.addr-sheet-close svg { width: 20px; height: 20px; }
.addr-sheet-form {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px calc(20px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}
.addr-smart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.addr-smart-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  border-radius: 20px;
  background: #f3f3f3;
  color: #888;
}
.addr-smart-search svg { width: 18px; height: 18px; flex-shrink: 0; }
.addr-smart-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: #222;
  outline: none;
}
.addr-smart-paste {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: #666;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.addr-smart-paste svg { width: 22px; height: 22px; }
.addr-field,
.addr-field-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 50px;
  border-bottom: 1px solid #f0f0f0;
}
.addr-field-row--region {
  gap: 10px;
}
.addr-field-row--region .addr-field {
  flex: 1;
  min-width: 0;
  border-bottom: none;
}
.addr-field {
  position: relative;
  width: 100%;
}
.addr-req {
  color: #ff4d4f;
  font-size: 14px;
  flex-shrink: 0;
}
.addr-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 14px 4px;
  font: inherit;
  font-size: 15px;
  color: #222;
  outline: none;
}
.addr-field-chevron {
  color: #bbb;
  font-size: 12px;
  margin-right: 2px;
}
.addr-default-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  user-select: none;
}
.addr-default-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.addr-radio {
  width: 18px;
  height: 18px;
  border: 1.5px solid #ccc;
  border-radius: 50%;
  box-sizing: border-box;
  position: relative;
}
.addr-default-toggle input:checked + .addr-radio {
  border-color: #ff6a2a;
  background: #ff6a2a;
  box-shadow: inset 0 0 0 3px #fff;
}
.addr-field--phone .addr-cc {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: #222;
  padding: 0 6px 0 0;
  cursor: default;
  flex-shrink: 0;
}
.addr-tag-block {
  margin-top: 18px;
}
.addr-tag-block h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}
.addr-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.addr-tag-chip {
  padding: 7px 14px;
  border: none;
  border-radius: 8px;
  background: #f3f3f3;
  color: #444;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.addr-tag-chip.is-on {
  background: #fff1e8;
  color: #ff6a2a;
  font-weight: 600;
}
.addr-tag-custom {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}
.addr-tag-custom[hidden] { display: none !important; }
.addr-save-btn {
  display: block;
  width: 100%;
  margin-top: 28px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: #ff6a2a;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.addr-save-btn:active { filter: brightness(0.96); }

/* 订单通知会话 */
.view-msg-order-thread {
  padding: 0 0 24px;
  background: #f5f5f5;
  min-height: 50vh;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}
.msg-order-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0 24px;
}
.msg-order-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.msg-order-card:active { background: #fafafa; }
.msg-order-card strong {
  font-size: 15px;
  font-weight: 650;
  color: #1a1a1a;
}
.msg-order-card em {
  font-style: normal;
  font-size: 13px;
  color: #888;
  line-height: 1.45;
}
.msg-order-card small {
  font-size: 11px;
  color: #bbb;
}
.msg-order-time {
  align-self: center;
  padding: 2px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 11px;
  color: #999;
}
