: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.active { display: block; }
.page-pad { padding: 14px; }
/* 非首页页面为固定底部导航留出空间 */
.page:not(#page-home) .page-pad { padding-bottom: 80px; }

/* ===== 直播间 ===== */
.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)); }
/* 直播声音开关（左侧垂直居中，背景半透明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); }

/* 底部互动栏：评论输入框 + 礼物 / 购物车 / 送♥ / 更多（仅图标） */
.interact-bar { position: absolute; left: 12px; right: 12px; bottom: 14px; z-index: 4; 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; }

/* 未开播/直播结束遮罩（直播结束页 + 历史直播） */
.live-offline { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; background: rgba(10,6,20,.72); backdrop-filter: blur(6px); color: #fff; text-align: center; padding: 7vh 32px 44px; 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); }
/* 直播结束页：往期直播列表 */
.live-offline .lo-history { width: 100%; max-width: 340px; margin-top: 4px; text-align: left; }
.live-offline .lo-history h4 { font-size: 13px; letter-spacing: .5px; color: rgba(255,255,255,.85); margin: 0 0 8px; }
.live-offline .lh-list { max-height: 30vh; overflow-y: auto; }
.live-offline .lh-item { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.live-offline .lh-item .lh-date { color: #fff; font-size: 12px; }
.live-offline .lh-item .lh-sub { color: rgba(255,255,255,.6); }
.live-offline .lh-empty { color: rgba(255,255,255,.5); }
.live-offline .lo-more { margin-top: 10px; padding: 8px 20px; border-radius: 18px; border: 1px solid rgba(255,93,143,.6); background: rgba(255,93,143,.15); color: #ffb3cb; font-size: 12px; cursor: pointer; }
.streamer { position: absolute; top: 14px; left: 12px; display: flex; align-items: center; gap: 8px; z-index: 3; }
.avatar { position: relative; }
.avatar img { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #ff5d8f; object-fit: cover; }
.live-badge { position: absolute; left: 50%; transform: translateX(-50%); bottom: -12px; background: var(--red); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 8px; font-weight: 700; }
.streamer-meta { background: rgba(0,0,0,.35); backdrop-filter: blur(4px); border-radius: 20px; padding: 4px 12px; color: #fff; font-size: 12px; display: flex; flex-direction: column; }
.streamer-meta b { font-size: 13px; }
.float-col { position: absolute; right: 12px; top: 14px; display: flex; flex-direction: column; 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 i { font-style: normal; font-size: 9px; transform: scale(.9); }
/* 刷新按钮：无底色、更大尺寸、白色图标 50% 透明 */
#btn-refresh-float { background: none; width: 56px; height: 56px; opacity: .5; }
#btn-refresh-float:active { opacity: .8; }
.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-sheet h3 { text-align: center; margin-bottom: 12px; }
.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; }

/* 礼物面板 */
.gift-sheet h3 { text-align: center; margin-bottom: 14px; }
.gift-bal { display: flex; align-items: center; justify-content: space-between; background: #fff7e6; border: 1px solid #ffe1a8; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; color: #b8860b; }
.gift-bal b { color: #d48806; font-size: 15px; }
.gift-bal button { background: none; border: 0; color: #e4393c; font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gift-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; background: #fafafa; font-size: 12px; color: #555; }
.gift-item:active { background: #ffeff2; }
.gift-item b { font-size: 24px; }
.gift-item em { font-style: normal; color: var(--red); font-size: 11px; font-weight: 600; }

/* 余额充值弹层 */
.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: 8px; }
.more-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 14px; border-radius: 10px; font-size: 14px; background: #fafafa; margin-bottom: 8px; }
.more-item:active { background: #f0f0f4; }

.danmaku { position: absolute; left: 12px; bottom: 84px; width: 70%; max-height: 150px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; z-index: 2; }
.danmaku p { background: rgba(0,0,0,.35); color: #fff; font-size: 12px; border-radius: 12px; padding: 4px 10px; width: fit-content; max-width: 100%; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }

/* 送礼物 / 送♥ 飘动动画 */
.gift-fly, .heart-fly { position: absolute; bottom: 90px; font-size: 42px; z-index: 6; pointer-events: none; animation: giftUp 1.5s ease-out forwards; }
.gift-fly { animation: giftUp 1.5s ease-out forwards; }
.heart-fly { font-size: 22px; animation: heartUp 2.4s ease-out forwards; }
@keyframes giftUp { 0% { opacity: 0; transform: translateY(10px) scale(.6); } 20% { opacity: 1; transform: translateY(0) scale(1.15); } 100% { opacity: 0; transform: translateY(-130px) scale(1); } }
@keyframes heartUp { 0% { opacity: 0; transform: translateY(0) scale(.7); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-220px) scale(1.1); } }

.live-product { position: absolute; right: 12px; bottom: 66px; z-index: 3; display: flex; flex-direction: column; width: 148px; background: rgba(255,255,255,.97); border-radius: 12px; padding: 8px; 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; border-radius: 8px; overflow: hidden; }
.lp-media img { width: 100%; height: 158px; object-fit: cover; }
.lp-sold { position: absolute; top: -26px; left: 0; 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); }
.lp-tag { position: absolute; left: 0; bottom: 0; background: linear-gradient(90deg, #7b2ff7, #b24bf3); color: #fff; font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 0 8px 0 0; }
.lp-name { margin-top: 7px; font-size: 14px; line-height: 1.35; height: 38px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lp-buy { margin-top: 6px; position: relative; display: flex; align-items: stretch; width: 100%; border-radius: 16px; 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: 12px; padding: 7px 4px 7px 10px; min-width: 0; }
.lp-price i { font-style: normal; font-size: 17px; }
.lp-price em { display: none; }
.lp-go { position: relative; display: flex; align-items: center; padding: 7px 12px 7px 16px; background: linear-gradient(90deg, #ff5d8f, var(--red)); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.lp-go::before { content: ''; position: absolute; left: -5px; top: 0; width: 12px; height: 100%; background: linear-gradient(90deg, #ff5d8f, var(--red)); border-radius: 100% 0 0 100% / 50%; }
.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; }
.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: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.card-price { color: var(--red); font-weight: 700; margin-top: 4px; font-size: 15px; }
.card-price em { font-style: normal; font-size: 11px; color: var(--muted); text-decoration: line-through; font-weight: 400; margin-left: 4px; }
.card-save { color: #16a34a; font-size: 11px; font-weight: 600; margin-top: 2px; }
.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: 60px; 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: 5; }
.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; }
.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-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; }

/* ===== 底部导航 ===== */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: 56px; background: #fff; display: flex; box-shadow: 0 -2px 12px rgba(0,0,0,.06); z-index: 10; }
.tabbar.hide { display: none; }
/* 首页：导航排在直播画面下方，需滚动页面才能看到 */
.tabbar.on-live { position: static; transform: none; }
.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); }

/* 头像下方客服按钮 */
.avatar-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.btn-service { padding: 3px 10px; font-size: 11px; border-radius: 10px; background: rgba(0,0,0,.45); color: #fff; border: 1px solid rgba(255,255,255,.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); margin-top: 4px; }
.btn-service:active { background: rgba(0,0,0,.65); }
/* ===== 弹层 ===== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 20; 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; }
.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; }
.pay-sheet h3 { margin-bottom: 6px; }
.pay-amount { font-size: 16px; color: var(--red); margin: 14px 0 20px; }
.pay-amount b { font-size: 32px; }
.pay-methods { display: flex; gap: 10px; margin-bottom: 14px; }
.pm-btn { flex: 1; border-radius: 12px; padding: 13px 8px; font-size: 15px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.pm-btn small { font-size: 11px; font-weight: 400; opacity: .85; }
.pm-btn.disabled { opacity: .45; }
.pm-wx { background: #07c160; color: #fff; }
.pm-bal { background: #fff7e6; color: #b8860b; border: 1px solid #ffe1a8; }
.pay-qr { padding: 4px 0 10px; }
.pay-qr img { width: 220px; height: 220px; border: 1px solid #eee; border-radius: 10px; }
.qr-tip { font-size: 14px; font-weight: 600; color: #07c160; margin-bottom: 10px; }

/* 扫码登录弹层（非微信环境） */
.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; flex-direction: column; align-items: center; gap: 8px; }
.me-balance { text-align: center; font-size: 12px; opacity: .9; }
.me-balance b { font-size: 17px; color: #ffd76a; }
.btn-recharge { background: linear-gradient(90deg, #ff5d8f, #e4393c); color: #fff; border: 0; border-radius: 14px; padding: 5px 16px; font-size: 13px; font-weight: 600; }

/* ===== 分享弹层 ===== */
.share-sheet { text-align: center; }
.share-sheet h3 { margin-bottom: 18px; }
.share-options { display: flex; gap: 12px; margin-bottom: 4px; }
.share-opt { flex: 1; background: #f5f5fa; border-radius: 14px; padding: 16px 6px; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; color: #333; }
.share-opt:active { background: #ececf2; }
.share-opt i { font-style: normal; font-size: 28px; line-height: 1; }
.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; }
.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; } }
