/*
 * lottery 项目样式（手写维护，无构建步骤）
 *
 * 加载顺序（见 crates/interfaces/templates/layouts/*.html）：
 *   1) base.css        —— 设计令牌（CSS 变量）与全局重置
 *   2) utilities.css   —— 冻结的工具类（flex / mb-2 / text-sm …），新增类名需自己补规则
 *   3) app.css（本文件）—— 站点组件与各页面样式
 *
 * 约定：
 *   - 页面样式一律用 body[data-page="<页面标识>"] 作用域，标识由页面处理器传入
 *     （首页 home、后台首页 admin、后台子页 admin-users 等），与下方分区标题一致；
 *   - 新增页面：在对应分区追加规则；用到工具类里没有的类名，先在 utilities.css 补规则；
 *   - 改动后请跑 `python3 scripts/check-css-coverage.py`，它会检查模板/JS 里的类名是否都有规则。
 *
 * 目录：
 *    1. 全局：布局外壳、卡片、按钮、表单、下拉、弹层、导航、列表组件
 *    2. 首页
 *    3. 排列五开奖页
 *    4. 七星彩开奖页
 *    5. 预测页
 *    6. 预测师主页
 *    7. 大师榜
 *    8. 充值页
 *    9. 支付结果页
 *   10. 我的（含我的预测 / 积分消耗 / 订单）
 *   11. 我的关注
 *   12. 梦册
 *   13. 画规
 *   14. 下载页
 *   15. 404 页
 *   16. 后台首页（看板）
 *   17. 后台·用户管理
 *   18. 后台·管理员
 *   19. 后台·排列五
 *   20. 后台·七星彩
 *   21. 后台·预测管理
 *   22. 后台·委托发布
 *   23. 后台·通知管理
 *   24. 后台·订单
 *   25. 后台·支付
 *   26. 后台·报表
 *   27. 后台·计划任务
 *   28. 后台·站点设置
 *   29. 后台·积分套餐
 *   30. 后台·支付配置
 *   31. 后台·积分消耗
 *   32. error-500
 */

/* ====================  1. 全局：布局外壳、卡片、按钮、表单、下拉、弹层、导航、列表组件 —— body[data-page="（全局）"] ==================== */

/* 图片加载失败时的占位样式（前台）：隐藏原图，在原位插入同尺寸 span，
   只居中显示一个「破图」SVG 图标，不显示任何文字（浏览器对坏图的 alt 文案也一并隐藏）。
   与"本来没上传头像"的渐变色 + 首字占位明确区分。
   占位 span 由 core/app-core.js 动态生成，复用原 img 的 class 以保持尺寸/圆角。 */
img.img-failed {
  display: none !important;
}
.img-broken {
  background: #f3f4f6;
  border: 1.5px dashed #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 1.6rem;
  min-height: 1.6rem;
  overflow: hidden;
  flex-shrink: 0;
  cursor: default;
  color: #9ca3af;
}

/* 破图图标：随容器缩放，但限制在合理区间（头像 1.8~3.5rem，快捷入口 3.2rem、
   梦册卡片图 4.5rem 都不会过大或过小） */
.img-broken svg {
  width: 55%;
  height: 55%;
  min-width: 0.9rem;
  min-height: 0.9rem;
  max-width: 2.2rem;
  max-height: 2.2rem;
  fill: currentColor;
}

/* 返回按钮箭头（SVG 切角）：尺寸随字号，颜色跟随文字 */
.icon-back {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  flex-shrink: 0;
}




html {
  height: 100%;
  overflow: hidden;
}

body {
  height: 100vh;
  height: 100svh;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden !important;
  background: linear-gradient(to bottom, #fff 0, #fff env(safe-area-inset-top, 0px), #f7fafc env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
}

.flex-1 {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.card {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 1.5rem;
  background: white;
  border-radius: 0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  min-height: calc(100vh - env(safe-area-inset-top, 0px));
  min-height: calc(100dvh - env(safe-area-inset-top, 0px));
  min-height: calc(var(--vh, 1vh) * 100 - env(safe-area-inset-top, 0px));
}

.sticky-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.sticky-topbar-inner {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem 0.85rem;
}

.pb-20 {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .card {
    max-width: 880px;
  }

  /* 吸顶返回栏与底部导航 / 内容卡同宽（880px 居中）：
     宽度本身此前横贯整屏、内层又只有 400px，宽屏下两头都不齐。 */
  .sticky-topbar {
    max-width: 880px;
    margin: 0 auto;
  }
  .sticky-topbar-inner {
    max-width: 880px;
  }
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  ring: 2px solid #93c5fd;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 0.75rem;
  font-weight: 600;
  text-align: center;
  border-radius: 0.75rem;
  background: #3b82f6;
  color: white;
  transition: background 0.2s;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn:hover {
  background: #2563eb;
}

.flash {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.flash-success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

a {
  color: #3b82f6;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.gap-2 {
  gap: 0.5rem;
}

body select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.35rem 1.9rem 0.35rem 0.65rem;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: normal;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.8rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

body option {
  font-size: 0.72rem;
  color: #94a3b8;
  background-color: #fff;
  padding: 0.2rem 0.5rem;
  line-height: 1;
  font-weight: normal;
}

body option:hover {
  background-color: #fafbfc;
  color: #aab0cc;
}

body option:checked {
  background-color: #fafbfc;
  color: #aab0cc;
  font-weight: 500;
}

body option:disabled {
  color: #d8dee9;
  background-color: #fcfdfe;
}

body optgroup {
  font-style: normal;
  color: #b6bdc9;
  background-color: #fcfdfe;
}

body optgroup option {
  padding-left: 0.9rem;
}

.cus-select {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  box-sizing: border-box;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.cus-select-native {
  display: none !important;
}

.cus-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  text-align: left;
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cus-select-trigger:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79,70,229,0.15);
}

.cus-select-trigger:disabled {
  opacity: 0.55;
  cursor: default;
}

.cus-select-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cus-select-arrow {
  flex-shrink: 0;
  display: inline-flex;
  color: #94a3b8;
  pointer-events: none;
}

.cus-select-panel {
  position: fixed;
  z-index: 9999;
  display: none;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(15,23,42,0.12);
  padding: 0.3rem;
  max-height: 15rem;
  overflow-y: auto;
  max-width: calc(100vw - 1rem);
}

.cus-select-option {
  display: block;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #94a3b8;
  border-radius: 0.35rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cus-select-option:hover {
  background: #fafbfc;
  color: #aab0cc;
}

.cus-select-option.active {
  background: #fafbfc;
  color: #aab0cc;
}

.cus-select-option.selected {
  color: #64748b;
  font-weight: 500;
}

.cus-select-option.disabled {
  color: #d8dee9;
  cursor: default;
}

.cus-select-option.disabled:hover {
  background: none;
  color: #d8dee9;
}

select:hover {
  border-color: #c7d2fe;
}

select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79,70,229,0.15);
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%);
  background: rgba(30,41,59,0.92);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.55rem 1rem;
  border-radius: 0.6rem;
  z-index: 9999;
  max-width: 80%;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.app-toast.show {
  opacity: 1;
}

@keyframes pull-spin {
  to {
    transform: rotate(360deg);
  }
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
}

.app-modal:not([hidden]) {
  display: flex;
}

.app-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.4);
}

