@import url("/common/tokens.css?v=20261022c");
/* ============================================================
 * 昌农牧业官网（客户端）· 移动端优先样式
 * 设计语言：浅绿/薄荷绿主色 + 极浅青绿底 + 活力点缀（四端统一）
 * 视觉基调：科技动漫插画感（发光渐变、饱满圆角、微网格），四端中最活泼
 * 移动端规范：375px 基准、返回箭头 + 面包屑、无下拉框、无底部返回按钮
 * 语义 token 统一收敛于 /common/tokens.css（见文件头 @import），此处仅留端特有变量
 * ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  background-color: var(--cream);
  background-image: var(--grid-img); background-size: var(--grid-size);
  color: var(--text-900); font-size: 14px; line-height: 1.6;
}
.hidden { display: none !important; }

/* 隐藏滚动条（保留滚动能力） */
::-webkit-scrollbar { width: 0; height: 0; }
* { scrollbar-width: none; -ms-overflow-style: none; }

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; font-size: 14px; outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--brand-500); outline-offset: 2px;
}

/* 移动端优先：桌面居中限宽 */
.app-shell {
  max-width: 480px; margin: 0 auto; min-height: 100vh;
  background: transparent; position: relative;
}
.view { min-height: 100vh; padding-bottom: 78px; }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 14px; font-size: 14px;
  background: var(--line-soft); color: var(--text-700);
  transition: opacity .15s, transform .12s, background .15s, box-shadow .15s;
}
.btn:active { opacity: .85; transform: scale(.98); }
.btn-primary {
  background: var(--grad-btn); color: var(--brand-900); font-weight: 700;
  box-shadow: 0 8px 20px rgba(52,211,153,.42);
}
.btn-plain { background: var(--paper); border: 1px solid var(--line); color: var(--brand-700); }
.btn-block { width: 100%; padding: 13px; font-size: 16px; border-radius: 16px; min-height: 48px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ================= 登录页（独立样式，与员工端区分） =================
 * 移动端规范：375px 设计基准、返回箭头 + 面包屑、无下拉框 */
.login-view {
  background: linear-gradient(170deg, var(--brand-300) 0%, var(--brand-400) 24%, var(--pop-cyan) 42%, var(--cream) 42.1%);
  display: flex; flex-direction: column; align-items: center;
  padding-bottom: 0;
}
/* 登录页顶栏：返回箭头 + 面包屑 */
.login-topbar {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: rgba(255,255,255,.94); box-shadow: var(--shadow-sm);
}
/* 面包屑目录：官网 / 客户登录 */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 3px;
  font-size: 11px; color: var(--text-400); line-height: 1.7;
}
.breadcrumb .crumb { color: var(--brand-700); }
.breadcrumb .crumb-current { color: var(--text-500); font-weight: 600; }
.breadcrumb .crumb-sep { color: var(--text-400); opacity: .6; }

.login-hero { padding: 48px 24px 30px; text-align: center; color: var(--brand-900); }
.login-logo {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 22px;
  background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700;
  color: var(--brand-800);
  box-shadow: 0 12px 28px rgba(15,118,110,.24);
}
.login-hero h1 {
  font-size: 24px; letter-spacing: 2px; font-weight: 800;
}
.login-hero p { margin-top: 10px; color: rgba(11,59,52,.82); letter-spacing: 3px; font-size: 14px; }
.login-card {
  width: calc(100% - 40px); max-width: 375px; background: var(--paper); border-radius: var(--r-lg);
  padding: 26px 22px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(52,211,153,.28);
}
.login-card h2 {
  font-size: 20px; margin-bottom: 20px; font-weight: 800;
  background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-sub { margin: -12px 0 20px; color: var(--text-400); font-size: 12px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; margin-bottom: 8px; color: var(--text-700); font-size: 14px; }
.field input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: #f4fcf9; color: var(--text-900);
}
.field input::placeholder { color: var(--text-400); }
.field input:focus {
  border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3px rgba(52,211,153,.22);
}
.login-demo { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 14px; }
.demo-title { font-size: 12px; color: var(--text-400); margin-bottom: 10px; }
.demo-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 14px; background: #f4fcf9;
}
.demo-item:active {
  border-color: var(--brand-400); background: var(--brand-50);
  box-shadow: 0 5px 16px rgba(52,211,153,.2);
}
.demo-item b { color: var(--brand-800); min-width: 62px; }
.demo-item span { color: var(--text-400); font-size: 12px; }
.demo-item i { margin-left: auto; font-style: normal; color: var(--brand-600); font-size: 12px; }

