/* ========== 粉嘟嘟主题屋 · 粉色二次元风格 ========== */
:root {
  --pink: #ff6fa5;
  --pink-deep: #ff4d8d;
  --pink-dark: #e91e63;
  --pink-light: #ffd6e7;
  --pink-bg: #fff5f9;
  --purple: #c084fc;
  --text: #5b3a4a;
  --text-light: #a97e90;
  --card: #ffffff;
  --shadow: 0 4px 16px rgba(255, 111, 165, 0.15);
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--pink-bg);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 182, 213, .25) 0, transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(192, 132, 252, .15) 0, transparent 30%);
  color: var(--text);
  min-height: 100vh;
}

#sakura { position: fixed; inset: 0; pointer-events: none; z-index: 999; }

.app { max-width: 520px; margin: 0 auto; padding-bottom: 76px; position: relative; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(255, 214, 231, .95), rgba(255, 245, 249, .95));
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--pink-light);
}
.brand { display: flex; align-items: center; gap: 6px; text-decoration: none; flex-shrink: 0; }
.brand-logo { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: var(--shadow); object-fit: cover; }
.brand-name {
  font-weight: 800; font-size: 16px;
  background: linear-gradient(90deg, var(--pink-deep), var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}
.search-box { flex: 1; display: flex; background: #fff; border-radius: 999px; border: 2px solid var(--pink-light); overflow: hidden; }
.search-box input { flex: 1; border: none; outline: none; padding: 7px 12px; font-size: 13px; background: transparent; color: var(--text); min-width: 0; }
.search-btn { border: none; background: none; padding: 0 10px; cursor: pointer; font-size: 14px; }
.bell { border: none; background: #fff; border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 15px; box-shadow: var(--shadow); flex-shrink: 0; }

.content { padding: 12px; }

/* ---------- 轮播 ---------- */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.carousel-track { display: flex; transition: transform .5s ease; }
.slide { flex: 0 0 100%; position: relative; }
.slide img { width: 100%; aspect-ratio: 16/8; object-fit: cover; display: block; }
.slide-text {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(4px);
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--pink-deep);
}
.carousel-dots { position: absolute; bottom: 10px; right: 12px; display: flex; gap: 5px; }
.carousel-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.7); transition: .3s; }
.carousel-dots i.on { background: var(--pink-deep); width: 16px; border-radius: 4px; }

/* ---------- 区块 ---------- */
.section { margin-top: 18px; }
.section-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.section-title { font-size: 17px; font-weight: 800; color: var(--text); }
.section-sub { font-size: 12px; color: var(--pink); font-weight: 600; }

/* ---------- 店铺推荐 ---------- */
.shop-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.shop-scroll::-webkit-scrollbar { display: none; }
.shop-card {
  flex: 0 0 auto; width: 108px; text-align: center; text-decoration: none;
  background: var(--card); border-radius: var(--radius); padding: 12px 8px;
  box-shadow: var(--shadow); border: 2px solid transparent; transition: .2s;
}
.shop-card:active { transform: scale(.96); border-color: var(--pink-light); }
.shop-avatar {
  width: 44px; height: 44px; margin: 0 auto 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-light), #ffeef5);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.shop-avatar.big { width: 52px; height: 52px; font-size: 26px; margin: 0; }