.app-modal-box {
  position: relative;
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  max-width: 80%;
  width: 18rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.app-modal-msg {
  font-size: 0.85rem;
  color: #334155;
  text-align: center;
  margin-bottom: 1rem;
  word-break: break-all;
}

.app-modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.app-modal-btn {
  flex: 1;
  padding: 0.45rem;
  border-radius: 0.6rem;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.app-modal-cancel {
  background: #f1f5f9;
  color: #64748b;
}

.app-modal-ok {
  background: #4f46e5;
  color: #fff;
}

.bottom-nav {
  position: static;
  flex-shrink: 0;
  width: 100%;
  background: white;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0 calc(0.75rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

@media (min-width: 768px) {
  .bottom-nav {
    margin: 0 auto;
    max-width: 880px;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  color: #94a3b8;
  text-decoration: none;
  gap: 0.15rem;
  padding: 0.25rem 1rem;
  border-radius: 0.5rem;
  transition: color 0.2s;
}

.nav-item.active {
  color: #3b82f6;
  font-weight: 600;
}

.nav-item:hover {
  text-decoration: none;
  color: #3b82f6;
}

.nav-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.admin-shell {
  height: calc(100vh - env(safe-area-inset-top, 0px));
  height: calc(100dvh - env(safe-area-inset-top, 0px));
  height: calc(var(--vh, 1vh) * 100 - env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 200px;
  background: #fff;
  z-index: 51;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.2s;
  box-shadow: 2px 0 12px rgba(0,0,0,0.1);
}

.admin-sidebar.show {
  transform: translateX(0);
}

.admin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 50;
  display: none;
  border: none;
  padding: 0;
}

.admin-overlay.show {
  display: block;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-group {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 600;
  padding: 0.5rem 0.55rem 0.2rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  color: #64748b;
  text-decoration: none !important;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s;
}

@media (hover: hover) {
  .sidebar-link:hover {
    background: #f1f5f9;
  }
}

.sidebar-link.active {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none !important;
}

.sidebar-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.admin-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.topbar-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  margin: 0;
}

.topbar-toggle {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  font-size: 1.1rem;
}

.topbar-toggle:hover {
  background: #e2e8f0;
}

.topbar-toggle:focus-visible, .topbar-avatar:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.topbar-avatar {
  width: 2rem;
  height: 2rem;
  margin-left: auto;
  border-radius: 50%;
  background: #ede9fe;
  color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  position: relative;
  user-select: none;
  border: none;
}

.dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 120px;
  z-index: 100;
  display: none;
}

.dropdown.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: #334155;
  text-decoration: none !important;
}

.dropdown-item:hover {
  background: #f1f5f9;
}

.dropdown-item.danger {
  color: #dc2626;
}

@media (min-width: 768px) {
  .admin-sidebar {
    transform: translateX(0);
  }
  .admin-overlay {
    display: none !important;
  }
  .admin-main {
    margin-left: 200px;
    padding: 1.25rem 1.5rem;
  }
  .admin-topbar {
    margin-left: 200px;
    padding: 0.6rem 1.5rem;
  }
  .topbar-toggle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar {
    transition: none;
  }
}

@keyframes shimmer--admin-admins {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin-notifications {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin-orders {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin-payment-config {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin-payments {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin-credit-consumptions {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin-plw {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin-position-predictions {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin-predictor-configs {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin-qxc {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin-recharge-products {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--admin-scheduler {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes btn-ripple--admin-settings {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes shimmer--admin-users {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes ql-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes noticeScroll--home {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

@keyframes shimmer--plw {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--prediction {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--predictor {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes predFadeIn--predictor {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes shimmer--qxc {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes shimmer--ranking {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes flamePulse--ranking {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 4px rgba(249, 115, 22, 0.4);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.75);
  }
}

@keyframes hg-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hgSlideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes mc-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes mc-up {
  from {
    transform: translateY(24px);
    opacity: .4;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@property --tw-translate-x {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-translate-y {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-translate-z {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-rotate-x {
  syntax: "*";
  inherits: false;
}

@property --tw-rotate-y {
  syntax: "*";
  inherits: false;
}

@property --tw-rotate-z {
  syntax: "*";
  inherits: false;
}

@property --tw-skew-x {
  syntax: "*";
  inherits: false;
}

@property --tw-skew-y {
  syntax: "*";
  inherits: false;
}

@property --tw-space-y-reverse {
  syntax: "*";
  inherits: false;
  initial-value: 0;
}

@property --tw-border-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}

@property --tw-leading {
  syntax: "*";
  inherits: false;
}

@property --tw-font-weight {
  syntax: "*";
  inherits: false;
}

@property --tw-blur {
  syntax: "*";
  inherits: false;
}

@property --tw-brightness {
  syntax: "*";
  inherits: false;
}

@property --tw-contrast {
  syntax: "*";
  inherits: false;
}

@property --tw-grayscale {
  syntax: "*";
  inherits: false;
}

@property --tw-hue-rotate {
  syntax: "*";
  inherits: false;
}

@property --tw-invert {
  syntax: "*";
  inherits: false;
}

@property --tw-opacity {
  syntax: "*";
  inherits: false;
}

@property --tw-saturate {
  syntax: "*";
  inherits: false;
}

@property --tw-sepia {
  syntax: "*";
  inherits: false;
}

@property --tw-drop-shadow {
  syntax: "*";
  inherits: false;
}

@property --tw-drop-shadow-color {
  syntax: "*";
  inherits: false;
}

@property --tw-drop-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@property --tw-drop-shadow-size {
  syntax: "*";
  inherits: false;
}

/* ====================  2. 首页 —— body[data-page="home"] ==================== */

body[data-page="home"] .flex-1 {
  overscroll-behavior-y: contain;
}

body[data-page="home"] .pull-hint {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5rem;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
  transform: translateY(-100%);
  pointer-events: none;
}

body[data-page="home"] .pull-hint.pulling {
  transition: none;
}

body[data-page="home"] .pull-hint.snap {
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body[data-page="home"] .pull-hint .pull-icon {
  display: inline-block;
  font-style: normal;
  transition: transform 0.2s ease;
}

body[data-page="home"] .pull-hint[data-state="ready"] .pull-icon {
  transform: rotate(180deg);
}

body[data-page="home"] .pull-hint[data-state="loading"] .pull-icon {
  animation: pull-spin 0.8s linear infinite;
}

body[data-page="home"] .predictor-search {
  position: relative;
  z-index: 20;
  margin-bottom: .8rem;
}

body[data-page="home"] .predictor-search-form {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .28rem .3rem .28rem .75rem;
  border: 1px solid #e7eaf0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(20, 30, 50, .05);
}

body[data-page="home"] .predictor-search-icon {
  flex: none;
  color: #9aa0aa;
  font-size: 1.1rem;
  line-height: 1;
}

body[data-page="home"] .predictor-search-form input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #2a3040;
  font-size: .82rem;
}

body[data-page="home"] .predictor-search-form input::placeholder {
  color: #a8adb5;
}

body[data-page="home"] .predictor-search-btn {
  flex: none;
  padding: .42rem .8rem;
  border: none;
  border-radius: 999px;
  background: #fd3d44;
  color: #fff;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
}

body[data-page="home"] .predictor-search-results {
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  right: 0;
  max-height: 18rem;
  overflow-y: auto;
  padding: .3rem;
  border: 1px solid #e9ecf1;
  border-radius: .7rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 30, 50, .14);
}

body[data-page="home"] .predictor-search-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .55rem;
  border-radius: .5rem;
  color: inherit;
  text-decoration: none;
}

body[data-page="home"] .predictor-search-item:hover {
  background: #f7f8fa;
}

body[data-page="home"] .predictor-search-avatar {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff0f1;
  color: #fd3d44;
  font-size: .78rem;
  font-weight: 700;
}

body[data-page="home"] .predictor-search-main {
  flex: 1;
  min-width: 0;
}

body[data-page="home"] .predictor-search-name {
  display: block;
  overflow: hidden;
  color: #2a3040;
  font-size: .8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="home"] .predictor-search-arrow {
  flex: none;
  color: #b2b7c0;
  font-size: 1rem;
}

body[data-page="home"] .predictor-search-state {
  padding: .8rem;
  color: #9aa0aa;
  font-size: .74rem;
  text-align: center;
}

body[data-page="home"] .draw-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
}

body[data-page="home"] .draw-card:hover {
  background: #f1f5f9;
}

body[data-page="home"] .ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

body[data-page="home"] .ball-red {
  background: linear-gradient(135deg, #e53935, #d32f2f);
  box-shadow: 0 2px 6px rgba(229,57,53,0.35);
}

body[data-page="home"] .ball-blue {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 2px 6px rgba(37,99,235,0.35);
}

body[data-page="home"] .flex {
  display: flex;
}

body[data-page="home"] .justify-center {
  justify-content: center;
}

body[data-page="home"] .justify-between {
  justify-content: space-between;
}

body[data-page="home"] .items-center {
  align-items: center;
}

body[data-page="home"] .mt-2 {
  margin-top: 0.5rem;
}

body[data-page="home"] .mt-4 {
  margin-top: 1rem;
}

body[data-page="home"] .mb-2 {
  margin-bottom: 0.5rem;
}

body[data-page="home"] .mb-4 {
  margin-bottom: 1rem;
}

body[data-page="home"] .notice-bar {
  background: #fffbe6;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

body[data-page="home"] .notice-bar.hidden {
  display: none;
}

body[data-page="home"] .notice-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

body[data-page="home"] .notice-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}

body[data-page="home"] .notice-text {
  display: inline-block;
  white-space: nowrap;
  animation: noticeScroll--home 16s linear infinite;
  font-size: 0.8rem;
  color: #92400e;
}

body[data-page="home"] .notice-sep {
  display: inline-block;
  margin: 0 2rem;
  color: #d97706;
}

body[data-page="home"] .download-fab {
  position: fixed;
  right: 1.1rem;
  bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 60;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, opacity 0.2s;
}

body[data-page="home"] .download-fab:hover {
  text-decoration: none;
  transform: scale(1.06);
}

body[data-page="home"] .quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.2rem, 1fr));
  gap: 0.6rem;
}

/* 连中排名（首页）：左侧名次 + 头像 + 昵称 + 连中/近10中，整行可点进预测师详情 */
body[data-page="home"] .streak-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

body[data-page="home"] .streak-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}

body[data-page="home"] .streak-more {
  font-size: 0.72rem;
  color: #94a3b8;
  text-decoration: none;
}

body[data-page="home"] .streak-list {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 0.9rem;
  overflow: hidden;
}

body[data-page="home"] .streak-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s;
}

body[data-page="home"] .streak-item + .streak-item {
  border-top: 1px solid #f1f5f9;
}

body[data-page="home"] .streak-item:hover, body[data-page="home"] .streak-item:active {
  background: #f8fafc;
  text-decoration: none;
}

body[data-page="home"] .streak-rank {
  width: 1.15rem;
  flex-shrink: 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
}

body[data-page="home"] .streak-rank.top {
  color: #f97316;
}

body[data-page="home"] .streak-avatar {
  width: 1.7rem;
  height: 1.7rem;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  object-fit: cover;
  overflow: hidden;
}

body[data-page="home"] .streak-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

body[data-page="home"] .streak-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="home"] .streak-tag {
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="home"] .streak-value {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #dc2626;
}

body[data-page="home"] .streak-arrow {
  flex-shrink: 0;
  color: #cbd5e1;
  font-size: 0.9rem;
}

body[data-page="home"] .quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.25rem;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 0.9rem;
  cursor: pointer;
}

body[data-page="home"] .quick-item:active {
  background: #f8fafc;
}

body[data-page="home"] .quick-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
}

body[data-page="home"] .quick-icon img {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  object-fit: cover;
  display: block;
}

body[data-page="home"] .quick-name {
  font-size: 0.72rem;
  color: #334155;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

body[data-page="home"] .quick-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: stretch;
  background: rgba(15,23,42,0.5);
}

body[data-page="home"] .quick-modal-mask {
  position: absolute;
  inset: 0;
}

body[data-page="home"] .quick-modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #fff;
}

body[data-page="home"] .quick-modal-fab {
  position: absolute;
  left: 0.6rem;
  top: 0.5rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.7);
  color: #dc2626;
  font-size: 1.2rem;
  line-height: 1;
  cursor: grab;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

body[data-page="home"] .quick-modal-box iframe {
  flex: 1;
  border: none;
  width: 100%;
  background: #fff;
}

body[data-page="home"] .quick-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  background: #fff;
  color: #64748b;
  font-size: .82rem;
}

body[data-page="home"] .quick-loading-spinner {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 3px solid #e0e7ff;
  border-top-color: #4f46e5;
  animation: ql-spin .8s linear infinite;
}

body[data-page="home"] .quick-error {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  background: #fff;
  padding: 2rem 1.5rem;
  text-align: center;
}

body[data-page="home"] .quick-error-icon {
  font-size: 2.6rem;
  line-height: 1;
}

body[data-page="home"] .quick-error-title {
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
}

body[data-page="home"] .quick-error-msg {
  font-size: .78rem;
  color: #94a3b8;
  line-height: 1.6;
}

body[data-page="home"] .quick-error-actions {
  display: flex;
  gap: .5rem;
  margin-top: .4rem;
  flex-wrap: wrap;
  justify-content: center;
}

body[data-page="home"] .quick-error-btn {
  padding: .5rem 1rem;
  border-radius: .6rem;
  border: none;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}

body[data-page="home"] .quick-error-primary {
  background: #4f46e5;
  color: #fff;
}

body[data-page="home"] .quick-error-plain {
  background: #f1f5f9;
  color: #64748b;
}

/* ====================  3. 排列五开奖页 —— body[data-page="plw"] ==================== */

body[data-page="plw"] .skeleton {
  animation: shimmer--plw 1.5s ease-in-out infinite;
}

body[data-page="plw"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

body[data-page="plw"] .skeleton-circle {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #e2e8f0;
}

body[data-page="plw"] .draw-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="plw"] .ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #e53935, #d32f2f);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(229,57,53,0.35);
}

body[data-page="plw"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

body[data-page="plw"] .btn-sm:disabled {
  opacity: 0.4;
  cursor: default;
}

body[data-page="plw"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="plw"] .flex {
  display: flex;
}

body[data-page="plw"] .justify-center {
  justify-content: center;
}

body[data-page="plw"] .justify-between {
  justify-content: space-between;
}

body[data-page="plw"] .items-center {
  align-items: center;
}

body[data-page="plw"] .self-center {
  align-self: center;
}

body[data-page="plw"] .mt-3 {
  margin-top: 0.75rem;
}

body[data-page="plw"] .mb-2 {
  margin-bottom: 0.5rem;
}

/* ====================  4. 七星彩开奖页 —— body[data-page="qxc"] ==================== */

body[data-page="qxc"] .skeleton {
  animation: shimmer--qxc 1.5s ease-in-out infinite;
}

body[data-page="qxc"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

body[data-page="qxc"] .skeleton-circle {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #e2e8f0;
}

body[data-page="qxc"] .draw-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="qxc"] .ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(37,99,235,0.35);
}

body[data-page="qxc"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

body[data-page="qxc"] .btn-sm:disabled {
  opacity: 0.4;
  cursor: default;
}

body[data-page="qxc"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="qxc"] .flex {
  display: flex;
}

body[data-page="qxc"] .justify-center {
  justify-content: center;
}

body[data-page="qxc"] .justify-between {
  justify-content: space-between;
}

body[data-page="qxc"] .items-center {
  align-items: center;
}

body[data-page="qxc"] .self-center {
  align-self: center;
}

body[data-page="qxc"] .mt-3 {
  margin-top: 0.75rem;
}

body[data-page="qxc"] .mb-2 {
  margin-bottom: 0.5rem;
}

/* ====================  5. 预测页 —— body[data-page="prediction"] ==================== */

body[data-page="prediction"] :root {
  color-scheme: light;
}

body[data-page="prediction"] .tab-btn {
  padding: 0.4rem 1.2rem;
  border-radius: 0.6rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

body[data-page="prediction"] .tab-btn:hover {
  border-color: #c7d2fe;
  color: #4338ca;
}

body[data-page="prediction"] .tab-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

body[data-page="prediction"] .pred-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  padding: 0.55rem 0 0.5rem;
}

body[data-page="prediction"] .filter-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

body[data-page="prediction"] .filter-row .draw-filter {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

body[data-page="prediction"] .draw-filter {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

body[data-page="prediction"] .draw-filter-label {
  font-size: 0.72rem;
  color: #94a3b8;
  flex-shrink: 0;
}

body[data-page="prediction"] .draw-select {
  flex: 1;
  min-width: 0;
}

body[data-page="prediction"] .pred-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1rem;
  padding: 0.9rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s, box-shadow 0.15s;
}

body[data-page="prediction"] .pred-card.skeleton {
  margin-bottom: 0.75rem;
}

body[data-page="prediction"] .pred-card.skeleton:last-child {
  margin-bottom: 0;
}

@media (hover: hover) {
  body[data-page="prediction"] .pred-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  }
}

body[data-page="prediction"] .avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

body[data-page="prediction"] a.pred-link {
  color: inherit;
  text-decoration: none;
}

body[data-page="prediction"] a.pred-link:hover {
  text-decoration: none;
}

body[data-page="prediction"] .card-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.9rem;
  line-height: 1.25;
}

body[data-page="prediction"] .card-meta {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

body[data-page="prediction"] .badge {
  font-size: 0.6rem;
  padding: 0.14rem 0.45rem;
  border-radius: 0.4rem;
  white-space: nowrap;
  font-weight: 600;
  flex-shrink: 0;
}

body[data-page="prediction"] .badge-correct {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.25);
}

body[data-page="prediction"] .badge-incorrect {
  background: #f1f5f9;
  color: #94a3b8;
}

body[data-page="prediction"] .badge-pending {
  background: #eff6ff;
  color: #2563eb;
}

body[data-page="prediction"] .draw-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.55rem 0 0.6rem;
  padding: 0.45rem 0.6rem;
  background: #f8fafc;
  border-radius: 0.6rem;
}

body[data-page="prediction"] .draw-label {
  font-size: 0.62rem;
  color: #94a3b8;
  flex-shrink: 0;
}

body[data-page="prediction"] .draw-balls {
  display: inline-flex;
  gap: 0.2rem;
  align-items: center;
  flex-wrap: wrap;
}

body[data-page="prediction"] .ball-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

body[data-page="prediction"] .draw-pending {
  font-size: 0.65rem;
  color: #94a3b8;
  background: #f8fafc;
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
}

body[data-page="prediction"] .matrix {
  display: grid;
  grid-template-columns: 1.6rem minmax(5.6rem, 1fr) minmax(3.8rem, 1fr) minmax(2rem, 1fr);
  column-gap: 0.25rem;
  align-items: center;
  row-gap: 0.2rem;
}

body[data-page="prediction"] .pos-label {
  width: 1.6rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.8rem;
}

body[data-page="prediction"] .grain-col {
  display: inline-flex;
  gap: 0;
  justify-content: center;
  flex-wrap: nowrap;
}

body[data-page="prediction"] .grain-label {
  color: #cbd5e1;
  text-align: center;
}

@media (max-width: 380px) {
  body[data-page="prediction"] .matrix {
    grid-template-columns: 1.4rem minmax(5.2rem, 1fr) minmax(3.6rem, 1fr) minmax(1.9rem, 1fr);
    column-gap: 0.2rem;
  }
  body[data-page="prediction"] .pos-label {
    width: 1.4rem;
  }
}

body[data-page="prediction"] .dg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.62em;
  padding: 0.06em 0.12em;
  border-radius: 0.3em;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #334155;
  transition: transform 0.15s, background-color 0.15s, color 0.15s;
}

body[data-page="prediction"] .dg-hit {
  color: #dc2626;
  font-weight: 700;
}

body[data-page="prediction"] .btn-sm {
  font-size: 0.7rem;
  padding: 0.3rem 0.7rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, color 0.15s;
}

body[data-page="prediction"] .btn-sm:disabled {
  opacity: 0.4;
  cursor: default;
}

body[data-page="prediction"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="prediction"] .btn-gray:hover:not(:disabled) {
  background: #e2e8f0;
  color: #334155;
}

body[data-page="prediction"] .btn-primary {
  background: #4f46e5;
  color: #fff;
}

body[data-page="prediction"] .btn-primary:hover {
  background: #4338ca;
}

body[data-page="prediction"] .back-top-btn {
  position: fixed;
  right: 1rem;
  bottom: calc(8.6rem + env(safe-area-inset-bottom, 0px));
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 45;
}

body[data-page="prediction"] .back-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body[data-page="prediction"] .publish-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(5.4rem + env(safe-area-inset-bottom, 0px));
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 60;
  transition: transform 0.15s;
}

body[data-page="prediction"] .publish-fab:active {
  transform: scale(0.92);
}

body[data-page="prediction"] .publish-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 61;
}

body[data-page="prediction"] .publish-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  z-index: 62;
  max-height: 84vh;
  overflow-y: auto;
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.16);
}

body[data-page="prediction"] .publish-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

body[data-page="prediction"] .publish-close {
  border: none;
  background: #f1f5f9;
  color: #64748b;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

body[data-page="prediction"] .publish-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

body[data-page="prediction"] .publish-row label {
  font-size: 0.8rem;
  color: #475569;
  width: 3.2rem;
  flex-shrink: 0;
}

body[data-page="prediction"] .publish-select {
  flex: 1;
  padding: 0.5rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  font-size: 0.85rem;
  background: #fff;
  color: #334155;
  outline: none;
}

body[data-page="prediction"] .publish-select:focus {
  border-color: #4f46e5;
}

body[data-page="prediction"] .publish-fixed {
  flex: 1;
  padding: 0.5rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  font-size: 0.85rem;
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="prediction"] .pub-pos-block {
  background: #f8fafc;
  border-radius: 0.65rem;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.6rem;
}

body[data-page="prediction"] .pub-pos-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}

body[data-page="prediction"] .pub-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

body[data-page="prediction"] .pub-row-label {
  font-size: 0.7rem;
  color: #94a3b8;
  width: 2.2rem;
  flex-shrink: 0;
}

body[data-page="prediction"] .pub-digits {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

body[data-page="prediction"] .pub-digit {
  width: 2.05rem;
  height: 2.2rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
  outline: none;
}

body[data-page="prediction"] .pub-digit:focus {
  border-color: #4f46e5;
}

body[data-page="prediction"] .pub-digit:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

body[data-page="prediction"] .publish-submit {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem;
  border: none;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

body[data-page="prediction"] .publish-submit:disabled {
  opacity: 0.5;
}

body[data-page="prediction"] .lock-body {
  text-align: center;
  padding: 0.9rem 0 0.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

body[data-page="prediction"] .unlock-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.45rem;
  border-radius: 0.6rem;
  border: none;
  background: #4f46e5;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
}

body[data-page="prediction"] .unlock-btn:hover {
  background: #4338ca;
  text-decoration: none;
}

body[data-page="prediction"] .skeleton {
  animation: shimmer--prediction 1.5s ease-in-out infinite;
}

body[data-page="prediction"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

body[data-page="prediction"] .tab-btn:focus-visible, body[data-page="prediction"] .back-top-btn:focus-visible, body[data-page="prediction"] .btn-sm:focus-visible, body[data-page="prediction"] .retry-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="prediction"] .skeleton {
    animation: none;
  }
  body[data-page="prediction"] .pred-card, body[data-page="prediction"] .dg, body[data-page="prediction"] .tab-btn, body[data-page="prediction"] .btn-sm, body[data-page="prediction"] .back-top-btn {
    transition: none;
  }
}
/* 页面容器与发布位锁定态 */
body[data-page="prediction"] .pred-page {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
body[data-page="prediction"] .pub-digit-locked {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
}
/* ====================  6. 预测师主页 —— body[data-page="predictor"] ==================== */

body[data-page="predictor"] .tab-btn {
  padding: 0.4rem 1.2rem;
  border-radius: 0.6rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

body[data-page="predictor"] .tab-btn:hover {
  border-color: #c7d2fe;
  color: #4338ca;
}

body[data-page="predictor"] .tab-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

body[data-page="predictor"] .tab-btn:focus-visible, body[data-page="predictor"] .pos-nav-item:focus-visible, body[data-page="predictor"] .btn-sm:focus-visible, body[data-page="predictor"] .follow-btn:focus-visible, body[data-page="predictor"] .back-top-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

body[data-page="predictor"] .predictor-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding: 1.8rem 1.3rem 1.2rem;
  min-height: 8rem;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  border: 1px solid #e0e7ff;
  border-radius: 1rem;
}

body[data-page="predictor"] .predictor-head-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

body[data-page="predictor"] .predictor-head-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

body[data-page="predictor"] .follow-btn {
  flex-shrink: 0;
  padding: 0.22rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #ec4899;
  background: transparent;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

body[data-page="predictor"] .follow-btn.following {
  color: #ec4899;
}

body[data-page="predictor"] .follow-btn.following:hover {
  background: #fdf2f8;
  color: #db2777;
  border-color: #db2777;
}

@media (max-width: 767px) {
  body[data-page="predictor"] .predictor-head {
    width: 100vw;
    margin: -2.5rem 0 0.75rem calc(50% - 50vw);
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 0;
    border: none;
  }
}

body[data-page="predictor"] .follow-btn.followed {
  color: #ec4899;
}

body[data-page="predictor"] .follow-btn.followed:hover {
  background: #fdf2f8;
  color: #db2777;
  border-color: #db2777;
}

body[data-page="predictor"] .follow-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

body[data-page="predictor"] .p-avatar {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

body[data-page="predictor"] .p-info {
  min-width: 0;
}

body[data-page="predictor"] .p-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="predictor"] .p-avatar.skeleton {
  background: #e2e8f0;
}

body[data-page="predictor"] .pred-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  padding: 0.55rem 0 0.5rem;
}

body[data-page="predictor"] .pos-nav {
  margin-bottom: 0.75rem;
}

body[data-page="predictor"] .pos-nav-list {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  min-height: 2.15rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body[data-page="predictor"] .pos-nav-list::-webkit-scrollbar {
  display: none;
}

body[data-page="predictor"] .pos-nav-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.4rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

body[data-page="predictor"] .pos-nav-item:hover {
  background: #f1f5f9;
}

body[data-page="predictor"] .pos-nav-item.active {
  background: #eef2ff;
  border-color: #c7d2fe;
}

body[data-page="predictor"] .pos-nav-code {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

body[data-page="predictor"] .pos-nav-item.active .pos-nav-code {
  color: #4f46e5;
}

body[data-page="predictor"] .pos-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 0 0.75rem;
  padding: 0.42rem 0.8rem;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  border: 1px solid #fecdd3;
  border-radius: 0.65rem;
  min-height: 2.05rem;
}

body[data-page="predictor"] .pos-stat-item {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e11d48;
}

body[data-page="predictor"] .pos-stat-item .pos-stat-label {
  margin-right: 0.25rem;
  font-weight: 500;
  color: #9f1239;
}

body[data-page="predictor"] .pred-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1rem;
  padding: 0.9rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s, box-shadow 0.15s;
}

@media (hover: hover) {
  body[data-page="predictor"] .pred-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  }
}

body[data-page="predictor"] .card-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.9rem;
  line-height: 1.25;
}

body[data-page="predictor"] .badge {
  font-size: 0.6rem;
  padding: 0.14rem 0.45rem;
  border-radius: 0.4rem;
  white-space: nowrap;
  font-weight: 600;
  flex-shrink: 0;
}

body[data-page="predictor"] .badge-correct {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.25);
}

body[data-page="predictor"] .badge-incorrect {
  background: #f1f5f9;
  color: #94a3b8;
}

body[data-page="predictor"] .badge-pending {
  background: #eff6ff;
  color: #2563eb;
}

body[data-page="predictor"] .badge-unpublished {
  background: #f1f5f9;
  color: #94a3b8;
}

body[data-page="predictor"] .draw-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.55rem 0 0.6rem;
  padding: 0.45rem 0.6rem;
  background: #f8fafc;
  border-radius: 0.6rem;
}

body[data-page="predictor"] .draw-label {
  font-size: 0.62rem;
  color: #94a3b8;
  flex-shrink: 0;
}

body[data-page="predictor"] .draw-balls {
  display: inline-flex;
  gap: 0.2rem;
  align-items: center;
  flex-wrap: wrap;
}

body[data-page="predictor"] .ball-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

body[data-page="predictor"] .draw-pending {
  font-size: 0.65rem;
  color: #94a3b8;
  background: #f8fafc;
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
}

body[data-page="predictor"] .matrix {
  display: grid;
  grid-template-columns: 1.6rem minmax(5.6rem, 1fr) minmax(3.8rem, 1fr) minmax(2rem, 1fr);
  column-gap: 0.25rem;
  align-items: center;
  row-gap: 0.2rem;
}

body[data-page="predictor"] .pos-label {
  width: 1.6rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.8rem;
}

body[data-page="predictor"] .grain-col {
  display: inline-flex;
  gap: 0;
  justify-content: center;
  flex-wrap: nowrap;
}

body[data-page="predictor"] .grain-label {
  color: #cbd5e1;
  text-align: center;
}

@media (max-width: 380px) {
  body[data-page="predictor"] .matrix {
    grid-template-columns: 1.4rem minmax(5.2rem, 1fr) minmax(3.6rem, 1fr) minmax(1.9rem, 1fr);
    column-gap: 0.2rem;
  }
  body[data-page="predictor"] .pos-label {
    width: 1.4rem;
  }
}

body[data-page="predictor"] .dg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.62em;
  padding: 0.06em 0.12em;
  border-radius: 0.3em;
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #334155;
  transition: color 0.15s;
}

body[data-page="predictor"] .dg-hit {
  color: #dc2626;
  font-weight: 700;
}

body[data-page="predictor"] .dg-placeholder {
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.72rem;
}

body[data-page="predictor"] .btn-sm {
  font-size: 0.7rem;
  padding: 0.3rem 0.7rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, color 0.15s;
}

body[data-page="predictor"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="predictor"] .btn-gray:hover:not(:disabled) {
  background: #e2e8f0;
  color: #334155;
}

body[data-page="predictor"] .back-top-btn {
  position: fixed;
  right: 1rem;
  bottom: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 45;
}

body[data-page="predictor"] .back-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body[data-page="predictor"] .lock-body {
  text-align: center;
  padding: 0.9rem 0 0.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

body[data-page="predictor"] .unlock-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.45rem;
  border-radius: 0.6rem;
  border: none;
  background: #4f46e5;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
}

body[data-page="predictor"] .unlock-btn:hover {
  background: #4338ca;
  text-decoration: none;
}

body[data-page="predictor"] .skeleton {
  animation: shimmer--predictor 1.5s ease-in-out infinite;
}

body[data-page="predictor"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

body[data-page="predictor"] .skeleton-circle {
  display: inline-flex;
  border-radius: 50%;
  background: #e2e8f0;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="predictor"] .skeleton, body[data-page="predictor"] .pred-card, body[data-page="predictor"] .back-top-btn {
    animation: none;
    transition: none;
  }
}

body[data-page="predictor"] .pred-grid {
  animation: predFadeIn--predictor 0.28s ease;
}

body[data-page="predictor"] .grid {
  display: grid;
}

body[data-page="predictor"] .grid-cols-1 {
  grid-template-columns: 1fr;
}

body[data-page="predictor"] .gap-2 {
  gap: 0.5rem;
}

body[data-page="predictor"] .gap-3 {
  gap: 0.75rem;
}

body[data-page="predictor"] .flex {
  display: flex;
}

body[data-page="predictor"] .flex-col {
  flex-direction: column;
}

body[data-page="predictor"] .items-center {
  align-items: center;
}

body[data-page="predictor"] .items-start {
  align-items: flex-start;
}

body[data-page="predictor"] .justify-between {
  justify-content: space-between;
}

body[data-page="predictor"] .justify-center {
  justify-content: center;
}

body[data-page="predictor"] .text-center {
  text-align: center;
}

body[data-page="predictor"] .truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="predictor"] .w-full {
  width: 100%;
}

body[data-page="predictor"] .min-w-0 {
  min-width: 0;
}

body[data-page="predictor"] .mt-1 {
  margin-top: 0.25rem;
}

body[data-page="predictor"] .mb-1 {
  margin-bottom: 0.25rem;
}

body[data-page="predictor"] .mb-2 {
  margin-bottom: 0.5rem;
}

body[data-page="predictor"] .mb-3 {
  margin-bottom: 0.75rem;
}

body[data-page="predictor"] .py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

body[data-page="predictor"] .py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

body[data-page="predictor"] .text-sm {
  font-size: 0.875rem;
}

body[data-page="predictor"] .text-4xl {
  font-size: 2.25rem;
}

@media (min-width: 768px) {
  body[data-page="predictor"] .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body[data-page="predictor"] .text-xs {
  font-size: 0.75rem;
}

body[data-page="predictor"] .text-gray-400 {
  color: #9ca3af;
}

body[data-page="predictor"] .text-gray-500 {
  color: #6b7280;
}

body[data-page="predictor"] .text-red-500 {
  color: #ef4444;
}
/* 页面容器与关注按钮容器（关注态由 profile 之外的 predictor 页独立维护） */
body[data-page="predictor"] .pred-page {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
body[data-page="predictor"] .p-follow-wrap {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}
/* ====================  7. 大师榜 —— body[data-page="ranking"] ==================== */

body[data-page="ranking"] .tab-btn {
  padding: 0.4rem 1.2rem;
  border-radius: 0.6rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

body[data-page="ranking"] .tab-btn:hover {
  border-color: #c7d2fe;
  color: #4338ca;
}

body[data-page="ranking"] .tab-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

body[data-page="ranking"] .tab-btn:focus-visible, body[data-page="ranking"] .pos-nav-item:focus-visible, body[data-page="ranking"] .retry-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

body[data-page="ranking"] .skeleton {
  animation: shimmer--ranking 1.5s ease-in-out infinite;
}

body[data-page="ranking"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

body[data-page="ranking"] .skeleton-circle {
  display: inline-flex;
  border-radius: 50%;
  background: #e2e8f0;
}

body[data-page="ranking"] .retry-btn {
  margin-top: 0.6rem;
  padding: 0.35rem 1.1rem;
  border: 1px solid #c7d2fe;
  border-radius: 0.5rem;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="ranking"] .skeleton {
    animation: none;
  }
  body[data-page="ranking"] .master-streak.flame {
    animation: none;
  }
}

body[data-page="ranking"] .rank-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  padding: 0.55rem 0 0.5rem;
}

/* 左导航 + 右榜单：导航纵向排在左侧，榜单占满剩余宽度 */
body[data-page="ranking"] .rank-body {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

body[data-page="ranking"] .pos-nav {
  flex: 0 0 auto;
  width: 4.3rem;
  position: sticky;
  top: 3rem;
  max-height: calc(100dvh - 9.5rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body[data-page="ranking"] .rank-main {
  flex: 1 1 auto;
  min-width: 0;
}

body[data-page="ranking"] .pos-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0.1rem 0.2rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: y proximity;
}

body[data-page="ranking"] .pos-nav-list::-webkit-scrollbar {
  display: none;
}

body[data-page="ranking"] .pos-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  width: 100%;
  font-size: 0.7rem;
  padding: 0.45rem 0.2rem;
  scroll-snap-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

body[data-page="ranking"] .pos-nav-item:hover {
  background: #f1f5f9;
}

body[data-page="ranking"] .pos-nav-item.active {
  background: #eef2ff;
  border-color: #c7d2fe;
}

body[data-page="ranking"] .rank-slider {
  display: flex;
  overflow-x: hidden;
  scrollbar-width: none;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
  will-change: scroll-position;
}

body[data-page="ranking"] .rank-slide {
  flex: 0 0 100%;
  /* 允许内容收缩：否则内容 min-content 超过一屏时会把「页」撑宽，
     滑块每页宽度就不再等于 clientWidth，index * clientWidth 的定位会漂移 */
  min-width: 0;
  box-sizing: border-box;
  padding: 0 0.25rem 0 0;
}

body[data-page="ranking"] .pos-nav-code {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

body[data-page="ranking"] .pos-nav-item.active .pos-nav-code {
  color: #4f46e5;
}

body[data-page="ranking"] .master-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="ranking"] .master-rank {
  width: 1.8rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #64748b;
  flex-shrink: 0;
}

body[data-page="ranking"] .master-avatar {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.72rem;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
}

body[data-page="ranking"] .master-name {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  color: #334155;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="ranking"] a.master-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

body[data-page="ranking"] a.master-link:hover {
  text-decoration: none;
}

body[data-page="ranking"] .master-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
}

body[data-page="ranking"] .master-hit {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 0.4rem;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.25);
}

body[data-page="ranking"] .master-streak {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.08rem 0.4rem;
  border-radius: 0.4rem;
  transform-origin: center;
}

body[data-page="ranking"] .master-streak.on {
  color: #b45309;
  background: #fef3c7;
}

body[data-page="ranking"] .master-streak.off {
  color: #94a3b8;
  background: #f1f5f9;
}

body[data-page="ranking"] .master-streak.flame {
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  animation: flamePulse--ranking 1.2s ease-in-out infinite;
}

body[data-page="ranking"] .text-sm {
  font-size: 0.875rem;
}

body[data-page="ranking"] .text-xs {
  font-size: 0.75rem;
}

body[data-page="ranking"] .text-gray-400 {
  color: #9ca3af;
}

body[data-page="ranking"] .text-gray-500 {
  color: #6b7280;
}

body[data-page="ranking"] .text-red-500 {
  color: #ef4444;
}

body[data-page="ranking"] .font-bold {
  font-weight: 700;
}

/* ====================  8. 充值页 —— body[data-page="recharge"] ==================== */

body[data-page="recharge"] .section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.5rem;
}

body[data-page="recharge"] .prod-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f8fafc;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

body[data-page="recharge"] .prod-item.active {
  border-color: #4f46e5;
  background: #eef2ff;
}

body[data-page="recharge"] .prod-item input {
  accent-color: #4f46e5;
}

body[data-page="recharge"] .prod-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

body[data-page="recharge"] .prod-price {
  font-size: 0.75rem;
  color: #d97706;
  font-weight: 600;
  margin-top: 0.15rem;
}

body[data-page="recharge"] .prod-credits {
  font-size: 0.7rem;
  color: #94a3b8;
}

body[data-page="recharge"] .method-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f8fafc;
  border: 2px solid transparent;
  border-radius: 0.6rem;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: #334155;
  margin: 0.2rem 0.4rem 0.2rem 0;
}

body[data-page="recharge"] .method-item.active {
  border-color: #4f46e5;
  background: #eef2ff;
}

body[data-page="recharge"] .method-item input {
  accent-color: #4f46e5;
}

body[data-page="recharge"] .pay-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.6rem;
  border: none;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

body[data-page="recharge"] .pay-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

body[data-page="recharge"] .empty-tip {
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

body[data-page="recharge"] .qr-panel {
  text-align: center;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  margin-top: 0.75rem;
}

body[data-page="recharge"] .qr-panel img {
  width: 11rem;
  height: 11rem;
  display: block;
  margin: 0 auto;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.5rem;
}

body[data-page="recharge"] .qr-panel p {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.4rem;
  word-break: break-all;
}

/* ====================  9. 支付结果页 —— body[data-page="pay-result"] ==================== */

body[data-page="pay-result"] .result-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-top: 0.25rem;
  text-align: center;
}

body[data-page="pay-result"] .result-loading {
  font-size: 0.85rem;
  color: #64748b;
  padding: 1.5rem 0;
}

body[data-page="pay-result"] .result-icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

body[data-page="pay-result"] .result-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.3rem;
}

body[data-page="pay-result"] .result-desc {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.5;
}

body[data-page="pay-result"] .result-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

body[data-page="pay-result"] .result-btn {
  flex: 1;
  padding: 0.65rem;
  border-radius: 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

body[data-page="pay-result"] .result-btn:hover {
  text-decoration: none;
  opacity: 0.92;
}

body[data-page="pay-result"] .result-btn-primary {
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff;
}

body[data-page="pay-result"] .result-btn-plain {
  background: #f1f5f9;
  color: #64748b;
}
/* 结果态容器（result-success / result-processing / result-error 由 JS 拼接） */
body[data-page="pay-result"] .result-state {
  padding: .5rem 0;
}
/* ==================== 10. 我的（含我的预测 / 积分消耗 / 订单） —— body[data-page="profile"] ==================== */

body[data-page="profile"] .profile-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  object-fit: cover;
}

body[data-page="profile"] .profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

body[data-page="profile"] .avatar-edit-btn {
  position: absolute;
  right: -0.1rem;
  bottom: -0.1rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #4f46e5;
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  touch-action: manipulation;
}

body[data-page="profile"] .avatar-edit-btn:hover {
  background: #4338ca;
}

body[data-page="profile"] .profile-card {
  position: relative;
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

body[data-page="profile"] .profile-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

body[data-page="profile"] .profile-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

body[data-page="profile"] .profile-email {
  font-size: 0.8rem;
  color: #64748b;
  word-break: break-all;
  margin-top: 0.25rem;
}

body[data-page="profile"] .edit-info-btn {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0;
  touch-action: manipulation;
}

body[data-page="profile"] .edit-info-btn:hover {
  background: #f1f5f9;
}

body[data-page="profile"] .edit-info-panel {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
}

body[data-page="profile"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

body[data-page="profile"] .btn-primary {
  background: #3b82f6;
  color: #fff;
}

body[data-page="profile"] .btn-primary:hover {
  background: #2563eb;
}

body[data-page="profile"] .btn-plain {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="profile"] .btn-plain:hover {
  background: #e2e8f0;
}

body[data-page="profile"] .avatar-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,0.5);
  padding: 1rem;
  overflow-y: auto;
}

body[data-page="profile"] .avatar-crop-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  width: min(92vw, 23rem);
  padding: 1rem;
  margin: auto;
}

body[data-page="profile"] .avatar-crop-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.35rem;
}

body[data-page="profile"] .avatar-crop-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 0.6rem;
}