/* ================= 品牌区 ================= */
.brand-bar {
  background:
    radial-gradient(260px 150px at 90% 0%, rgba(255,255,255,.5), transparent 64%),
    linear-gradient(135deg, var(--brand-300), var(--brand-400) 55%, var(--pop-cyan));
  color: var(--brand-900); display: flex; align-items: center; gap: 12px;
  padding: 26px 20px 30px;
}
.brand-logo {
  width: 46px; height: 46px; border-radius: 16px; background: rgba(255,255,255,.55);
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 8px 20px rgba(15,118,110,.22);
  color: var(--brand-800);
}
.brand-text h2 {
  font-size: 20px; letter-spacing: 1px; font-weight: 800;
}
.brand-text p { margin-top: 5px; font-size: 12px; color: rgba(11,59,52,.82); }

/* ================= 卡片 ================= */
.card {
  background: var(--paper); border-radius: var(--r-lg); margin: -14px 14px 14px;
  padding: 16px; box-shadow: var(--shadow-sm); position: relative;
  border: 1px solid rgba(52,211,153,.18);
}

/* ================= 功能宫格 ================= */
.block-grid {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 10px;
}
.block-item {
  width: 25%; display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 12px 4px; border-radius: 14px;
  transition: background .15s, transform .15s;
}
.block-item:active { background: var(--brand-50); transform: scale(.95); }
.block-ico {
  width: 46px; height: 46px; border-radius: 16px;
  background: var(--grad-soft);
  border: 1px solid rgba(52,211,153,.32);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  box-shadow: 0 6px 16px rgba(52,211,153,.22);
}
.block-title { font-size: 12px; color: var(--text-700); }
.block-tag {
  font-size: 11px; color: #7c2d12; font-weight: 700;
  background: linear-gradient(135deg, var(--pop-yellow), var(--pop-orange));
  padding: 1px 7px; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(249,115,22,.3);
}
.block-placeholder .block-ico { background: var(--line-soft); filter: grayscale(1); opacity: .75; box-shadow: none; }
.block-placeholder .block-title { color: var(--text-400); }

/* ================= 商品列表 ================= */
.goods-section { padding: 0 14px; }
.search-bar { display: flex; gap: 10px; margin-bottom: 12px; }
.search-bar input {
  flex: 1; padding: 11px 15px; border: 1px solid rgba(52,211,153,.22); border-radius: 15px; background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.search-bar input::placeholder { color: var(--text-400); }
.search-bar input:focus {
  border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3px rgba(52,211,153,.2);
}
.search-bar .btn { padding: 11px 22px; border-radius: 15px; }
.cat-bar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; }
.cat-item {
  flex: none; padding: 7px 15px; border-radius: 999px; background: var(--paper);
  color: var(--text-500); font-size: 14px; border: 1px solid var(--line-soft);
}
.cat-item:active { transform: scale(.97); }
.cat-item.active {
  background: var(--grad-btn); color: var(--brand-900); border-color: transparent;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(52,211,153,.45);
}
.goods-list { display: flex; flex-direction: column; gap: 12px; }
.goods-card {
  display: flex; gap: 13px; background: var(--paper); border-radius: var(--r-lg); padding: 13px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(52,211,153,.16);
}
.goods-thumb {
  width: 78px; height: 78px; flex: none; border-radius: 17px;
  background: var(--grad-soft);
  color: var(--brand-700); font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(52,211,153,.3);
  overflow: hidden;
}
.goods-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ================= 认种认养图片（列表卡缩略图 / 详情主图） ================= */
.fm-card-img {
  margin: -14px -16px 12px; height: 150px;
  border-radius: var(--r-md) var(--r-md) 0 0; overflow: hidden;
}
.fm-card-img img, .fm-hero-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.fm-hero-img {
  margin: -16px -16px 12px; height: 200px;
  border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden;
}
.goods-body { flex: 1; display: flex; flex-direction: column; }
.goods-name { font-size: 16px; font-weight: 600; color: var(--text-900); }
.goods-spec { margin-top: 5px; font-size: 12px; color: var(--text-400); flex: 1; }
.goods-meta { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; gap: 8px; }
.goods-price {
  color: var(--price); font-size: 20px; font-weight: 800;
  text-shadow: 0 2px 12px rgba(232,86,15,.28);
}
.goods-price em { font-style: normal; font-size: 12px; color: var(--text-400); font-weight: 400; }
.goods-sku { font-size: 11px; color: var(--text-400); }
.goods-add {
  flex: none; padding: 7px 14px; border-radius: 999px;
  background: var(--grad-brand); color: var(--brand-900); font-size: 12px; font-weight: 700;
  box-shadow: 0 5px 14px rgba(52,211,153,.4);
}
.goods-add:active { transform: scale(.95); filter: brightness(.96); }

