/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }

/* 充值记录入口（蓝色小字链接） */
.rec-records-link { color: #2d7dd2; font-size: 13px; text-decoration: none; }
.rec-records-link:active { opacity: .7; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }

/* 充值记录入口（蓝色小字链接） */
.rec-records-link { color: #2d7dd2; font-size: 13px; text-decoration: none; }
.rec-records-link:active { opacity: .7; }

/* 站内弹窗（模态） */
.app-modal-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.app-modal-mask.show { opacity: 1; pointer-events: auto; }
.app-modal-card {
  width: min(82vw, 320px); background: #fff; border-radius: 14px;
  padding: 22px 18px 16px; box-shadow: 0 8px 30px rgba(0,0,0,.18);
  text-align: center;
}
.app-modal-body { font-size: 15px; line-height: 1.6; color: #333; margin-bottom: 18px; }
.app-modal-btn {
  width: 100%; padding: 10px 0; border: 0; border-radius: 10px;
  background: #e34d2c; color: #fff; font-size: 15px; cursor: pointer;
}
.app-modal-btn:active { opacity: .8; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }

/* 充值记录入口（蓝色小字链接） */
.rec-records-link { color: #2d7dd2; font-size: 13px; text-decoration: none; }
.rec-records-link:active { opacity: .7; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }

/* 充值记录入口（蓝色小字链接） */
.rec-records-link { color: #2d7dd2; font-size: 13px; text-decoration: none; }
.rec-records-link:active { opacity: .7; }

/* 站内弹窗（模态） */
.app-modal-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.app-modal-mask.show { opacity: 1; pointer-events: auto; }
.app-modal-card {
  width: min(82vw, 320px); background: #fff; border-radius: 14px;
  padding: 22px 18px 16px; box-shadow: 0 8px 30px rgba(0,0,0,.18);
  text-align: center;
}
.app-modal-body { font-size: 15px; line-height: 1.6; color: #333; margin-bottom: 18px; }
.app-modal-btn {
  width: 100%; padding: 10px 0; border: 0; border-radius: 10px;
  background: #e34d2c; color: #fff; font-size: 15px; cursor: pointer;
}
.app-modal-btn:active { opacity: .8; }

/* 语言作为导航项 */
.me-links .me-lang-cur { color: #888; font-size: 13px; margin-left: auto; }
.me-lang-item .lang-list { border-top: none; }
.me-lang-item .lang-opt { padding-left: 36px; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }

/* 充值记录入口（蓝色小字链接） */
.rec-records-link { color: #2d7dd2; font-size: 13px; text-decoration: none; }
.rec-records-link:active { opacity: .7; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }

/* 充值记录入口（蓝色小字链接） */
.rec-records-link { color: #2d7dd2; font-size: 13px; text-decoration: none; }
.rec-records-link:active { opacity: .7; }

/* 站内弹窗（模态） */
.app-modal-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.app-modal-mask.show { opacity: 1; pointer-events: auto; }
.app-modal-card {
  width: min(82vw, 320px); background: #fff; border-radius: 14px;
  padding: 22px 18px 16px; box-shadow: 0 8px 30px rgba(0,0,0,.18);
  text-align: center;
}
.app-modal-body { font-size: 15px; line-height: 1.6; color: #333; margin-bottom: 18px; }
.app-modal-btn {
  width: 100%; padding: 10px 0; border: 0; border-radius: 10px;
  background: #e34d2c; color: #fff; font-size: 15px; cursor: pointer;
}
.app-modal-btn:active { opacity: .8; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }

/* 充值记录入口（蓝色小字链接） */
.rec-records-link { color: #2d7dd2; font-size: 13px; text-decoration: none; }
.rec-records-link:active { opacity: .7; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }
/* 电商模板基础样式：简洁、响应式、亮色 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #222;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 导航 */
#site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 20px; font-weight: 700; color: #e34d2c; }
#site-header nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
#site-header nav a:hover { color: #e34d2c; }
.nav-user { color: #666; }
.lang-switch { border: 1px solid #ddd; border-radius: 6px; padding: 4px 6px; font-size: 13px; color: #555; background: #fff; cursor: pointer; outline: none; margin-left: auto; margin-right: 12px; }
.lang-switch:hover { border-color: #e34d2c; color: #e34d2c; }
.coin-balance { color: #e34d2c; font-weight: 700; }

/* 布局容器 */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { height: 180px; background: #f0f1f3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.ph { background: linear-gradient(135deg, #ffd9cc, #ffe8d9); }
.ph-letter { font-size: 48px; font-weight: 700; color: #e34d2c; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; min-height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #e34d2c; font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
.product-stock { font-size: 12px; color: #999; margin-bottom: 10px; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #e34d2c; color: #fff; }
.btn:hover { background: #d14321; }
.btn-block { width: 100%; text-align: center; }
.btn-ghost { background: #fff; color: #e34d2c; border: 1px solid #e34d2c; }
.btn-ghost:hover { background: #fff4f0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { background: #ccc; cursor: not-allowed; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid #ddd; font-size: 13px; color: #555; }
.chip.active { background: #e34d2c; border-color: #e34d2c; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination button { min-width: 36px; padding: 6px 10px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }
.pagination button.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.pagination button:disabled { color: #ccc; cursor: not-allowed; }

/* 表单 */
.form-card { max-width: 420px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.msg { display: none; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: #e8f7ee; color: #1a7f37; }
.msg.error { background: #fdecea; color: #c62828; }

/* 购物车 / 订单列表 */
.list { display: flex; flex-direction: column; gap: 12px; }
.line-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.line-item .p-img { width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0; }
.line-item .p-img img { object-fit: cover; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-name { font-weight: 600; font-size: 14px; }
.line-item .li-price { color: #e34d2c; font-weight: 700; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.qty-control button { width: 30px; height: 32px; border: none; background: #f7f8fa; font-size: 16px; }
.qty-control span { width: 40px; text-align: center; font-size: 14px; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px; margin-top: 16px; }
.summary-total { font-size: 16px; }
.summary-total strong { color: #e34d2c; font-size: 22px; margin-left: 6px; }

/* 订单卡片 */
.order-card { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888; margin-bottom: 10px; }
.order-status { color: #1a7f37; font-weight: 600; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-foot { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* 后台 */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 8px 20px; border-radius: 8px; background: #fff; border: 1px solid #ddd; }
.tab.active { background: #e34d2c; color: #fff; border-color: #e34d2c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafbfc; color: #666; }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; }
.status-pill.paid { background: #e8f7ee; color: #1a7f37; }
.status-pill.cancelled { background: #fdecea; color: #c62828; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.empty { text-align: center; color: #999; padding: 60px 0; }
.empty a { color: #e34d2c; }

.chips-label { font-size: 13px; color: #666; margin-right: 8px; font-weight: 600; }

/* 彩币：余额框 / 充值金额选择 */
.balance-box { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border: 1px solid #ffd591; font-size: 14px; }
.balance-box b { color: #e34d2c; }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-chips .chip { padding: 10px 16px; font-size: 14px; }

/* 社区：帖子卡片 / 点赞 / 评论 */
.post-card { padding: 16px 18px; }
.post-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.post-title a:hover { color: #e34d2c; }
.post-content { font-size: 14px; color: #555; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 10px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; flex-wrap: wrap; gap: 6px; }
.like-btn { border: 1px solid #ddd; background: #fff; border-radius: 14px; padding: 2px 12px; font-size: 12px; color: #666; }
.like-btn.liked { border-color: #e34d2c; color: #e34d2c; background: #fff4f0; }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

@media (max-width: 600px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px 16px; gap: 8px; }
  #site-header nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-img { height: 130px; }
}

/* 首页专题：3 个 16:9 横版卡片单列三行，上方图片 + 下方简介 */
.topic-list { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.topic-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.topic-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f6f6f6; flex-shrink: 0; }
.topic-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-img-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; letter-spacing: 2px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-info { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.topic-info h2 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #222; }
.topic-info p { font-size: 13px; line-height: 1.6; color: #777; margin: 0 0 10px; }
.topic-more { display: inline-block; font-size: 13px; font-weight: 600; color: #e34d2c; }

/* 专栏商品页 */
.collection-head { text-align: center; position: relative; padding-top: 14px; }
.collection-head .back-link { position: absolute; left: 4px; top: 16px; font-size: 14px; color: #888; text-decoration: none; }
.collection-head .back-link:hover { color: #e34d2c; }

/* 后台：专题管理 */
.topic-edit { padding: 16px; }
.topic-edit-top { display: flex; gap: 14px; margin-bottom: 12px; }
.topic-preview { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid #eee; flex-shrink: 0; }
.topic-preview-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; letter-spacing: 1px; background: linear-gradient(135deg, #f7f7f7, #efefef); }
.topic-edit-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-edit-bottom select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

/* 商品详情：主图轮播（4:3 等比缩小，最多 3 张滑动切换） */
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #f6f6f6; border: 1px solid #eee; }
.gallery-main .g-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.gallery-main .g-slide.active { opacity: 1; }
.g-slide.g-ph { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 14px; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.g-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.g-thumb.active { border-color: #e34d2c; opacity: 1; }

/* 玩法规则介绍 */
.rules-box { margin-top: 22px; padding: 16px 18px; background: #fff8f2; border: 1px solid #f3dccb; border-radius: 12px; }
.rules-box h3 { margin: 0 0 8px; font-size: 16px; color: #b23a1c; }
.rules-body { font-size: 14px; line-height: 1.8; color: #555; }

/* 号码数组填写（每组 3 位 0~9，最多 20 组） */
.num-box { margin-top: 22px; }
.num-box h3 { font-size: 16px; margin: 0 0 6px; }
.num-tip { font-size: 12px; color: #999; margin: 0 0 12px; }
.num-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.num-idx { width: 22px; font-size: 12px; color: #999; text-align: center; flex-shrink: 0; }
.num-input { width: 90px; padding: 10px; font-size: 18px; text-align: center; letter-spacing: 4px; border: 1px solid #ddd; border-radius: 10px; }
.num-input:focus { border-color: #e34d2c; outline: none; }

/* 订单：号码数组 */
.order-nums { padding: 8px 0 2px; font-size: 13px; color: #666; border-top: 1px dashed #eee; margin-top: 6px; }
.order-nums b { color: #e34d2c; letter-spacing: 2px; }

/* 交易时段状态 */
.btn-grey { background: #b8bcc4 !important; border-color: #b8bcc4 !important; color: #fff !important; cursor: not-allowed !important; box-shadow: none !important; }
.trade-status { margin-top: 10px; font-size: 12px; text-align: center; line-height: 1.5; min-height: 16px; }
.rate-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rate-name { width: 64px; font-weight: 700; color: #333; white-space: nowrap; }
.price-line { font-size: 14px; color: #666; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.price-line b { color: #e34d2c; }
.price-total { font-size: 16px; font-weight: 700; color: #333; border-top: 1px dashed #eee; padding-top: 10px; margin-top: 10px; }
.price-total b { font-size: 20px; }

/* 专题3 弹珠竞猜：三组冠军选择（6 列等宽网格，A/B/C 三行整齐对齐） */
.marble-opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.m-opt { height: 38px; padding: 0; border: 1px solid #ddd; border-radius: 8px; background: #fff; font-size: 15px; color: #333; cursor: pointer; text-align: center; }
.m-opt.active { background: #e34d2c; color: #fff; border-color: #e34d2c; font-weight: 700; box-shadow: 0 2px 6px rgba(227, 77, 44, .35); }

/* 专题3 商品页：查看前5s 按钮 */
.m5s-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.m5s-btn { font-size: 12px; color: #e34d2c; background: #fff7f5; border: 1px solid #ffd6cc; border-radius: 14px; padding: 4px 14px; cursor: pointer; }
.m5s-btn:hover { background: #ffede8; }

/* 专题3 订单详情：竞速详情入口（紧凑三行，点击展开 16:9 视频） */
.marble-video-list { display: grid; gap: 8px; }
.marble-video-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e5e8ec; border-radius: 8px; background: #fff; cursor: pointer; }
.marble-video-row-name { font-size: 14px; color: #333; font-weight: 600; }
.marble-video-row-arrow { font-size: 13px; color: #e34d2c; }
.marble-video-row.open { border-color: #e34d2c; background: #fff7f5; }
.marble-video-detail { display: none; }
.marble-video-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.marble-video-frame { aspect-ratio: 9 / 16; background: #f2f3f5; border: 1px dashed #d5d8de; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #666; font-size: 14px; text-align: center; padding: 6px; }
.marble-video-frame video { width: 100%; height: 100%; border: none; border-radius: 8px; }
.marble-video-seg { font-weight: 700; color: #e34d2c; font-size: 13px; }
.marble-video-pending { color: #999; font-size: 12px; }
.marble-video-full-btn { margin-top: 8px; padding: 9px 12px; border: 1px solid #e34d2c; color: #e34d2c; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.marble-video-full-btn.open { background: #e34d2c; color: #fff; }
/* 完整版全屏播放器（9:16 竖屏） */
.marble-fullscreen { position: fixed; inset: 0; z-index: 9999; background: #000; display: none; flex-direction: column; }
.marble-fullscreen-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; font-size: 15px; font-weight: 600; }
.marble-fullscreen-close { font-size: 20px; cursor: pointer; padding: 2px 10px; color: #fff; }
.marble-fullscreen-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.marble-fullscreen-stage video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; display: block; }
.marble-video-player-pending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #999; font-size: 13px; pointer-events: none; }

/* 后台：倍率设置 */
.rate-edit { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.rate-edit .rate-name { width: 52px; font-weight: 700; color: #e34d2c; padding-bottom: 10px; }

/* 订单详情 */
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0; }
.order-line span { color: #888; }
.order-line b { color: #333; font-weight: 600; text-align: right; }
.redeem-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.redeem-num { font-size: 18px; font-weight: 700; letter-spacing: 3px; color: #333; width: 80px; }
.redeem-state { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.redeem-state.hit { background: #ffe8e3; color: #e34d2c; font-weight: 700; }
.redeem-state.semi { background: #fff4e0; color: #c77b00; }
.redeem-state.miss { background: #f2f2f2; color: #999; }
.redeem-total { margin-top: 14px; padding: 14px; background: #fff7f4; border: 1px dashed #e34d2c; border-radius: 10px; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.redeem-total b { color: #e34d2c; font-size: 22px; }
.redeem-done { margin-top: 12px; padding: 12px; background: #f2f8f2; border-radius: 8px; color: #2d7d2d; font-size: 14px; text-align: center; }

/* 底部导航 TabBar：首页 / 社区 / 订单 / 我的 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; font-size: 11px; color: #8a8a8a; text-decoration: none;
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item.active { color: #e34d2c; font-weight: 600; }
body.tabbar .container { padding-bottom: 84px; }

/* 我的页面：用户卡片与功能入口 */
.me-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #e34d2c, #f5a623);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 56px;
}
.me-links { list-style: none; }
.me-links li { border-bottom: 1px solid #f3f3f3; }
.me-links li:last-child { border-bottom: none; }
.me-links a {
  display: flex; align-items: center; gap: 10px; padding: 14px 6px; color: #333; text-decoration: none; font-size: 15px;
}
.me-links a:hover { color: #e34d2c; }
.me-links .me-icon { width: 20px; height: 20px; color: #e34d2c; flex: 0 0 20px; }
.me-links .me-arrow { margin-left: auto; color: #ccc; font-size: 14px; }

/* 专题「待开放」徽标 */
.topic-card { position: relative; }
.topic-pending-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #e34d2c; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px; font-weight: 600;
  letter-spacing: 1px; box-shadow: 0 2px 6px rgba(227,77,44,.35);
}

/* ===== 社区：右下角发布加号（FAB）===== */
.fab {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #e34d2c;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(227, 77, 44, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: scale(.94); }

/* ===== 发布面板（bottom sheet）===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }

/* 发布图片预览 */
.post-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-img { position: relative; width: 84px; height: 84px; }
.compose-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.compose-img-del {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: #e34d2c; color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}

/* 帖子图片网格 */
.post-img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.post-img-cell { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 8px; cursor: pointer; }
.post-img-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== 语言选择（我的页 · 点击展开）===== */
.lang-box { border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.lang-head-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #555; }
.lang-arrow { width: 16px; height: 16px; transition: transform .18s; }
.lang-head.open .lang-arrow { transform: rotate(180deg); }
.lang-list { display: none; border-top: 1px solid #f2f2f2; }
.lang-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f5f5f5;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}
.lang-opt:first-child { border-top: none; }
.lang-opt.active { color: #e34d2c; font-weight: 700; }
.lang-opt:active { background: #fafafa; }

/* 号码数组重复提示 */
.num-input.num-dup { border-color: #e34d2c !important; background: #fdecea; color: #e34d2c; }

/* ===== 站内提示框（toast）===== */
.app-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 999;
  max-width: 84%;
  padding: 12px 22px;
  border-radius: 10px;
  background: rgba(40, 40, 40, .94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.err { background: rgba(190, 45, 20, .96); }

/* 充值记录入口（蓝色小字链接） */
.rec-records-link { color: #2d7dd2; font-size: 13px; text-decoration: none; }
.rec-records-link:active { opacity: .7; }

/* 站内弹窗（模态） */
.app-modal-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.app-modal-mask.show { opacity: 1; pointer-events: auto; }
.app-modal-card {
  width: min(82vw, 320px); background: #fff; border-radius: 14px;
  padding: 22px 18px 16px; box-shadow: 0 8px 30px rgba(0,0,0,.18);
  text-align: center;
}
.app-modal-body { font-size: 15px; line-height: 1.6; color: #333; margin-bottom: 18px; }
.app-modal-btn {
  width: 100%; padding: 10px 0; border: 0; border-radius: 10px;
  background: #e34d2c; color: #fff; font-size: 15px; cursor: pointer;
}
.app-modal-btn:active { opacity: .8; }

/* 语言作为导航项 */
.me-links .me-lang-cur { color: #888; font-size: 13px; margin-left: auto; }
.me-lang-item .lang-list { border-top: none; }
.me-lang-item .lang-opt { padding-left: 36px; }

/* 专题2 玩法选择 */
.p3-plays { display: flex; gap: 8px; flex-wrap: wrap; }
.p3-play-opt {
  flex: 1; min-width: 80px; padding: 9px 0; border: 1px solid #e5e5e5; border-radius: 8px;
  background: #fff; font-size: 14px; color: #555; cursor: pointer;
}
.p3-play-opt.active { border-color: #e34d2c; color: #e34d2c; background: #fff5f2; font-weight: 700; }


/* ===== 专题3 刮刮乐 ===== */
.scratch-preview { display:flex; gap:12px; justify-content:center; margin:14px 0; }
.scratch-cards { display:flex; gap:14px; justify-content:center; margin:14px 0; }
.scratch-cell {
  width:72px; height:96px; border-radius:10px;
  background:linear-gradient(145deg,#f3d27a,#e8b73a);
  display:flex; align-items:center; justify-content:center;
  font-size:36px; font-weight:700; color:#7a4a00;
  box-shadow:0 3px 8px rgba(0,0,0,.15); cursor:pointer;
  user-select:none;
}
.scratch-preview .scratch-cell { width:60px; height:80px; font-size:28px; }
.scratch-cover {
  position:absolute; inset:0; border-radius:10px;
  background:repeating-linear-gradient(45deg,#cfd8dc,#cfd8dc 6px,#b0bec5 6px,#b0bec5 12px);
  display:flex; align-items:center; justify-content:center;
  font-size:14px; color:#546e7a; font-weight:600; letter-spacing:2px;
}
.scratch-cards .scratch-cell { position:relative; }

.scratch-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:5px; margin:14px auto; width:100%; max-width:276px; position:relative; }
.scratch-cell.s3x3 { width:100%; height:64px; font-size:24px; position:relative; }
.scratch-cell.s3x3 .scratch-cover { position:absolute; inset:0; }

.win-nums-bar { display:flex; align-items:center; justify-content:center; gap:10px; background:#fff7e6; border:1px dashed #e8b73a; border-radius:10px; padding:10px 14px; margin-bottom:12px; }
.win-label { font-size:13px; color:#999; }
.win-nums { font-size:20px; font-weight:700; color:#e34d2c; letter-spacing:3px; }
.scratch-cell.cell-hit { background:linear-gradient(145deg,#ffd54f,#ffb300); box-shadow:0 0 0 2px #e34d2c, 0 3px 8px rgba(0,0,0,.2); }


/* ===== 刮刮乐印刷卡片（真实刮刮卡质感）===== */
.scratch-ticket {
  width: 300px;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(120,15,15,.88) 0%, rgba(180,30,25,.82) 45%, rgba(200,50,25,.85) 100%),
    url("/images/ox-bg.jpg") center/cover no-repeat;
  box-shadow: 0 6px 20px rgba(168,35,31,.45), inset 0 0 0 1px rgba(255,215,130,.35);
  margin: 14px auto;
  position: relative;
}
.ticket-head {
  background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,0));
  padding: 16px 18px 12px;
  text-align: center;
  border-bottom: 1px dashed rgba(255,220,150,.4);
}
.ticket-brand {
  font-size: 22px; font-weight: 800; color: #ffe9a8;
  letter-spacing: 4px;
  text-shadow: 0 2px 4px rgba(0,0,0,.35);
}
.ticket-tag {
  margin-top: 4px; font-size: 12px; color: #ffd88a;
  letter-spacing: 2px; opacity: .9;
}
.ticket-body { display:flex; flex-direction:column; align-items:center; padding: 10px 12px; padding: 16px 14px; }
.ticket-foot {
  background: rgba(0,0,0,.18);
  padding: 10px 14px; text-align: center;
  font-size: 12px; color: #ffe9a8; letter-spacing: 1px;
  border-top: 1px dashed rgba(255,220,150,.4);
}

/* 中奖号码金框 */
.scratch-ticket .win-nums-bar {
  background: #dedede;
  border: 1px dashed #9a9a9a;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.scratch-ticket .win-label { color: #555; font-size: 13px; }
.scratch-ticket .win-nums {
  color: #fff; font-size: 22px; font-weight: 800;
  letter-spacing: 6px;
  text-shadow: 0 1px 3px rgba(0,0,0,.35);
}

/* 锡纸刮层 */
.scratch-ticket .scratch-cell.s3x3 {
  background: repeating-linear-gradient(45deg, #c7ccd1 0, #c7ccd1 6px, #a8adb3 6px, #a8adb3 12px);
  color: #4a5560;
  border: 1px solid #8b9299;
  box-shadow: inset 0 1px 3px rgba(255,255,255,.5), inset 0 -2px 4px rgba(0,0,0,.15);
}
.scratch-ticket .scratch-cover {
  position: absolute; inset: 0; border-radius: inherit;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #6b7280; font-weight: 700; letter-spacing: 2px;
}
/* 刮开后露出的金格 */
.scratch-ticket .scratch-cell.s3x3:not(:has(.scratch-cover)) {
  background: linear-gradient(160deg, #fff8e1, #ffe9a8);
  color: #b8430f;
  border-color: #f0c060;
  font-weight: 800;
}
.scratch-ticket .scratch-cell.cell-hit {
  background: linear-gradient(160deg, #fff176, #ffd54f) !important;
  box-shadow: 0 0 0 2px #e34d2c, 0 3px 10px rgba(227,77,44,.45);
}

/* 福牛主题装饰 */
.ticket-head { display:flex; align-items:center; justify-content:center; gap:14px; }
.ticket-ox { display:none; }
.ticket-head-text { text-align:left; }
.ticket-head-text .ticket-brand { text-align:left; }
.ticket-head-text .ticket-tag { text-align:left; }

/* 福牛暗纹背景（铜钱+云纹） */
.scratch-ticket { position:relative; }
.scratch-ticket::before { content:""; position:absolute; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,215,130,.22) 0, transparent 55px),
    radial-gradient(circle at 88% 25%, rgba(255,215,130,.18) 0, transparent 60px),
    radial-gradient(circle at 15% 70%, rgba(255,235,180,.18) 0, transparent 50px),
    radial-gradient(circle at 85% 80%, rgba(255,215,130,.20) 0, transparent 65px),
    radial-gradient(circle at 50% 50%, rgba(255,240,200,.08) 0, transparent 100px);
}
.scratch-ticket .deco-layer { position:absolute; inset:0; pointer-events:none; z-index:3; overflow:hidden; border-radius:inherit; }
.scratch-ticket .deco-layer span { position:absolute; color:rgba(255,215,130,.18); }
.scratch-ticket .deco-layer .d-cloud1 { left:8%; top:12%; font-size:28px; }
.scratch-ticket .deco-layer .d-cloud2 { right:10%; top:35%; font-size:22px; }
.scratch-ticket .deco-layer .d-cloud3 { left:12%; top:60%; font-size:24px; }
.scratch-ticket .deco-layer .d-cloud4 { right:8%; bottom:20%; font-size:26px; }
.scratch-ticket .deco-layer .d-coin1 { left:25%; top:8%; font-size:18px; }
.scratch-ticket .deco-layer .d-coin2 { right:25%; top:55%; font-size:16px; }
.scratch-ticket .deco-layer .d-coin3 { left:30%; bottom:15%; font-size:20px; }
.scratch-ticket .deco-layer .d-star1 { left:18%; top:40%; font-size:12px; }
.scratch-ticket .deco-layer .d-star2 { right:18%; top:75%; font-size:14px; }
.scratch-ticket .deco-layer .d-ribbon { left:50%; top:4%; transform:translateX(-50%); font-size:16px; }
.scratch-ticket::after { content:"福"; position:absolute; right:-10px; bottom:-20px; font-size:140px; font-weight:900; color:rgba(255,215,130,.08); z-index:0; font-family:serif; }
.scratch-ticket > * { position:relative; z-index:1; }
.scratch-ticket::before {
  content:"";
  position:absolute; inset:0; pointer-events:none;
  background-image:
    radial-gradient(circle at 12% 30%, rgba(255,233,168,.08) 0, transparent 22%),
    radial-gradient(circle at 88% 65%, rgba(255,233,168,.08) 0, transparent 22%),
    radial-gradient(circle at 50% 90%, rgba(255,233,168,.06) 0, transparent 25%);
}
.scratch-ticket > * { position:relative; }

/* 中奖号码区（虚线分隔） */
.win-zone {
  grid-column: 1 / -1;
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 12px 14px;
  background:#dedede;
  border-radius:10px;
  border: 1px dashed #9a9a9a;
  margin-bottom: 12px;
}
.win-zone .win-label { color: #555; font-size: 13px; }
.win-zone .win-nums { color: #fff; font-size: 22px; font-weight: 800; letter-spacing: 6px; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
/* 刮奖区：4列网格 */
.cells-zone {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; justify-items: center;
}
.scratch-cell.cell-placeholder { background: rgba(255,255,255,.08); }


/* 金额格：数字+彩币单位，小字号防溢出 */
.scratch-cell.s3x3.cell-num-amt { font-size:12px !important; letter-spacing:0; font-weight:700; line-height:1.2 !important; white-space:nowrap !important; overflow:hidden; }

/* 生肖图格 */
.scratch-cell.s3x3 .cell-img { width: 88%; height: 88%; object-fit: contain; display: block; margin: 0 auto; }

/* 金额格：上方福字图 + 下方彩币 */
.cell-amt-wrap { display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; height:100%; gap:0; }
.cell-amt-wrap img { width:40%; height:38%; object-fit:contain; display:block; }
.cell-amt-wrap .cell-amt { font-size:10px; font-weight:800; color:#b8430f; white-space:nowrap; line-height:1.1; margin-top:-2px; max-width:96%; overflow:hidden; text-overflow:ellipsis; }
/* 中奖号码：小福字图+数字 */
.win-item { display:inline-flex; flex-direction:column; align-items:center; justify-content:center; gap:0; margin:0 6px; }
.win-item img { width:38px; height:38px; object-fit:contain; display:block; }
.win-item b { font-size:13px; color:#fff; font-weight:800; line-height:1; }

.cell-amt-wrap .cell-amt.zero { color:#aaa; }

.tier-card { display:flex; align-items:center; justify-content:space-between; padding:18px 20px; margin-bottom:12px; text-decoration:none; color:inherit; grid-column:1/-1; }
.tier-card .tier-price { font-size:22px; font-weight:800; color:#e34d2c; }
.tier-card .tier-price span { font-size:13px; color:#999; font-weight:400; margin-left:4px; }
.tier-card .tier-go { font-size:28px; color:#ccc; }
.tier-card .tier-status { font-size:13px; color:#aaa; }
.tier-locked { opacity:.6; }

.tier-tabs { display:flex; gap:10px; margin-bottom:18px; grid-column:1/-1; }
.tier-tab { flex:1; padding:12px 0; border:1px solid #e5e7eb; background:#fff; border-radius:10px; font-size:18px; font-weight:700; color:#666; }
.tier-tab.active { background:#e34d2c; color:#fff; border-color:#e34d2c; }
.tier-tab:disabled { opacity:.45; }
.tier-content { grid-column:1/-1; }
.scratch-card { padding:14px; text-decoration:none; color:inherit; display:block; }
.scratch-card .sc-row { display:flex; align-items:center; gap:14px; }
.scratch-card .sc-img { width:140px; border-radius:8px; flex-shrink:0; }
.scratch-card .sc-info { flex:1; }
.scratch-card .sc-name { font-size:20px; font-weight:800; color:#222; }
.scratch-card .sc-face { font-size:14px; color:#888; margin-top:6px; }
.scratch-card .sc-top { font-size:14px; color:#888; margin-top:2px; }
.scratch-card .sc-actions { display:flex; flex-direction:column; align-items:center; gap:8px; }
.scratch-card .sc-tag { font-size:12px; color:#e34d2c; background:#fde8e3; padding:3px 10px; border-radius:4px; }
.scratch-card .sc-btn { background:#e34d2c; color:#fff; padding:10px 22px; border-radius:24px; font-size:15px; }

.sc-img-placeholder { width:120px; height:80px; background:#f5f5f5; border:1px dashed #ccc; border-radius:8px; display:flex; align-items:center; justify-content:center; color:#aaa; font-size:12px; flex-shrink:0; }

.scratch-ticket .deco-layer .d-lantern1 { left:6%; top:3%; font-size:20px; color:rgba(255,215,130,.35); }
.scratch-ticket .deco-layer .d-lantern2 { right:6%; top:3%; font-size:20px; color:rgba(255,215,130,.35); }
.scratch-ticket .deco-layer .d-fire1 { left:12%; top:10%; font-size:14px; color:rgba(255,235,180,.3); }
.scratch-ticket .deco-layer .d-fire2 { right:12%; top:10%; font-size:14px; color:rgba(255,235,180,.3); }
.scratch-ticket .deco-layer .d-bottom1 { left:10%; bottom:8%; font-size:22px; color:rgba(255,215,130,.25); }
.scratch-ticket .deco-layer .d-bottom2 { right:10%; bottom:8%; font-size:22px; color:rgba(255,215,130,.25); }
.scratch-ticket .deco-layer .d-edge1 { left:2%; top:30%; font-size:16px; color:rgba(255,215,130,.2); }
.scratch-ticket .deco-layer .d-edge2 { right:2%; top:50%; font-size:16px; color:rgba(255,215,130,.2); }
.scratch-ticket .deco-layer .d-edge3 { left:2%; top:70%; font-size:16px; color:rgba(255,215,130,.2); }
.scratch-ticket .deco-layer .d-edge4 { right:2%; top:85%; font-size:16px; color:rgba(255,215,130,.2); }
.scratch-ticket .deco-layer .d-bless1 { left:18%; bottom:15%; font-size:18px; color:rgba(255,215,130,.22); }
.scratch-ticket .deco-layer .d-bless2 { right:18%; bottom:15%; font-size:18px; color:rgba(255,215,130,.22); }

.ticket100 { width:300px; max-width:300px; margin:14px auto; border-radius:14px; overflow:hidden; position:relative; box-shadow:0 6px 20px rgba(168,35,31,.3); }
.ticket100-bg { position:relative; width:100%; aspect-ratio:400/1056; background-size:100% 100%; }
.ticket100 canvas { position:absolute; left:0; width:100%; }
.ticket100-label { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); color:#5b6670; font-size:14px; font-weight:bold; z-index:1; pointer-events:none; }

.ticket100-white { position:absolute; left:0; width:100%; background:#fff; z-index:0; }

.ticket100-foot { position:absolute; bottom:0; left:0; width:100%; background:linear-gradient(transparent, rgba(0,0,0,.55)); padding:30px 12px 10px; color:#fff; font-size:13px; text-align:center; z-index:2; border-radius:0 0 14px 14px; }

/* 刮奖记录页 */
.scr-summary { display:flex; gap:10px; margin-bottom:16px; }
.scr-sum-item { flex:1; background:#fff; border:1px solid #eee; border-radius:10px; padding:12px 6px; text-align:center; }
.scr-sum-num { font-size:16px; font-weight:700; color:#e34d2c; }
.scr-sum-lab { font-size:11px; color:#888; margin-top:4px; }


/* ===== 50档 行大运 刮刮乐（底图版：图一为底图，刮奖区浅灰底+涂层） ===== */
.ticket50 { position:relative; border-radius:14px; overflow:hidden; border:2px solid #7a5cff; box-shadow:0 0 18px rgba(122,92,255,.45); }
.ticket50-bg { position:relative; aspect-ratio:602/1205; background:url('/images/ticket50-before.png') center/100% 100% no-repeat; }
.g1-zone { position:absolute; left:4%; top:23.4%; width:91.8%; height:32.5%; background:#dadada; }
.g1-grid { display:grid; grid-template-columns:repeat(5,1fr); grid-template-rows:repeat(5,1fr); gap:4px; padding:10px; height:100%; box-sizing:border-box; }
.g1-cell { position:relative; background:#fff; border-radius:4px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; padding:1px 0; }
.g1-cell.win { background:#ffe9a8; box-shadow:0 0 8px rgba(255,217,102,.6); }
.g1-top { font-size:15px; color:#d32f2f; font-weight:800; line-height:1.05; }
.g1-top.small { font-size:11px; }
.g1-img { width:21px; height:21px; object-fit:contain; }
.g1-bot { font-size:10px; color:#8a6d1a; font-weight:700; line-height:1; }
.g2-zone { position:absolute; left:5.6%; top:60.7%; width:58.4%; height:29.2%; background:#dadada; }
.g2-cell { height:100%; display:flex; align-items:center; justify-content:center; }
.g2-sym { font-size:36px; color:#333; font-weight:800; }
.mult-img { position:absolute; left:57.3%; top:61.8%; width:27.9%; height:27.8%; object-fit:fill; z-index:6; }
.mult-title { color:#ffd966; font-size:11px; text-align:center; font-weight:700; margin-bottom:2px; text-shadow:0 0 6px rgba(255,217,102,.5); }
.mult-item { color:#e8e2ff; font-size:12px; padding:1px 2px; display:flex; justify-content:space-between; }
.mult-item b { color:#ffd966; }
.mult-note { color:#9d8fd4; font-size:10px; text-align:center; margin-top:4px; }