body[data-page="profile"] .avatar-crop-hint {
  color: #94a3b8;
  flex: 1;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="profile"] .avatar-crop-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #0f172a;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

body[data-page="profile"] .avatar-crop-box canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

body[data-page="profile"] .avatar-crop-mask {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.55);
  pointer-events: none;
}

body[data-page="profile"] .avatar-crop-grid {
  position: absolute;
  border: 2px solid #fff;
  border-radius: 0.35rem;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 0 10px rgba(0,0,0,0.25);
  pointer-events: none;
}

body[data-page="profile"] .avatar-crop-grid::before, body[data-page="profile"] .avatar-crop-grid::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,0.65);
}

body[data-page="profile"] .avatar-crop-grid::before {
  left: 33.33%;
  right: 33.33%;
  top: 0;
  bottom: 0;
}

body[data-page="profile"] .avatar-crop-grid::after {
  top: 33.33%;
  bottom: 33.33%;
  left: 0;
  right: 0;
}

body[data-page="profile"] .avatar-crop-zoom {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.75rem 0;
}

body[data-page="profile"] .avatar-crop-zoom-label {
  font-size: 0.75rem;
  color: #64748b;
  flex-shrink: 0;
}

body[data-page="profile"] .avatar-crop-zoom input[type="range"] {
  flex: 1;
  accent-color: #4f46e5;
  min-width: 0;
}

body[data-page="profile"] .avatar-crop-zoom-val {
  font-size: 0.75rem;
  color: #334155;
  font-weight: 600;
  min-width: 2.6rem;
  text-align: right;
  flex-shrink: 0;
}

body[data-page="profile"] .avatar-crop-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

body[data-page="profile"] .avatar-crop-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  color: #94a3b8;
}

body[data-page="profile"] .avatar-crop-preview {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #f1f5f9;
  object-fit: cover;
  display: block;
}

body[data-page="profile"] .avatar-crop-actions {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  justify-content: flex-end;
}

body[data-page="profile"] .profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

body[data-page="profile"] .profile-meta-item {
  text-align: center;
}

body[data-page="profile"] .profile-meta-val {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

body[data-page="profile"] .profile-meta-label {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

body[data-page="profile"] .stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

body[data-page="profile"] .stat-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.85rem;
  text-align: center;
}

body[data-page="profile"] .stat-card.highlight {
  background: #fef3c7;
}

body[data-page="profile"] .stat-card.green-bg {
  background: #dcfce7;
}

body[data-page="profile"] .stat-num {
  font-size: 1.5rem;
  font-weight: 800;
}

body[data-page="profile"] .stat-num.purple {
  color: #7c3aed;
}

body[data-page="profile"] .stat-num.green {
  color: #16a34a;
}

body[data-page="profile"] .stat-num.amber {
  color: #d97706;
}

body[data-page="profile"] .stat-num.blue {
  color: #2563eb;
}

body[data-page="profile"] .stat-label {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.2rem;
}

body[data-page="profile"] .stat-sub {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

body[data-page="profile"] .pred-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
}

body[data-page="profile"] .pred-item:last-child {
  border-bottom: none;
}

body[data-page="profile"] .unlock-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

body[data-page="profile"] .unlock-item:last-child {
  border-bottom: none;
}

body[data-page="profile"] .unlock-item:hover, body[data-page="profile"] .unlock-item:active, body[data-page="profile"] .unlock-item:focus {
  background: #f8fafc;
  text-decoration: none !important;
}

body[data-page="profile"] .unlock-go {
  color: #3b82f6;
  font-weight: 500;
}

body[data-page="profile"] .pred-type {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
  font-weight: 600;
  flex-shrink: 0;
}

body[data-page="profile"] .pred-type.plw {
  background: #ede9fe;
  color: #7c3aed;
}

body[data-page="profile"] .pred-type.qxc {
  background: #dbeafe;
  color: #2563eb;
}

body[data-page="profile"] .pred-nums {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.02em;
}

body[data-page="profile"] .pred-status {
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

body[data-page="profile"] .pred-status.correct {
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff;
}

body[data-page="profile"] .pred-status.incorrect {
  background: #f1f5f9;
  color: #94a3b8;
}

body[data-page="profile"] .pred-status.pending {
  background: #eff6ff;
  color: #2563eb;
}

body[data-page="profile"] .order-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}

body[data-page="profile"] .order-item:last-child {
  border-bottom: none;
}

body[data-page="profile"] .order-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
}

body[data-page="profile"] .order-meta {
  font-size: 0.7rem;
  color: #94a3b8;
}

body[data-page="profile"] .order-amount {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  flex-shrink: 0;
}

body[data-page="profile"] .order-status {
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

body[data-page="profile"] .order-status.pending {
  background: #eff6ff;
  color: #2563eb;
}

body[data-page="profile"] .order-status.paid {
  background: #dcfce7;
  color: #16a34a;
}

body[data-page="profile"] .order-status.cancelled {
  background: #f1f5f9;
  color: #94a3b8;
}

body[data-page="profile"] .order-actions {
  margin-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
}

body[data-page="profile"] .order-pay-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: #3b82f6;
  padding: 0.3rem 0.85rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

body[data-page="profile"] .order-pay-link:hover, body[data-page="profile"] .order-pay-link:active {
  background: #2563eb;
  text-decoration: none;
}

body[data-page="profile"] .app-menu {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

body[data-page="profile"] .app-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: #fff;
  text-decoration: none;
  color: #1e293b;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

body[data-page="profile"] .app-menu-item + .app-menu-item {
  border-top: 1px solid #f1f5f9;
}

body[data-page="profile"] .app-menu-item:hover, body[data-page="profile"] .app-menu-item:active {
  background: #f8fafc;
  text-decoration: none;
}

body[data-page="profile"] .app-menu-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

body[data-page="profile"] .app-menu-label {
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

body[data-page="profile"] .app-menu-arrow {
  color: #cbd5e1;
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

body[data-page="profile"] .app-menu-item.danger, body[data-page="profile"] .app-menu-item.danger .app-menu-label {
  color: #dc2626;
}

body[data-page="profile"] .app-menu-item.danger:hover, body[data-page="profile"] .app-menu-item.danger:active {
  background: #fef2f2;
}

body[data-page="profile"] .empty-tip {
  padding: 1rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ==================== 11. 我的关注 —— body[data-page="follows"] ==================== */

body[data-page="follows"] .follow-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="follows"] .follow-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

body[data-page="follows"] .follow-user:hover {
  text-decoration: none;
}

body[data-page="follows"] .follow-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
  object-fit: cover;
}

body[data-page="follows"] .follow-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="follows"] .follow-unfollow {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

body[data-page="follows"] .follow-unfollow:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

body[data-page="follows"] .follow-unfollow:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

body[data-page="follows"] .empty-tip {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ==================== 12. 梦册 —— body[data-page="mengce"] ==================== */

body[data-page="mengce"] .mc-root {
  padding: .25rem .15rem .75rem;
}

body[data-page="mengce"] .mc-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 1.15rem 1rem 1rem;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #9333ea 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(79,70,229,.28);
  margin-bottom: .7rem;
}

body[data-page="mengce"] .mc-hero::after {
  content: '☁';
  position: absolute;
  right: -.6rem;
  top: -.9rem;
  font-size: 5rem;
  opacity: .13;
  transform: rotate(12deg);
}

body[data-page="mengce"] .mc-logo {
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: .2rem;
}

body[data-page="mengce"] .mc-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .04em;
}

body[data-page="mengce"] .mc-sub {
  margin: .18rem 0 .7rem;
  font-size: .72rem;
  opacity: .85;
}

body[data-page="mengce"] .mc-search-box {
  position: relative;
  z-index: 1;
  display: flex;
  gap: .45rem;
}

body[data-page="mengce"] .mc-search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  border-radius: .65rem;
  padding: .68rem .85rem;
  font-size: .92rem;
  color: #1e293b;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

body[data-page="mengce"] .mc-search-box input::placeholder {
  color: #94a3b8;
}

body[data-page="mengce"] .mc-search-box button {
  flex-shrink: 0;
  border: none;
  border-radius: .65rem;
  padding: 0 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: #4f46e5;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: transform .12s;
}

body[data-page="mengce"] .mc-search-box button:active {
  transform: scale(.94);
}

body[data-page="mengce"] .mc-hot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .65rem;
}

body[data-page="mengce"] .mc-chip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  border-radius: 999px;
  font-size: .72rem;
  padding: .3rem .62rem;
  cursor: pointer;
  user-select: none;
  transition: transform .12s, background .15s, color .15s, box-shadow .15s;
}