/* ================= 个人中心 ================= */
.mine-hero {
  margin-top: 0; padding: 24px 18px; display: flex; align-items: center; gap: 14px;
  background:
    radial-gradient(280px 160px at 92% 0%, rgba(255,255,255,.5), transparent 64%),
    linear-gradient(135deg, var(--brand-300), var(--brand-400) 55%, var(--pop-cyan));
  color: var(--brand-900); border-radius: 0 0 24px 24px;
}
.mine-avatar {
  width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.55);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700;
  border: 2px solid rgba(255,255,255,.85);
  color: var(--brand-800);
}
.mine-info { flex: 1; }
.mine-info h2 { font-size: 20px; font-weight: 800; }
.mine-info p { margin-top: 5px; font-size: 12px; color: rgba(11,59,52,.82); }
.mine-balance { text-align: right; }
.mine-balance span { display: block; font-size: 11px; color: rgba(11,59,52,.75); }
.mine-balance b {
  font-size: 20px;
  text-shadow: 0 2px 12px rgba(255,255,255,.55);
}
#mine-view .mine-hero { margin: 0 0 14px; }
#mine-view .card { margin: 0 14px 14px; }

.mine-menu { padding: 4px 16px; }
.mine-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 2px; font-size: 16px; color: var(--text-700); border-bottom: 1px solid var(--line-soft);
}
.mine-item:last-child { border-bottom: none; }
.mine-item:active { background: #f4fcf9; }
.mine-item i { font-style: normal; color: var(--text-400); font-size: 18px; }
.mine-logout { color: var(--price); justify-content: center; font-weight: 600; }

.plug-tip h3 { font-size: 16px; color: var(--text-900); margin-bottom: 8px; }
.plug-tip p { color: var(--text-400); font-size: 14px; line-height: 1.8; }
.plug-placeholder { display: flex; gap: 10px; margin-top: 12px; }
.plug-ph-item {
  flex: 1; border: 1px dashed rgba(52,211,153,.45); border-radius: 15px; padding: 18px 8px;
  text-align: center; color: var(--text-400); font-size: 12px;
  background: radial-gradient(140px 90px at 50% 0%, rgba(52,211,153,.14), transparent 72%), #f4fcf9;
}

/* ================= 底部标签栏 ================= */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 480px; background: rgba(255,255,255,.96); display: flex;
  border-top: 1px solid var(--line-soft); padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-400); font-size: 11px; padding: 3px 0;
}
.tab-item:active { transform: scale(.96); }
.tab-item.active {
  color: var(--brand-700); font-weight: 600;
  text-shadow: 0 2px 12px rgba(52,211,153,.5);
}
.tab-ico { font-size: 21px; line-height: 1; }