.shop-avatar.xl { width: 64px; height: 64px; font-size: 32px; margin: 0; }
.shop-name { font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-slogan { font-size: 11px; color: var(--pink); margin-top: 2px; }

/* ---------- 周星榜单 ---------- */
.rank-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.rank-scroll::-webkit-scrollbar { display: none; }
.rank-card {
  flex: 0 0 auto; width: 118px; position: relative; text-decoration: none;
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.rank-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.rank-num {
  position: absolute; top: 0; left: 0; z-index: 2;
  min-width: 24px; height: 24px; padding: 0 6px;
  background: linear-gradient(135deg, #ffb3cd, #ffd6e7); color: #fff;
  font-size: 13px; font-weight: 800; text-align: center; line-height: 24px;
  border-radius: var(--radius) 0 12px 0;
}
.rank-num.rank-top1 { background: linear-gradient(135deg, #ffb800, #ff8a00); }
.rank-num.rank-top2 { background: linear-gradient(135deg, #c0c8d8, #98a4bd); }
.rank-num.rank-top3 { background: linear-gradient(135deg, #e8a06c, #cd7f32); }
.rank-title { font-size: 12px; font-weight: 600; color: var(--text); padding: 6px 8px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-heat { font-size: 11px; color: var(--pink); padding: 0 8px 8px; }

/* ---------- 卡密兑换横幅 ---------- */
.kami-banner {
  display: block; margin-top: 16px; padding: 16px; border-radius: var(--radius);
  background: linear-gradient(120deg, #ff8fb8, #c084fc); color: #fff;
  text-decoration: none; box-shadow: 0 6px 20px rgba(255, 77, 141, .35);
}
.kami-title { font-size: 17px; font-weight: 800; }
.kami-sub { font-size: 12px; opacity: .9; margin-top: 4px; }

/* ---------- 分类 / 排序 / 标签 ---------- */
.cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: #fff; color: var(--text-light); text-decoration: none; border: 2px solid var(--pink-light);
}
.cat-chip.active {
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(255, 77, 141, .4);
}
.sort-bar { display: flex; align-items: center; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.sort-item { padding: 6px 10px; font-size: 13px; color: var(--text-light); text-decoration: none; border-radius: 10px; font-weight: 600; }
.sort-item.active { color: var(--pink-deep); background: var(--pink-light); }
.sort-sep { width: 1px; height: 16px; background: var(--pink-light); margin: 0 4px; }
.filter-chip { padding: 4px 10px; font-size: 12px; border-radius: 999px; background: #fff; color: var(--pink); text-decoration: none; border: 1.5px solid var(--pink-light); }
.filter-chip.active { background: var(--pink-deep); color: #fff; border-color: transparent; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 34px; overflow: hidden; transition: max-height .3s; }
.tag-cloud.expanded { max-height: 300px; }
.tag {
  padding: 4px 10px; font-size: 12px; border-radius: 999px; text-decoration: none;
  background: #ffeef5; color: var(--text-light); border: 1px solid var(--pink-light);
}
.tag.active { background: var(--pink); color: #fff; }
.tag-toggle { margin-top: 6px; border: none; background: none; color: var(--pink); font-size: 12px; cursor: pointer; padding: 2px 4px; }

.search-result { font-size: 13px; color: var(--text-light); margin-bottom: 10px; }

/* ---------- 商品卡片 ---------- */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; box-shadow: var(--shadow); transition: transform .15s;
  border: 2px solid transparent;
}
.p-card:active { transform: scale(.97); border-color: var(--pink-light); }
.p-cover { position: relative; }
.p-cover img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.p-badge {
  position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  box-shadow: 0 2px 6px rgba(255, 77, 141, .4);
}
.badge-免费 { background: linear-gradient(135deg, #34d399, #10b981); }
.badge-活动 { background: linear-gradient(135deg, #fbbf24, #f97316); }
.badge-盲盒 { background: linear-gradient(135deg, #c084fc, #8b5cf6); }
.badge-拼团 { background: linear-gradient(135deg, #f472b6, #ec4899); }
.p-info { padding: 8px 10px 10px; }
.p-cat { font-size: 11px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-title {
  font-size: 13px; font-weight: 700; color: var(--text); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 34px;
}
.p-gift { font-size: 11px; color: #f97316; margin-top: 3px; }
.p-tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.p-tags span { font-size: 10px; color: var(--pink); background: #ffeef5; padding: 1px 6px; border-radius: 6px; }
.p-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.p-price { font-size: 15px; font-weight: 800; color: var(--pink-deep); }
.p-price del { font-size: 11px; color: var(--text-light); font-weight: 400; margin-left: 3px; }
.p-heat { font-size: 11px; color: var(--text-light); }

/* ---------- 通用卡片 ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-top: 12px; box-shadow: var(--shadow); }
.card-title { font-size: 15px; font-weight: 800; margin-bottom: 10px; }

/* ---------- 详情页 ---------- */
.p-carousel .slide img { aspect-ratio: 1; }
.pd-price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-price { font-size: 26px; font-weight: 900; color: var(--pink-deep); }
.pd-orig { color: var(--text-light); font-size: 14px; }
.pd-heat { margin-left: auto; font-size: 12px; color: var(--text-light); }
.pd-title { font-size: 17px; margin-top: 8px; }
.pd-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--text-light); }
.pd-gift { margin-top: 8px; font-size: 12px; color: #f97316; background: #fff7ed; padding: 6px 10px; border-radius: 10px; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pd-desc { font-size: 13px; line-height: 1.8; white-space: pre-wrap; color: var(--text); }

.shop-entry { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.shop-entry-info { flex: 1; min-width: 0; }
.shop-desc { font-size: 12px; color: var(--text-light); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-go { font-size: 12px; color: var(--pink-deep); font-weight: 700; flex-shrink: 0; }

/* 评价 */
.review { border-top: 1px dashed var(--pink-light); padding: 10px 0; }
.review:first-of-type { border-top: none; }
.review-head { display: flex; align-items: center; gap: 6px; }
.review-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--pink-light); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.review-user { font-size: 13px; font-weight: 700; }
.review-stars { font-size: 11px; color: #fbbf24; margin-left: auto; }
.review-content { font-size: 13px; margin-top: 6px; line-height: 1.6; }
.review-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.review-form { margin-top: 10px; }
.review-form-row { display: flex; gap: 6px; }
.review-form select, .review-form input { border: 2px solid var(--pink-light); border-radius: 10px; padding: 8px; font-size: 13px; outline: none; background: #fff; }
.review-form input { flex: 1; min-width: 0; }
.login-tip { margin-top: 10px; font-size: 13px; color: var(--text-light); text-align: center; }
.login-tip a { color: var(--pink-deep); }

/* 底部操作栏 */
.action-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 110;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--pink-light);
}
.ab-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--text-light); text-decoration: none;
  border: none; background: none; cursor: pointer; padding: 2px 6px;
}
.ab-item span { font-size: 20px; }
.ab-item.faved { color: var(--pink-deep); }
.ab-cart {
  flex: 1; border: none; padding: 12px 0; border-radius: 999px;
  background: linear-gradient(135deg, #ffd6e7, #ffb3cd);
  color: var(--pink-deep); font-size: 14px; font-weight: 800; cursor: pointer;
}
.ab-buy {
  flex: 1; border: none; padding: 12px 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  color: #fff; font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 77, 141, .4);
}
.ab-buy:active, .ab-cart:active { transform: scale(.96); }

/* 详情页有操作栏时给内容让位 */
body:has(.action-bar) .tabbar { display: none; }
body:has(.action-bar) .app { padding-bottom: 80px; }

/* ---------- 底部导航（悬浮液态玻璃胶囊） ---------- */
.tabbar {
  position: fixed; bottom: calc(12px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; gap: 2px;
  padding: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(18px) saturate(1.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: 0 8px 28px rgba(255, 77, 141, .22), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 18px; border-radius: 999px;
  font-size: 11px; color: var(--text-light); text-decoration: none;
  transition: background .3s, color .3s, box-shadow .3s;
}
.tab-icon { font-size: 19px; filter: grayscale(.4); transition: transform .3s; }
.tab.active {
  color: #fff; font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  box-shadow: 0 4px 12px rgba(255, 77, 141, .45);
}
.tab.active .tab-icon { filter: none; transform: translateY(-1px) scale(1.1); }

/* 悬浮购物车 */
.cart-fab {
  position: fixed; right: max(14px, calc(50% - 246px)); bottom: 84px; z-index: 99;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  box-shadow: 0 6px 16px rgba(255, 77, 141, .45); text-decoration: none;
}
.cart-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  background: #fff; color: var(--pink-deep); font-size: 11px; font-weight: 800;
  border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
body:has(.action-bar) .cart-fab { display: none; }

/* ---------- 用户页 ---------- */
.user-card { display: flex; align-items: center; gap: 12px; }
.user-avatar {
  width: 58px; height: 58px; border-radius: 50%; font-size: 28px;
  background: linear-gradient(135deg, var(--pink-light), #ffeef5);
  display: flex; align-items: center; justify-content: center;
  border: 3px solid #fff; box-shadow: var(--shadow);
}
.user-info { flex: 1; }
.user-name { font-size: 17px; font-weight: 800; }
.user-id { font-size: 12px; color: var(--text-light); margin-top: 3px; }

.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.menu-item {
  background: var(--card); border-radius: var(--radius); padding: 14px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text); text-decoration: none; box-shadow: var(--shadow);
}
.menu-item:active { transform: scale(.95); }
.menu-icon { font-size: 24px; }

.order-mini {
  display: flex; justify-content: space-between; gap: 8px; padding: 10px 0;
  border-top: 1px dashed var(--pink-light); font-size: 13px; color: var(--text); text-decoration: none;
}
.order-mini:first-of-type { border-top: none; }
.order-mini span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-mini-price { color: var(--pink-deep); font-weight: 700; flex-shrink: 0; }

/* 登录注册 */
.auth-card { text-align: center; padding: 28px 20px; }
.auth-logo { width: 72px; height: 72px; border-radius: 50%; border: 3px solid #fff; box-shadow: var(--shadow); object-fit: cover; }
.auth-title { font-size: 18px; margin-top: 12px; }
.auth-sub { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.auth-msg { margin-top: 10px; font-size: 13px; color: var(--pink-deep); }
.auth-tabs { display: flex; margin-top: 18px; background: #ffeef5; border-radius: 999px; padding: 4px; }
.auth-tab {
  flex: 1; border: none; padding: 9px 0; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: transparent; color: var(--text-light); cursor: pointer;
}
.auth-tab.active { background: linear-gradient(135deg, var(--pink), var(--pink-deep)); color: #fff; box-shadow: 0 3px 8px rgba(255,77,141,.35); }
.auth-form { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.auth-form input {
  border: 2px solid var(--pink-light); border-radius: 12px; padding: 12px 14px;
  font-size: 14px; outline: none; background: #fff;
}
.auth-form input:focus { border-color: var(--pink); }
.auth-extra { margin-top: 14px; font-size: 12px; color: var(--text-light); display: flex; gap: 8px; justify-content: center; }
.auth-extra a { color: var(--pink-deep); text-decoration: none; }
.demo-tip { margin-top: 12px; font-size: 12px; color: var(--purple); background: #f5f0ff; padding: 8px; border-radius: 10px; }
.hidden { display: none; }

/* ---------- 购物车 ---------- */
.cart-list { display: flex; flex-direction: column; }
.cart-item { display: flex; align-items: center; gap: 10px; }
.cart-cover img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; display: block; }
.cart-info { flex: 1; min-width: 0; }
.cart-price { color: var(--pink-deep); font-weight: 800; margin-top: 4px; }
.cart-del {
  border: none; background: #ffeef5; color: var(--pink-deep);
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 13px;
}
.checkout-bar {
  position: sticky; bottom: 88px; margin-top: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-radius: 999px; padding: 8px 8px 8px 18px; box-shadow: var(--shadow);
}
.checkout-total { font-size: 14px; }
.checkout-total b { color: var(--pink-deep); font-size: 18px; }

/* ---------- 订单 ---------- */
.order-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-light); }
.order-status { color: var(--pink-deep); font-weight: 700; }
.order-item { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 14px; }
.order-item-title { color: var(--text); text-decoration: none; font-weight: 600; }
.order-item-price { color: var(--text-light); }
.order-key {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  background: #fff0f6; border: 1.5px dashed var(--pink); border-radius: 10px; padding: 8px 10px;
}
.key-label { font-size: 12px; flex-shrink: 0; }
.key-value { flex: 1; font-size: 12px; color: var(--pink-deep); font-weight: 700; letter-spacing: .5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.order-foot { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--text-light); }
.order-total b { color: var(--pink-deep); font-size: 15px; }

/* ---------- 卡密兑换 ---------- */
.redeem-card { text-align: center; padding: 26px 20px; }
.redeem-icon { font-size: 46px; }
.redeem-title { font-size: 20px; margin-top: 8px; }
.redeem-sub { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.redeem-input {
  width: 100%; margin-top: 16px; border: 2px solid var(--pink-light); border-radius: 12px;
  padding: 13px 14px; font-size: 15px; text-align: center; letter-spacing: 1px; outline: none;
}
.redeem-input:focus { border-color: var(--pink); }
.redeem-card .btn { margin-top: 12px; }
.tips-list { padding-left: 18px; font-size: 13px; line-height: 2; color: var(--text-light); }

/* ---------- 教程 ---------- */
.tutorial-steps { display: flex; flex-direction: column; gap: 14px; }
.t-step { display: flex; gap: 12px; }
.t-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(255,77,141,.35);
}
.t-title { font-size: 14px; font-weight: 800; }
.t-desc { font-size: 12px; color: var(--text-light); margin-top: 4px; line-height: 1.7; }
.faq { border-top: 1px dashed var(--pink-light); padding: 10px 0; }
.faq:first-of-type { border-top: none; }
.faq summary { font-size: 13px; font-weight: 700; cursor: pointer; }
.faq p { font-size: 12px; color: var(--text-light); margin-top: 6px; line-height: 1.7; }

/* ---------- 店铺页 ---------- */
.shop-header { display: flex; gap: 14px; align-items: center; }
.shop-header-info h1 { font-size: 18px; }
.shop-header-info p { font-size: 12px; color: var(--text-light); margin-top: 4px; line-height: 1.6; }
.shop-heat { font-size: 12px; color: var(--pink); margin-top: 6px; }
.shop-search { display: flex; gap: 8px; margin-top: 12px; }
.shop-search input {
  flex: 1; border: 2px solid var(--pink-light); border-radius: 999px;
  padding: 9px 14px; font-size: 13px; outline: none; background: #fff; min-width: 0;
}

/* ---------- 按钮 / 提示 ---------- */
.btn {
  border: none; border-radius: 999px; padding: 11px 22px; cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  color: #fff; font-size: 14px; font-weight: 800; text-decoration: none;
  display: inline-block; text-align: center;
  box-shadow: 0 4px 12px rgba(255, 77, 141, .35);
}
.btn:active { transform: scale(.96); }
.btn.block { width: 100%; }
.btn.small { padding: 8px 16px; font-size: 12px; }
.btn.tiny { padding: 4px 10px; font-size: 11px; box-shadow: none; }
.btn.ghost { background: #fff; color: var(--pink-deep); border: 2px solid var(--pink-light); box-shadow: none; }

.empty { text-align: center; padding: 40px 20px; color: var(--text-light); font-size: 13px; }
.empty.big { padding: 70px 20px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.empty.small { padding: 16px; }
.empty-icon { font-size: 40px; margin-bottom: 8px; }

#toast {
  position: fixed; left: 50%; bottom: 130px; transform: translateX(-50%) translateY(20px);
  background: rgba(91, 58, 74, .92); color: #fff; padding: 11px 20px;
  border-radius: 999px; font-size: 13px; z-index: 1000;
  opacity: 0; pointer-events: none; transition: .3s; max-width: 80%; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 521px) {
  .app { border-left: 2px solid var(--pink-light); border-right: 2px solid var(--pink-light); }
}

/* ===== 角色标签 ===== */
.role-tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #fce4ec; color: var(--pink); margin-left: 6px; vertical-align: middle; }
.role-tag.admin { background: #ffebee; color: #e91e63; font-weight: bold; }
.role-tag.merchant { background: #fff3e0; color: #f57c00; }

/* ===== 更多功能九宫格 ===== */
.more-grid .menu-item { background: #fff; }

/* ===== 商家入驻申请 ===== */
.apply-card { margin-bottom: 20px; }
.apply-header { text-align: center; padding: 16px 0 8px; }
.apply-icon { font-size: 48px; }
.apply-title { margin: 6px 0 4px; color: var(--pink-dark); font-size: 20px; }
.apply-sub { color: var(--text-light); font-size: 13px; padding: 0 12px; }
.apply-form { padding: 8px 0; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group label .req { color: var(--pink); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--pink-light); border-radius: 10px;
  font-size: 14px; background: #fff; box-sizing: border-box; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--pink); }
.form-group small { display: block; color: var(--text-light); font-size: 11px; margin-top: 4px; }
.form-group textarea { resize: vertical; font-family: inherit; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-agree { font-size: 12px; color: var(--text-light); margin: 8px 0 16px; }
.form-agree label { cursor: pointer; }
.apply-btn { background: linear-gradient(135deg, var(--pink), var(--pink-dark)); }
.apply-info { background: #fff7fb; border-radius: 10px; padding: 12px; margin: 12px 0; }
.info-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.info-row span { color: var(--text-light); }
.apply-tip { text-align: center; color: var(--pink); font-size: 13px; margin: 8px 0; }
.apply-notes { background: #fff7fb; border-radius: 10px; padding: 14px; margin-top: 16px; }
.notes-title { font-weight: 600; color: var(--pink-dark); margin-bottom: 8px; font-size: 14px; }
.apply-notes ul { margin: 0; padding-left: 18px; color: var(--text-light); font-size: 12px; line-height: 1.8; }
.status-pending { background: #fff8e1; color: #f9a825; padding: 12px; border-radius: 10px; text-align: center; font-weight: 600; margin: 12px 0; }
.status-approved { background: #e8f5e9; color: #2e7d32; padding: 12px; border-radius: 10px; text-align: center; font-weight: 600; margin: 12px 0; }
.status-approved a { color: #1565c0; }
.status-rejected { background: #ffebee; color: #c62828; padding: 12px; border-radius: 10px; text-align: center; font-weight: 600; margin: 12px 0; }

/* ===== 管理员后台 ===== */
.admin-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; }
.admin-header h2 { margin: 0; color: var(--pink-dark); font-size: 20px; }
.admin-sub { color: var(--text-light); font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-item { background: linear-gradient(135deg, #fff, #fff5fa); border: 1px solid var(--pink-light); border-radius: 12px; padding: 14px 8px; text-align: center; }
.stat-num { font-size: 22px; font-weight: bold; color: var(--pink-dark); }
.stat-num.highlight { color: #e91e63; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.stat-label { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* 商家申请列表 */
.app-list { display: flex; flex-direction: column; gap: 12px; }
.app-item { border: 1.5px solid var(--pink-light); border-radius: 12px; padding: 14px; background: #fff; }
.app-item.pending { border-color: #ffb74d; background: #fffef5; }
.app-item.approved { border-color: #a5d6a7; background: #f9fff9; opacity: .85; }
.app-item.rejected { border-color: #ef9a9a; background: #fffafa; opacity: .85; }
.app-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.app-user { font-weight: 600; color: var(--text); }
.app-status { font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.app-status.pending { background: #fff3e0; color: #f57c00; }
.app-status.approved { background: #e8f5e9; color: #2e7d32; }
.app-status.rejected { background: #ffebee; color: #c62828; }
.app-body { font-size: 13px; color: var(--text-light); line-height: 1.8; }
.app-body a { color: #1976d2; word-break: break-all; }
.app-actions { display: flex; gap: 8px; margin-top: 10px; }

/* 管理员表格 */
.admin-table { font-size: 12px; overflow-x: auto; }
.admin-tr { display: grid; grid-template-columns: 50px 2fr 80px 70px 50px 50px 60px; gap: 6px; padding: 8px 6px; border-bottom: 1px solid #fce4ec; align-items: center; }
.admin-tr.th { background: #fff5fa; font-weight: 600; color: var(--pink-dark); border-radius: 8px; }
.admin-tr .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 商家后台 ===== */
.merchant-header { display: flex; align-items: center; gap: 12px; padding: 14px 4px; }
.merchant-icon { font-size: 40px; }
.merchant-title { margin: 0; color: var(--pink-dark); font-size: 20px; }
.merchant-shop { font-size: 13px; color: var(--text-light); }
.merchant-header .btn { margin-left: auto; }
.m-product-list { display: flex; flex-direction: column; gap: 10px; }
.m-product-card { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1.5px solid var(--pink-light); border-radius: 12px; background: #fff; }
.m-product-cover { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.m-product-cover img { width: 100%; height: 100%; object-fit: cover; }
.m-product-info { flex: 1; min-width: 0; }
.m-product-title { font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-product-meta { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.m-product-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.btn.danger { color: #e53935; border-color: #ffcdd2; }

/* 商品编辑表单 */
.product-form .form-actions { display: flex; gap: 12px; margin-top: 20px; }
.product-form .form-actions .btn { flex: 1; }

/* ===== 营销活动开关 ===== */
.activity-section { background: #fff5fa; border: 1.5px dashed var(--pink-light); border-radius: 12px; padding: 16px; margin: 16px 0; }
.activity-title { font-weight: 600; color: var(--pink-dark); margin-bottom: 12px; font-size: 14px; }
.activity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.activity-item { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1.5px solid var(--pink-light); border-radius: 10px; padding: 12px; cursor: pointer; transition: .2s; }
.activity-item:hover { border-color: var(--pink); background: #fffafd; }
.activity-item input { margin-bottom: 4px; }
.activity-name { font-weight: 600; font-size: 14px; color: var(--text); }
.activity-desc { font-size: 11px; color: var(--text-light); }
.activity-tip { margin-top: 10px; font-size: 12px; color: #f57c00; background: #fff8e1; padding: 8px 12px; border-radius: 8px; }

/* ===== 优惠券 ===== */
.section-sub { color: var(--text-light); font-size: 13px; margin: 6px 0 14px; }
.coupon-list { display: flex; flex-direction: column; gap: 12px; }
.coupon-card { display: flex; background: #fff; border: 1.5px solid var(--pink-light); border-radius: 14px; overflow: hidden; }
.coupon-card.used { opacity: .5; }
.coupon-left { width: 100px; background: linear-gradient(135deg, var(--pink), var(--pink-dark)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 8px; }
.coupon-card.merchant .coupon-left { background: linear-gradient(135deg, #ff9800, #f57c00); }
.coupon-amount { font-size: 26px; font-weight: bold; }
.coupon-cond { font-size: 11px; margin-top: 2px; }
.coupon-right { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.coupon-name { font-weight: 600; font-size: 14px; }
.coupon-scope { font-size: 12px; color: var(--text-light); }
.coupon-time { font-size: 11px; color: var(--text-light); }
.coupon-stock { font-size: 11px; color: var(--pink); }
.coupon-status { font-size: 12px; color: #4caf50; font-weight: 600; }
.coupon-btn { align-self: flex-start; margin-top: 4px; }
.coupon-form .btn { margin-top: 8px; }
.coupon-tip { position: fixed; bottom: 70px; left: 0; right: 0; max-width: 520px; margin: 0 auto; background: #fff8e1; padding: 8px 16px; text-align: center; font-size: 13px; color: #f57c00; border-top: 1px solid #ffe0b2; z-index: 90; }

/* ===== 秒杀 ===== */
.seckill-header { text-align: center; }
.seckill-banner { font-size: 24px; font-weight: bold; color: var(--pink-dark); }
.seckill-list { display: flex; flex-direction: column; gap: 12px; }
.seckill-card { display: flex; gap: 12px; background: #fff; border: 1.5px solid #ffab91; border-radius: 14px; padding: 12px; }
.seckill-cover { width: 90px; height: 90px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.seckill-cover img { width: 100%; height: 100%; object-fit: cover; }
.seckill-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.seckill-title { font-weight: 600; font-size: 15px; }
.seckill-price-row { display: flex; align-items: baseline; gap: 8px; }
.seckill-price { font-size: 22px; color: #e53935; font-weight: bold; }
.seckill-orig { font-size: 13px; color: var(--text-light); text-decoration: line-through; }
.seckill-meta { font-size: 12px; color: var(--text-light); }
.seckill-time { font-size: 11px; color: var(--text-light); }
.seckill-btn { background: linear-gradient(135deg, #ff5722, #e53935); align-self: flex-start; margin-top: 4px; }

/* ===== 盲盒 ===== */
.prize-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.prize-row input { flex: 1; padding: 8px; border: 1.5px solid var(--pink-light); border-radius: 8px; font-size: 13px; }
.blindbox-card { background: #fff5fa; border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.blindbox-head { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.blindbox-prizes { display: flex; flex-wrap: wrap; gap: 6px; }
.prize-tag { background: #fff; border: 1px solid var(--pink-light); border-radius: 999px; padding: 3px 10px; font-size: 12px; }

/* ===== 拼团 ===== */
.groupbuy-header { text-align: center; }
.groupbuy-banner { font-size: 24px; font-weight: bold; color: var(--pink-dark); }
.groupbuy-list { display: flex; flex-direction: column; gap: 12px; }
.groupbuy-card { display: flex; gap: 12px; background: #fff; border: 1.5px solid #ce93d8; border-radius: 14px; padding: 12px; }
.groupbuy-cover { width: 90px; height: 90px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.groupbuy-cover img { width: 100%; height: 100%; object-fit: cover; }
.groupbuy-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.groupbuy-title { font-weight: 600; font-size: 15px; }
.groupbuy-price-row { display: flex; align-items: baseline; gap: 8px; }
.groupbuy-price { font-size: 22px; color: #8e24aa; font-weight: bold; }
.groupbuy-orig { font-size: 13px; color: var(--text-light); text-decoration: line-through; }
.groupbuy-people { font-size: 12px; color: #8e24aa; background: #f3e5f5; padding: 2px 8px; border-radius: 999px; }
.groupbuy-time { font-size: 11px; color: var(--text-light); }
.groupbuy-btn { background: linear-gradient(135deg, #ab47bc, #8e24aa); align-self: flex-start; margin-top: 4px; }

/* 拼团详情 */
.group-status { text-align: center; font-size: 18px; font-weight: bold; padding: 12px; border-radius: 10px; margin-bottom: 14px; }
.group-status.pending { background: #fff8e1; color: #f9a825; }
.group-status.success { background: #e8f5e9; color: #2e7d32; }
.group-status.failed { background: #ffebee; color: #c62828; }
.group-product { display: flex; gap: 12px; margin-bottom: 14px; }
.group-product img { width: 70px; height: 70px; border-radius: 10px; object-fit: cover; }
.group-product-title { font-weight: 600; }
.group-product-price { color: var(--pink); font-size: 13px; margin-top: 4px; }
.group-members { margin-bottom: 14px; }
.group-members-title { font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.group-member { padding: 4px 0; font-size: 13px; }
.group-share { background: #f3e5f5; border-radius: 10px; padding: 12px; text-align: center; }
.group-share p { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.share-link { background: #fff; padding: 8px; border-radius: 8px; font-size: 12px; color: var(--text-light); margin-bottom: 10px; word-break: break-all; }
.group-success { background: #e8f5e9; color: #2e7d32; padding: 16px; border-radius: 10px; text-align: center; font-weight: 600; }
.group-fail { background: #ffebee; color: #c62828; padding: 16px; border-radius: 10px; text-align: center; font-weight: 600; }
.group-record { padding: 8px 12px; background: #fff5fa; border-radius: 8px; margin-bottom: 6px; font-size: 13px; }

/* ===== 后台分区管理 ===== */
.admin-body .app { max-width: 680px; }
.admin-top { background: linear-gradient(135deg, #ff9ec7, #ff6fa5); border-radius: 0 0 18px 18px; padding: 14px 14px 10px; box-shadow: var(--shadow); }
.admin-top-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-brand { color: #fff; font-weight: 800; font-size: 16px; text-decoration: none; text-shadow: 0 1px 3px rgba(200,40,100,.3); }
.admin-user { display: flex; align-items: center; gap: 6px; }
.admin-uname { color: #fff; font-size: 12px; font-weight: 600; }
.admin-role { font-size: 10px; padding: 2px 8px; border-radius: 999px; color: #fff; }
.admin-role.role-super { background: rgba(255,255,255,.28); }
.admin-role.role-site { background: rgba(142,36,170,.55); }
.admin-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.anav { flex-shrink: 0; background: rgba(255,255,255,.9); color: var(--pink-dark); font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; text-decoration: none; border: 1.5px solid transparent; }
.anav.active { background: #fff; border-color: #fff; box-shadow: 0 2px 8px rgba(200,40,100,.25); }
.admin-scope-tip { background: rgba(255,255,255,.85); color: #8e24aa; font-size: 11px; border-radius: 8px; padding: 5px 10px; margin-top: 6px; }
.admin-content { padding-bottom: 40px; }
.admin-header { flex-wrap: wrap; gap: 8px; }
.range-switch { display: inline-flex; gap: 6px; margin-left: 8px; }
.range-switch .tag { cursor: pointer; }

/* 统计卡片 */
.stat-grid { grid-template-columns: repeat(3, 1fr); margin-top: 14px; }
.stat-box { background: linear-gradient(135deg, #fff, #fff5fa); border: 1.5px solid var(--pink-light); border-radius: 14px; padding: 14px 8px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.stat-box .stat-num { font-size: 20px; font-weight: 800; color: var(--pink-dark); }
.stat-box .stat-label { font-size: 11px; color: var(--text-light); }

/* 销量柱状图 */
.chart-card { margin-top: 14px; }
.chart-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.chart-bar { width: 70%; max-width: 22px; min-height: 2px; background: linear-gradient(180deg, #ff9ec7, #ff6fa5); border-radius: 6px 6px 2px 2px; transition: height .5s; }
.chart-day { font-size: 9px; color: var(--text-light); transform: scale(.9); }

/* 表格（后台通用行） */
.order-table { background: #fff; border-radius: 12px; padding: 8px; box-shadow: var(--shadow); margin-top: 12px; }
.order-tr { display: grid; grid-template-columns: 1.4fr 1fr 1.6fr .7fr .9fr 1.2fr; gap: 6px; padding: 9px 6px; border-bottom: 1px solid #fce4ec; align-items: center; font-size: 12px; }
.order-tr.th { background: #fff5fa; font-weight: 700; color: var(--pink-dark); border-radius: 8px; }
.order-tr .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-tr.prod-tr { grid-template-columns: 40px 2fr .8fr .9fr 1fr .8fr 1.6fr; }
.order-tr.user-tr { grid-template-columns: 44px 1.2fr 1fr .8fr .8fr 1.4fr; }
.order-tr.coupon-tr { grid-template-columns: 1.2fr .7fr 1.3fr .8fr 1.2fr .8fr; }
.order-tr.rec-tr { grid-template-columns: 36px 2fr .7fr 1fr .8fr 1.6fr; }
.order-tr.fund-tr { grid-template-columns: 1fr 1.2fr .9fr .9fr; }
.order-ops { display: flex; gap: 4px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; }
.uid-tag { display: inline-block; background: #fce4ec; color: var(--pink-dark); border-radius: 999px; padding: 1px 7px; font-size: 10px; }

/* 状态 chip */
.chip { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 999px; background: #f5f5f5; color: #757575; white-space: nowrap; }
.chip-ok { background: #e8f5e9; color: #2e7d32; }
.chip-warn { background: #fff8e1; color: #f57c00; }
.chip-bad { background: #ffebee; color: #c62828; }
.chip-super { background: linear-gradient(135deg, var(--pink), #8e24aa); color: #fff; }

/* 筛选条 */
.admin-filter { display: flex; gap: 8px; margin: 12px 0; }
.admin-filter input[type=search] { flex: 1; border: 1.5px solid var(--pink-light); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.admin-filter select { border: 1.5px solid var(--pink-light); border-radius: 10px; padding: 8px; font-size: 13px; }
.inline-input { border: 1.5px solid var(--pink-light); border-radius: 8px; padding: 6px 10px; font-size: 13px; width: 110px; }
.inline-input.mini { width: 62px; }

/* 分类管理 */
.cat-card { margin-top: 12px; }
.cat-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.cat-row.sub { border-top: 1px dashed #fce4ec; }
.cat-name { font-weight: 700; color: var(--text); font-size: 14px; }
.cat-row.sub .cat-name { font-weight: 500; font-size: 13px; color: var(--text-light); }
.cat-meta { flex: 1; font-size: 11px; color: var(--text-light); text-align: right; }
.cat-ops { display: flex; gap: 4px; flex-shrink: 0; }
.empty-tip { color: var(--text-light); font-size: 13px; text-align: center; padding: 18px 0; }

/* 商家资金卡 */
.merchant-card { border: 1.5px solid var(--pink-light); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
.merchant-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.merchant-head small.uid-tag { margin-left: 6px; }
.fund-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-light); }
.fund-row .pink { color: var(--pink-dark); font-size: 15px; }
.settle-logs { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; color: var(--text-light); }

/* 弹层 */
.modal { position: fixed; inset: 0; background: rgba(180, 60, 110, .35); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal.hidden { display: none; }
.modal-box { background: #fff; border-radius: 16px; padding: 20px 18px; width: min(92%, 420px); max-height: 84vh; overflow-y: auto; box-shadow: 0 12px 40px rgba(200,40,100,.3); }
.modal-box h3 { margin: 0 0 14px; color: var(--pink-dark); }

/* 分站卡 */
.site-card { margin-top: 12px; }
.site-desc { font-size: 12px; color: var(--text-light); margin: 4px 0; }
.site-stats { margin-top: 8px; }

/* 营销活动行 */
.act-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #fce4ec; font-size: 12.5px; color: var(--text); }
.act-row:last-child { border-bottom: none; }
.act-row .ellipsis { flex: 1; }
.act-icons { color: var(--pink); letter-spacing: 2px; }
.search-uid-result { font-size: 13px; margin: 10px 0 4px; }
.rec-tr input { width: 56px; }

/* 支付设置 */
.pay-chan { border: 1.5px solid var(--pink-light); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.chan-toggle { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--pink-dark); margin-bottom: 10px; cursor: pointer; }
.driver-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.driver-item { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--pink-light); border-radius: 10px; padding: 10px; font-size: 13px; cursor: pointer; }
.driver-item:has(input:checked) { border-color: var(--pink); background: #fff5fa; }

/* 热销榜管理 */
.hot-flags { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #fce4ec; }
.rank-row .ellipsis { flex: 1; font-size: 13px; }
.rank-num { width: 26px; height: 26px; border-radius: 8px; background: #fce4ec; color: var(--pink-dark); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.rank-num.rank-top1 { background: linear-gradient(135deg, #ffd54f, #ffb300); color: #fff; }
.rank-num.rank-top2 { background: linear-gradient(135deg, #b0bec5, #90a4ae); color: #fff; }
.rank-num.rank-top3 { background: linear-gradient(135deg, #ffab91, #ff7043); color: #fff; }
.rank-ops { display: flex; gap: 4px; }

/* 收银台 */
.pay-wrap { padding: 30px 0; }
.pay-card { padding: 22px 18px; }
.pay-head { text-align: center; font-size: 18px; font-weight: 800; color: var(--pink-dark); margin-bottom: 16px; }
.pay-order { background: #fff5fa; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.pay-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.pay-row .ellipsis { max-width: 70%; }
.pay-amount b { color: var(--pink-dark); font-size: 20px; }
.pay-sub { margin: 14px 0 10px; }
.pay-btn { margin-bottom: 10px; }
.pay-done { background: #e8f5e9; color: #2e7d32; border-radius: 10px; padding: 12px; text-align: center; font-size: 13px; margin-bottom: 12px; }

/* 首页推荐位 */
.rec-banner { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.rec-banner::-webkit-scrollbar { display: none; }
.rec-item { flex-shrink: 0; width: 120px; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; }
.rec-item img { width: 100%; height: 86px; object-fit: cover; }
.rec-item-info { padding: 8px 10px; }
.rec-item-title { font-size: 12px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-item-price { font-size: 13px; color: var(--pink-dark); font-weight: 700; margin-top: 2px; }
.hot-rank-list { background: #fff; border-radius: 14px; padding: 6px 12px; box-shadow: var(--shadow); }
.hot-rank-item { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #fce4ec; text-decoration: none; }
.hot-rank-item:last-child { border-bottom: none; }
.hot-rank-item .rank-num { flex-shrink: 0; }
.hot-rank-title { flex: 1; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-rank-meta { font-size: 11px; color: var(--text-light); }
.hot-rank-price { font-size: 13px; color: var(--pink-dark); font-weight: 700; }

/* ===== 商家钱包 / 提现 ===== */
.wallet-box { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #ffeef5, #fff5fa); border: 1.5px solid var(--pink-light); border-radius: 14px; padding: 14px; }
.wallet-main { text-align: center; padding-right: 14px; border-right: 1px dashed var(--pink); }
.wallet-balance { font-size: 26px; font-weight: 900; color: var(--pink-dark); }
.wallet-label { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.wallet-side { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-light); min-width: 0; }
.wallet-side b { color: var(--pink-dark); }
.withdraw-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.withdraw-form input { border: 1.5px solid var(--pink-light); border-radius: 10px; padding: 10px 12px; font-size: 13px; outline: none; background: #fff; width: 100%; }
.withdraw-form input:focus { border-color: var(--pink); }
.withdraw-list { margin-top: 12px; }
.order-tr.wd-tr { grid-template-columns: .8fr 1.6fr 1.5fr; }
.admin-table .order-tr.wd-tr { grid-template-columns: 1.3fr .8fr 1.3fr .8fr 1.5fr; }

/* ===== 双端自适应（桌面端 ≥768px 加宽布局） ===== */
@media (min-width: 768px) {
  .app { max-width: 1000px; padding-bottom: 120px; }
  .topbar { padding: 14px 22px; }
  .brand-logo { width: 40px; height: 40px; }
  .brand-name { font-size: 19px; }
  .search-box input { font-size: 14px; padding: 9px 14px; }
  .bell { width: 40px; height: 40px; font-size: 17px; }
  .content { padding: 20px 24px; }
  .section { margin-top: 26px; }
  .section-title { font-size: 20px; }
  .section-sub { font-size: 13px; }

  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .p-info { padding: 10px 12px 12px; }
  .p-title { font-size: 14px; min-height: 40px; }
  .p-price { font-size: 17px; }
  .p-cat { font-size: 12px; }
  .p-tags span { font-size: 11px; }
  .shop-card { width: 124px; padding: 14px 10px; }
  .rank-card { width: 136px; }
  .rank-title { font-size: 13px; }
  .rec-item { width: 142px; }
  .rec-item img { height: 100px; }
  .menu-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .menu-item { padding: 16px 8px; font-size: 13px; }
  .menu-icon { font-size: 28px; }
  .carousel .slide img { aspect-ratio: 21/8; }
  .slide-text { font-size: 14px; padding: 8px 14px; }

  /* 详情页 */
  .action-bar { max-width: 1000px; }
  .pd-price { font-size: 30px; }
  .pd-title { font-size: 20px; }
  .pd-desc { font-size: 14px; }
  .checkout-bar { bottom: 104px; }

  /* 液态导航桌面加宽 */
  .tabbar { gap: 6px; padding: 8px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .tab { padding: 9px 28px; font-size: 12.5px; }
  .tab-icon { font-size: 21px; }
  .cart-fab { width: 54px; height: 54px; font-size: 24px; right: max(24px, calc(50% - 490px)); bottom: 100px; }
  #toast { bottom: 150px; font-size: 14px; }

  /* 后台桌面 */
  .admin-body .app { max-width: 1080px; padding-bottom: 60px; }
  .admin-top { padding: 16px 22px 12px; }
  .admin-brand { font-size: 18px; }
  .anav { font-size: 13px; padding: 7px 14px; }
  .admin-header h2 { font-size: 22px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .stat-box { padding: 18px 10px; }
  .stat-box .stat-num { font-size: 24px; }
  .chart-bars { height: 190px; gap: 8px; }
  .chart-bar { max-width: 36px; }
  .chart-day { font-size: 10px; }
  .admin-table { font-size: 13px; }
  .order-tr { font-size: 13px; padding: 10px 8px; }
  .card { padding: 18px; }
  .card-title { font-size: 16px; }
  .form-group input, .form-group select, .form-group textarea { font-size: 14px; }
  .modal-box { width: min(92%, 520px); }

  /* 手机悬浮液态导航在桌面端位置微调 */
  body:has(.action-bar) .app { padding-bottom: 110px; }
}