body[data-page="mengce"] .mc-chip:active {
  transform: scale(.93);
}

body[data-page="mengce"] .mc-chip-hot {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}

body[data-page="mengce"] .mc-chip-hot:active, body[data-page="mengce"] .mc-chip-hot.active {
  background: #fff;
  color: #6d28d9;
  border-color: #fff;
  font-weight: 600;
}

body[data-page="mengce"] .mc-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}

@media (min-width: 768px) {
  body[data-page="mengce"] .mc-list {
    grid-template-columns: 1fr 1fr;
  }
}

body[data-page="mengce"] .mc-card {
  display: flex;
  gap: .6rem;
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: .8rem;
  padding: .6rem .65rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15,23,42,.05);
  transition: transform .12s, box-shadow .15s, border-color .15s;
}

body[data-page="mengce"] .mc-card:active {
  transform: scale(.985);
}

body[data-page="mengce"] .mc-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 6px 16px rgba(79,70,229,.12);
}

body[data-page="mengce"] .mc-card-img {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: .55rem;
  overflow: hidden;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
}

body[data-page="mengce"] .mc-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body[data-page="mengce"] .mc-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

body[data-page="mengce"] .mc-card-title {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}

body[data-page="mengce"] .mc-title-text {
  font-size: .95rem;
  font-weight: 700;
  color: #1e293b;
}

body[data-page="mengce"] mark {
  background: #fde68a;
  color: #92400e;
  border-radius: .15rem;
  padding: 0 .08rem;
}

body[data-page="mengce"] .mc-badge {
  font-size: .6rem;
  font-weight: 700;
  border-radius: 999px;
  padding: .1rem .42rem;
  color: #fff;
}

body[data-page="mengce"] .mc-badge-mz {
  background: linear-gradient(135deg, #f97316, #dc2626);
}

body[data-page="mengce"] .mc-card-meta {
  display: flex;
  align-items: center;
  gap: .45rem;
}

body[data-page="mengce"] .mc-tag {
  font-size: .62rem;
  color: #6366f1;
  background: #eef2ff;
  border-radius: 999px;
  padding: .06rem .45rem;
}

body[data-page="mengce"] .mc-fire {
  font-size: .62rem;
  color: #f59e0b;
}

body[data-page="mengce"] .mc-nums {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .15rem;
}

body[data-page="mengce"] .mc-num-group {
  font-size: .66rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: .45rem;
  padding: .18rem .5rem;
}

body[data-page="mengce"] .mc-num-group b {
  font-size: .8rem;
  color: #dc2626;
  font-weight: 800;
  letter-spacing: .06em;
  margin-left: .12rem;
}

body[data-page="mengce"] .mc-more {
  margin-top: auto;
  font-size: .68rem;
  color: #6366f1;
  font-weight: 600;
  padding-top: .2rem;
}

body[data-page="mengce"] .mc-empty {
  text-align: center;
  padding: 2.5rem 0;
  color: #94a3b8;
}

body[data-page="mengce"] .mc-empty-icon {
  font-size: 2.4rem;
  margin-bottom: .4rem;
}

body[data-page="mengce"] .mc-empty p {
  margin: 0;
  font-size: .82rem;
}

body[data-page="mengce"] .mc-loading {
  text-align: center;
  padding: 1.6rem 0;
  color: #94a3b8;
  font-size: .8rem;
}

body[data-page="mengce"] .mc-loading::before {
  content: '';
  display: inline-block;
  width: .9rem;
  height: .9rem;
  margin-right: .45rem;
  vertical-align: -.1rem;
  border: 2px solid #c7d2fe;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: mc-spin .7s linear infinite;
}

body[data-page="mengce"] .mc-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

body[data-page="mengce"] .mc-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.5);
}

body[data-page="mengce"] .mc-modal-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 84vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 30px rgba(15,23,42,.22);
  animation: mc-up .22s ease-out;
}

@media (min-width: 768px) {
  body[data-page="mengce"] .mc-modal {
    align-items: center;
  }
  body[data-page="mengce"] .mc-modal-box {
    border-radius: 1rem;
  }
}

body[data-page="mengce"] .mc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .7rem;
}

body[data-page="mengce"] .mc-modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
}

body[data-page="mengce"] .mc-modal-x {
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.05rem;
  cursor: pointer;
}

body[data-page="mengce"] .mc-detail-img {
  border-radius: .7rem;
  overflow: hidden;
  margin-bottom: .7rem;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  text-align: center;
}