/* ================= 弹窗 ================= */
.modal-mask {
  position: fixed; inset: 0; background: rgba(11,59,52,.44); z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  width: 100%; max-width: 480px; background: var(--paper); border-radius: 22px 22px 0 0;
  max-height: 82vh; display: flex; flex-direction: column; overflow: hidden;
  animation: sheet-in .22s ease;
  border-top: 1px solid rgba(52,211,153,.3);
}
@keyframes sheet-in { from { transform: translateY(30px); opacity: .5; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h3 {
  font-size: 16px; font-weight: 700;
  background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.modal-close { font-size: 23px; color: var(--text-400); cursor: pointer; line-height: 1; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); }
.modal-foot .btn { flex: 1; padding: 12px; border-radius: 15px; font-size: 16px; min-height: 46px; }
.form .field:last-child { margin-bottom: 0; }

/* 支付方式列表 */
.pay-list { display: flex; flex-direction: column; gap: 10px; }
.pay-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: #f4fcf9; border: 1px solid var(--line-soft); border-radius: 15px;
}
.pay-item span { color: var(--text-400); font-size: 12px; }
.plug-ph-detail { text-align: center; padding: 10px 0 6px; }
.plug-ph-big {
  border: 1px dashed rgba(52,211,153,.45); border-radius: 17px; padding: 34px 10px;
  color: var(--text-400); font-size: 14px; margin-bottom: 14px;
  background: radial-gradient(200px 120px at 50% 0%, rgba(52,211,153,.16), transparent 72%), #f4fcf9;
}
.plug-ph-detail p { color: var(--text-400); font-size: 14px; line-height: 1.8; }

/* ================= 提示条 / 空状态 ================= */
.toast-box {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  padding: 10px 20px; border-radius: 13px; color: #fff; font-size: 14px;
  box-shadow: 0 10px 26px rgba(11,59,52,.22); animation: toast-in .2s ease;
}
.toast-success { background: linear-gradient(135deg, var(--brand-700), var(--brand-800)); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--brand-900); }
.toast-out { opacity: 0; transition: opacity .35s; }
@keyframes toast-in { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.loading, .empty {
  padding: 34px 0; text-align: center; color: var(--text-400); font-size: 14px;
  border: 1px dashed rgba(52,211,153,.45); border-radius: var(--r-lg);
  background: radial-gradient(220px 140px at 50% 0%, rgba(52,211,153,.16), transparent 72%);
}
.loading::before {
  content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px;
  vertical-align: -3px; border-radius: 50%; border: 2px solid var(--brand-100);
  border-top-color: var(--brand-500); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= 子页面顶栏（返回箭头，无底部返回按钮） ================= */
.sub-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: rgba(255,255,255,.94); box-shadow: var(--shadow-sm);
}
.sub-back {
  width: 34px; height: 34px; border-radius: 12px; background: var(--line-soft);
  color: var(--text-700); font-size: 22px; line-height: 1;
}
.sub-back:active { background: var(--line); }
.sub-topbar h2 {
  font-size: 16px; font-weight: 700;
  background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub-view { padding-bottom: 20px; }

/* ================= 购物车悬浮入口 ================= */
.cart-fab {
  position: fixed; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom));
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--grad-brand); color: var(--brand-900); font-size: 22px; z-index: 60;
  box-shadow: 0 12px 28px rgba(52,211,153,.5);
}
.cart-fab::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(52,211,153,.55); animation: fab-pulse 2.4s ease-out infinite;
}
@keyframes fab-pulse {
  0% { transform: scale(.92); opacity: .8; }
  70% { transform: scale(1.38); opacity: 0; }
  100% { transform: scale(1.38); opacity: 0; }
}
.cart-fab:active { transform: scale(.94); }
.cart-badge {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px;
  padding: 0 5px; border-radius: 999px; background: var(--pop-violet); color: #fff;
  font-size: 11px; line-height: 19px; text-align: center;
  box-shadow: 0 4px 12px rgba(124,58,237,.45);
}

/* ================= 商品详情 ================= */
.detail-card { margin: 12px 14px; padding: 16px; }
.detail-thumb {
  width: 100%; height: 170px; border-radius: 17px;
  background:
    radial-gradient(220px 130px at 82% 10%, rgba(255,255,255,.5), transparent 62%),
    linear-gradient(135deg, var(--brand-300), var(--brand-400) 55%, var(--pop-cyan));
  color: var(--brand-900); font-size: 52px; display: flex; align-items: center; justify-content: center;
}
.detail-info { margin-top: 14px; }
.detail-price {
  color: var(--price); font-size: 24px; font-weight: 800;
  text-shadow: 0 2px 14px rgba(232,86,15,.3);
}
.detail-price em { font-style: normal; font-size: 12px; color: var(--text-400); font-weight: 400; }
.detail-name { margin-top: 8px; font-size: 16px; font-weight: 600; color: var(--text-900); }
.detail-spec { margin-top: 6px; color: var(--text-500); font-size: 14px; line-height: 1.7; }
.desc-list { margin-top: 12px; border-top: 1px solid var(--line-soft); }
.desc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--text-700);
}
.desc-row:last-child { border-bottom: none; }
.desc-row .desc-label { color: var(--text-400); flex: none; }
.ck-amount { font-weight: 600; color: var(--price); }
.qty-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; font-size: 14px; color: var(--text-700);
}
.detail-actions {
  display: flex; gap: 12px; padding: 4px 14px calc(18px + env(safe-area-inset-bottom));
}
.detail-actions .btn { flex: 1; padding: 13px; border-radius: 15px; font-size: 16px; min-height: 48px; }

