:root {
  --red: #e4393c;
  --bg: #f4f4f8;
  --card: #fff;
  --text: #222;
  --muted: #999;
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
button { border: 0; cursor: pointer; font-family: inherit; }
input { font-family: inherit; border: 1px solid #e3e3ea; border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: none; width: 100%; }
input:focus { border-color: var(--red); }
img { display: block; }
.muted { color: var(--muted); font-size: 12px; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; box-shadow: 0 0 40px rgba(0,0,0,.08); }
.page { display: none; }
#page-home { display: block; } /* 直播画面常驻，作为半屏导航的背景 */
.page-pad { padding: 14px; }
/* 分类 / 购物车 / 个人中心：一律以 70% 底部半屏盖在直播画面上。
   平时底部导航隐藏（bottom:0 占满半屏）；点开「购物车」带出底部导航时，半屏上移让位给导航栏 */
#page-category.active, #page-cart.active, #page-me.active {
  display: block; position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; height: 70%; width: 100%; max-width: 480px;
  background: var(--bg); border-radius: 18px 18px 0 0; overflow-y: auto;
  z-index: 30; box-shadow: 0 -6px 26px rgba(0,0,0,.22);
  animation: pageUp .22s ease-out;
}
@keyframes pageUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
body.nav-on #page-category.active, body.nav-on #page-cart.active, body.nav-on #page-me.active { bottom: 56px; } /* 底部导航弹出时给导航让位 */
#page-cart.active .page-pad { padding-bottom: 92px; } /* 预留结算栏高度 */
/* 购物车半屏标题栏：标题居中，关闭按钮固定在右上角 */
.cart-sheet-head {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 10px 12px 6px; background: #fff;
}
.cart-sheet-head b {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 16px; font-weight: 700; white-space: nowrap;
}
.cs-close {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: rgba(0,0,0,.07); color: #666; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.cs-close:active { background: rgba(0,0,0,.16); }

/* ===== 直播间 ===== */
.live-room { position: relative; height: 100vh; min-height: 420px; overflow: hidden; background: #1a0e2e; }
@supports (height: 100dvh) { .live-room { height: 100dvh; } }
.live-bg { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
/* 真实直播画面（管理员摄像头推流），置于背景与压暗渐变之间 */
.live-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #1a0e2e; z-index: 1; transform: scaleX(-1); }
.live-video[hidden] { display: none; }
.live-gradient { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 30%, transparent 55%, rgba(26,14,46,.92)); }
/* 连接 / 网络波动 / 重连 加载动画（悬浮于直播画面居中，pointer-events:none 不挡操作） */
.live-loading {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 22px;
  background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; pointer-events: none;
}
.ll-spin {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: ll-spin .8s linear infinite;
}
@keyframes ll-spin { to { transform: rotate(360deg); } }
.live-loading em { font-style: normal; font-size: 13px; letter-spacing: .5px; white-space: nowrap; }
/* 直播声音开关（左侧垂直居中，背景半透明50%，与底部互动栏错开避免重叠） */
.live-sound { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); z-index: 4; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; font-size: 17px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* 底部互动栏：评论输入框 + 购物分类 / 购物车 / 礼物 / 点赞(红心) / 更多 */
/* 底部导航常驻占 56px，互动栏整体上移到导航之上 */
.interact-bar { position: absolute; left: 12px; right: 12px; bottom: 14px; z-index: 9; display: flex; align-items: center; gap: 6px; }
.ib-input { flex: 1; min-width: 0; height: 38px; padding: 0 14px; border: 0; border-radius: 19px; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); color: #fff; font-size: 13px; outline: none; }
.ib-input::placeholder { color: rgba(255,255,255,.55); }
.ib-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.ib-btn:active { background: rgba(0,0,0,.7); }
.ib-btn .badge { top: -2px; right: -4px; font-size: 9px; min-width: 15px; height: 15px; line-height: 15px; border-radius: 8px; }
/* 点赞按钮：透明底 + 红色红心，按下轻微放大 */
.ib-btn.like-heart { background: none; box-shadow: none; color: #ff3b5c; font-size: 22px; }
.ib-btn.like-heart:active { background: none; transform: scale(.9); }

/* 未开播/直播结束遮罩：全屏覆盖所有内容（直播结束页 + 历史直播） */
.live-offline { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; background: linear-gradient(170deg, #1d0f36 0%, #2c1252 48%, #130724 100%); color: #fff; text-align: center; padding: 14px 24px 40px; overflow-y: auto; }
.live-offline .lo-icon { font-size: 52px; opacity: .9; }
/* 封面横幅 + 已结束标记 */
.live-offline .lo-banner { position: relative; width: 100%; max-width: 340px; border-radius: 14px; overflow: hidden; border: 2px solid rgba(255,255,255,.35); box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.live-offline .lo-banner img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.live-offline .lo-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; letter-spacing: 1px; padding: 3px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.3); }
/* 主播信息行 */
.live-offline .lo-anchor { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 340px; margin-top: 2px; text-align: left; }
.live-offline .lo-anchor img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #ff5d8f; object-fit: cover; flex-shrink: 0; }
.live-offline .lo-anchor-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.live-offline .lo-anchor-info b { font-size: 15px; letter-spacing: 0; }
.live-offline .lo-anchor-info span { font-size: 12px; color: rgba(255,255,255,.65); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 观看数据 */
.live-offline .lo-stats { display: flex; gap: 18px; font-size: 12px; color: rgba(255,255,255,.8); }
.live-offline .lo-stats span { color: rgba(255,255,255,.8); }
.live-offline .lo-stats b { color: #ffb3cb; }
.lo-tags, .live-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.lo-tags span { background: rgba(255,93,143,.18); border: 1px solid rgba(255,93,143,.6); color: #ffb3cb; font-size: 11px; padding: 3px 10px; border-radius: 12px; }
.live-tags { position: absolute; top: 66px; left: 12px; justify-content: flex-start; z-index: 3; }
.live-tags span { background: rgba(0,0,0,.4); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 12px; }
.live-offline b { font-size: 18px; letter-spacing: 1px; }
.live-offline span { font-size: 13px; color: rgba(255,255,255,.65); }
/* 主播信息：头像 → 昵称/观看(头像右侧) → 举报 → 客服按钮 */
.streamer { position: absolute; top: 14px; left: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; z-index: 3; max-width: calc(100% - 84px); }
.avatar-row { display: flex; align-items: center; gap: 8px; width: 100%; }
.avatar { position: relative; flex: none; }
.avatar img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #ff5d8f; object-fit: cover; }
.live-badge { position: absolute; left: 50%; transform: translateX(-50%); bottom: -9px; background: var(--red); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 8px; font-weight: 700; }
.streamer-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; margin: 0; background: rgba(0,0,0,.34); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border-radius: 8px; padding: 4px 9px 5px; }
.streamer-meta b { font-size: 13px; color: #fff; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.streamer-meta span { font-size: 10px; color: rgba(255,255,255,.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.float-col { position: absolute; right: 12px; top: 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 60; }
.float-col button { width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.float-col button:active { background: rgba(0,0,0,.7); }
.float-col button i { font-style: normal; }
/* 亲密榜：椭圆背景、仅文字 */
#btn-affinity { width: 64px; height: 30px; border-radius: 15px; background: rgba(0,0,0,.35); }
#btn-affinity i { font-size: 12px; letter-spacing: 1px; }
#btn-affinity:active { background: rgba(0,0,0,.7); }
/* 刷新按钮：与分享同尺寸同底色，图标等大垂直居中 */
#btn-refresh-float { background: rgba(0,0,0,.35); width: 44px; height: 44px; opacity: 1; }
#btn-refresh-float:active { background: rgba(0,0,0,.7); opacity: 1; }
.float-col button svg { display: block; }
.badge { position: absolute; top: -3px; right: -3px; background: var(--red); color: #fff; font-size: 10px; min-width: 17px; height: 17px; line-height: 17px; border-radius: 9px; padding: 0 4px; font-style: normal; text-align: center; }
.badge.hide { display: none; }

/* 客服二维码弹层：居中显示，关闭按钮在右上角 */
#modal-service { align-items: center; }
#modal-service .center-sheet { width: 84%; max-width: 320px; border-radius: 16px; padding: 24px 20px; text-align: center; }
#modal-service .center-sheet > .close { top: 10px; right: 10px; width: 26px; height: 26px; font-size: 12px; background: #f2f2f5; color: #999; }
#modal-service .qr-img img { width: 210px; height: 210px; object-fit: contain; }

/* 直播历史弹层 */
.lh-list { display: flex; flex-direction: column; gap: 8px; }
.lh-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fafafa; border-radius: 10px; padding: 10px 12px; }
.lh-item .lh-date { font-size: 13px; font-weight: 600; color: #333; }
.lh-item .lh-sub { font-size: 11px; color: #999; margin-top: 3px; }
.lh-item .lh-tag { flex-shrink: 0; font-size: 11px; color: var(--red); background: rgba(228,57,60,.08); border: 1px solid rgba(228,57,60,.25); border-radius: 8px; padding: 2px 8px; font-weight: 600; }
.lh-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0; }

/* 礼物面板 */
.modal .gift-sheet { padding: 12px 14px 24px; background: linear-gradient(120deg,#0d0716,#1a0d33); color: #fff; }
.modal .gift-sheet h3 { text-align: center; margin-bottom: 14px; font-size: 16px; color: #fff; }
/* 送礼面板：用户卡（头像+昵称，余额与积分） */
.gift-me { display: flex; align-items: center; gap: 10px; background: linear-gradient(120deg,#140a26,#2b1450); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; color: #fff; box-shadow: 0 4px 14px rgba(107,47,143,.18); }
.gift-sheet .gift-me .gift-me-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); object-fit: cover; background: #fff; flex: none; }
.gift-me-name { flex: 1; min-width: 0; font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gift-me-right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.g-bal { font-size: 12px; color: rgba(255,255,255,.85); white-space: nowrap; line-height: 1.3; }
.g-bal b { color: #ffd76a; font-size: 13px; }
.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gift-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 88px; padding: 11px 2px 10px; border-radius: 12px; background: linear-gradient(120deg,#140a26,#2b1450); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 11px; min-width: 0; }
.gift-item:active { filter: brightness(1.4); }
.gift-item b { font-size: 26px; line-height: 1.15; }
.gift-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; font-size: 11px; }
.gift-item .g-free { font-style: normal; color: #ffd76a; font-size: 9px; line-height: 1; letter-spacing: .5px; }

/* 余额充值弹层 */
.recharge-sheet h3 { text-align: center; margin-bottom: 4px; }
.rc-tip { text-align: center; margin-bottom: 14px; }
.rc-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.rc-presets button { padding: 12px 0; border-radius: 12px; border: 1px solid #ffe1a8; background: #fff7e6; color: #b8860b; font-size: 15px; font-weight: 700; }
.rc-presets button.active { background: linear-gradient(90deg, #ff5d8f, #e4393c); color: #fff; border-color: transparent; }
.rc-field { margin-bottom: 14px; }
.rc-field input { flex: 1; border: 1px solid #eee; border-radius: 10px; padding: 10px; font-size: 14px; }

/* 更多面板：横向三宫格 */
.more-sheet h3 { text-align: center; margin-bottom: 14px; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 0 4px; }
.more-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: 14px; font-size: 12px; color: #333; background: #f7f7fb; }
.more-item:active { background: #efeafd; transform: scale(.97); }
.mi-ic { font-style: normal; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; font-size: 24px; line-height: 1; }
.mi-video { background: linear-gradient(135deg, #7c4dff, #b388ff); box-shadow: 0 4px 12px rgba(124,77,255,.35); }
.mi-gift { background: linear-gradient(135deg, #ff6b9d, #ff8fa3); box-shadow: 0 4px 12px rgba(255,107,157,.35); }
.mi-clear { background: linear-gradient(135deg, #36cfc9, #69e3d9); box-shadow: 0 4px 12px rgba(54,207,201,.35); }

.danmaku { position: absolute; left: 12px; bottom: 72px; width: 70%; max-height: 210px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; z-index: 2; }
.danmaku p { background: rgba(0,0,0,.35); color: #fff; font-size: 12px; border-radius: 12px; padding: 6px 12px; width: fit-content; max-width: 100%; animation: fadeUp .3s ease; }
/* 消息名称前的消费等级：黄底白字，无消费(不显示) */
.dm-lv { display: inline-block; vertical-align: 1px; margin-right: 5px; padding: 0 5px; border-radius: 4px; font-size: 9px; font-weight: 700; line-height: 1.5; color: #fff; background: linear-gradient(135deg, #ffc53d, #f0a20a); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }

/* 送礼物 / 送♥ 飘动动画 */
.gift-fly, .heart-fly { position: absolute; bottom: 150px; font-size: 42px; z-index: 6; pointer-events: none; }
.gift-fly { animation: giftUp 1.1s ease-out forwards; }
.heart-fly { font-size: 22px; color: #ff3b4e; text-shadow: 0 0 8px rgba(255,59,78,.4); animation: heartUp 1.6s ease-out forwards; }
@keyframes giftUp { 0% { opacity: 0; transform: translateY(6px) scale(.4); } 15% { opacity: 1; transform: translateY(0) scale(.95); } 55% { opacity: 1; transform: translateY(-45px) scale(1.9); } 100% { opacity: 0; transform: translateY(-230px) scale(2.3); } }
@keyframes heartUp { 0% { opacity: 0; transform: translateY(0) scale(.5); } 10% { opacity: 1; } 50% { opacity: 1; transform: translateY(-70px) scale(1.9); } 100% { opacity: 0; transform: translateY(-320px) scale(2.4); } }

.live-product { position: absolute; right: 12px; bottom: 72px; z-index: 3; display: flex; flex-direction: column; width: min(30vw, 170px); background: rgba(255,255,255,.97); border-radius: 10px; padding: 6px 6px 4px; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.live-product[hidden] { display: none; }
.lp-close { position: absolute; top: 4px; right: 4px; z-index: 2; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; font-size: 11px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.lp-media { position: relative; margin: 0; border-radius: 6px; overflow: hidden; }
.lp-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.lp-sold { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, #ff5d8f, var(--red)); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px; box-shadow: 0 2px 6px rgba(228,57,60,.4); white-space: nowrap; max-width: 96%; overflow: hidden; text-overflow: ellipsis; }
.lp-tag { position: absolute; top: 0; left: 0; bottom: auto; background: rgba(0,0,0,.3); color: #fff; font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 8px; backdrop-filter: blur(2px); }
.lp-name { margin-top: 4px; font-size: 11px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-buy { margin-top: 4px; position: relative; display: flex; align-items: stretch; width: 100%; border-radius: 14px; overflow: hidden; padding: 0; background: linear-gradient(180deg, #fff, #ffe9ee); box-shadow: inset 0 0 0 1px #ffd2df; }
.lp-price { flex: 1; display: flex; align-items: center; justify-content: center; gap: 2px; color: var(--red); font-weight: 700; font-size: 11px; padding: 5px 2px 5px 8px; min-width: 0; }
.lp-price i { font-style: normal; font-size: 14px; }
.lp-price em { display: none; }
.lp-go { position: relative; display: flex; align-items: center; padding: 5px 10px 5px 18px; background: linear-gradient(100deg, #ff7a00 0%, #ff3d7e 60%, #e0225c 100%); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px; clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%); }
.lp-buy::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.5) 52%, transparent 62%); pointer-events: none; }

.mi-price { color: var(--red); font-weight: 700; font-size: 15px; }
.mi-price em { font-style: normal; font-size: 11px; color: var(--muted); text-decoration: line-through; font-weight: 400; margin-left: 5px; }

/* ===== 分类页 ===== */
.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-bar button { background: var(--red); color: #fff; border-radius: 10px; padding: 0 18px; font-size: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; }
.chips button { flex-shrink: 0; background: #fff; border-radius: 16px; padding: 7px 14px; font-size: 13px; color: #666; }
.chips button.active { background: linear-gradient(90deg,#ff5d8f,#e4393c); color: #fff; font-weight: 600; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.card-media { position: relative; }
.grid .card-media > .p-media { width: 100%; aspect-ratio: 1 / 1; }
.p-media { position: relative; display: flex; align-items: center; justify-content: center; }
.p-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 商品卡“白字+底图文字”联合盖层：占满图片 95%，两条文字居中叠加显示 */
.p-cap { position: absolute; left: 2.5%; top: 2.5%; width: 95%; height: 95%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #fff; text-align: center; background: linear-gradient(180deg, rgba(60,10,90,.26), rgba(0,0,0,.55)); border-radius: 6px; pointer-events: none; }
.p-cap i { font-style: normal; font-weight: 800; font-size: 15px; line-height: 1.3; text-shadow: 0 1px 3px rgba(0,0,0,.75); padding: 0 6px; max-width: 96%; }
.p-cap b { font-size: 21px; font-weight: 900; line-height: 1.25; text-shadow: 0 2px 5px rgba(0,0,0,.8); padding: 0 6px; max-width: 96%; }
.p-cap b, .p-cap i { overflow-wrap: anywhere; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.seckill-tag { position: absolute; top: 8px; left: 8px; background: linear-gradient(90deg,#ff5d8f,#e4393c); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 10px; box-shadow: 0 2px 6px rgba(228,57,60,.4); }
.disc-badge { position: absolute; top: 8px; right: 8px; background: rgba(228,57,60,.92); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 8px; }
.card-body { padding: 8px 10px 12px; }
.card-body b { font-size: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.card-orig { color: var(--muted); font-size: 11px; margin-top: 20px; }
.card-orig s { text-decoration: line-through; }
.card-price { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; color: var(--red); font-weight: 700; margin-top: 1px; font-size: 21px; }
.card-price em { font-style: normal; font-size: 11px; color: var(--muted); text-decoration: line-through; font-weight: 400; }
.card-save { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 4px; background: linear-gradient(90deg, #ff5d8f, #e4393c); color: #fff; font-size: 10px; font-weight: 700; line-height: 1.5; }
.card-ops { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.stepper.sm { background: #f5f5f5; border: none; }
.stepper.sm button { width: 24px; height: 24px; font-size: 14px; }
.stepper.sm b { min-width: 18px; font-size: 12px; }
.card-btns { display: flex; align-items: center; gap: 6px; }
.q-buy { background: linear-gradient(90deg,#ff5d8f,#e4393c); color: #fff; border: none; border-radius: 14px; padding: 6px 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.q-buy:active { transform: scale(.95); }
.q-cart { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid #ff5d8f; color: #ff5d8f; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.q-cart:active { transform: scale(.92); background: #fff0f4; }
.empty-tip { text-align: center; color: var(--muted); padding: 60px 0; font-size: 13px; }

/* ===== 购物车 ===== */
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px 12px; font-weight: 700; }
.cart-clear { color: var(--muted); font-size: 12px; font-weight: 400; background: none; }
.cart-item { display: flex; gap: 10px; background: var(--card); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; align-items: center; }
.cart-item img { width: 68px; height: 68px; border-radius: 10px; object-fit: cover; }
.ci-info { flex: 1; min-width: 0; }
.ci-info b { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-tags { display: flex; align-items: center; gap: 6px; margin-top: 3px; min-height: 16px; }
.ci-tags s { color: #bbb; font-size: 11px; text-decoration: line-through; }
.ci-save { font-style: normal; color: #16a34a; font-size: 10px; margin-left: 6px; font-weight: 600; }
.mi-price em.ci-save { color: #16a34a; text-decoration: none; }
.ci-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.stepper { display: flex; align-items: center; gap: 2px; border: 1px solid #eee; border-radius: 14px; }
.stepper button { width: 26px; height: 26px; background: none; font-size: 14px; color: #666; }
.stepper b { min-width: 24px; text-align: center; font-size: 13px; }
.cart-bar { position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; padding: 10px 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 -4px 20px rgba(0,0,0,.08); z-index: 45; }
.cart-info { flex: 1; min-width: 0; }
.cart-save { font-size: 11px; color: #16a34a; font-weight: 600; margin-bottom: 2px; }
.cart-save i { font-style: normal; }
.cart-total span { font-size: 12px; color: var(--muted); }
.cart-total b { color: var(--red); font-size: 18px; }
.btn-checkout { background: linear-gradient(90deg,#ff5d8f,#e4393c); color: #fff; border-radius: 22px; padding: 11px 28px; font-weight: 700; font-size: 14px; }

/* ===== 个人中心 ===== */
.me-head { display: flex; align-items: center; gap: 12px; background: linear-gradient(120deg,#2b1a4e,#4a2170); border-radius: var(--radius); padding: 18px 16px; color: #fff; margin-bottom: 14px; }
.me-avatar { width: 50px; height: 50px; border-radius: 50%; }
.btn-logout { display: block; width: 100%; margin: 12px 0; padding: 10px; background: #fff; color: var(--red); border: 1px solid #ffd2df; border-radius: 22px; font-size: 13px; }

.order-lookup { display: flex; gap: 8px; margin-bottom: 12px; }
.order-lookup button { background: var(--red); color: #fff; border-radius: 10px; padding: 0 18px; font-size: 14px; white-space: nowrap; flex: none; height: 40px; line-height: 40px; }
.order-card { background: var(--card); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.oc-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; color: var(--muted); }
.st-pending { color: #ff9800; } .st-paid { color: #2196f3; } .st-shipped { color: #8b5cf6; }
.st-completed { color: #10b981; } .st-refunded { color: #9e9e9e; }
.oc-items { font-size: 12px; color: #666; line-height: 1.7; }
.oc-time { font-size: 11px; color: #999; margin: 6px 0 8px; }
.oc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.oc-foot b { color: var(--red); }
.btn-pay { background: var(--red); color: #fff; border-radius: 16px; padding: 7px 16px; font-size: 12px; font-weight: 600; }

/* ===== 底部导航：默认隐藏（滑出屏幕），仅点开「购物车」面板时弹出，位于 70% 半屏下方 ===== */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translate(-50%, 100%); width: 100%; max-width: 480px; height: 56px; background: #fff; display: flex; box-shadow: 0 -2px 12px rgba(0,0,0,.06); z-index: 40; transition: transform .28s ease; }
.tabbar.show { transform: translate(-50%, 0); }
.tabbar button { flex: 1; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: #888; position: relative; }
.tabbar button i { font-style: normal; font-size: 20px; line-height: 1; }
.tabbar button.active { color: var(--red); font-weight: 600; }
.tabbar .badge { position: absolute; top: 4px; right: calc(50% - 20px); }

/* 举报(头像右侧) / 客服(昵称下方) 小按钮 */
.btn-report,
.btn-service { display: flex; align-items: center; justify-content: center; gap: 3px; height: 26px; padding: 0 8px; font-size: 10px; color: #fff; border-radius: 13px; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.35); flex-shrink: 0; }
.btn-report { border-color: rgba(255,91,107,.7); }
.btn-report svg { display: block; }
.btn-service svg { display: block; flex: none; }
/* 客服按钮：下移一点、字号加大、左侧带耳机图标 */
#btn-service { margin-top: 8px; height: 30px; padding: 0 13px; gap: 5px; font-size: 12px; border-radius: 15px; }
.btn-report:active, .btn-service:active { background: rgba(0,0,0,.68); }
/* ===== 弹层 ===== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.sheet { background: #fff; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 20px 18px 26px; max-height: 85vh; overflow-y: auto; position: relative; }
.sheet > .close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; background: #f2f2f5; color: #666; font-size: 13px; }
.sheet img { width: 100%; border-radius: 14px; }
/* 直播中心弹层（高优先级覆盖，确保与分类同底、标题白底吸顶贴顶） */
.modal .c1-sheet, .modal .lh-sheet { background: var(--bg); padding-top: 0; }
.modal .lh-sheet { max-height: 72vh; }
.modal .c1-sheet h3, .modal .lh-sheet h3 { background: #fff; text-align: center; font-size: 15px; position: sticky; top: 0; z-index: 3; margin: 0 -18px 12px; padding: 9px 12px 8px; border-radius: 20px 20px 0 0; border-bottom: 1px solid #f0eef6; }
.modal .c1-sheet > .close, .modal .lh-sheet > .close { z-index: 10; background: #73737e; color: #fff; top: 5px; right: 12px; width: 28px; height: 28px; font-size: 12px; }
.pd-body { padding-top: 14px; }
.pd-price { display: flex; align-items: center; gap: 6px; color: var(--red); font-size: 14px; }
.pd-tag { background: linear-gradient(90deg, #ff5d8f, #e4393c); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.pd-now b { font-size: 26px; }
.pd-price em { font-style: normal; color: var(--muted); text-decoration: line-through; font-size: 12px; }
.pd-save { margin-top: 6px; font-size: 13px; color: #16a34a; font-weight: 600; }
.pd-save i { font-style: normal; }
.pd-save em { font-style: normal; color: #e4393c; background: rgba(228,57,60,.1); padding: 1px 7px; border-radius: 9px; font-size: 12px; margin-left: 6px; }
.pd-body h3 { font-size: 16px; margin: 6px 0; }
.pd-row { display: flex; justify-content: space-between; align-items: center; margin: 16px 0; font-size: 14px; }
.btn-primary { width: 100%; background: linear-gradient(90deg,#ff5d8f,#e4393c); color: #fff; border-radius: 24px; padding: 13px; font-size: 15px; font-weight: 700; }
.btn-ghost { width: 100%; background: none; color: #888; padding: 12px; font-size: 13px; }
.pd-btns { display: flex; gap: 10px; align-items: center; }
.pd-btns .btn-primary, .pd-btns .btn-ghost { width: auto; flex: 1; white-space: nowrap; }
.pd-btns .btn-ghost { border: 1px solid #ffb9c8; border-radius: 24px; color: #ff5d8f; }
.field { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.field label { font-size: 13px; color: #666; flex-shrink: 0; width: 48px; }
.btn-wxaddr { width: 100%; background: #f0fbf4; color: #07c160; border: 1px dashed #07c160; border-radius: 10px; padding: 10px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.co-items { background: #fafafa; border-radius: 10px; padding: 4px 12px; font-size: 12px; color: #666; margin-bottom: 14px; line-height: 1.8; }
.co-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #eee; }
.co-item:last-child { border-bottom: 0; }
.co-item-main b { font-size: 13px; color: #333; }
.co-item-sub { display: block; font-size: 11px; color: #999; margin-top: 2px; }
.co-item-sub s { color: #bbb; margin: 0 3px; }
.co-seckill-tag { font-style: normal; color: #e4393c; font-weight: 600; background: rgba(228,57,60,.08); border: 1px solid rgba(228,57,60,.25); border-radius: 6px; padding: 0 5px; margin-right: 4px; font-size: 10px; }
.co-item-price { text-align: right; }
.co-now { color: var(--red); font-size: 15px; }
.co-save { display: block; font-size: 10px; color: #16a34a; margin-top: 1px; }
.co-total { text-align: right; margin: 12px 0; font-size: 14px; }
.co-total b { color: var(--red); font-size: 20px; }
.co-save-bar { background: linear-gradient(90deg, rgba(22,163,74,.1), rgba(228,57,60,.08)); border: 1px dashed #16a34a; color: #16a34a; border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; text-align: center; margin: -4px 0 12px; }
.co-save-bar b { color: #e4393c; font-size: 15px; }
/* ===== 支付弹层（仿微信官方收银台） ===== */
.pay-sheet { text-align: center; padding: 6px 0 14px; border-radius: 18px 18px 0 0; }
.pay-sheet > .close { top: 10px; right: 12px; width: 28px; height: 28px; font-size: 12px; background: #f2f3f5; color: #8a8a8a; }
.pay-sheet h3 { margin: 8px 0 4px; font-size: 19px; font-weight: 600; color: #191919; }
.pay-methods { margin-top: 18px; border-top: 1px solid #ebedf0; }
.pm-item { display: flex; width: 100%; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; text-align: left; }
.pm-item + .pm-item { border-top: 1px solid #ebedf0; }
.pm-item:active { background: #f7f8fa; }
.pm-item.unavail { opacity: .5; cursor: not-allowed; }
.pm-ic { width: 26px; height: 26px; border-radius: 9px; flex: none; overflow: hidden; }
.pm-ic svg { display: block; }
.pm-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-tx em { font-style: normal; font-size: 15px; font-weight: 500; color: #191919; }
.pm-tx small { font-size: 11px; color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-dot { width: 18px; height: 18px; flex: none; border: 1.5px solid #c8c9cc; border-radius: 50%; position: relative; transition: border-color .15s; }
.pm-item.on .pm-dot { border-color: #07c160; }
.pm-item.on .pm-dot::after { content: ''; position: absolute; left: 3px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: #07c160; }
.wxp-confirm { display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 32px); margin: 14px auto 0; padding: 13px 0; background: #07c160; color: #fff; font-size: 16px; font-weight: 600; border-radius: 24px; }
.wxp-confirm:active { background: #06ad56; }
.wxp-confirm:disabled { background: #e5e6e8; color: #b9babb; }
/* 扫码收款区（微信 Native 支付/充值共用） */
.pay-qr { padding: 6px 0 4px; }
.pay-qr img { width: 196px; height: 196px; margin: 0 auto; background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 10px; }
.qr-tip { font-size: 15px; font-weight: 600; color: #07c160; margin: 10px 0 14px; }
.pay-qr .muted { margin: 10px 0 0; }

/* 扫码登录弹层（非微信环境） */
.qr-sheet { text-align: center; padding-top: 30px; }
.qr-logo { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 14px; background: linear-gradient(120deg,#2b1a4e,#4a2170); color: #fff; font-size: 24px; line-height: 60px; }
.qr-sheet h3 { margin-bottom: 10px; }
.qr-img img { width: 210px; height: 210px; margin: 8px auto; border: 1px solid #eee; border-radius: 12px; padding: 8px; }
.qr-hint { margin-top: 10px; }
.me-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.me-balances { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.me-balance { text-align: right; font-size: 12px; opacity: .9; white-space: nowrap; line-height: 1.25; }
.me-balance b { font-size: 17px; color: #ffd76a; }
.btn-recharge { background: linear-gradient(90deg, #ff5d8f, #e4393c); color: #fff; border: 0; border-radius: 12px; padding: 4px 12px; font-size: 11px; font-weight: 600; white-space: nowrap; }

/* ===== 分享弹层 ===== */
.share-sheet { text-align: center; }
.share-sheet h3 { margin-bottom: 18px; }
.share-options { display: flex; gap: 22px; justify-content: center; margin-bottom: 6px; }
/* 分享选项：圆形背景图标 + 下方小字 */
.share-opt { flex: none; width: 64px; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; color: #444; }
.share-opt:active i { filter: brightness(.92); }
.share-opt i { font-style: normal; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; line-height: 1; }
.share-opt i svg { display: block; }
#share-friend i { background: #07C160; }   /* 微信绿 */
#share-copy i { background: #FFC224; }     /* 复制链接 · 黄 */
#share-poster i { background: #4DB8F7; }   /* 生成海报 · 天蓝 */
.share-opt[disabled] { opacity: .5; }
.share-friend-hint { margin-top: 14px; background: #f0fbf4; border: 1px dashed #07c160; color: #07c160; border-radius: 10px; padding: 12px; font-size: 13px; }
.share-friend-hint p:first-child { font-weight: 600; }
.share-friend-hint p.muted { color: #666; margin-top: 4px; }
.poster-box { margin-top: 16px; }
.poster-box img { width: 260px; margin: 0 auto; border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.poster-box .muted { margin-top: 8px; }

/* ===== 亲密榜弹层 ===== */
.affinity-sheet h3 { text-align: center; }
.af-hint { text-align: center; font-size: 12px; margin: 2px 0 14px; }
.af-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.af-item { display: flex; align-items: center; gap: 10px; background: #f6f6fb; border-radius: 12px; padding: 8px 12px; }
.af-item.top1 { background: linear-gradient(90deg, #fff5e0, #ffe9c2); }
.af-item.top2 { background: linear-gradient(90deg, #f0f2f7, #e3e7f0); }
.af-item.top3 { background: linear-gradient(90deg, #fff0ec, #f9ddcf); }
.af-rank { width: 26px; text-align: center; font-size: 15px; font-weight: 700; color: #999; flex: none; }
.af-item.top1 .af-rank { color: #f5a623; }
.af-item.top2 .af-rank { color: #8a94a6; }
.af-item.top3 .af-rank { color: #d97b4a; }
.affinity-sheet .af-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #ddd; flex: none; }
.af-meta { flex: 1; min-width: 0; }
.af-name { font-size: 14px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-pts { font-size: 12px; color: #ff4d6a; margin-top: 2px; }
.af-pts b { font-size: 13px; }
.af-me { margin-top: 12px; border-top: 1px dashed #ddd; padding-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #666; }
.af-me b { color: #ff4d6a; }

#toast { position: fixed; top: 18%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.78); color: #fff; padding: 10px 22px; border-radius: 20px; font-size: 13px; z-index: 99; opacity: 0; pointer-events: none; transition: opacity .25s; }
#toast.show { opacity: 1; }

@media (min-width: 481px) { body { padding-bottom: 60px; } }

/* ===== 直播中心弹层（全部/直播中/待直播/已结束/我的观看） ===== */
.lc-tabs { display: flex; margin: 4px 0 12px; }
.lc-tabs button { flex: 1; background: none; padding: 6px 2px; font-size: 13px; color: #8a8a94; border-radius: 0; white-space: nowrap; position: relative; text-align: center; }
.lc-tabs button.active { color: #e4393c; font-weight: 700; }
.lc-tabs button[data-t="all"] { color: #1f1f1f; font-weight: 800; }
.lc-tabs button.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2.5px; border-radius: 2px; background: linear-gradient(90deg, #ff5d8f, #e4393c); }
.lh-tag.plan { color: #2f6fed; background: rgba(47,111,237,.08); border-color: rgba(47,111,237,.3); }
.lc-live { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: linear-gradient(120deg, #2b1a4e, #6b2f8f); border-radius: 12px; padding: 12px; color: #fff; }
.lc-live:active { opacity: .92; }
.lc-live .lc-thumb { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.5); background: #ddd; flex: none; }
.lc-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lc-meta b { font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lc-status { font-style: normal; font-size: 11px; }
.lc-status.live { color: #6dffa0; }
.lc-status.live::before { content: '● '; animation: lc-pulse 1.2s infinite; }
@keyframes lc-pulse { 50% { opacity: .25; } }
.lc-enter { flex: none; font-size: 12px; font-weight: 600; color: #fff; background: var(--red); border-radius: 15px; padding: 8px 14px; }

/* ===== 奖励记录（我送出的礼物） ===== */
.rw-list { display: flex; flex-direction: column; }
.rw-item { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px dashed #eee; }
.rw-gift { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rw-price { color: var(--red); font-size: 14px; flex: none; }
.rw-time { flex: none; }

/* ===== 清屏模式 ===== */
.dm-hidden { display: none !important; }

/* ===== 购物车底部抽屉（直播中弹出，约 70% 屏高，直播继续） ===== */
.cart-drawer { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; height: 70%; min-height: 300px; background: var(--bg); border-radius: 18px 18px 0 0; box-shadow: 0 -6px 30px rgba(0,0,0,.25); z-index: 30; display: flex; flex-direction: column; animation: cd-up .22s ease-out; }
.cart-drawer[hidden] { display: none; }
@keyframes cd-up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.cd-grab { flex: none; width: 40px; height: 4px; border-radius: 2px; background: #d4d4dd; margin: 8px auto 2px; }
.cd-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 14px; }
.cd-head > span:first-child { font-size: 15px; font-weight: 700; }
.cd-close { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: #ececf2; color: #888; font-size: 12px; }
.cd-box { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.cd-box .empty-tip { padding: 30px 0; }
.cd-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; padding: 10px 14px; box-shadow: 0 -3px 14px rgba(0,0,0,.06); border-radius: 0 0 18px 18px; }
.cd-bar .btn-checkout { padding: 9px 26px; }

/* ===== 举报弹窗（多选） ===== */
.report-sheet h3, .shopcat-sheet h3 { text-align: center; margin-bottom: 4px; }
.rp-tip { text-align: center; margin: 2px 0 14px; }
.rp-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.rp-grid button { padding: 8px 16px; font-size: 13px; color: #555; background: #f4f4f8; border: 1px solid transparent; border-radius: 18px; }
.rp-grid button.on { color: #fff; background: linear-gradient(90deg, #ff5d8f, var(--red)); border-color: transparent; font-weight: 600; }
.report-sheet textarea { width: 100%; border: 1px solid #e6e6ee; border-radius: 10px; padding: 10px 12px; font-size: 13px; resize: none; outline: none; margin-bottom: 14px; font-family: inherit; box-sizing: border-box; }
.report-sheet textarea:focus { border-color: var(--red); }
.report-sheet .btn-primary { width: 100%; padding: 12px 0; }
.rp-ok { text-align: center; color: #10b981; font-size: 14px; font-weight: 600; margin-top: 14px; }

/* ===== 购物分类弹层（三列宫格） ===== */
.shopcat-sheet .sc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sc-grid button { padding: 15px 4px; border-radius: 12px; background: #f7f7fb; font-size: 13px; color: #333; }
.sc-grid button:active { background: #ffe3e8; color: var(--red); }

/* ===== 分类页新版：每行一个商品 + 搜索栏右侧订单/购物车按钮(无背景、灰色图标+文字) + 紫色文字底图 ===== */
.search-bar { gap: 6px; align-items: center; }
.search-bar input { flex: 1; min-width: 0; width: auto; height: 36px; border-radius: 18px; }
.search-bar > button:not(.sb-btn) { height: 36px; padding: 0 16px; border-radius: 18px; font-size: 13px; }
.search-bar .sb-btn { position: relative; flex: none; min-width: 34px; padding: 0; border: 0; border-radius: 8px; background: none; box-shadow: none; color: #666; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.search-bar .sb-btn:active { background: none; }
.sb-ic { font-size: 17px; line-height: 1.1; filter: grayscale(1) brightness(.72); }
.sb-tx { font-size: 9px; color: #8a8a94; line-height: 1; letter-spacing: 0; }
.sb-btn .sb-badge { position: absolute; top: -2px; right: -4px; min-width: 15px; height: 15px; line-height: 15px; padding: 0 3px; border-radius: 8px; background: var(--red); color: #fff; font-size: 9px; font-weight: 600; }
.sb-badge.hide { display: none; }
.grid { display: flex; flex-direction: column; gap: 10px; }
.card { display: flex; gap: 10px; padding: 10px; align-items: stretch; }
.card-media { position: relative; width: 104px; height: 104px; flex: none; border-radius: 10px; overflow: hidden; background: #e9e6f5; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .p-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; font-size: 15px; line-height: 1.35; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0; }
.card-body b { font-size: 16px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.card-ops { margin-top: auto; padding-top: 6px; }
/* 通用紫色文字底图（白色文字） */
.p-media { display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; font-weight: 700; letter-spacing: .5px; background: linear-gradient(160deg, #9b6bff, #6a3fd8); overflow: hidden; }
.p-media.sm { font-size: 11px; padding: 4px; }
/* 商品详情紫色底图 */
.pd-media-box { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #e9e6f5; border-radius: 14px; overflow: hidden; }
.pd-media-box .p-media { position: absolute; inset: 0; width: 100%; height: 100%; font-size: 22px; padding: 18px; }
#pd-pm { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; z-index: 1; }
#pd-pm b { font-size: 27px; font-weight: 900; line-height: 1.25; text-shadow: 0 2px 6px rgba(0,0,0,.55); }
#pd-pm i { font-style: normal; font-size: 17px; font-weight: 600; line-height: 1.3; opacity: .92; }
.pd-media-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 直播秒杀卡文字底图（与分类列表同款 95% 文字盖层） */
.live-product .lp-media .p-media { width: 100%; aspect-ratio: 1 / 1; padding: 0; }
/* 购物车行缩略图（紫色文字） */
.cart-item .cart-thumb { width: 68px; height: 68px; flex: none; border-radius: 10px; font-size: 11px; cursor: pointer; }
.cart-item .cart-thumb .p-cap { border-radius: 6px; }
.cart-item .cart-thumb .p-cap b { font-size: 11px; }
.cart-item .cart-thumb .p-cap i { font-size: 7px; }
/* 我的订单弹窗 */
.orders-sheet { max-height: 76vh; overflow-y: auto; }
.orders-sheet h3 { text-align: center; margin-bottom: 10px; }

/* ===== 客服二维码弹层：仅正方形图片，无文字 ===== */
#modal-service .center-sheet { padding: 18px 16px 16px; text-align: center; }
#modal-service .qr-img img { display: block; width: min(74vw, 240px); height: min(74vw, 240px); aspect-ratio: 1 / 1; object-fit: cover; padding: 8px; margin: 4px auto; border-radius: 12px; background: #fff; }

/* ===== 直播结束页新版：顶部正方形大头像(宽80%) → 直播间名称 → 已结束+观看人数 → 主播头像/名称/简介 ===== */
.live-offline .lo-cover { flex: none; width: 92%; max-width: 460px; border-radius: 16px; overflow: hidden; border: 2px solid rgba(255,255,255,.32); box-shadow: 0 10px 32px rgba(0,0,0,.55); }
.live-offline .lo-cover img { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.live-offline .lo-title { margin-top: 16px; font-size: 22px; font-weight: 800; letter-spacing: .5px; color: #fff; }
.live-offline .lo-ended { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 6px 16px; border: 1px solid rgba(255,255,255,.55); border-radius: 18px; background: transparent; }
.live-offline .lo-state { background: rgba(128,128,128,.32); border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: 16px; font-weight: 600; padding: 5px 16px; border-radius: 14px; }
.live-offline .lo-ended-views { font-size: 16px; color: rgba(255,255,255,.72); }
.live-offline .lo-ended-views b { font-size: 18px; color: #ffb3cb; }
.live-offline .lo-anchor { display: flex; flex-direction: column; align-items: stretch; gap: 0; width: 100%; max-width: 340px; margin: 14px auto 0; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px 16px; }
.live-offline .lo-anchor-top { display: flex; align-items: center; gap: 10px; width: 100%; }
.live-offline .lo-anchor img { width: 50px; height: 50px; }
.live-offline .lo-anchor-info { text-align: left; flex: 1; min-width: 0; }
.live-offline .lo-anchor-sig { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.62); text-align: left; word-break: break-word; }

/* ===== 直播中心新版卡片：左侧封面+状态角标，右侧 房间名/副信息/主播头像昵称 ===== */
.lc-card { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 10px; box-shadow: 0 1px 5px rgba(0,0,0,.05); text-align: left; width: 100%; }
.lc-card.lc-click:active { background: #faf6ff; }
.lc-thumb-box { position: relative; flex: none; width: 100px; height: 100px; border-radius: 12px; overflow: hidden; background: #e9e6f5; }
.lc-thumb-box .lc-cover { display: block; width: 100%; height: 100%; object-fit: cover; }
.lc-badge { position: absolute; top: 6px; left: 6px; z-index: 2; font-size: 11px; font-weight: 700; color: #fff; padding: 3px 9px; border-radius: 9px; line-height: 1.5; letter-spacing: .5px; }
.lc-badge.live { background: linear-gradient(90deg, #ff2d55, #ff5d8f); box-shadow: 0 2px 6px rgba(255,45,85,.35); }
.lc-badge.live::before { content: '● '; animation: lc-pulse 1.2s infinite; }
.lc-badge.plan { background: #2f6fed; box-shadow: 0 2px 6px rgba(47,111,237,.3); }
.lc-badge.ended { background: rgba(0,0,0,.55); }
.lc-badge.mine { background: linear-gradient(90deg, #9b6bff, #6a3fd8); }
.lc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lc-main .lc-rtitle { font-size: 14px; font-weight: 700; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-main .lc-sub { font-size: 11px; color: #999; line-height: 1.6; }
.lc-anchor { display: flex; align-items: center; gap: 5px; margin-top: 1px; font-size: 11px; color: #666; min-width: 0; }
.lc-anchor img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex: none; }
.lc-anchor span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 直播中心1（个人直播数据页） ===== */
.c1-sheet { background: var(--bg); padding-top: 0; }
.c1-sheet h3 { background: #fff; text-align: center; font-size: 15px; position: sticky; top: 0; z-index: 3; margin: 0 -18px 12px; padding: 9px 12px 8px; border-radius: 20px 20px 0 0; border-bottom: 1px solid #f0eef6; }
.c1-user { display: flex; flex-direction: column; background: #fff; border-radius: 14px; box-shadow: 0 1px 5px rgba(0,0,0,.05); margin-bottom: 10px; }
.c1-top { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 16px 16px; }
.c1-top img { position: absolute; top: -11px; left: 16px; width: 76px; height: 76px; border-radius: 50%; border: 3px solid #fff; object-fit: cover; background: #e8e8ee; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.c1-user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding-left: 82px; }
.c1-user-meta > b { font-size: 16px; color: #222; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
.c1-lv { display: inline-flex; align-items: center; gap: 3px; background: #f2f2f5; border-radius: 9px; padding: 2px 7px 2px 3px; font-size: 10px; color: #5a5a63; }
.c1-lv i { font-style: normal; width: 13px; height: 13px; line-height: 13px; text-align: center; background: #a9afbc; color: #fff; border-radius: 4px; font-size: 9px; font-weight: 700; }
.c1-dur { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: 10px; }
.c1-dur b { font-size: 18px; color: #e4393c; white-space: nowrap; line-height: 1.1; }
.c1-dur span { font-size: 11px; color: #999; white-space: nowrap; }
.c1-stats { display: flex; align-items: stretch; padding: 22px 4px 18px; }
.c1-stat { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.c1-stat b { font-size: 20px; color: #2b1a4e; }
.c1-stat span { font-size: 11px; color: #999; text-align: center; line-height: 1.3; padding: 0 2px; }
.c1-reward { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 12px; box-shadow: none; padding: 7px 12px; margin: 2px 14px 12px; }
.c1-reward-t { font-size: 14px; font-weight: 700; color: #333; }
.c1-reward em { font-style: normal; flex: 1; min-width: 0; text-align: right; font-size: 12px; color: #ff4d6a; }
.c1-arrow { flex: none; width: 20px; height: 20px; margin-left: 4px; border-radius: 50%; background: #fff; color: #999; font-style: normal; display: flex; align-items: center; justify-content: center; font-size: 16px; line-height: 1; }
#c1-reward { cursor: pointer; }
.c1-head { position: relative; background: #ffe6ec; color: #222; font-size: 15px; font-weight: 700; text-align: left; border-radius: 12px; padding: 12px 16px 12px 28px; margin-bottom: 8px; letter-spacing: .5px; }
.c1-head::before { content: ''; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 4px; height: 16px; border-radius: 3px; background: #ff2d55; }
.c1-list { display: flex; flex-direction: column; gap: 8px; }
.c1-more { width: 100%; margin-top: 12px; padding: 10px 0; border-radius: 20px; border: 1px solid #ffd2df; background: #fff; color: #e4393c; font-size: 13px; font-weight: 600; }
.c1-more:active { background: #fff0f3; }