body[data-page="mengce"] .mc-detail-img img {
  max-width: 100%;
  max-height: 14rem;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

body[data-page="mengce"] .mc-detail-nums {
  display: flex;
  gap: .5rem;
  margin-bottom: .6rem;
  flex-wrap: wrap;
}

body[data-page="mengce"] .mc-detail-num {
  flex: 1;
  min-width: 8.5rem;
  text-align: center;
  font-size: .78rem;
  color: #475569;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
  border: 1px solid #fecaca;
  border-radius: .6rem;
  padding: .45rem .4rem;
}

body[data-page="mengce"] .mc-detail-num b {
  font-size: 1.15rem;
  color: #dc2626;
  font-weight: 800;
  letter-spacing: .1em;
  display: block;
  margin-top: .1rem;
}

body[data-page="mengce"] .mc-detail-tags {
  display: flex;
  gap: .45rem;
  margin-bottom: .6rem;
  align-items: center;
}

body[data-page="mengce"] .mc-detail-sec {
  font-size: .78rem;
  font-weight: 700;
  color: #4f46e5;
  margin: .85rem 0 .4rem;
  padding-left: .5rem;
  border-left: 3px solid #6366f1;
}

body[data-page="mengce"] .mc-related {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

body[data-page="mengce"] .mc-related-item {
  font-size: .72rem;
  color: #4f46e5;
  background: #eef2ff;
  border-radius: 999px;
  padding: .28rem .6rem;
  cursor: pointer;
}

body[data-page="mengce"] .mc-related-item:active {
  background: #c7d2fe;
}
body[data-page="mengce"] .mc-modal-body {
  font-size: .82rem;
  color: #334155;
  line-height: 1.75;
}
/* ==================== 13. 画规 —— body[data-page="huagui"] ==================== */

body[data-page="huagui"] .flex-1 {
  overflow: hidden;
  background: #fff;
}

body[data-page="huagui"] .card {
  max-width: none;
  width: 100%;
  padding: 0;
  min-height: 0;
  height: 100%;
  box-shadow: none;
  border-radius: 0;
}

body[data-page="huagui"] #huaguiApp {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

body[data-page="huagui"] .hg-tool {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  color: #fff;
  font-weight: 700;
  box-shadow: 2px 0 5px 1px rgba(51,51,51,.2);
  padding: 0 .05rem;
  z-index: 901;
}

body[data-page="huagui"] .hg-tool-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .12rem;
  font-size: .68rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

body[data-page="huagui"] .hg-tool-item i {
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1;
}

body[data-page="huagui"] .hg-tool-item.disable {
  opacity: .45;
}

body[data-page="huagui"] .hg-split {
  width: 1px;
  height: 42%;
  background: rgba(255,255,255,.55);
  flex-shrink: 0;
}

body[data-page="huagui"] .hg-board {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

body[data-page="huagui"] .hg-board-status {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: 1.15rem 1.5rem;
  min-width: 13rem;
  max-width: 82%;
  background: rgba(255,255,255,.97);
  border: 1px solid #eef0f4;
  border-radius: .9rem;
  box-shadow: 0 10px 30px rgba(15,23,42,.14);
  text-align: center;
  font-size: .82rem;
  color: #475569;
}

body[data-page="huagui"] .hg-board-status-text {
  line-height: 1.5;
}

body[data-page="huagui"] .hg-status-spinner {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 3px solid #e0e7ff;
  border-top-color: #4f46e5;
  animation: hg-spin .8s linear infinite;
}

body[data-page="huagui"] .hg-board-status.hg-status-error {
  border-color: #fecaca;
  background: rgba(255,245,245,.98);
}

body[data-page="huagui"] .hg-board-status.hg-status-error .hg-board-status-text {
  color: #b91c1c;
  font-weight: 600;
}

body[data-page="huagui"] .hg-board-status button {
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
  font-size: .8rem;
  border-radius: .5rem;
  padding: .42rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s;
}

body[data-page="huagui"] .hg-board-status button:active {
  background: #fef2f2;
}

body[data-page="huagui"] .hg-scroll {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

body[data-page="huagui"] .hg-bg {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

body[data-page="huagui"] .hg-bg canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

body[data-page="huagui"] #hgGrid {
  position: static;
}

body[data-page="huagui"] .hg-selbar {
  position: absolute;
  z-index: 50;
  display: flex;
  gap: .35rem;
  background: rgba(30,41,59,.92);
  border-radius: .5rem;
  padding: .28rem .4rem;
  align-items: center;
}

body[data-page="huagui"] .hg-sel-btn {
  border: none;
  background: transparent;
  color: #fff;
  font-size: .7rem;
  cursor: pointer;
  padding: .15rem .2rem;
  border-radius: .3rem;
  white-space: nowrap;
}

body[data-page="huagui"] .hg-sel-btn.hg-sel-danger {
  color: #fca5a5;
}

body[data-page="huagui"] .hg-color-btn {
  position: fixed;
  left: .35rem;
  bottom: .8rem;
  z-index: 900;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  background: rgba(76,75,75,.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

body[data-page="huagui"] .hg-color-dot {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  display: block;
}

body[data-page="huagui"] .hg-pen-dot {
  width: 1.2rem;
  background: #fff;
  border-radius: 2px;
  display: block;
}

body[data-page="huagui"] .hg-color-panel {
  position: fixed;
  left: .55rem;
  bottom: 4rem;
  z-index: 899;
  background: rgba(76,75,75,.88);
  border-radius: 1rem;
  padding: .7rem;
  display: none;
}

body[data-page="huagui"] .hg-color-panel.show {
  display: block;
}

body[data-page="huagui"] .hg-colors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}

body[data-page="huagui"] .hg-color {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  padding: 0;
}

body[data-page="huagui"] .hg-color.on {
  box-shadow: 0 0 0 2px #fd3d44;
}

body[data-page="huagui"] .hg-pens {
  display: flex;
  justify-content: space-around;
  gap: .5rem;
  margin-top: .6rem;
}

body[data-page="huagui"] .hg-pen {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

body[data-page="huagui"] .hg-pen i {
  width: 1.2rem;
  background: #fff;
  border-radius: 2px;
  display: block;
}

body[data-page="huagui"] .hg-pen.on {
  background: #fd3d44;
}

body[data-page="huagui"] .hg-tools {
  position: fixed;
  right: .35rem;
  bottom: .8rem;
  z-index: 901;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .4rem;
}

body[data-page="huagui"] .hg-tool-panel {
  display: none;
  flex-direction: column;
  gap: .25rem;
  max-height: 74vh;
  overflow-y: auto;
}

body[data-page="huagui"] .hg-tool-panel.show {
  display: flex;
}

body[data-page="huagui"] .hg-tool-pick {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .35rem;
  cursor: pointer;
  user-select: none;
}

body[data-page="huagui"] .hg-tool-pick span {
  display: none;
  font-size: .72rem;
  color: #fff;
  background: rgba(76,75,75,.82);
  border-radius: .45rem;
  padding: .3rem .5rem;
  white-space: nowrap;
}

body[data-page="huagui"] .hg-tool-panel.show .hg-tool-pick span {
  display: block;
}

body[data-page="huagui"] .hg-tool-pick:before {
  content: '';
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(76,75,75,.82);
}

body[data-page="huagui"] .hg-tool-pick.on:before {
  background: #fd3d44;
}

body[data-page="huagui"] .hg-tool-float {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  background: rgba(76,75,75,.82);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

body[data-page="huagui"] .hg-lock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: .8rem;
  z-index: 900;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  background: rgba(75,75,75,.82);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

body[data-page="huagui"] .hg-sheet {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

body[data-page="huagui"] .hg-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

body[data-page="huagui"] .hg-sheet-box {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: #fff;
  border-radius: .8rem .8rem 0 0;
  padding: 1rem 1.1rem 1.4rem;
  max-height: 82vh;
  overflow-y: auto;
}

body[data-page="huagui"] .hg-sheet-title {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  line-height: 1;
  margin: .2rem 0 .9rem .4rem;
  padding-left: .6rem;
  border-left: .16rem solid #fd3d44;
  position: relative;
}

body[data-page="huagui"] .hg-sheet-close {
  position: absolute;
  right: .2rem;
  top: -.25rem;
  font-size: 1.2rem;
  color: #999;
  font-weight: 400;
  cursor: pointer;
}

body[data-page="huagui"] .hg-sheet-ok {
  display: block;
  width: 100%;
  padding: .8rem;
  margin-top: .8rem;
  border: none;
  border-radius: .6rem;
  background: linear-gradient(90deg, #fd3d44, #f97316);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}

body[data-page="huagui"] .hg-intel-row {
  display: flex;
  align-items: center;
  margin-bottom: .75rem;
}

body[data-page="huagui"] .hg-intel-name {
  font-size: .85rem;
  color: #333;
  margin-right: .8rem;
  white-space: nowrap;
}

body[data-page="huagui"] .hg-intel-btns {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

body[data-page="huagui"] .hg-intel-btn {
  height: 1.9rem;
  padding: 0 .8rem;
  display: flex;
  align-items: center;
  border: 1px solid #eef0f4;
  border-radius: .35rem;
  font-size: .8rem;
  color: #555;
  cursor: pointer;
  user-select: none;
}

body[data-page="huagui"] .hg-intel-btn.on {
  border-color: rgba(253,61,68,.35);
  background: #fff5f5;
  color: #fd3d44;
}

body[data-page="huagui"] .hg-intel-row.disable {
  opacity: .45;
  pointer-events: none;
}

body[data-page="huagui"] .hg-switch {
  width: 2.6rem;
  height: 1.4rem;
  border-radius: 1rem;
  background: #e9e8e8;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}

body[data-page="huagui"] .hg-switch i {
  position: absolute;
  top: .14rem;
  left: .15rem;
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 50%;
  background: #fff;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}

body[data-page="huagui"] .hg-switch.on {
  background: #fd3d44;
}

body[data-page="huagui"] .hg-switch.on i {
  left: 1.35rem;
}

body[data-page="huagui"] .hg-switch-blue.on {
  background: #4f46e5;
}

body[data-page="huagui"] .hg-intel-dot {
  margin-left: auto;
  font-size: 1.3rem;
  color: #fd3d44;
}

body[data-page="huagui"] .hg-num-title {
  font-size: .82rem;
  color: #333;
  font-weight: 600;
  margin: .7rem 0 .4rem;
}

body[data-page="huagui"] .hg-num-row {
  display: flex;
  gap: .45rem;
  margin-bottom: .35rem;
}

body[data-page="huagui"] .hg-num-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 .35rem;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  font-size: .82rem;
  color: #475569;
  cursor: pointer;
  font-style: normal;
}

body[data-page="huagui"] .hg-num-combs {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}

body[data-page="huagui"] .hg-setting {
  align-items: stretch;
  justify-content: flex-end;
}

body[data-page="huagui"] .hg-setting-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

body[data-page="huagui"] .hg-setting-box {
  position: relative;
  width: 82%;
  max-width: 360px;
  background: #fff;
  height: 100%;
  padding: 0 1.1rem;
  overflow-y: auto;
  animation: hgSlideIn .2s ease;
}

body[data-page="huagui"] .hg-setting-nav {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .8rem 0;
  border-bottom: 1px solid #f1f5f9;
}

body[data-page="huagui"] .hg-setting-back {
  font-size: 1.4rem;
  color: #323233;
  cursor: pointer;
  line-height: 1;
}

body[data-page="huagui"] .hg-setting-title {
  font-size: .95rem;
  font-weight: 600;
  color: #323233;
}

body[data-page="huagui"] .hg-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

body[data-page="huagui"] .hg-setting-text {
  font-size: .9rem;
  color: #333;
  display: block;
}

body[data-page="huagui"] .hg-setting-remark {
  font-size: .72rem;
  color: #94a3b8;
  display: block;
  margin-top: .25rem;
}

body[data-page="huagui"] .hg-gap {
  height: .5rem;
  background: #f5f6f8;
  margin: 0 -1.1rem;
}

body[data-page="huagui"] .hg-setting-sec {
  font-size: .85rem;
  font-weight: 600;
  color: #333;
  margin: 1rem 0 .6rem;
}

body[data-page="huagui"] .hg-stage-length {
  display: flex;
  gap: .5rem;
}

body[data-page="huagui"] .hg-length-item {
  flex: 1;
  text-align: center;
  padding: .55rem 0;
  border: 1px solid #e2e8f0;
  border-radius: .45rem;
  font-size: .85rem;
  color: #475569;
  cursor: pointer;
}

body[data-page="huagui"] .hg-length-item.on {
  border-color: #fd3d44;
  color: #fd3d44;
  background: #fff5f5;
}

body[data-page="huagui"] .hg-skins {
  display: flex;
  gap: .6rem;
}

body[data-page="huagui"] .hg-skin-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
}

body[data-page="huagui"] .hg-skin-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: 3.2rem;
  border-radius: .45rem;
  overflow: hidden;
  border: 2px solid #e2e8f0;
}

body[data-page="huagui"] .hg-skin-item.on .hg-skin-preview {
  border-color: #fd3d44;
}

body[data-page="huagui"] .hg-skin-item span {
  display: block;
  font-size: .72rem;
  color: #64748b;
  margin-top: .3rem;
}

body[data-page="huagui"] .hg-text-input {
  position: fixed;
  inset: 0;
  z-index: 940;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0,0,0,.25);
  padding-top: 4.5rem;
}

body[data-page="huagui"] .hg-text-box {
  width: 80%;
  max-width: 420px;
  background: #fff;
  border-radius: .7rem;
  padding: .8rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

body[data-page="huagui"] .hg-text-box textarea {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid;
  border-radius: .45rem;
  padding: .5rem;
  font-size: .95rem;
  outline: none;
  resize: none;
}

body[data-page="huagui"] .hg-text-actions {
  display: flex;
  gap: .5rem;
  margin-top: .6rem;
}

body[data-page="huagui"] .hg-text-btn {
  flex: 1;
  padding: .55rem;
  border: none;
  border-radius: .5rem;
  background: #f1f5f9;
  color: #475569;
  font-size: .85rem;
  cursor: pointer;
}

body[data-page="huagui"] .hg-text-ok {
  background: #fd3d44;
  color: #fff;
}

body[data-page="huagui"] .hg-guide {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--hg-tool-h, 50px);
  bottom: 0;
  z-index: 960;
}

body[data-page="huagui"] .hg-guide-mask1 {
  height: var(--hg-row-h, 50px);
  background: rgba(0,0,0,.35);
}

body[data-page="huagui"] .hg-guide-mask2 {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--hg-row-h, 50px);
  bottom: 0;
  display: flex;
}

body[data-page="huagui"] .hg-guide-left {
  width: 19%;
  flex-shrink: 0;
  background: rgba(0,0,0,.35);
}

body[data-page="huagui"] .hg-guide-right {
  flex: 1;
  background: rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body[data-page="huagui"] .hg-guide-text1 {
  color: #fff;
  font-size: .9rem;
  margin-bottom: 1rem;
}

body[data-page="huagui"] .hg-guide-text2 {
  color: #fff;
  font-size: .85rem;
  border: 1px solid #fff;
  border-radius: 1rem;
  padding: .5rem 1.6rem;
  cursor: pointer;
}

body[data-page="huagui"] .hg-preview {
  position: fixed;
  inset: 0;
  z-index: 980;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-page="huagui"] .hg-preview-mask {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.62);
}

body[data-page="huagui"] .hg-preview-box {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: .6rem;
  padding: .6rem;
  box-shadow: 0 12px 36px rgba(0,0,0,.25);
}

body[data-page="huagui"] .hg-preview-box img {
  max-width: 100%;
  max-height: 64vh;
  object-fit: contain;
  border-radius: .3rem;
}

body[data-page="huagui"] .hg-preview-tip {
  font-size: .72rem;
  color: #64748b;
  margin: .5rem 0 .45rem;
}

body[data-page="huagui"] .hg-preview-actions {
  display: flex;
  gap: .5rem;
  width: 100%;
  justify-content: center;
}

body[data-page="huagui"] .hg-preview-btn {
  flex: 1;
  padding: .6rem;
  border: none;
  border-radius: .5rem;
  background: #f1f5f9;
  color: #475569;
  font-size: .85rem;
  cursor: pointer;
}

body[data-page="huagui"] .hg-preview-primary {
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff;
}
/* 工具栈 / 弹层细节（模板 huagui.html 与 huagui.js 动态渲染共用） */
body[data-page="huagui"] .hg-tool-set:before {
  background: rgba(79, 70, 229, .9);
}
body[data-page="huagui"] .hg-intel-box {
  padding-bottom: 1rem;
}
body[data-page="huagui"] .hg-num-box {
  max-height: 78vh;
}
body[data-page="huagui"] .hg-num-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .45rem;
}
body[data-page="huagui"] .hg-setting-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
body[data-page="huagui"] .hg-status-loading {
  color: #4f46e5;
}
/* ==================== 13b. 规律图集 —— body[data-page="patterns"] ==================== */

body[data-page="patterns"] {
  background: #f5f6f8;
}

body[data-page="patterns"] .flex-1 {
  background: #f5f6f8;
}

body[data-page="patterns"] .card {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

body[data-page="patterns"] #ptApp {
  padding: .6rem .75rem 1.5rem;
}

body[data-page="patterns"] .pt-top {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem 0 .7rem;
}

body[data-page="patterns"] .pt-top-skin {
  padding: .45rem .6rem;
  border-radius: .6rem;
}

body[data-page="patterns"] .pt-top-skin .pt-title,
body[data-page="patterns"] .pt-top-skin .pt-sub {
  color: #fff;
}

body[data-page="patterns"] .pt-top-skin .pt-cp {
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border-color: transparent;
}

body[data-page="patterns"] .pt-top-main {
  flex: 1;
  min-width: 0;
}

body[data-page="patterns"] .pt-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  color: #1f2430;
}

body[data-page="patterns"] .pt-sub {
  margin-top: .12rem;
  font-size: .7rem;
  color: #8b93a1;
}

body[data-page="patterns"] .pt-cp {
  flex: none;
  padding: .38rem .7rem;
  border: 1px solid #eceef3;
  border-radius: 999px;
  background: #fff;
  color: #fd3d44;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}

body[data-page="patterns"] .pt-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.1rem;
  padding: .6rem .75rem;
  background: #fff;
  border-radius: .8rem;
}

body[data-page="patterns"] .pt-control {
  display: flex;
  align-items: center;
  gap: .45rem;
}

body[data-page="patterns"] .pt-filter-block {
  display: flex;
  flex: 1 1 13rem;
  align-items: center;
  gap: .45rem;
  min-width: 0;
}

body[data-page="patterns"] .pt-filter-group {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .7rem;
  min-width: 0;
  padding: .32rem .45rem;
  border: 1px solid #f0f2f5;
  border-radius: .55rem;
  background: transparent;
}

body[data-page="patterns"] .pt-group-label {
  flex: none;
  color: #8b93a1;
  font-size: .72rem;
  font-weight: 400;
  white-space: nowrap;
}

body[data-page="patterns"] .pt-position-control {
  flex-basis: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: .4rem;
}

body[data-page="patterns"] .pt-position-main {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
}

body[data-page="patterns"] .pt-subfilter {
  display: flex;
  align-items: center;
  min-width: 0;
}

body[data-page="patterns"] .pt-digit-row {
  display: flex;
  align-items: flex-start;
  gap: .24rem;
  width: 100%;
  overflow-x: auto;
  padding: .02rem 0 .1rem;
  scrollbar-width: none;
}

body[data-page="patterns"] .pt-digit-row::-webkit-scrollbar {
  display: none;
}

body[data-page="patterns"] .pt-digit-option {
  display: inline-flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: .14rem;
  min-height: 1.5rem;
}

body[data-page="patterns"] .pt-digit-btn {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid #e5e8ee;
  border-radius: 50%;
  background: #fff;
  color: #5f6775;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

body[data-page="patterns"] .pt-digit-count {
  color: #8b93a1;
  font-size: .46rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

body[data-page="patterns"] .pt-digit-btn.on {
  border-color: #fd3d44;
  background: #fd3d44;
  color: #fff;
  box-shadow: 0 2px 7px rgba(253, 61, 68, .28);
}

body[data-page="patterns"] .pt-digit-all {
  width: auto;
  min-width: 2.15rem;
  padding: 0 .42rem;
  border-radius: 999px;
  font-size: .66rem;
}

body[data-page="patterns"] .pt-control-label {
  font-size: .72rem;
  color: #8b93a1;
  white-space: nowrap;
}

body[data-page="patterns"] .pt-seg {
  display: flex;
  gap: .25rem;
}

body[data-page="patterns"] .pt-seg-item {
  padding: .3rem .55rem;
  border: 1px solid #eceef3;
  border-radius: .4rem;
  background: #fff;
  color: #666e7d;
  font-size: .72rem;
  line-height: 1;
  cursor: pointer;
}

body[data-page="patterns"] .pt-seg-item.on {
  border-color: rgba(253, 61, 68, .4);
  background: #fff5f5;
  color: #fd3d44;
  font-weight: 700;
}

body[data-page="patterns"] .pt-select {
  min-width: 4.8rem;
  padding: .28rem 1.5rem .28rem .5rem;
  border: 1px solid #eceef3;
  border-radius: .4rem;
  background: #fff;
  color: #555f6e;
  font-size: .72rem;
  line-height: 1.2;
  cursor: pointer;
}

body[data-page="patterns"] .pt-range-filter {
  gap: .28rem;
}

body[data-page="patterns"] .pt-number {
  width: 3rem;
  padding: .28rem .3rem;
  border: 1px solid #eceef3;
  border-radius: .4rem;
  background: #fff;
  color: #555f6e;
  font-size: .72rem;
  line-height: 1.2;
}

body[data-page="patterns"] .pt-range-values {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  color: #8b93a1;
  font-size: .7rem;
}

body[data-page="patterns"] .pt-range-values[hidden] {
  display: none;
}

body[data-page="patterns"] .pt-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3.2rem, 1fr));
  gap: .4rem;
  margin: .6rem 0 0;
}

body[data-page="patterns"] .pt-sum-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  padding: .5rem .2rem;
  border-radius: .6rem;
  background: #fff;
  cursor: pointer;
}

body[data-page="patterns"] .pt-sum-item.on {
  background: #fff5f5;
  box-shadow: inset 0 0 0 1px rgba(253, 61, 68, .35);
}

body[data-page="patterns"] .pt-sum-name {
  font-size: .64rem;
  color: #8b93a1;
}

body[data-page="patterns"] .pt-sum-digit {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

body[data-page="patterns"] .pt-sum-pct {
  font-size: .62rem;
  color: #a0a6b1;
}

body[data-page="patterns"] .pt-sum-more {
  font-size: .56rem;
  color: #b3b8c1;
  white-space: nowrap;
}

body[data-page="patterns"] .pt-panel {
  margin-top: .6rem;
  padding: .6rem .6rem .55rem;
  border-radius: .8rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 30, 50, .04);
}

body[data-page="patterns"] .pt-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: 0 .2rem .45rem;
}

body[data-page="patterns"] .pt-panel-title {
  font-size: .82rem;
  font-weight: 700;
  color: #2a3040;
}

body[data-page="patterns"] .pt-status {
  padding: .8rem;
  text-align: center;
  font-size: .75rem;
  color: #8b93a1;
  cursor: pointer;
}

body[data-page="patterns"] .pt-count {
  font-size: .66rem;
  color: #a0a6b1;
}

body[data-page="patterns"] .pt-select-toggle {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  margin-left: auto;
  color: #737b89;
  font-size: .68rem;
  cursor: pointer;
}

body[data-page="patterns"] .pt-select-toggle input {
  width: .92rem;
  height: .92rem;
  margin: 0;
  accent-color: #1f8fff;
  cursor: pointer;
}

body[data-page="patterns"] .pt-select-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .35rem;
  padding: 0 .2rem .5rem;
}

body[data-page="patterns"] .pt-select-actions[hidden] {
  display: none;
}

body[data-page="patterns"] .pt-select-btn {
  flex: none;
  padding: .32rem .58rem;
  border: 1px solid #e5e8ee;
  border-radius: .42rem;
  background: #fff;
  color: #666e7d;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

body[data-page="patterns"] .pt-select-download {
  border-color: rgba(31, 143, 255, .3);
  background: rgba(31, 143, 255, .06);
  color: #1f78d1;
}

body[data-page="patterns"] .pt-select-btn:disabled {
  border-color: #e5e8ee;
  background: #f7f8fa;
  color: #9aa1ad;
  cursor: default;
}

body[data-page="patterns"] .pt-pagebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: .6rem;
}

body[data-page="patterns"] .pt-page-btn {
  padding: .35rem .7rem;
  border: 1px solid #eceef3;
  border-radius: .4rem;
  background: #fff;
  color: #555;
  font-size: .72rem;
  cursor: pointer;
}

body[data-page="patterns"] .pt-page-btn:disabled {
  opacity: .4;
  cursor: default;
}

body[data-page="patterns"] .pt-page-info {
  font-size: .7rem;
  color: #8b93a1;
}

body[data-page="patterns"] .pt-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: .5rem;
}

body[data-page="patterns"] .pt-card {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem;
  border: 1px solid #eef0f4;
  border-radius: .6rem;
  background: #fff;
  cursor: pointer;
}

body[data-page="patterns"] .pt-card-main {
  flex: 1 1 auto;
  min-width: 0;
}

body[data-page="patterns"] .pt-card-thumb {
  flex: none;
  max-width: 128px;
  max-height: 92px;
  border: 1px solid #eceff3;
  border-radius: .35rem;
  background: #fff;
}

body[data-page="patterns"] .pt-card.on {
  border-color: #fd3d44;
  box-shadow: 0 0 0 2px rgba(253, 61, 68, .12);
}

body[data-page="patterns"] .pt-card.picked {
  border-color: rgba(31, 143, 255, .65);
  background: rgba(31, 143, 255, .035);
  box-shadow: 0 0 0 2px rgba(31, 143, 255, .12);
}

body[data-page="patterns"] .pt-card-head {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .35rem;
}

body[data-page="patterns"] .pt-card-check {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 1px solid #dfe3ea;
  border-radius: .28rem;
  background: #fff;
  color: transparent;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

body[data-page="patterns"] .pt-card-check.on {
  border-color: #1f8fff;
  background: #1f8fff;
  color: #fff;
}

body[data-page="patterns"] .pt-card-index {
  flex: none;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 .35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f4f5f7;
  color: #7b8391;
  font-size: .66rem;
  font-weight: 700;
}

body[data-page="patterns"] .pt-card-badge {
  padding: .1rem .3rem;
  border-radius: .25rem;
  color: #fff;
  font-size: .6rem;
  white-space: nowrap;
}

body[data-page="patterns"] .pt-card-title {
  font-size: .75rem;
  font-weight: 700;
  color: #2a3040;
}

body[data-page="patterns"] .pt-card-shift {
  margin-left: auto;
  font-size: .66rem;
  color: #a0a6b1;
  white-space: nowrap;
}

body[data-page="patterns"] .pt-card-foot {
  margin-top: .3rem;
  font-size: .62rem;
  color: #a0a6b1;
}

body[data-page="patterns"] .pt-card-geometry {
  margin-top: .22rem;
  font-size: .64rem;
  font-weight: 600;
  color: #6b7280;
}

body[data-page="patterns"] .pt-empty {
  grid-column: 1 / -1;
  padding: 1.4rem 0;
  text-align: center;
  font-size: .78rem;
  color: #9aa0aa;
}

body[data-page="patterns"] .pt-preview {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .62);
}

body[data-page="patterns"] .pt-preview-box {
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  padding: .8rem;
  border-radius: .8rem;
  background: #fff;
  text-align: center;
}

body[data-page="patterns"] .pt-preview-box img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  margin: 0 auto;
  border-radius: .4rem;
  background: #f5f6f8;
}

body[data-page="patterns"] .pt-preview-tip {
  margin: .55rem 0;
  font-size: .7rem;
  color: #9aa0aa;
}

body[data-page="patterns"] .pt-preview-actions {
  display: flex;
  justify-content: center;
  gap: .5rem;
}

body[data-page="patterns"] .pt-preview-save,
body[data-page="patterns"] .pt-preview-close {
  padding: .55rem 1rem;
  border: none;
  border-radius: .5rem;
  font-size: .8rem;
  cursor: pointer;
}

body[data-page="patterns"] .pt-preview-save {
  background: #fd3d44;
  color: #fff;
  font-weight: 700;
}

body[data-page="patterns"] .pt-preview-close {
  background: #f0f2f5;
  color: #555;
}

body[data-page="patterns"] .pt-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  background: #111;
}

body[data-page="patterns"] .pt-fullscreen-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .75rem;
  background: #1f2430;
  color: #fff;
}

body[data-page="patterns"] .pt-fullscreen-title {
  font-size: .85rem;
  font-weight: 700;
}

body[data-page="patterns"] .pt-fullscreen-index {
  margin-left: auto;
  margin-right: .6rem;
  font-size: .72rem;
  color: #c7ccd6;
}

body[data-page="patterns"] .pt-fullscreen-close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

body[data-page="patterns"] .pt-fullscreen-download {
  position: absolute;
  right: 1rem;
  bottom: calc(2.8rem + env(safe-area-inset-bottom, 0px));
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  background: transparent;
  color: #1f2430;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .16);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 1101;
}

body[data-page="patterns"] .pt-fullscreen-download svg {
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px rgba(255, 255, 255, .9));
}