/* 数量步进器 */
.stepper { display: flex; align-items: center; gap: 0; }
.stepper button {
  width: 32px; height: 32px; border-radius: 11px; background: var(--line-soft); color: var(--text-700); font-size: 17px;
}
.stepper button:active { background: var(--line); }
.stepper .step-input {
  width: 52px; height: 32px; text-align: center; border: none; background: none;
  font-size: 16px; color: var(--text-900);
}

/* ================= 购物车 ================= */
.cart-list { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.cart-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border-radius: var(--r-md); padding: 13px 14px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(52,211,153,.16);
}
.cart-info { flex: 1; min-width: 0; }
.cart-name {
  font-size: 14px; font-weight: 600; color: var(--text-900);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cart-price { margin-top: 4px; font-size: 12px; color: var(--price); font-weight: 600; }
.cart-del {
  width: 28px; height: 28px; border-radius: 50%; background: var(--danger-soft);
  color: var(--danger); font-size: 12px;
}
.cart-settle {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97); box-shadow: 0 -4px 18px rgba(13,148,136,.12);
  max-width: 480px; margin: 0 auto;
}
.cart-total { flex: 1; font-size: 14px; color: var(--text-500); }
.cart-total b {
  font-size: 20px; color: var(--price); margin-left: 4px;
  text-shadow: 0 2px 12px rgba(232,86,15,.28);
}
.cart-settle .btn { padding: 12px 30px; border-radius: 15px; font-size: 16px; min-height: 46px; }

/* ================= 药丸点选（替代下拉框） ================= */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 8px 16px; border-radius: 999px; background: var(--line-soft);
  color: var(--text-700); font-size: 14px; border: 1px solid transparent;
}
.pill:active { transform: scale(.97); }
.pill.on {
  background: var(--grad-btn); color: var(--brand-900);
  border-color: transparent; font-weight: 700;
  box-shadow: 0 5px 16px rgba(52,211,153,.38);
}
.pay-tip { margin-top: 10px; color: var(--text-400); font-size: 12px; line-height: 1.7; }
.pay-bank {
  margin-top: 10px; padding: 10px 12px; background: #f4fcf9;
  border: 1px dashed #bfe6d8; border-radius: 13px; color: var(--text-500); font-size: 12px; line-height: 1.7;
}

/* ================= 起止日期并排一行 ================= */
.date-range {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 0;
}
.card-date-range { background: transparent; box-shadow: none; border: none; }
.date-range .date-input {
  flex: 1; min-width: 0; height: 38px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
  color: var(--text-700); font-size: 14px;
}
.date-range .date-input:focus { border-color: var(--brand-500); }
.date-range .date-sep { flex: none; color: var(--text-400); font-size: 12px; }
.date-range .date-go {
  flex: none; height: 38px; padding: 0 14px; border-radius: 12px;
  background: var(--grad-btn); color: var(--brand-900); font-size: 14px; font-weight: 600;
}
.date-range .date-go:active { filter: brightness(.95); }
.order-status-row { padding: 12px 14px 0; }

/* ================= 我的订单 ================= */
.order-list { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.order-card {
  background: var(--paper); border-radius: var(--r-md); padding: 14px 16px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(52,211,153,.16);
}
.order-head { display: flex; align-items: center; justify-content: space-between; }
.order-no { font-size: 14px; font-weight: 600; color: var(--text-900); }
.order-st { font-size: 11px; padding: 3px 10px; border-radius: 999px; }
.st-orange { background: var(--warm-soft); color: var(--warm); }
.st-blue { background: #e0f2fe; color: #0369a1; }
.st-green { background: var(--brand-100); color: var(--brand-700); }
.st-gray { background: var(--line-soft); color: var(--text-400); }
.order-items { margin: 10px 0; border-top: 1px solid var(--line-soft); }
.order-item {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--text-700);
}
.order-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-400); }
.order-total b { color: var(--price); font-size: 16px; }

