/* =============================================
   JFSD 积分商店 - 样式表
   v21 - 重新设计版
   ============================================= */

/* ---- 变量 & 重置 ---- */
:root {
  --c-bg: #F0F2F5;
  --c-sidebar: #1C1E2E;
  --c-sidebar-hover: #262940;
  --c-card: #FFFFFF;
  --c-primary: #5B5FD6;
  --c-primary-dark: #4748BB;
  --c-accent: #F5A623;
  --c-text: #1F2937;
  --c-muted: #9CA3AF;
  --c-border: #E5E7EB;
  --c-success: #10B981;
  --c-danger: #EF4444;
  --c-warning: #F59E0B;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 220px;
  --topbar-h: 52px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
input, textarea { font-family: inherit; outline: none; }

/* ---- 桌面布局 ---- */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--c-sidebar);
  color: rgba(255,255,255,.65);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-head {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-head h1 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .3px;
}
.sidebar-head span { color: var(--c-primary); }

.user-card {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.user-card img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,.1);
}
.user-card .name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card .pts {
  font-size: 11px;
  color: var(--c-accent);
}

/* ---- 赞助排行榜 ---- */
.donor-rank {
  margin: 0 12px 8px;
  background: rgba(255,255,255,.05);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.donor-rank-head {
  padding: 8px 12px;
  font-size: 11px;
  color: var(--c-accent);
  font-weight: 600;
  letter-spacing: .3px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.donor-rank-body { padding: 6px 0; }
.donor-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  font-size: 12px;
}
.donor-item .rank {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.donor-item .rank.r1 { background: #FCD34D; color: #78350F; }
.donor-item .rank.r2 { background: #D1D5DB; color: #374151; }
.donor-item .rank.r3 { background: #D97706; color: #fff; }
.donor-item .rank.rn { background: rgba(255,255,255,.1); color: rgba(255,255,255,.4); }
.donor-item .name { flex: 1; color: rgba(255,255,255,.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donor-item .amount { color: var(--c-accent); font-weight: 600; font-size: 11px; }
.donor-loading { padding: 10px 12px; font-size: 12px; color: rgba(255,255,255,.3); }
.donor-rank-more { width: 100%; border-top: 1px solid rgba(255,255,255,.06); border-radius: 0; color: rgba(255,255,255,.3); font-size: 11px; justify-content: center; padding: 6px; }
.donor-rank-more:hover { color: rgba(255,255,255,.6); background: rgba(255,255,255,.05); }

/* 手机端专属元素：桌面端默认隐藏 */
.m-user-info { display: none; }
.m-card-btn { display: none; }

@media (max-width: 640px) {
  .donor-rank { display: none; }
}

.sidebar-nav { flex: 1; padding: 8px 0; }
.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: none;
  border: none;
  color: rgba(255,255,255,.55);
  font-size: 13.5px;
  cursor: pointer;
  transition: background .15s, color .15s;
  text-align: left;
}
.nav-btn:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-btn.active { background: rgba(91,95,214,.25); color: #fff; }
.nav-btn .ico { font-size: 15px; }

.sidebar-foot {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---- 主内容区 ---- */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* 顶栏 */
.topbar {
  height: var(--topbar-h);
  background: var(--c-card);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 50;
}
.topbar-back {
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 13px;
  color: var(--c-text);
  cursor: pointer;
  display: none;
}
.topbar-back.show { display: inline-flex; align-items: center; gap: 4px; }
.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* 页面主体 */
.page-main {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* ---- 通用按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); }
.btn-outline { background: none; border: 1px solid var(--c-border); color: var(--c-text); }
.btn-outline:hover { background: var(--c-bg); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-full { width: 100%; }
.btn-ghost { background: none; border: none; color: var(--c-muted); padding: 4px 8px; }
.btn-ghost:hover { color: var(--c-text); }

/* ---- 搜索栏 ---- */
.search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: center;
}
.search-row input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: var(--c-card);
  transition: border-color .2s;
}
.search-row input:focus { border-color: var(--c-primary); }
.search-row .count { font-size: 12px; color: var(--c-muted); white-space: nowrap; }

/* ---- 商品网格 ---- */
.goods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.goods-card {
  background: var(--c-card);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
}
.goods-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.goods-img {
  height: 130px;
  background: linear-gradient(135deg, #EEF2FF, #F8F8FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #C7D2FE;
}
.goods-img img { width: 100%; height: 100%; object-fit: cover; }
.goods-body { padding: 12px 14px; }
.goods-name { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.goods-desc {
  font-size: 12px;
  color: var(--c-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.goods-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.goods-price { font-size: 16px; font-weight: 700; color: var(--c-accent); }
.goods-stock { font-size: 11px; color: var(--c-muted); }

/* ---- 列表页 ---- */
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.list-title { font-size: 15px; font-weight: 600; }
.list-body { display: flex; flex-direction: column; gap: 10px; }

.rec-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow .15s;
}
.rec-card:hover { box-shadow: var(--shadow-sm); }
.rec-card.active { border-color: var(--c-primary); background: #F8F9FF; }
.rec-title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.rec-meta { font-size: 12px; color: var(--c-muted); display: flex; gap: 10px; }
.rec-preview { font-size: 12px; color: var(--c-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- 状态标签 ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-w { background: #FEF3C7; color: #92400E; }
.badge-i { background: #DBEAFE; color: #1E40AF; }
.badge-s { background: #D1FAE5; color: #065F46; }
.badge-g { background: #F3F4F6; color: #6B7280; }
.badge-r { background: #FEE2E2; color: #991B1B; }

/* ---- 详情页 ---- */
.detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
}
.detail-title { font-size: 15px; font-weight: 600; flex: 1; }
.detail-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 16px;
  min-height: 0;
}
.detail-foot {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
}
.detail-foot textarea {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  resize: none;
  max-height: 80px;
  line-height: 1.5;
  transition: border-color .2s;
}
.detail-foot textarea:focus { border-color: var(--c-primary); }
.detail-foot button { padding: 0 18px; height: 38px; flex-shrink: 0; }
.detail-foot .closed textarea,
.detail-foot .closed button { opacity: .45; pointer-events: none; }

/* ---- 消息气泡 ---- */
.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg { margin: 0; }
.msg-bubble {
  max-width: 70%;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  word-break: break-word;
}
.msg.user { align-self: flex-end; }
.msg.user .msg-bubble { background: var(--c-primary); color: #fff; border-bottom-right-radius: 3px; }
.msg.admin { align-self: flex-start; }
.msg.admin .msg-bubble { background: var(--c-card); color: var(--c-text); border: 1px solid var(--c-border); border-bottom-left-radius: 3px; }
.msg-time { font-size: 11px; color: var(--c-muted); margin-top: 3px; padding: 0 4px; }
.msg-sys { text-align: center; margin: 10px 0; }
.msg-sys span { background: var(--c-bg); color: var(--c-muted); padding: 3px 12px; border-radius: 20px; font-size: 12px; }

/* ---- 新建工单表单 ---- */
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-stack input,
.form-stack textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: var(--c-card);
  transition: border-color .2s;
}
.form-stack input:focus,
.form-stack textarea:focus { border-color: var(--c-primary); }
.form-stack textarea { resize: none; min-height: 140px; line-height: 1.6; }

/* ---- 订单详情卡 ---- */
.order-info-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 12px;
}
.order-info-head {
  text-align: center;
  padding: 24px 16px 18px;
  background: linear-gradient(135deg, #EEF2FF, #F8F9FF);
}
.order-info-head .ico { font-size: 48px; margin-bottom: 8px; }
.order-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--c-border);
  font-size: 13.5px;
}
.order-row span:first-child { color: var(--c-muted); }
.order-row span:last-child { font-weight: 500; }

/* ---- 赞助排行榜弹窗 ---- */
.donor-full-list { max-height: 500px; overflow-y: auto; }
.donor-full-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border);
  font-size: 13.5px;
}
.donor-full-item:last-child { border-bottom: none; }
.donor-full-item .rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.donor-full-item .rank.r1 { background: #FCD34D; color: #78350F; }
.donor-full-item .rank.r2 { background: #D1D5DB; color: #374151; }
.donor-full-item .rank.r3 { background: #D97706; color: #fff; }
.donor-full-item .rank.rn { background: var(--c-bg); color: var(--c-muted); }
.donor-full-item .name { flex: 1; font-weight: 500; }
.donor-full-item .amount { color: var(--c-accent); font-weight: 700; }
.donor-full-item .qq { font-size: 11px; color: var(--c-muted); }

/* ---- 模态框 ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  width: 420px;
  max-width: 95%;
  box-shadow: var(--shadow-md);
}
.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-hd h3 { font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--c-muted); cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--c-text); }
.modal-ft {
  text-align: center;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--c-border);
  font-size: 12px;
  color: var(--c-muted);
}
.modal input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 12px;
  transition: border-color .2s;
}
.modal input:focus { border-color: var(--c-primary); outline: none; }

.product-modal {
  width: 520px;
  padding: 0;
  overflow: hidden;
}
.product-modal .modal-hd {
  padding: 20px 22px 0;
}
.product-preview {
  margin: 0 22px 16px;
  height: 240px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #EEF2FF, #FFF7ED);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #F8FAFC;
}
.product-preview-empty {
  font-size: 56px;
  color: #C7D2FE;
}
.product-info {
  margin: 0 22px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.product-row {
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #F8FAFC;
}
.product-row span {
  display: block;
  color: var(--c-muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.product-row b {
  color: var(--c-text);
  font-size: 16px;
}
.product-row b#productPrice {
  color: var(--c-accent);
}
.product-row b.soldout {
  color: var(--c-danger);
}
.product-desc-box {
  margin: 0 22px 18px;
  border-top: 1px solid var(--c-border);
  padding-top: 14px;
  color: var(--c-muted);
  font-size: 13px;
  line-height: 1.7;
}
.product-section-title {
  color: var(--c-text);
  font-weight: 600;
  margin-bottom: 6px;
}
.product-desc-box p {
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 8px;
}
.product-desc-box ul {
  padding-left: 18px;
}
.product-actions {
  display: flex;
  gap: 10px;
  padding: 16px 22px 20px;
  background: #F8FAFC;
  border-top: 1px solid var(--c-border);
}
.product-actions .btn {
  flex: 1;
  justify-content: center;
}
.product-actions .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* ---- Toast ---- */
#toast {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 18px;
  border-radius: 8px;
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
  animation: taIn .25s ease;
  pointer-events: auto;
  min-width: 180px;
}
.toast-success { background: var(--c-success); }
.toast-error { background: var(--c-danger); }
.toast-info { background: var(--c-primary); }
@keyframes taIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ---- 空状态 & 加载 ---- */
.empty-state { text-align: center; padding: 48px 16px; color: var(--c-muted); }
.empty-state .ico { font-size: 48px; margin-bottom: 10px; }
.loading { text-align: center; padding: 40px; color: var(--c-muted); font-size: 13px; }

/* ---- 登录页 ---- */
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #5B5FD6 0%, #8B5CF6 100%);
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 40px;
  width: 400px;
  max-width: 95%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-card h1 { font-size: 20px; margin-bottom: 4px; color: var(--c-text); }
.login-card .sub { color: var(--c-muted); font-size: 13px; margin-bottom: 22px; }
.code-display {
  background: var(--c-sidebar);
  color: #A5B4FC;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 26px;
  font-weight: 700;
  padding: 16px 20px;
  border-radius: 10px;
  letter-spacing: 4px;
  margin-bottom: 18px;
  word-break: break-all;
  user-select: all;
}
.instruction {
  text-align: left;
  background: var(--c-bg);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.9;
  margin-bottom: 18px;
}
.instruction b { color: var(--c-text); }
.instruction .cmd {
  background: #EEF2FF;
  color: var(--c-primary);
  padding: 1px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 600;
  font-size: 12px;
}
.status-bar { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--c-muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c-muted); }
.dot.waiting { background: var(--c-warning); animation: dotPulse 1.4s infinite; }
.dot.bound { background: var(--c-success); }
.dot.error { background: var(--c-danger); }
@keyframes dotPulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ---- 手机端 ---- */
@media (max-width: 640px) {
  /* 隐藏侧边栏 */
  .sidebar { display: none; }

  /* 布局 */
  .layout { flex-direction: column; }
  .main { height: auto; min-height: 100vh; overflow: visible; }

  /* 顶栏 */
  .topbar {
    height: 48px;
    padding: 0 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
  }
  .topbar-title { font-size: 14px; }

  /* 主内容区 */
  .page-main { padding: 14px 14px 80px; overflow-y: auto; min-height: calc(100vh - 48px); }

  /* 商品网格 */
  .goods-grid { grid-template-columns: 1fr 1fr; gap: 10px; overflow-y: auto; max-height: calc(100vh - 48px - 60px); }
  .goods-img { height: 100px; font-size: 32px; }
  .goods-body { padding: 10px 12px; }
  .goods-name { font-size: 13px; }
  .goods-desc { display: none; }
  .goods-foot { flex-direction: column; align-items: flex-start; gap: 2px; }
  .goods-price { font-size: 15px; }
  .goods-stock { font-size: 10px; }

  /* 搜索 */
  .search-row { margin-bottom: 14px; }
  .search-row input { padding: 8px 12px; font-size: 13px; }

  /* 列表 */
  .list-head { margin-bottom: 12px; }
  .rec-card { padding: 12px 14px; }
  .rec-title { font-size: 13px; }
  .rec-meta { font-size: 11px; }

  /* 详情 */
  .detail-head { flex-wrap: wrap; }
  .detail-body { max-height: none; overflow: visible; }
  .detail-foot { position: fixed; bottom: 60px; left: 0; right: 0; background: #fff; padding: 10px 14px; box-shadow: 0 -2px 8px rgba(0,0,0,.08); border-top: 1px solid var(--c-border); flex-wrap: wrap; gap: 8px; }
  .detail-foot textarea { min-height: 38px; height: 38px; flex: 1; }
  .detail-foot button { padding: 0 14px; height: 38px; }

  /* 新建工单 */
  .form-stack textarea { min-height: 120px; }

  /* 订单详情 */
  .order-info-card { margin-top: 0; }

  /* 模态框 */
  .modal { width: 96%; padding: 20px; }
  .product-modal { width: 96%; max-height: 92vh; overflow-y: auto; padding: 0; }
  .product-modal .modal-hd { padding: 16px 16px 0; }
  .product-preview { height: 190px; margin: 0 16px 14px; }
  .product-info { margin: 0 16px 14px; grid-template-columns: 1fr; }
  .product-desc-box { margin: 0 16px 16px; }
  .product-actions { position: sticky; bottom: 0; padding: 12px 16px 16px; }

  /* 底部导航 */
  .mobile-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--c-sidebar);
    padding: 6px 0;
    z-index: 200;
    border-top: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 -2px 12px rgba(0,0,0,.2);
  }
  .m-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: none;
    border: none;
    color: rgba(255,255,255,.4);
    font-size: 10px;
    cursor: pointer;
    transition: color .15s;
  }
  .m-btn.active { color: #A5B4FC; }
  .m-ico { font-size: 20px; }

  /* Toast */
  #toast { top: auto; bottom: 76px; right: 10px; left: 10px; }
  .toast { width: 100%; min-width: 0; border-radius: 8px; }

  /* 隐藏不需要的元素 */
  .desktop-only { display: none !important; }

  /* 手机端：顶栏用户积分 + 赞助入口 */
  .mobile-only { display: flex !important; align-items: center; gap: 6px; }
  .m-user-pts {
    font-size: 13px;
    font-weight: 600;
    color: #A5B4FC;
    background: rgba(165,180,252,.12);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
  }
  .m-donor-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    opacity: .7;
    transition: opacity .15s;
  }
  .m-donor-btn:hover { opacity: 1; }
  .m-user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 2px;
  }
  .m-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.3);
    object-fit: cover;
  }
  .m-nickname {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.95);
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .m-card-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    opacity: .7;
    transition: opacity .15s;
  }
  .m-card-btn:hover { opacity: 1; }

  /* 手机端：隐藏侧边栏排行榜（改用弹窗） */
  .donor-rank { display: none !important; }
}

/* ---- 桌面端隐藏手机导航 ---- */
.mobile-nav { display: none; }

/* ---- 手机端元素默认隐藏 ---- */
.mobile-only { display: none; }