body[data-page="patterns"] .pt-fullscreen-body {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  background: #0b0c0f;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

body[data-page="patterns"] .pt-fullscreen-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

body[data-page="patterns"] .pt-fullscreen-wrap canvas {
  display: block;
  width: 100%;
}

body[data-page="patterns"] .pt-fullscreen-tip {
  flex: none;
  padding: .35rem;
  text-align: center;
  font-size: .66rem;
  color: #9aa0aa;
  background: #111;
}

body[data-page="patterns"] .back-top-btn {
  position: fixed;
  right: 1rem;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  color: #fd3d44;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .14);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 50;
}

body[data-page="patterns"] .back-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body[data-page="patterns"] .pt-slide-layer {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 2;
}

/* ==================== 14. 下载页 —— body[data-page="download"] ==================== */

body[data-page="download"] .download-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

body[data-page="download"] .download-icon {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

body[data-page="download"] .download-icon svg {
  width: 2.6rem;
  height: 2.6rem;
  display: block;
  margin: 0 auto;
}

body[data-page="download"] .version-line {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  margin: 0.2rem 0 0.6rem;
}

body[data-page="download"] .download-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

body[data-page="download"] .download-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0.25rem 0 0.75rem;
}

body[data-page="download"] .download-btn {
  display: block;
  padding: 0.7rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

body[data-page="download"] .download-btn-ios {
  background: linear-gradient(135deg, #334155, #0f172a);
}

body[data-page="download"] .download-btn:hover {
  text-decoration: none;
  opacity: 0.92;
}

body[data-page="download"] .download-empty {
  padding: 0.65rem;
  border-radius: 0.75rem;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 0.8rem;
}

body[data-page="download"] .download-app {
  text-align: center;
  margin-bottom: 1.25rem;
}

body[data-page="download"] .download-app-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 1.1rem;
  object-fit: contain;
  box-shadow: 0 6px 18px rgba(15,23,42,0.12);
  margin: 0 auto 0.6rem;
}

body[data-page="download"] .download-app-icon-none {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  font-size: 2.6rem;
}

body[data-page="download"] .download-app-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

body[data-page="download"] .download-app-sub {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ==================== 15. 404 页 —— body[data-page="error-404"] ==================== */

body[data-page="error-404"] .error-page {
  text-align: center;
  padding: 2rem 0;
}

body[data-page="error-404"] .error-code {
  font-size: 5rem;
  font-weight: 800;
  color: #e2e8f0;
  line-height: 1;
  margin-bottom: 0.5rem;
}

body[data-page="error-404"] .error-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

body[data-page="error-404"] .error-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

body[data-page="error-404"] .error-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

body[data-page="error-404"] .btn-outline {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: 2px solid #e2e8f0;
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s;
}

body[data-page="error-404"] .btn-outline:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  text-decoration: none;
}

body[data-page="error-404"] .btn-primary {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem;
  background: #3b82f6;
  color: #fff;
  text-decoration: none;
  transition: background 0.15s;
}

body[data-page="error-404"] .btn-primary:hover {
  background: #2563eb;
  text-decoration: none;
}

/* ==================== 16. 后台首页（看板） —— body[data-page="admin"] ==================== */

body[data-page="admin"] .stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

body[data-page="admin"] .stat-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
  text-align: center;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s, box-shadow 0.15s;
}

body[data-page="admin"] a.stat-card:hover, body[data-page="admin"] a.stat-card:focus {
  background: #eef2ff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.12);
}

body[data-page="admin"] .stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

body[data-page="admin"] .stat-label {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

body[data-page="admin"] .stat-indigo {
  color: #4f46e5;
}

body[data-page="admin"] .stat-green {
  color: #16a34a;
}

body[data-page="admin"] .stat-purple {
  color: #7c3aed;
}

body[data-page="admin"] .stat-orange {
  color: #ea580c;
}

body[data-page="admin"] .stat-red {
  color: #dc2626;
}

body[data-page="admin"] .stat-teal {
  color: #0d9488;
}

body[data-page="admin"] .section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}

/* 首个分组标题不再额外下沉：顶部已经有 .admin-main 的内边距，
   否则顶栏下边框到内容会多出 16px 空白 */
body[data-page="admin"] .section-title:first-child {
  margin-top: 0;
}

body[data-page="admin"] .sched-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin"] .sched-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

body[data-page="admin"] .sched-cron {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 0.1rem;
  font-variant-numeric: tabular-nums;
}

body[data-page="admin"] .sched-meta {
  text-align: right;
  flex-shrink: 0;
}

body[data-page="admin"] .sched-time {
  display: block;
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

body[data-page="admin"] .badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 0.4rem;
  white-space: nowrap;
}

body[data-page="admin"] .badge-ok {
  background: #dcfce7;
  color: #15803d;
}

body[data-page="admin"] .badge-err {
  background: #fee2e2;
  color: #b91c1c;
}

body[data-page="admin"] .badge-running {
  background: #dbeafe;
  color: #1d4ed8;
}

body[data-page="admin"] .badge-idle {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin"] .online-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f1f5f9;
}

body[data-page="admin"] .online-user:last-child {
  border-bottom: none;
}

body[data-page="admin"] .online-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #ede9fe;
  color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

body[data-page="admin"] .online-info {
  min-width: 0;
  flex: 1;
}

body[data-page="admin"] .online-name {
  font-size: 0.8rem;
  color: #334155;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="admin"] .online-time {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 0.05rem;
}

body[data-page="admin"] .role-tag {
  font-size: 0.58rem;
  font-weight: 600;
  padding: 0.08rem 0.35rem;
  border-radius: 0.3rem;
  flex-shrink: 0;
}

body[data-page="admin"] .role-tag.admin {
  background: #fee2e2;
  color: #b91c1c;
}

body[data-page="admin"] .role-tag.user {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin"] .online-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

body[data-page="admin"] .empty-tip {
  padding: 0.75rem 0;
  text-align: center;
  font-size: 0.72rem;
  color: #94a3b8;
}

body[data-page="admin"] .skeleton {
  animation: shimmer--admin 1.5s ease-in-out infinite;
}

body[data-page="admin"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="admin"] .skeleton {
    animation: none;
  }
}

body[data-page="admin"] .retry-btn {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4f46e5;
  cursor: pointer;
  font-weight: 600;
}

body[data-page="admin"] .retry-btn:hover {
  background: #eef2ff;
}
/* 调度行左侧信息块（名称 + cron），右侧为状态徽标 */
body[data-page="admin"] .sched-info {
  min-width: 0;
  flex: 1;
}
/* ==================== 17. 后台·用户管理 —— body[data-page="admin-users"] ==================== */

body[data-page="admin-users"] .user-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin-users"] .user-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

body[data-page="admin-users"] .user-card-body {
  margin-bottom: 0.5rem;
}

body[data-page="admin-users"] .user-card-actions {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
}

body[data-page="admin-users"] .user-avatar {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
}

body[data-page="admin-users"] .search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

body[data-page="admin-users"] .search-input {
  flex: 1;
  min-width: 8rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  outline: none;
}

body[data-page="admin-users"] .search-input:focus {
  border-color: #c7d2fe;
}

body[data-page="admin-users"] .search-select {
  padding: 0.4rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  background: #fff;
  color: #334155;
  outline: none;
}

body[data-page="admin-users"] .search-select:focus {
  border-color: #c7d2fe;
}

body[data-page="admin-users"] .list-summary {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

body[data-page="admin-users"] .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

body[data-page="admin-users"] .badge-admin {
  background: #ede9fe;
  color: #7c3aed;
}

body[data-page="admin-users"] .badge-user {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-users"] .badge-predictor {
  background: #ede9fe;
  color: #7c3aed;
}

body[data-page="admin-users"] .badge-active {
  background: #dcfce7;
  color: #166534;
}

body[data-page="admin-users"] .badge-disabled {
  background: #fef2f2;
  color: #991b1b;
}

body[data-page="admin-users"] .hidden {
  display: none;
}

body[data-page="admin-users"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

body[data-page="admin-users"] .btn-blue {
  background: #eff6ff;
  color: #2563eb;
}

body[data-page="admin-users"] .btn-orange {
  background: #fff7ed;
  color: #ea580c;
}

body[data-page="admin-users"] .btn-green {
  background: #f0fdf4;
  color: #16a34a;
}

body[data-page="admin-users"] .btn-red {
  background: #fef2f2;
  color: #dc2626;
}

body[data-page="admin-users"] .btn-blue:hover {
  background: #dbeafe;
}

body[data-page="admin-users"] .btn-orange:hover {
  background: #ffedd5;
}

body[data-page="admin-users"] .btn-green:hover {
  background: #dcfce7;
}

body[data-page="admin-users"] .btn-red:hover {
  background: #fee2e2;
}

body[data-page="admin-users"] .btn-sm:disabled {
  opacity: 0.4;
  cursor: default;
}

body[data-page="admin-users"] .flex {
  display: flex;
}

body[data-page="admin-users"] .gap-2 {
  gap: 0.5rem;
}

body[data-page="admin-users"] .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

body[data-page="admin-users"] .page-btn {
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

body[data-page="admin-users"] .page-btn:hover {
  background: #f1f5f9;
}

body[data-page="admin-users"] .page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

body[data-page="admin-users"] .page-info {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
}

body[data-page="admin-users"] .skeleton {
  animation: shimmer--admin-users 1.5s ease-in-out infinite;
}

body[data-page="admin-users"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

/* ==================== 18. 后台·管理员 —— body[data-page="admin-admins"] ==================== */

body[data-page="admin-admins"] .add-form {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

body[data-page="admin-admins"] .form-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

body[data-page="admin-admins"] .form-row label {
  font-size: 0.75rem;
  color: #475569;
  font-weight: 500;
  min-width: 4.5rem;
  flex-shrink: 0;
}

body[data-page="admin-admins"] .form-input {
  padding: 0.45rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  background: #fff;
  color: #334155;
  outline: none;
}

body[data-page="admin-admins"] .form-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

body[data-page="admin-admins"] .config-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e2e8f0;
}

body[data-page="admin-admins"] .config-card.inactive {
  opacity: 0.65;
}

body[data-page="admin-admins"] .config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

body[data-page="admin-admins"] .config-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #1e293b;
}

body[data-page="admin-admins"] .config-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

body[data-page="admin-admins"] .config-actions {
  display: flex;
  gap: 0.4rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.65rem;
  flex-wrap: wrap;
}

body[data-page="admin-admins"] .badge {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
}

body[data-page="admin-admins"] .badge-super {
  background: #fef3c7;
  color: #b45309;
}

body[data-page="admin-admins"] .badge-admin {
  background: #eef2ff;
  color: #4f46e5;
}

body[data-page="admin-admins"] .badge-on {
  background: #dcfce7;
  color: #15803d;
}

body[data-page="admin-admins"] .badge-off {
  background: #f1f5f9;
  color: #94a3b8;
}

body[data-page="admin-admins"] .badge-self {
  background: #fee2e2;
  color: #b91c1c;
}

body[data-page="admin-admins"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

body[data-page="admin-admins"] .btn-blue {
  background: #eef2ff;
  color: #4f46e5;
}

body[data-page="admin-admins"] .btn-green {
  background: #dcfce7;
  color: #15803d;
}

body[data-page="admin-admins"] .btn-red {
  background: #fef2f2;
  color: #dc2626;
}

body[data-page="admin-admins"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-admins"] .btn-sm:disabled {
  opacity: 0.45;
  cursor: default;
}

body[data-page="admin-admins"] .edit-panel {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #e2e8f0;
}

body[data-page="admin-admins"] .skeleton {
  animation: shimmer--admin-admins 1.5s ease-in-out infinite;
}

body[data-page="admin-admins"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

body[data-page="admin-admins"] .fab {
  position: fixed;
  right: 1.1rem;
  bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: none;
  background: #4f46e5;
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
  z-index: 70;
  transition: transform 0.25s, background-color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body[data-page="admin-admins"] .fab:hover {
  background: #4338ca;
}

body[data-page="admin-admins"] .fab.open {
  transform: rotate(135deg);
  background: #dc2626;
}

body[data-page="admin-admins"] .create-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #f8fafc;
  padding: 1rem 1rem 4.5rem;
  overflow-y: auto;
}

body[data-page="admin-admins"] .create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

body[data-page="admin-admins"] .create-head .title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

body[data-page="admin-admins"] .create-close {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
}

body[data-page="admin-admins"] .create-close:hover {
  background: #e2e8f0;
}

/* ==================== 19. 后台·排列五 —— body[data-page="admin-plw"] ==================== */

body[data-page="admin-plw"] .draw-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin-plw"] .draw-card-actions {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
}

body[data-page="admin-plw"] .fab {
  position: fixed;
  right: 1.1rem;
  bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: none;
  background: #dc2626;
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
  z-index: 70;
  transition: transform 0.25s, background-color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body[data-page="admin-plw"] .fab:hover {
  background: #b91c1c;
}

body[data-page="admin-plw"] .fab.open {
  transform: rotate(135deg);
}

body[data-page="admin-plw"] .add-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #f8fafc;
  padding: 1rem 1rem 4.5rem;
  overflow-y: auto;
}

body[data-page="admin-plw"] .add-panel .create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

body[data-page="admin-plw"] .add-panel .create-head .title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

body[data-page="admin-plw"] .add-panel .create-close {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
}

body[data-page="admin-plw"] .add-panel .create-close:hover {
  background: #e2e8f0;
}

body[data-page="admin-plw"] .add-form {
  background: #f0fdf4;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0;
}

body[data-page="admin-plw"] .ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #e53935, #d32f2f);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(229,57,53,0.35);
}

body[data-page="admin-plw"] .add-form {
  background: #f0fdf4;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin-plw"] #newDate, body[data-page="admin-qxc"] #newDate {
  width: 10rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  background: transparent;
}

body[data-page="admin-plw"] .digit-group {
  display: flex;
  gap: 0.4rem;
}

body[data-page="admin-plw"] .digit-box {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #fff;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  outline: none;
  padding: 0;
}

body[data-page="admin-plw"] .digit-box:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

body[data-page="admin-plw"] .digit-box-ro {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
}

body[data-page="admin-plw"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

body[data-page="admin-plw"] .btn-blue {
  background: #eff6ff;
  color: #2563eb;
}

body[data-page="admin-plw"] .btn-red {
  background: #fef2f2;
  color: #dc2626;
}

body[data-page="admin-plw"] .btn-green {
  background: #f0fdf4;
  color: #16a34a;
}

body[data-page="admin-plw"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-plw"] .btn-blue:hover {
  background: #dbeafe;
}

body[data-page="admin-plw"] .btn-red:hover {
  background: #fee2e2;
}

body[data-page="admin-plw"] .btn-green:hover {
  background: #dcfce7;
}

body[data-page="admin-plw"] .btn-gray:hover {
  background: #e2e8f0;
}

body[data-page="admin-plw"] .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

body[data-page="admin-plw"] .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

body[data-page="admin-plw"] .page-btn {
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

body[data-page="admin-plw"] .page-btn:hover {
  background: #f1f5f9;
}

body[data-page="admin-plw"] .page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

body[data-page="admin-plw"] .page-info {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
}

body[data-page="admin-plw"] .skeleton {
  animation: shimmer--admin-plw 1.5s ease-in-out infinite;
}

body[data-page="admin-plw"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

body[data-page="admin-plw"] .skeleton-circle {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #e2e8f0;
}

/* ==================== 20. 后台·七星彩 —— body[data-page="admin-qxc"] ==================== */

body[data-page="admin-qxc"] .draw-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin-qxc"] .draw-card-actions {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
}

body[data-page="admin-qxc"] .fab {
  position: fixed;
  right: 1.1rem;
  bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: none;
  background: #dc2626;
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
  z-index: 70;
  transition: transform 0.25s, background-color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body[data-page="admin-qxc"] .fab:hover {
  background: #b91c1c;
}

body[data-page="admin-qxc"] .fab.open {
  transform: rotate(135deg);
}

body[data-page="admin-qxc"] .add-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #f8fafc;
  padding: 1rem 1rem 4.5rem;
  overflow-y: auto;
}

body[data-page="admin-qxc"] .add-panel .create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

body[data-page="admin-qxc"] .add-panel .create-head .title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

body[data-page="admin-qxc"] .add-panel .create-close {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
}

body[data-page="admin-qxc"] .add-panel .create-close:hover {
  background: #e2e8f0;
}

body[data-page="admin-qxc"] .add-form {
  background: #eff6ff;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0;
}

body[data-page="admin-qxc"] .ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(37,99,235,0.35);
}

body[data-page="admin-qxc"] .add-form {
  background: #eff6ff;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin-qxc"] .digit-group {
  display: flex;
  gap: 0.4rem;
}

body[data-page="admin-qxc"] .digit-box {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #fff;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  outline: none;
  padding: 0;
}

body[data-page="admin-qxc"] .digit-box:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

body[data-page="admin-qxc"] .digit-box-ro {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
}

body[data-page="admin-qxc"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

body[data-page="admin-qxc"] .btn-blue {
  background: #eff6ff;
  color: #2563eb;
}

body[data-page="admin-qxc"] .btn-red {
  background: #fef2f2;
  color: #dc2626;
}

body[data-page="admin-qxc"] .btn-green {
  background: #f0fdf4;
  color: #16a34a;
}

body[data-page="admin-qxc"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-qxc"] .btn-blue:hover {
  background: #dbeafe;
}

body[data-page="admin-qxc"] .btn-red:hover {
  background: #fee2e2;
}

body[data-page="admin-qxc"] .btn-green:hover {
  background: #dcfce7;
}

body[data-page="admin-qxc"] .btn-gray:hover {
  background: #e2e8f0;
}

body[data-page="admin-qxc"] .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

body[data-page="admin-qxc"] .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

body[data-page="admin-qxc"] .page-btn {
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

body[data-page="admin-qxc"] .page-btn:hover {
  background: #f1f5f9;
}

body[data-page="admin-qxc"] .page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

body[data-page="admin-qxc"] .page-info {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
}

body[data-page="admin-qxc"] .skeleton {
  animation: shimmer--admin-qxc 1.5s ease-in-out infinite;
}

body[data-page="admin-qxc"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

body[data-page="admin-qxc"] .skeleton-circle {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #e2e8f0;
}

/* ==================== 21. 后台·预测管理 —— body[data-page="admin-position-predictions"] ==================== */

body[data-page="admin-position-predictions"] .pred-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin-position-predictions"] .pred-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

body[data-page="admin-position-predictions"] .pred-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

body[data-page="admin-position-predictions"] .pred-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

body[data-page="admin-position-predictions"] .pred-meta {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

body[data-page="admin-position-predictions"] .pred-avatar {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
}

body[data-page="admin-position-predictions"] .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

body[data-page="admin-position-predictions"] .badge-correct {
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff;
}

body[data-page="admin-position-predictions"] .badge-incorrect {
  background: #f1f5f9;
  color: #94a3b8;
}

body[data-page="admin-position-predictions"] .badge-pending {
  background: #eff6ff;
  color: #2563eb;
}

body[data-page="admin-position-predictions"] .auto-tag {
  font-size: 0.6rem;
  background: #ede9fe;
  color: #7c3aed;
  padding: 0.08rem 0.4rem;
  border-radius: 0.3rem;
  font-weight: 600;
  margin-left: 0.4rem;
}

body[data-page="admin-position-predictions"] .type-tag {
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 0.35rem;
  font-weight: 600;
}

body[data-page="admin-position-predictions"] .type-tag.plw {
  background: #ede9fe;
  color: #7c3aed;
}

body[data-page="admin-position-predictions"] .type-tag.qxc {
  background: #dbeafe;
  color: #2563eb;
}

body[data-page="admin-position-predictions"] .search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

body[data-page="admin-position-predictions"] .search-input {
  flex: 1;
  min-width: 8rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  outline: none;
}

body[data-page="admin-position-predictions"] .search-input:focus {
  border-color: #c7d2fe;
}

body[data-page="admin-position-predictions"] .list-summary {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

body[data-page="admin-position-predictions"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

body[data-page="admin-position-predictions"] .btn-red {
  background: #fef2f2;
  color: #dc2626;
}

body[data-page="admin-position-predictions"] .btn-red:hover {
  background: #fee2e2;
}

body[data-page="admin-position-predictions"] .btn-blue {
  background: #eef2ff;
  color: #4f46e5;
}

body[data-page="admin-position-predictions"] .btn-blue:hover {
  background: #e0e7ff;
}

body[data-page="admin-position-predictions"] .btn-green {
  background: #dcfce7;
  color: #15803d;
}

body[data-page="admin-position-predictions"] .btn-green:hover {
  background: #bbf7d0;
}

body[data-page="admin-position-predictions"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-position-predictions"] .btn-gray:hover {
  background: #e2e8f0;
}

body[data-page="admin-position-predictions"] .btn-sm:disabled {
  opacity: 0.4;
  cursor: default;
}

body[data-page="admin-position-predictions"] .paid-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 0.4rem;
  background: #fef3c7;
  color: #b45309;
}

body[data-page="admin-position-predictions"] .paid-tag.free {
  background: #f1f5f9;
  color: #94a3b8;
}

body[data-page="admin-position-predictions"] .pred-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-end;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

body[data-page="admin-position-predictions"] .credits-edit {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e2e8f0;
}

body[data-page="admin-position-predictions"] .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

body[data-page="admin-position-predictions"] .page-btn {
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

body[data-page="admin-position-predictions"] .page-btn:hover {
  background: #f1f5f9;
}

body[data-page="admin-position-predictions"] .page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

body[data-page="admin-position-predictions"] .page-info {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
}

body[data-page="admin-position-predictions"] .empty-tip {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

body[data-page="admin-position-predictions"] .matrix {
  display: grid;
  grid-template-columns: 1.6rem minmax(5.6rem, 1fr) minmax(3.8rem, 1fr) minmax(2rem, 1fr);
  column-gap: 0.25rem;
  row-gap: 0.2rem;
  align-items: center;
  margin-top: 0.5rem;
}

body[data-page="admin-position-predictions"] .mh {
  color: #cbd5e1;
  text-align: center;
}

body[data-page="admin-position-predictions"] .pos-label {
  width: 1.6rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.8rem;
}

body[data-page="admin-position-predictions"] .grain {
  display: inline-flex;
  gap: 0;
  justify-content: center;
  flex-wrap: nowrap;
}

body[data-page="admin-position-predictions"] .dg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.62em;
  padding: 0.06em 0.12em;
  border-radius: 0.3em;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #334155;
}

body[data-page="admin-position-predictions"] .dg-hit {
  color: #dc2626;
  font-weight: 700;
}

body[data-page="admin-position-predictions"] .skeleton {
  animation: shimmer--admin-position-predictions 1.5s ease-in-out infinite;
}

body[data-page="admin-position-predictions"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

body[data-page="admin-position-predictions"] .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ==================== 22. 后台·委托发布 —— body[data-page="admin-predictor-configs"] ==================== */

body[data-page="admin-predictor-configs"] .config-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin-predictor-configs"] .config-card.inactive {
  opacity: 0.5;
}

body[data-page="admin-predictor-configs"] .config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

body[data-page="admin-predictor-configs"] .config-body {
  font-size: 0.85rem;
  color: #334155;
}

body[data-page="admin-predictor-configs"] .config-meta {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.3rem;
}

body[data-page="admin-predictor-configs"] .config-avatar {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
}

body[data-page="admin-predictor-configs"] .config-id {
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="admin-predictor-configs"] .config-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

body[data-page="admin-predictor-configs"] .config-actions-bottom {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid #e2e8f0;
}

body[data-page="admin-predictor-configs"] .add-form {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

body[data-page="admin-predictor-configs"] .publish-tag {
  display: inline-block;
  font-size: 0.7rem;
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  font-weight: 600;
}

body[data-page="admin-predictor-configs"] .lottery-tag {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  font-weight: 600;
}

body[data-page="admin-predictor-configs"] .lottery-tag.plw {
  background: #fef2f2;
  color: #dc2626;
}

body[data-page="admin-predictor-configs"] .lottery-tag.qxc {
  background: #dbeafe;
  color: #2563eb;
}

body[data-page="admin-predictor-configs"] .sub-tag {
  font-size: 0.62rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  background: #f0fdf4;
  color: #15803d;
  margin-left: 0.35rem;
  font-weight: 600;
}

body[data-page="admin-predictor-configs"] .sub-tag-random {
  background: #f1f5f9;
  color: #94a3b8;
}

body[data-page="admin-predictor-configs"] .credit-num {
  margin-left: 0.3rem;
  color: #d97706;
  font-size: 0.58rem;
  font-weight: 600;
}

body[data-page="admin-predictor-configs"] .config-sub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.3rem;
}

body[data-page="admin-predictor-configs"] .config-sub-row .sub-tag {
  margin-left: 0;
}

body[data-page="admin-predictor-configs"] .sub-select-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

body[data-page="admin-predictor-configs"] .sub-chip-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

body[data-page="admin-predictor-configs"] .sub-chip {
  font-size: 0.72rem;
  padding: 0.3rem 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font-weight: 500;
}

body[data-page="admin-predictor-configs"] .sub-chip:hover {
  border-color: #c7d2fe;
}

body[data-page="admin-predictor-configs"] .sub-chip.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

body[data-page="admin-predictor-configs"] .sub-credit-input {
  display: none;
  width: 3.5rem;
  padding: 0.15rem 0.3rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.4rem;
  font-size: 0.7rem;
  text-align: center;
  outline: none;
}

body[data-page="admin-predictor-configs"] .sub-credit-input:focus {
  border-color: #c7d2fe;
}

body[data-page="admin-predictor-configs"] .sub-chip-wrap.active .sub-credit-input {
  display: inline-block;
}

body[data-page="admin-predictor-configs"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

body[data-page="admin-predictor-configs"] .btn-blue {
  background: #3b82f6;
  color: #fff;
}

body[data-page="admin-predictor-configs"] .btn-green {
  background: #22c55e;
  color: #fff;
}

body[data-page="admin-predictor-configs"] .btn-red {
  background: #ef4444;
  color: #fff;
}

body[data-page="admin-predictor-configs"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-predictor-configs"] .form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

body[data-page="admin-predictor-configs"] .form-input:focus {
  outline: none;
  border-color: #3b82f6;
}

body[data-page="admin-predictor-configs"] .form-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

body[data-page="admin-predictor-configs"] .form-row label {
  font-size: 0.8rem;
  color: #64748b;
  min-width: 3rem;
}

body[data-page="admin-predictor-configs"] .type-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
}

body[data-page="admin-predictor-configs"] .type-section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

body[data-page="admin-predictor-configs"] .fab {
  position: fixed;
  right: 1.1rem;
  bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: none;
  background: #4f46e5;
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
  z-index: 70;
  transition: transform 0.25s, background-color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body[data-page="admin-predictor-configs"] .fab:hover {
  background: #4338ca;
}

body[data-page="admin-predictor-configs"] .fab.open {
  transform: rotate(135deg);
  background: #dc2626;
}

body[data-page="admin-predictor-configs"] .create-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #f8fafc;
  padding: 1rem 1rem 4.5rem;
  overflow-y: auto;
}

body[data-page="admin-predictor-configs"] .create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

body[data-page="admin-predictor-configs"] .create-head .title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

body[data-page="admin-predictor-configs"] .create-close {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
}

body[data-page="admin-predictor-configs"] .create-close:hover {
  background: #e2e8f0;
}

body[data-page="admin-predictor-configs"] .type-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

body[data-page="admin-predictor-configs"] .type-tab {
  flex: 1;
  padding: 0.5rem;
  border-radius: 0.6rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

body[data-page="admin-predictor-configs"] .type-tab.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

body[data-page="admin-predictor-configs"] .type-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body[data-page="admin-predictor-configs"] .type-slider::-webkit-scrollbar {
  display: none;
}

body[data-page="admin-predictor-configs"] .modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

body[data-page="admin-predictor-configs"] .modal-overlay.show {
  display: flex;
}

body[data-page="admin-predictor-configs"] .modal-box {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

body[data-page="admin-predictor-configs"] .modal-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

body[data-page="admin-predictor-configs"] .modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

body[data-page="admin-predictor-configs"] .type-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  box-sizing: border-box;
  padding-right: 0.4rem;
}

body[data-page="admin-predictor-configs"] .user-suggest {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  max-height: 14rem;
  overflow-y: auto;
  z-index: 80;
}

body[data-page="admin-predictor-configs"] .user-suggest-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
}

body[data-page="admin-predictor-configs"] .user-suggest-item:hover, body[data-page="admin-predictor-configs"] .user-suggest-item.active {
  background: #eef2ff;
}

body[data-page="admin-predictor-configs"] .user-suggest-avatar {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.7rem;
  flex-shrink: 0;
  overflow: hidden;
}

body[data-page="admin-predictor-configs"] .user-suggest-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-page="admin-predictor-configs"] .user-suggest-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

body[data-page="admin-predictor-configs"] .user-suggest-sub {
  font-size: 0.65rem;
  color: #94a3b8;
}

body[data-page="admin-predictor-configs"] .user-suggest-empty {
  padding: 0.7rem;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
}

body[data-page="admin-predictor-configs"] .type-info {
  border: 1px solid #eef2f7;
  border-radius: 0.6rem;
  padding: 0.65rem;
  margin-bottom: 0.5rem;
  background: #fff;
}

body[data-page="admin-predictor-configs"] .type-info:last-child {
  margin-bottom: 0;
}

body[data-page="admin-predictor-configs"] .type-info.inactive {
  opacity: 0.65;
}

body[data-page="admin-predictor-configs"] .type-info-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

body[data-page="admin-predictor-configs"] .search-bar {
  display: flex;
  margin-bottom: 0.75rem;
}

body[data-page="admin-predictor-configs"] .search-bar .form-input {
  flex: 1;
}

body[data-page="admin-predictor-configs"] .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #64748b;
  cursor: pointer;
}

body[data-page="admin-predictor-configs"] .flex {
  display: flex;
}

body[data-page="admin-predictor-configs"] .gap-2 {
  gap: 0.5rem;
}

body[data-page="admin-predictor-configs"] .items-center {
  align-items: center;
}

body[data-page="admin-predictor-configs"] .justify-between {
  justify-content: space-between;
}

body[data-page="admin-predictor-configs"] .justify-end {
  justify-content: flex-end;
}

body[data-page="admin-predictor-configs"] .mt-1 {
  margin-top: 0.25rem;
}

body[data-page="admin-predictor-configs"] .mt-2 {
  margin-top: 0.5rem;
}

body[data-page="admin-predictor-configs"] .mb-1 {
  margin-bottom: 0.25rem;
}

body[data-page="admin-predictor-configs"] .mb-2 {
  margin-bottom: 0.5rem;
}

body[data-page="admin-predictor-configs"] .w-full {
  width: 100%;
}

body[data-page="admin-predictor-configs"] .text-xs {
  font-size: 0.75rem;
}

body[data-page="admin-predictor-configs"] .text-sm {
  font-size: 0.85rem;
}

body[data-page="admin-predictor-configs"] .font-medium {
  font-weight: 500;
}

body[data-page="admin-predictor-configs"] .truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="admin-predictor-configs"] .min-w-0 {
  min-width: 0;
}

body[data-page="admin-predictor-configs"] .text-red-500 {
  color: #ef4444;
}

body[data-page="admin-predictor-configs"] .text-green-600 {
  color: #16a34a;
}

body[data-page="admin-predictor-configs"] .text-gray-400 {
  color: #9ca3af;
}

body[data-page="admin-predictor-configs"] .border-t {
  border-top: 1px solid #e2e8f0;
}

body[data-page="admin-predictor-configs"] .pt-2 {
  padding-top: 0.5rem;
}

body[data-page="admin-predictor-configs"] .hidden {
  display: none;
}

body[data-page="admin-predictor-configs"] .skeleton {
  animation: shimmer--admin-predictor-configs 1.5s ease-in-out infinite;
}

body[data-page="admin-predictor-configs"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}
/* 随机位 / 说明文案 / 用户建议行 */
body[data-page="admin-predictor-configs"] .random-chip .sub-chip {
  border-style: dashed;
  color: #4f46e5;
}
body[data-page="admin-predictor-configs"] .type-info-list {
  font-size: .7rem;
  color: #94a3b8;
  line-height: 1.6;
}
body[data-page="admin-predictor-configs"] .user-suggest-info {
  font-size: .68rem;
  color: #94a3b8;
}
/* ==================== 23. 后台·通知管理 —— body[data-page="admin-notifications"] ==================== */

body[data-page="admin-notifications"] .notice-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin-notifications"] .notice-card.inactive {
  opacity: 0.5;
}

body[data-page="admin-notifications"] .notice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

body[data-page="admin-notifications"] .notice-content {
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.5;
  word-break: break-all;
}

body[data-page="admin-notifications"] .notice-meta {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

body[data-page="admin-notifications"] .notice-actions {
  display: flex;
  gap: 0.4rem;
}

body[data-page="admin-notifications"] .notice-actions.footer {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

body[data-page="admin-notifications"] .add-form {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

body[data-page="admin-notifications"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

body[data-page="admin-notifications"] .btn-blue {
  background: #3b82f6;
  color: #fff;
}

body[data-page="admin-notifications"] .btn-green {
  background: #22c55e;
  color: #fff;
}

body[data-page="admin-notifications"] .btn-red {
  background: #ef4444;
  color: #fff;
}

body[data-page="admin-notifications"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-notifications"] .btn-sm:disabled {
  opacity: 0.35;
  cursor: default;
}

body[data-page="admin-notifications"] .form-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 3rem;
}

body[data-page="admin-notifications"] .form-input:focus {
  outline: none;
  border-color: #3b82f6;
}

body[data-page="admin-notifications"] .edit-form {
  margin-top: 0.6rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.6rem;
}

body[data-page="admin-notifications"] .flex {
  display: flex;
}

body[data-page="admin-notifications"] .gap-2 {
  gap: 0.5rem;
}

body[data-page="admin-notifications"] .items-center {
  align-items: center;
}

body[data-page="admin-notifications"] .justify-between {
  justify-content: space-between;
}

body[data-page="admin-notifications"] .justify-end {
  justify-content: flex-end;
}

body[data-page="admin-notifications"] .mt-2 {
  margin-top: 0.5rem;
}

body[data-page="admin-notifications"] .mt-4 {
  margin-top: 1rem;
}

body[data-page="admin-notifications"] .mb-2 {
  margin-bottom: 0.5rem;
}

body[data-page="admin-notifications"] .mb-4 {
  margin-bottom: 1rem;
}

body[data-page="admin-notifications"] .text-xs {
  font-size: 0.75rem;
}

body[data-page="admin-notifications"] .w-full {
  width: 100%;
}

body[data-page="admin-notifications"] .skeleton {
  animation: shimmer--admin-notifications 1.5s ease-in-out infinite;
}

body[data-page="admin-notifications"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

/* ==================== 24. 后台·订单 —— body[data-page="admin-orders"] ==================== */

body[data-page="admin-orders"] .item-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin-orders"] .item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

body[data-page="admin-orders"] .item-body {
  margin-bottom: 0.5rem;
}

body[data-page="admin-orders"] .item-actions {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
  flex-wrap: wrap;
}

body[data-page="admin-orders"] .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

body[data-page="admin-orders"] .badge-pending {
  background: #fef3c7;
  color: #92400e;
}

body[data-page="admin-orders"] .badge-paid {
  background: #dcfce7;
  color: #166534;
}

body[data-page="admin-orders"] .badge-cancelled {
  background: #fef2f2;
  color: #991b1b;
}

body[data-page="admin-orders"] .badge-overdue {
  background: #fee2e2;
  color: #b91c1c;
}

body[data-page="admin-orders"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

body[data-page="admin-orders"] .btn-blue {
  background: #eff6ff;
  color: #2563eb;
}

body[data-page="admin-orders"] .btn-green {
  background: #f0fdf4;
  color: #16a34a;
}

body[data-page="admin-orders"] .btn-orange {
  background: #fff7ed;
  color: #ea580c;
}

body[data-page="admin-orders"] .btn-red {
  background: #fef2f2;
  color: #dc2626;
}

body[data-page="admin-orders"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-orders"] .flex {
  display: flex;
}

body[data-page="admin-orders"] .gap-2 {
  gap: 0.5rem;
}

body[data-page="admin-orders"] .items-center {
  align-items: center;
}

body[data-page="admin-orders"] .justify-between {
  justify-content: space-between;
}

body[data-page="admin-orders"] .filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

body[data-page="admin-orders"] .search-input {
  flex: 1;
  min-width: 160px;
  padding: 0.4rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
}

body[data-page="admin-orders"] .search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

body[data-page="admin-orders"] .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

body[data-page="admin-orders"] .page-btn {
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

body[data-page="admin-orders"] .page-btn:hover {
  background: #f1f5f9;
}

body[data-page="admin-orders"] .page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

body[data-page="admin-orders"] .page-info {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
}

body[data-page="admin-orders"] .jump-input {
  width: 4rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  text-align: center;
}

body[data-page="admin-orders"] .text-xs {
  font-size: 0.75rem;
}

body[data-page="admin-orders"] .text-sm {
  font-size: 0.85rem;
}

body[data-page="admin-orders"] .skeleton {
  animation: shimmer--admin-orders 1.5s ease-in-out infinite;
}

body[data-page="admin-orders"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}
/* 筛选下拉（与用户管理页 .search-select 保持一致） */
body[data-page="admin-orders"] .filter-select {
  padding: 0.4rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  background: #fff;
  color: #334155;
  outline: none;
}
body[data-page="admin-orders"] .filter-select:focus {
  border-color: #c7d2fe;
}
/* ==================== 25. 后台·支付 —— body[data-page="admin-payments"] ==================== */

body[data-page="admin-payments"] .item-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin-payments"] .item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

body[data-page="admin-payments"] .item-body {
  margin-bottom: 0.5rem;
}

body[data-page="admin-payments"] .item-actions {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
  flex-wrap: wrap;
}

body[data-page="admin-payments"] .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

body[data-page="admin-payments"] .badge-pending {
  background: #fef3c7;
  color: #92400e;
}

body[data-page="admin-payments"] .badge-success {
  background: #dcfce7;
  color: #166534;
}

body[data-page="admin-payments"] .badge-failed {
  background: #fef2f2;
  color: #991b1b;
}

body[data-page="admin-payments"] .badge-refunded {
  background: #f1f5f9;
  color: #475569;
}

body[data-page="admin-payments"] .badge-overdue {
  background: #fee2e2;
  color: #b91c1c;
}

body[data-page="admin-payments"] .badge-wechat {
  background: #dcfce7;
  color: #166534;
}

body[data-page="admin-payments"] .badge-alipay {
  background: #dbeafe;
  color: #1e40af;
}

body[data-page="admin-payments"] .badge-hupijiao {
  background: #fce7f3;
  color: #9d174d;
}

body[data-page="admin-payments"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

body[data-page="admin-payments"] .btn-blue {
  background: #eff6ff;
  color: #2563eb;
}

body[data-page="admin-payments"] .btn-green {
  background: #f0fdf4;
  color: #16a34a;
}

body[data-page="admin-payments"] .btn-orange {
  background: #fff7ed;
  color: #ea580c;
}

body[data-page="admin-payments"] .btn-red {
  background: #fef2f2;
  color: #dc2626;
}

body[data-page="admin-payments"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-payments"] .flex {
  display: flex;
}

body[data-page="admin-payments"] .gap-2 {
  gap: 0.5rem;
}

body[data-page="admin-payments"] .items-center {
  align-items: center;
}

body[data-page="admin-payments"] .justify-between {
  justify-content: space-between;
}

body[data-page="admin-payments"] .filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

body[data-page="admin-payments"] .search-input {
  flex: 1;
  min-width: 160px;
  padding: 0.4rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
}

body[data-page="admin-payments"] .search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

body[data-page="admin-payments"] .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

body[data-page="admin-payments"] .page-btn {
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

body[data-page="admin-payments"] .page-btn:hover {
  background: #f1f5f9;
}

body[data-page="admin-payments"] .page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

body[data-page="admin-payments"] .page-info {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
}

body[data-page="admin-payments"] .trans-input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  box-sizing: border-box;
}

body[data-page="admin-payments"] .text-xs {
  font-size: 0.75rem;
}

body[data-page="admin-payments"] .text-sm {
  font-size: 0.85rem;
}

body[data-page="admin-payments"] .skeleton {
  animation: shimmer--admin-payments 1.5s ease-in-out infinite;
}

body[data-page="admin-payments"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}
/* 筛选下拉（与用户管理页 .search-select 保持一致） */
body[data-page="admin-payments"] .filter-select {
  padding: 0.4rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  background: #fff;
  color: #334155;
  outline: none;
}
body[data-page="admin-payments"] .filter-select:focus {
  border-color: #c7d2fe;
}
/* ==================== 26. 后台·报表 —— body[data-page="admin-reports"] ==================== */

body[data-page="admin-reports"] .config-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e2e8f0;
}

body[data-page="admin-reports"] .config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

body[data-page="admin-reports"] .config-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #1e293b;
}

body[data-page="admin-reports"] .config-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

body[data-page="admin-reports"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

body[data-page="admin-reports"] .btn-blue {
  background: #3b82f6;
  color: #fff;
}

body[data-page="admin-reports"] .btn-blue:hover {
  background: #2563eb;
}

body[data-page="admin-reports"] .btn-plain {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-reports"] .btn-plain:hover {
  background: #e2e8f0;
}

/* ==================== 27. 后台·计划任务 —— body[data-page="admin-scheduler"] ==================== */

body[data-page="admin-scheduler"] .task-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

body[data-page="admin-scheduler"] .task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

body[data-page="admin-scheduler"] .task-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

body[data-page="admin-scheduler"] .task-status {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  font-weight: 600;
}

body[data-page="admin-scheduler"] .status-running {
  background: #dbeafe;
  color: #2563eb;
}

body[data-page="admin-scheduler"] .status-idle {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-scheduler"] .status-success {
  background: #dcfce7;
  color: #16a34a;
}

body[data-page="admin-scheduler"] .status-failed {
  background: #fef2f2;
  color: #dc2626;
}

body[data-page="admin-scheduler"] .task-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

body[data-page="admin-scheduler"] .task-label {
  color: #94a3b8;
  min-width: 3.5rem;
  flex-shrink: 0;
}

body[data-page="admin-scheduler"] .task-value {
  color: #334155;
  font-weight: 500;
  word-break: break-all;
}

body[data-page="admin-scheduler"] .task-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

body[data-page="admin-scheduler"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

body[data-page="admin-scheduler"] .btn-sm:disabled {
  opacity: 0.5;
  cursor: default;
}

body[data-page="admin-scheduler"] .btn-blue {
  background: #3b82f6;
  color: #fff;
}

body[data-page="admin-scheduler"] .btn-green {
  background: #22c55e;
  color: #fff;
}

body[data-page="admin-scheduler"] .btn-red {
  background: #ef4444;
  color: #fff;
}

body[data-page="admin-scheduler"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-scheduler"] .btn-outline {
  background: #fff;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

body[data-page="admin-scheduler"] .toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body[data-page="admin-scheduler"] .toggle {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  background: #e2e8f0;
  border-radius: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
}

body[data-page="admin-scheduler"] .toggle.on {
  background: #22c55e;
}

body[data-page="admin-scheduler"] .toggle::after {
  content: '';
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

body[data-page="admin-scheduler"] .toggle.on::after {
  transform: translateX(1.25rem);
}

body[data-page="admin-scheduler"] .cron-input {
  width: 7rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  text-align: center;
  font-family: monospace;
}

body[data-page="admin-scheduler"] .cron-input:focus {
  outline: none;
  border-color: #3b82f6;
}

body[data-page="admin-scheduler"] .modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

body[data-page="admin-scheduler"] .modal-overlay.show {
  display: flex;
}

body[data-page="admin-scheduler"] .modal-box {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  width: 90%;
  max-width: 360px;
}

body[data-page="admin-scheduler"] .modal-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

body[data-page="admin-scheduler"] .modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

body[data-page="admin-scheduler"] .last-run-error {
  color: #dc2626;
}

body[data-page="admin-scheduler"] .task-retry {
  font-size: 0.68rem;
  color: #d97706;
  margin-top: 0.15rem;
}

body[data-page="admin-scheduler"] .task-retry-exhausted {
  color: #dc2626;
}

body[data-page="admin-scheduler"] .cron-hint {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

body[data-page="admin-scheduler"] .flex {
  display: flex;
}

body[data-page="admin-scheduler"] .items-center {
  align-items: center;
}

body[data-page="admin-scheduler"] .justify-between {
  justify-content: space-between;
}

body[data-page="admin-scheduler"] .gap-2 {
  gap: 0.5rem;
}

body[data-page="admin-scheduler"] .mb-4 {
  margin-bottom: 1rem;
}

body[data-page="admin-scheduler"] .text-xs {
  font-size: 0.75rem;
}

body[data-page="admin-scheduler"] .no-underline {
  text-decoration: none;
}

body[data-page="admin-scheduler"] .skeleton {
  animation: shimmer--admin-scheduler 1.5s ease-in-out infinite;
}

body[data-page="admin-scheduler"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

/* ==================== 28. 后台·站点设置 —— body[data-page="admin-settings"] ==================== */

body[data-page="admin-settings"] .config-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e2e8f0;
}

body[data-page="admin-settings"] .config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

body[data-page="admin-settings"] .config-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #1e293b;
}

body[data-page="admin-settings"] .config-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

body[data-page="admin-settings"] .form-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

body[data-page="admin-settings"] .form-row label {
  font-size: 0.8rem;
  color: #64748b;
  min-width: 3rem;
}

body[data-page="admin-settings"] .form-input {
  padding: 0.45rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  background: #fff;
  color: #334155;
  outline: none;
}

body[data-page="admin-settings"] .form-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

body[data-page="admin-settings"] .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #334155;
  cursor: pointer;
}

body[data-page="admin-settings"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}

body[data-page="admin-settings"] .btn-sm:active {
  transform: scale(0.94);
}

body[data-page="admin-settings"] .btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  transform: scale(0);
  animation: btn-ripple--admin-settings .5s ease-out forwards;
  pointer-events: none;
}

body[data-page="admin-settings"] .btn-blue {
  background: #3b82f6;
  color: #fff;
}

body[data-page="admin-settings"] .btn-blue:hover {
  background: #2563eb;
}

/* ==================== 29. 后台·积分套餐 —— body[data-page="admin-recharge-products"] ==================== */

body[data-page="admin-recharge-products"] .add-form {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

body[data-page="admin-recharge-products"] .form-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

body[data-page="admin-recharge-products"] .form-row label {
  font-size: 0.75rem;
  color: #475569;
  font-weight: 500;
  min-width: 4.5rem;
  flex-shrink: 0;
}

body[data-page="admin-recharge-products"] .form-input {
  padding: 0.45rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  background: #fff;
  color: #334155;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

body[data-page="admin-recharge-products"] .form-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

body[data-page="admin-recharge-products"] .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #334155;
  cursor: pointer;
}

body[data-page="admin-recharge-products"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

body[data-page="admin-recharge-products"] .btn-blue {
  background: #3b82f6;
  color: #fff;
}

body[data-page="admin-recharge-products"] .btn-green {
  background: #16a34a;
  color: #fff;
}

body[data-page="admin-recharge-products"] .btn-red {
  background: #ef4444;
  color: #fff;
}

body[data-page="admin-recharge-products"] .btn-gray {
  background: #e2e8f0;
  color: #475569;
}

body[data-page="admin-recharge-products"] .btn-sm:disabled {
  opacity: 0.5;
  cursor: default;
}

body[data-page="admin-recharge-products"] .config-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e2e8f0;
}

body[data-page="admin-recharge-products"] .config-card.inactive {
  opacity: 0.65;
}

body[data-page="admin-recharge-products"] .config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

body[data-page="admin-recharge-products"] .config-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #1e293b;
}

body[data-page="admin-recharge-products"] .config-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

body[data-page="admin-recharge-products"] .config-actions {
  display: flex;
  gap: 0.4rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.65rem;
  flex-wrap: wrap;
}

body[data-page="admin-recharge-products"] .badge-enabled {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  background: #dcfce7;
  color: #15803d;
}

body[data-page="admin-recharge-products"] .badge-disabled {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  background: #f1f5f9;
  color: #94a3b8;
}

body[data-page="admin-recharge-products"] .price-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: #d97706;
}

body[data-page="admin-recharge-products"] .credits-tag {
  font-size: 0.72rem;
  color: #64748b;
}

body[data-page="admin-recharge-products"] .sort-tag {
  font-size: 0.68rem;
  color: #94a3b8;
  background: #eef2ff;
  padding: 0.08rem 0.35rem;
  border-radius: 0.3rem;
}

body[data-page="admin-recharge-products"] .skeleton {
  animation: shimmer--admin-recharge-products 1.5s ease-in-out infinite;
}

body[data-page="admin-recharge-products"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

body[data-page="admin-recharge-products"] .modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

body[data-page="admin-recharge-products"] .modal-overlay.show {
  display: flex;
}

body[data-page="admin-recharge-products"] .modal-box {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

body[data-page="admin-recharge-products"] .modal-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

body[data-page="admin-recharge-products"] .modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

body[data-page="admin-recharge-products"] .fab {
  position: fixed;
  right: 1.1rem;
  bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: none;
  background: #4f46e5;
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
  z-index: 70;
  transition: transform 0.25s, background-color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body[data-page="admin-recharge-products"] .fab:hover {
  background: #4338ca;
}

body[data-page="admin-recharge-products"] .fab.open {
  transform: rotate(135deg);
  background: #dc2626;
}

body[data-page="admin-recharge-products"] .create-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #f8fafc;
  padding: 1rem 1rem 4.5rem;
  overflow-y: auto;
}

body[data-page="admin-recharge-products"] .create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

body[data-page="admin-recharge-products"] .create-head .title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

body[data-page="admin-recharge-products"] .create-close {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
}

body[data-page="admin-recharge-products"] .create-close:hover {
  background: #e2e8f0;
}

/* ==================== 30. 后台·支付配置 —— body[data-page="admin-payment-config"] ==================== */

body[data-page="admin-payment-config"] .config-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e2e8f0;
}

body[data-page="admin-payment-config"] .config-card.disabled {
  opacity: 0.6;
}

body[data-page="admin-payment-config"] .config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

body[data-page="admin-payment-config"] .config-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
}

body[data-page="admin-payment-config"] .config-body {
  margin-bottom: 0.5rem;
}

body[data-page="admin-payment-config"] .form-tip {
  font-size: 0.68rem;
  color: #94a3b8;
  margin: 0.2rem 0 0.6rem;
  line-height: 1.5;
  word-break: break-all;
}

body[data-page="admin-payment-config"] .form-tip button {
  color: #3b82f6;
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

body[data-page="admin-payment-config"] .config-actions {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.75rem;
  flex-wrap: wrap;
}

body[data-page="admin-payment-config"] .toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-block;
}

body[data-page="admin-payment-config"] .toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

body[data-page="admin-payment-config"] .toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: 0.2s;
}

body[data-page="admin-payment-config"] .toggle-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

body[data-page="admin-payment-config"] .toggle-switch input:checked+.toggle-slider {
  background: #22c55e;
}

body[data-page="admin-payment-config"] .toggle-switch input:checked+.toggle-slider:before {
  transform: translateX(20px);
}

body[data-page="admin-payment-config"] .form-label {
  font-size: 0.75rem;
  color: #475569;
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

body[data-page="admin-payment-config"] .form-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  margin-bottom: 0.65rem;
  background: #fff;
  color: #334155;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body[data-page="admin-payment-config"] .form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

body[data-page="admin-payment-config"] .form-input:placeholder-shown {
  border-color: #94a3b8;
  border-style: dashed;
}

body[data-page="admin-payment-config"] .form-input.empty {
  border-color: #f59e0b;
  border-style: dashed;
  background: #fffbeb;
}

body[data-page="admin-payment-config"] .chk-row {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

body[data-page="admin-payment-config"] .chk-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #334155;
  cursor: pointer;
}

body[data-page="admin-payment-config"] .pay-channel {
  border: 1px solid;
  border-radius: 0.75rem;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
}

body[data-page="admin-payment-config"] .channel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

body[data-page="admin-payment-config"] .channel-title {
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

body[data-page="admin-payment-config"] .channel-tip {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

body[data-page="admin-payment-config"] .dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  display: inline-block;
}

body[data-page="admin-payment-config"] .dot-wechat {
  background: #22c55e;
}

body[data-page="admin-payment-config"] .dot-alipay {
  background: #2563eb;
}

body[data-page="admin-payment-config"] .chk-label-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #334155;
  cursor: pointer;
}

body[data-page="admin-payment-config"] .pay-channel.channel-wechat {
  border-color: #86efac;
  background: #f0fdf4;
}

body[data-page="admin-payment-config"] .pay-channel.channel-wechat .channel-title {
  color: #15803d;
}

body[data-page="admin-payment-config"] .pay-channel.channel-alipay {
  border-color: #93c5fd;
  background: #eff6ff;
}

body[data-page="admin-payment-config"] .pay-channel.channel-alipay .channel-title {
  color: #1d4ed8;
}

body[data-page="admin-payment-config"] .pay-channel.channel-shared {
  border-color: #e2e8f0;
  background: #f8fafc;
}

body[data-page="admin-payment-config"] .pay-channel.channel-shared .channel-title {
  color: #475569;
}

body[data-page="admin-payment-config"] .form-input:not(.empty) {
  border-color: #22c55e;
  border-style: solid;
  background: #f0fdf4;
}

body[data-page="admin-payment-config"] .form-textarea {
  resize: vertical;
  min-height: 3rem;
  font-family: monospace;
}

body[data-page="admin-payment-config"] .btn-sm {
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

body[data-page="admin-payment-config"] .btn-blue {
  background: #eff6ff;
  color: #2563eb;
}

body[data-page="admin-payment-config"] .btn-green {
  background: #f0fdf4;
  color: #16a34a;
}

body[data-page="admin-payment-config"] .btn-red {
  background: #fef2f2;
  color: #dc2626;
}

body[data-page="admin-payment-config"] .btn-gray {
  background: #f1f5f9;
  color: #64748b;
}

body[data-page="admin-payment-config"] .flex {
  display: flex;
}

body[data-page="admin-payment-config"] .gap-2 {
  gap: 0.5rem;
}

body[data-page="admin-payment-config"] .items-center {
  align-items: center;
}

body[data-page="admin-payment-config"] .justify-between {
  justify-content: space-between;
}

body[data-page="admin-payment-config"] .mt-1 {
  margin-top: 0.25rem;
}

body[data-page="admin-payment-config"] .text-xs {
  font-size: 0.75rem;
}

body[data-page="admin-payment-config"] .text-sm {
  font-size: 0.85rem;
}

body[data-page="admin-payment-config"] .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

body[data-page="admin-payment-config"] .badge-on {
  background: #dcfce7;
  color: #166534;
}

body[data-page="admin-payment-config"] .badge-off {
  background: #fef2f2;
  color: #991b1b;
}

body[data-page="admin-payment-config"] .skeleton {
  animation: shimmer--admin-payment-config 1.5s ease-in-out infinite;
}

body[data-page="admin-payment-config"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

/* ==================== 31. 后台·积分消耗 —— body[data-page="admin-credit-consumptions"] ==================== */

body[data-page="admin-credit-consumptions"] .filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

body[data-page="admin-credit-consumptions"] .search-input {
  flex: 1;
  min-width: 160px;
  padding: 0.4rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  background: #fff;
  color: #334155;
}

body[data-page="admin-credit-consumptions"] .search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

body[data-page="admin-credit-consumptions"] .list-summary {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.6rem;
}

body[data-page="admin-credit-consumptions"] .item-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

body[data-page="admin-credit-consumptions"] .item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

body[data-page="admin-credit-consumptions"] .item-body {
  margin-bottom: 0;
}

body[data-page="admin-credit-consumptions"] .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  white-space: nowrap;
}

body[data-page="admin-credit-consumptions"] .badge-credit {
  background: #fee2e2;
  color: #b91c1c;
}

body[data-page="admin-credit-consumptions"] .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

body[data-page="admin-credit-consumptions"] .page-btn {
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

body[data-page="admin-credit-consumptions"] .page-btn:hover {
  background: #f1f5f9;
}

body[data-page="admin-credit-consumptions"] .page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

body[data-page="admin-credit-consumptions"] .page-info {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
}

body[data-page="admin-credit-consumptions"] .jump-input {
  width: 4rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  text-align: center;
}

body[data-page="admin-credit-consumptions"] .skeleton {
  animation: shimmer--admin-credit-consumptions 1.5s ease-in-out infinite;
}

body[data-page="admin-credit-consumptions"] .skeleton-line {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 0.25rem;
}
/* 筛选下拉（与用户管理页 .search-select 保持一致） */
body[data-page="admin-credit-consumptions"] .filter-select {
  padding: 0.4rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  background: #fff;
  color: #334155;
  outline: none;
}
body[data-page="admin-credit-consumptions"] .filter-select:focus {
  border-color: #c7d2fe;
}
/* ==================== 32. error-500 —— body[data-page="error-500"] ==================== */

body[data-page="error-500"] .error-page {
  text-align: center;
  padding: 2rem 0;
}

body[data-page="error-500"] .error-code {
  font-size: 5rem;
  font-weight: 800;
  color: #e2e8f0;
  line-height: 1;
  margin-bottom: 0.5rem;
}

body[data-page="error-500"] .error-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

body[data-page="error-500"] .error-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

body[data-page="error-500"] .error-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

body[data-page="error-500"] .btn-outline {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: 2px solid #e2e8f0;
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s;
}

body[data-page="error-500"] .btn-outline:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  text-decoration: none;
}

body[data-page="error-500"] .btn-primary {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem;
  background: #3b82f6;
  color: #fff;
  text-decoration: none;
  transition: background 0.15s;
}

body[data-page="error-500"] .btn-primary:hover {
  background: #2563eb;
  text-decoration: none;
}

body[data-page="error-500"] .error-detail {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
  word-break: break-all;
  display: none;
}