/* ================= 个人中心资产格 ================= */
.mine-assets { display: flex; margin: 0 14px 14px; padding: 14px 0; }
.asset-item { flex: 1; text-align: center; border-right: 1px solid var(--line-soft); }
.asset-item:last-child { border-right: none; }
.asset-item b {
  display: block; font-size: 20px;
  background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.asset-item span { display: block; margin-top: 5px; font-size: 11px; color: var(--text-400); }

/* ================= 统一门户组件（/common/portal.css）容器留白 ================= */
#home-root, #news-root, #feed-root, #contact-root, #mine-cards { padding: 12px 14px 4px; }

/* 我的 · 用户卡右侧（登录 / 余额 + 退出登录） */
.mine-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mine-side .btn { padding: 6px 16px; border-radius: 999px; font-size: 12px; }
.mine-logout-btn {
  padding: 5px 14px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.9); color: var(--brand-800);
}

/* 数字输入框去掉上下箭头（移动端） */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* ================= 商品详情 · 素材分层展示（实拍监控 / 精修素材） ================= */
/* 分层区块：详情卡内分区卡片（默认层浅绿白底，增值层青绿渐变区分） */
.ms-block { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.gl-layer {
  margin-top: 16px; padding: 14px; border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--paper) 0%, var(--brand-50) 100%);
  border: 1px solid var(--line); border-top: 1px solid var(--line);
}
.gl-studio { background: var(--grad-soft); border-color: rgba(34,211,238,.32); }
.ms-group-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--brand-800);
}
.ms-group-title::before {
  content: ""; width: 5px; height: 15px; border-radius: 4px;
  background: var(--grad-brand); box-shadow: 0 2px 8px rgba(52,211,129,.4);
}
.ms-tip { margin-top: 6px; font-size: 12px; color: var(--text-400); line-height: 1.7; }

/* 图片墙（图片 2 列 + 视频 2 列，375px 流式不横向溢出） */
.ms-gallery, .ms-vgrid, .ms-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px;
}
.ms-gal-item, .ms-video-card, .ms-spot {
  min-width: 0; background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.ms-cover {
  position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--line-soft);
}
.ms-cover img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
/* 封面缺图占位（图未生成/加载失败时露出）：浅色渐变 + 摄像头图形 */
.ms-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 0 10px; text-align: center;
  background: linear-gradient(180deg, var(--brand-50), var(--line-soft)); color: var(--text-400); font-size: 11px;
}
.ms-ph svg { opacity: .55; }
.ms-video-card video {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--brand-900);
}

/* ---------- 智能计步（step 插件：认养单计步卡 / 圈舍运动数据区 / 首页步数排行榜） ---------- */
.stp-card { margin-top: 12px; }
.stp-sum { display: flex; gap: 8px; }
.stp-sum-item {
  flex: 1; min-width: 0; padding: 10px 6px; border-radius: var(--r-md); text-align: center;
  background: var(--grad-soft); border: 1px solid rgba(52, 211, 153, .22);
}
.stp-sum-item em { display: block; font-style: normal; font-size: 11px; color: var(--text-500); }
.stp-sum-item b {
  display: block; margin-top: 2px; font-size: 20px; line-height: 1.25;
  background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stp-sum-item small { font-size: 11px; color: var(--text-400); }
.stp-block-title {
  display: flex; align-items: center; gap: 6px;
  margin: 14px 0 8px; font-size: 14px; font-weight: 700; color: var(--brand-800);
}
.stp-block-title::before {
  content: ""; width: 4px; height: 12px; border-radius: 3px;
  background: var(--grad-brand); box-shadow: 0 2px 8px rgba(52, 211, 153, .35);
}
.stp-bars {
  display: flex; align-items: flex-end; gap: 6px; padding: 10px 8px 6px;
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--paper) 100%);
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
}
.stp-bar-col {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.stp-bar-num { font-size: 9px; color: var(--text-400); }
.stp-bar-track { width: 100%; height: 62px; display: flex; align-items: flex-end; justify-content: center; }
.stp-bar-track i {
  display: block; width: 58%; min-height: 4px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--brand-300) 0%, var(--brand-500) 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, .28);
}
.stp-bar-track i:not(.on) { background: var(--line); box-shadow: none; }
.stp-bar-day { font-size: 9px; color: var(--text-400); }
.stp-bars-sm { padding: 6px; gap: 4px; margin-top: 8px; }
.stp-bars-sm .stp-bar-track { height: 32px; }
.stp-bars-sm .stp-bar-num { display: none; }
.stp-devs { display: flex; flex-direction: column; gap: 10px; }
.stp-dev {
  padding: 10px 12px; border-radius: var(--r-md); background: var(--paper);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.stp-dev-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 14px; color: var(--text-900);
}
.stp-dev-sub { margin-top: 3px; font-size: 11px; color: var(--text-400); }
.stp-dev-nums { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--text-700); }
.stp-dev-nums b { color: var(--brand-700); font-size: 14px; }
.stp-empty {
  padding: 18px 12px; border-radius: var(--r-md); text-align: center;
  font-size: 12px; line-height: 1.8; color: var(--text-500);
  background: var(--brand-50); border: 1px dashed rgba(13, 148, 136, .35);
}
/* 首页「认种认养」区块后的今日步数排行榜（Top5） */
.stp-rank { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.stp-rank-row {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--line-soft);
  font-size: 14px; color: var(--text-700);
}
.stp-rank-row.top { background: var(--grad-soft); border-color: rgba(34, 211, 238, .3); }
.stp-rank-no {
  flex: 0 0 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 8px;
  font-size: 11px; font-weight: 700; color: var(--brand-900); background: var(--brand-400);
}
.stp-rank-row.top .stp-rank-no { background: var(--grad-brand); box-shadow: var(--glow); }
.stp-rank-name {
  flex: 0 0 auto; max-width: 36%; font-weight: 600; color: var(--text-900);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stp-rank-place {
  flex: 1; min-width: 0; font-size: 11px; color: var(--text-400);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stp-rank-steps { flex: 0 0 auto; color: var(--brand-700); }
.stp-rank-steps b { font-size: 16px; }
.stp-rank-steps small { font-size: 11px; color: var(--text-400); }
.ms-video-ph { background: var(--grad-ink); }
.ms-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; line-height: 38px; text-align: center; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--brand-700); font-size: 14px;
  box-shadow: 0 6px 16px rgba(11,59,52,.28);
}
.ms-ph-text {
  position: absolute; left: 0; right: 0; bottom: 8px; text-align: center;
  color: #fff; font-size: 11px; opacity: .92;
}
/* 未授权角标（左上小胶囊，替代整块蒙层文案，避免与正文状态行重复） */
.ms-lock {
  position: absolute; top: 8px; left: 8px; z-index: 2; padding: 2px 9px; border-radius: 999px;
  background: rgba(11, 59, 52, .62); color: #fff; font-size: 11px; line-height: 1.6;
}
.ms-locked .ms-cover img { filter: grayscale(.35) blur(1px); }
.ms-body { padding: 9px 10px 11px; min-width: 0; }
.ms-name {
  font-size: 12px; font-weight: 600; color: var(--text-900);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ms-sub {
  margin-top: 3px; font-size: 11px; color: var(--text-400);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ms-st { margin-top: 5px; font-size: 11px; color: var(--warm); line-height: 1.5; }
.ms-st.ok { color: var(--brand-800); }
/* 可观看卡的操作行：按钮胶囊样式（未授权卡不渲染此行） */
.ms-act {
  margin-top: 8px; padding: 6px 0; border-radius: 999px; text-align: center;
  font-size: 12px; font-weight: 600; color: var(--brand-800);
  background: var(--grad-soft); border: 1px solid rgba(52, 211, 153, .28);
}
.ms-gal-big { width: 100%; max-height: 60vh; object-fit: contain; display: block; border-radius: 12px; }
.gl-vid { cursor: pointer; }

/* 分层流内小件（下单明细标题 / 空态图标） */
.card-title { font-size: 16px; font-weight: 700; color: var(--text-900); margin-bottom: 10px; }
.empty-icon { font-size: 32px; line-height: 1; margin-bottom: 6px; }
