/* ==========================================================================
   聚宝盆 · 国风设计系统 / Guofeng Design System v1.0
   --------------------------------------------------------------------------
   设计原则：设计系统优先 · 8pt 间距 · 语义化令牌 · WCAG AA · 移动优先
   视觉语言：墨底 / 烫金 / 朱砂 / 祥云 / 团龙 / 回纹 / 描金细线
   主题：玄金 · 朱砂 · 天青 · 紫宸 · 宣纸
   ========================================================================== */
@charset "UTF-8";

/* ============================ 1.0 题字字体（3 字精简子集） ============================
   开源字体依 SIL Open Font License 1.1 使用，许可全文见 static/fonts/OPEN-FONT-LICENSES.txt。
   每个 woff2 仅保留「聚宝盆」三字（约 2 KB），避免加载数 MB 的完整中文字库。
   楷书直接调用系统自带 KaiTi/楷体，不随本包分发任何字体数据。 */
@font-face {
  font-family: "JBP-MaShan";
  src: url("/static/fonts/jbp-mashan.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: block;
  unicode-range: U+5B9D, U+76C8, U+805A;
}
@font-face {
  font-family: "JBP-LongCang";
  src: url("/static/fonts/jbp-longcang.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: block;
  unicode-range: U+5B9D, U+76C8, U+805A;
}
@font-face {
  font-family: "JBP-ZhiMang";
  src: url("/static/fonts/jbp-zhimang.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: block;
  unicode-range: U+5B9D, U+76C8, U+805A;
}
@font-face {
  font-family: "JBP-XiaoWei";
  src: url("/static/fonts/jbp-xiaowei.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: block;
  unicode-range: U+5B9D, U+76C8, U+805A;
}
@font-face {
  font-family: "JBP-SongHeavy";
  src: url("/static/fonts/jbp-songheavy.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: block;
  unicode-range: U+5B9D, U+76C8, U+805A;
}

/* 题字字体方案（默认：楷书） */
:root, [data-font="kai"] {
  --title-font: "KaiTi", "楷体", "STKaiti", "Kaiti SC", "SimKai", var(--font-serif);
}
[data-font="mashan"]    { --title-font: "JBP-MaShan",   "KaiTi", var(--font-serif); }
[data-font="longcang"]  { --title-font: "JBP-LongCang", "KaiTi", var(--font-serif); }
[data-font="zhimang"]   { --title-font: "JBP-ZhiMang",  "KaiTi", var(--font-serif); }
[data-font="xiaowei"]   { --title-font: "JBP-XiaoWei",  "KaiTi", var(--font-serif); }
[data-font="songheavy"] { --title-font: "JBP-SongHeavy", var(--font-serif); }

/* ============================ 1. 设计令牌 ============================ */
:root {
  /* 字体 */
  --font-serif: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Source Han Sans CN", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-kai: "Kaiti SC", "STKaiti", "KaiTi", "SimKai", var(--font-serif);
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* 字号阶梯 */
  --fs-xs: 11px; --fs-sm: 12px; --fs-base: 14px; --fs-md: 15px;
  --fs-lg: 18px; --fs-xl: 21px; --fs-2xl: 26px; --fs-3xl: 32px; --fs-4xl: 40px;

  /* 间距（8pt 基准） */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-6: 24px; --sp-8: 32px; --sp-12: 48px; --sp-16: 64px;

  /* 圆角 / 阴影 / 动效 */
  --radius-sm: 6px; --radius: 10px; --radius-lg: 16px;
  --ease-fast: 160ms cubic-bezier(.4, 0, .2, 1);
  --ease: 300ms cubic-bezier(.4, 0, .2, 1);
  --ease-slow: 700ms cubic-bezier(.2, .7, .2, 1);

  /* ---- 玄金墨玉（默认主题）---- */
  --bg: #090c12;
  --bg2: #0e131d;
  --card: #141b28;
  --card-border: #2b3547;
  --text: #f1e8d6;
  --text-dim: #9ba6b9;
  --primary: #e3bd6b;
  --primary-dim: rgba(227, 189, 107, .13);
  --accent: #f6d99a;
  --success: #6fd6a8;
  --danger: #f0837a;
  --warn: #e9b45b;

  --gold: #e3bd6b;
  --gold-2: #f7e3ae;
  --gold-3: #a97f36;
  --foil-hi: #fff3cf;
  --gold-soft: rgba(227, 189, 107, .10);
  --gold-line: rgba(227, 189, 107, .34);
  --gold-grad: linear-gradient(100deg, #a97f36 0%, #e9c97e 22%, #fff3cf 42%, #e3bd6b 60%, #9c722e 80%, #e9c97e 100%);
  --cinnabar: #c04535;
  --cinnabar-soft: rgba(192, 69, 53, .16);
  --panel: #111825;
  --panel-2: #0c111b;
  --line: rgba(227, 189, 107, .16);
  --line-soft: rgba(227, 189, 107, .08);
  --btn-ink: #1a1206;
  --btn-ink-2: #f6e9c9;
  --orn-op: .055;
  --orn-op-strong: .11;
  --particle: 227, 189, 107;
  --shadow: 0 6px 22px rgba(0, 0, 0, .38);
  --shadow-lift: 0 14px 38px rgba(0, 0, 0, .5);
  --header-bg: linear-gradient(180deg, #121826 0%, #0b101a 100%);
  --sel-bg: rgba(227, 189, 107, .18);
  --ball-ink: #0a0e16;
  --skeleton: rgba(227, 189, 107, .07);
}

/* ============================ 2. 配色主题 ============================ */
/* 2.1 玄金墨玉 —— 墨黑为底，赤金为魂（默认） */
[data-theme="xuanjin"] {
  --bg: #090c12; --bg2: #0e131d; --card: #141b28; --card-border: #2b3547;
  --text: #f1e8d6; --text-dim: #9ba6b9; --primary: #e3bd6b;
  --primary-dim: rgba(227, 189, 107, .13); --accent: #f6d99a;
  --success: #6fd6a8; --danger: #f0837a; --warn: #e9b45b;
  --gold: #e3bd6b; --gold-2: #f7e3ae; --gold-3: #a97f36;
  --gold-line: rgba(227, 189, 107, .34);
  --gold-grad: linear-gradient(100deg, #a97f36 0%, #e9c97e 22%, #fff3cf 42%, #e3bd6b 60%, #9c722e 80%, #e9c97e 100%);
  --cinnabar: #c04535; --panel: #111825; --panel-2: #0c111b;
  --line: rgba(227, 189, 107, .16); --line-soft: rgba(227, 189, 107, .08);
  --btn-ink: #1a1206; --orn-op: .055; --particle: 227, 189, 107;
  --header-bg: linear-gradient(180deg, #121826 0%, #0b101a 100%);
  --sel-bg: rgba(227, 189, 107, .18); --skeleton: rgba(227, 189, 107, .07);
}

/* 2.2 朱砂宫墙 —— 绛红为底，金线勾勒 */
[data-theme="zhusha"] {
  --bg: #140a0b; --bg2: #1c1011; --card: #26161a; --card-border: #4a2a2a;
  --text: #fbeedd; --text-dim: #c3a09a; --primary: #eec47c;
  --primary-dim: rgba(238, 196, 124, .14); --accent: #f8dca6;
  --success: #7fd7a6; --danger: #ff8f7d; --warn: #f0bd67;
  --gold: #eec47c; --gold-2: #fff0c8; --gold-3: #b5883c;
  --gold-line: rgba(238, 196, 124, .38);
  --gold-grad: linear-gradient(100deg, #b07730 0%, #f2ce8a 22%, #fff3d4 42%, #eec47c 60%, #a06f2c 80%, #f2ce8a 100%);
  --cinnabar: #d4513c; --cinnabar-soft: rgba(212, 81, 60, .20);
  --panel: #211214; --panel-2: #190d0f;
  --line: rgba(238, 196, 124, .18); --line-soft: rgba(238, 196, 124, .09);
  --btn-ink: #2a1208; --orn-op: .065; --particle: 238, 196, 124;
  --shadow: 0 6px 22px rgba(0, 0, 0, .45);
  --header-bg: linear-gradient(180deg, #2a1416 0%, #170c0e 100%);
  --sel-bg: rgba(238, 196, 124, .18); --skeleton: rgba(238, 196, 124, .08);
}

/* 2.3 天青汝窑 —— 青黛为底，淡金点翠 */
[data-theme="tianqing"] {
  --bg: #08151a; --bg2: #0d1e24; --card: #122a30; --card-border: #274a50;
  --text: #eaf3ef; --text-dim: #94b1b0; --primary: #dcc384;
  --primary-dim: rgba(220, 195, 132, .13); --accent: #a5dcd2;
  --success: #77d9b0; --danger: #f08d80; --warn: #e7c078;
  --gold: #dcc384; --gold-2: #f7e9c4; --gold-3: #9c8547;
  --gold-line: rgba(220, 195, 132, .32);
  --gold-grad: linear-gradient(100deg, #8f7b40 0%, #e2d09b 22%, #fbf3dc 42%, #dcc384 60%, #8a7138 80%, #e2d09b 100%);
  --cinnabar: #b8543f; --cinnabar-soft: rgba(184, 84, 63, .16);
  --panel: #0f242a; --panel-2: #0a1a20;
  --line: rgba(220, 195, 132, .15); --line-soft: rgba(220, 195, 132, .08);
  --btn-ink: #10201f; --orn-op: .05; --particle: 220, 195, 132;
  --header-bg: linear-gradient(180deg, #122b31 0%, #0a191e 100%);
  --sel-bg: rgba(220, 195, 132, .17); --skeleton: rgba(220, 195, 132, .07);
}

/* 2.4 紫宸夜宴 —— 深紫为底，鎏金生辉 */
[data-theme="zichen"] {
  --bg: #0e0918; --bg2: #16102a; --card: #1e1738; --card-border: #3a2c60;
  --text: #f3eaf9; --text-dim: #ab9cc6; --primary: #e6c383;
  --primary-dim: rgba(230, 195, 131, .14); --accent: #cdb0f2;
  --success: #84d9ae; --danger: #f3929f; --warn: #eec07a;
  --gold: #e6c383; --gold-2: #fff0cd; --gold-3: #ac8740;
  --gold-line: rgba(230, 195, 131, .35);
  --gold-grad: linear-gradient(100deg, #9c7836 0%, #efd294 22%, #fff4d6 42%, #e6c383 60%, #8f6c2e 80%, #efd294 100%);
  --cinnabar: #b0486b; --cinnabar-soft: rgba(176, 72, 107, .18);
  --panel: #191230; --panel-2: #120c22;
  --line: rgba(230, 195, 131, .17); --line-soft: rgba(230, 195, 131, .08);
  --btn-ink: #1d1226; --orn-op: .06; --particle: 230, 195, 131;
  --header-bg: linear-gradient(180deg, #211640 0%, #100a1e 100%);
  --sel-bg: rgba(230, 195, 131, .18); --skeleton: rgba(230, 195, 131, .08);
}

/* 2.5 宣纸鎏金 —— 浅色日间主题（对比度按 AA 校准） */
[data-theme="xuanzhi"] {
  --bg: #f3ecdd; --bg2: #e9dfca; --card: #fffcf3; --card-border: #d8c6a4;
  --text: #2c2418; --text-dim: #746550; --primary: #8a5f16;
  --primary-dim: rgba(138, 95, 22, .10); --accent: #9a3a26;
  --success: #27734c; --danger: #a8342a; --warn: #8a5b0b;
  --gold: #9a6f28; --gold-2: #c9a154; --gold-3: #6f4c15;
  --foil-hi: #5f3f0e;
  --gold-line: rgba(138, 95, 22, .42);
  --gold-grad: linear-gradient(100deg, #7d5418 0%, #b98b38 22%, #e8cf95 42%, #a87a2a 60%, #6d4712 80%, #b98b38 100%);
  --cinnabar: #a83a28; --cinnabar-soft: rgba(168, 58, 40, .10);
  --panel: #fdf8ec; --panel-2: #f1e8d5;
  --line: rgba(138, 95, 22, .22); --line-soft: rgba(138, 95, 22, .10);
  --btn-ink: #fff8e8; --btn-ink-2: #fff8e8;
  --orn-op: .075; --particle: 154, 111, 40;
  --shadow: 0 4px 16px rgba(90, 68, 30, .14);
  --shadow-lift: 0 12px 30px rgba(90, 68, 30, .22);
  --header-bg: linear-gradient(180deg, #fbf5e6 0%, #eee2c9 100%);
  --sel-bg: rgba(138, 95, 22, .12);
  --ball-ink: #fff8e8; --skeleton: rgba(138, 95, 22, .08);
}

/* ============================ 3. 基础层 ============================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 55% at 50% -12%, var(--gold-soft), transparent 70%),
    radial-gradient(ellipse 60% 45% at 100% 100%, var(--cinnabar-soft), transparent 72%);
  transition: background-color var(--ease), color var(--ease);
}
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
::selection { background: var(--sel-bg); color: var(--text); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--panel-2); }
::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 6px; border: 2px solid var(--panel-2); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-3); }

/* 视觉隐藏（保留屏幕阅读器语义） */
.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;
}

/* ============================ 4. 背景装饰：云纹 · 团龙 · 烫金线 ============================ */
.ornaments {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.ornaments .orn-dragon {
  position: absolute; width: min(56vw, 700px); height: auto;
  right: -8vw; top: 12vh; opacity: var(--orn-op); color: var(--gold);
  transform: rotate(-8deg);
}
.ornaments .orn-dragon.left {
  right: auto; left: -12vw; top: auto; bottom: -18vh;
  width: min(46vw, 560px); transform: rotate(14deg) scaleX(-1); opacity: var(--orn-op-strong);
}
.ornaments .orn-cloud-tl, .ornaments .orn-cloud-br {
  position: absolute; width: 300px; color: var(--gold); opacity: var(--orn-op-strong);
}
.ornaments .orn-cloud-tl { left: -56px; top: 96px; }
.ornaments .orn-cloud-br { right: -56px; bottom: -48px; transform: rotate(180deg); }
.ornaments .orn-frame {
  position: absolute; inset: 10px; border: 1px solid var(--line-soft); border-radius: 4px;
}
.ornaments .orn-frame::before, .ornaments .orn-frame::after {
  content: ""; position: absolute; width: 18px; height: 18px;
  border: 1px solid var(--gold-line);
}
.ornaments .orn-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.ornaments .orn-frame::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* 烫金细线（通用分隔） */
.gold-rule {
  position: relative; height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--gold-line) 12%, var(--gold) 50%, var(--gold-line) 88%, transparent);
  opacity: .8;
}
.gold-rule::after {
  content: "◆"; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  font-size: 9px; color: var(--gold); background: var(--bg); padding: 0 8px;
  line-height: 1;
}

/* 粒子画布 */
#goldParticles {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none; opacity: .9;
}

/* ============================ 5. 御制页眉 · 烫金篆体 ============================ */
.imperial-header {
  position: relative; z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--gold-line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .34);
  overflow: hidden;
  isolation: isolate;
}
.imperial-header::before {
  /* 顶部回纹装饰带 */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: repeating-linear-gradient(90deg,
    var(--gold-3) 0 8px, transparent 8px 12px, var(--gold-3) 12px 14px, transparent 14px 22px);
  opacity: .55;
}
.imperial-header::after {
  /* 底部双层烫金线 */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-3) 8%, var(--gold) 50%, var(--gold-3) 92%, transparent);
  opacity: .75;
}
.hdr-inner {
  position: relative; max-width: 1680px; margin: 0 auto;
  padding: 20px 34px 18px;
  display: flex; align-items: center; gap: 28px;
}
.hdr-cloud {
  position: absolute; color: var(--gold); opacity: .28; pointer-events: none;
  width: 210px; height: auto;
}
.hdr-cloud.c1 { left: -30px; top: -34px; }
.hdr-cloud.c2 { right: -18px; bottom: -40px; transform: scaleX(-1); }

/* 印章 */
.hdr-seal {
  flex: 0 0 auto; width: 62px; height: 62px; border-radius: 7px;
  background: var(--cinnabar);
  border: 2px solid rgba(255, 226, 190, .55);
  box-shadow: 0 0 0 3px var(--cinnabar-soft), inset 0 0 16px rgba(0, 0, 0, .28);
  display: grid; grid-template-columns: 1fr 1fr; place-items: center;
  color: #fff1dc; font-family: var(--font-serif); font-size: 20px; font-weight: 700;
  line-height: 1; padding: 5px; transform: rotate(-6deg);
  letter-spacing: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  animation: sealIn var(--ease-slow) both .15s;
}
.hdr-seal span { display: block; }

/* ---- 主标题：真实字形 · 三方印格 · 烫金流光（默认） ---- */
.hdr-title-wrap { flex: 1 1 auto; min-width: 0; text-align: center; }
.jbp-wordmark {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(8px, 1.2vw, 18px);
  width: max-content; max-width: 100%; margin: 0 auto;
  /* 不设 fill-mode：动画未推进时仍保持默认可见态，避免首帧空白 */
  animation: titleIn 900ms cubic-bezier(.2, .8, .2, 1);
}
.jbp-cell {
  position: relative; flex: 0 0 auto;
  width: clamp(82px, 9.4vw, 138px);
  height: clamp(94px, 10.8vw, 158px);
  display: grid; place-items: center;
  border: 1px solid var(--gold-line); border-radius: 5px;
  background: linear-gradient(155deg, var(--gold-soft), transparent 62%), var(--panel-2);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .22), 0 4px 18px rgba(0, 0, 0, .18);
}
[data-theme="xuanzhi"] .jbp-cell {
  box-shadow: inset 0 0 18px rgba(138, 95, 22, .06), 0 3px 12px rgba(90, 68, 30, .10);
}
.jbp-cell::before {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid var(--line-soft); border-radius: 2px; pointer-events: none;
}
.jbp-cell::after {
  content: ""; position: absolute; left: 50%; bottom: 7px;
  width: 18px; height: 2px; transform: translateX(-50%);
  background: var(--gold-grad); opacity: .55; border-radius: 2px; pointer-events: none;
}
.jbp-glyph {
  display: block; justify-self: center; width: max-content;
  font-family: var(--title-font); font-weight: 400;
  font-size: clamp(58px, 7.2vw, 106px); line-height: 1; letter-spacing: 0;
  /* 两层背景：底层烫金渐变 + 上层往复移动的高光带，均裁剪到字形内 */
  background-image:
    linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .04) 43%,
      rgba(255, 255, 255, .88) 50%, rgba(255, 255, 255, .04) 57%, transparent 68%),
    var(--gold-grad);
  background-size: 260% 100%, 220% 100%;
  background-position: 220% 0, 0 0;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .8px var(--gold-3);
  filter: drop-shadow(0 2px 8px rgba(227, 189, 107, .28));
  animation: foilSweep 5.5s cubic-bezier(.4, 0, .25, 1) infinite,
             foilBreathe 5.5s ease-in-out infinite;
}
[data-theme="xuanzhi"] .jbp-glyph {
  /* 米白底：深赭金实底 + 极弱暖色高光（避免白光冲淡字形）+ 深色压边 */
  background-image:
    linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .02) 43%,
      rgba(255, 246, 214, .14) 50%, rgba(255, 255, 255, .02) 57%, transparent 68%),
    linear-gradient(100deg, #5a3c0d 0%, #8a5f16 22%, #a87a2a 42%,
      #6d4712 60%, #4a3109 80%, #8a5f16 100%);
  -webkit-text-stroke: 1.2px #4a3109;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .45));
}
.jbp-cell:nth-child(2) .jbp-glyph { animation-delay: .35s, .18s; }
.jbp-cell:nth-child(3) .jbp-glyph { animation-delay: .7s, .36s; }

/* ---- 初版小篆方案：仅在 data-font="zhuan" 下显示 ---- */
.seal-script-title {
  display: none; width: min(100%, 640px); height: auto; margin: 0 auto;
  overflow: visible;
  filter: drop-shadow(0 2px 10px rgba(227, 189, 107, .28));
  animation: titleIn 900ms cubic-bezier(.2, .8, .2, 1) both;
}
[data-font="zhuan"] .seal-script-title { display: block; }
[data-font="zhuan"] .jbp-wordmark { display: none; }
/* 烫金渐变描边（渐变本体写在 SVG 内联属性上，避免外部样式表 url(#id) 解析到 CSS 文件） */
.foil-stroke, .foil-shine {
  fill: none;
  stroke-width: 8.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.foil-glint {
  fill: none; stroke: var(--gold-2); stroke-width: 1.2;
  stroke-linecap: round; opacity: .5;
}
/* 三方印格 */
.seal-grid { stroke: var(--gold-3); stroke-width: 1; opacity: .3; fill: none; }
.seal-diamonds { fill: var(--gold); opacity: .55; }
/* 古印谱式释文 */
.seal-caption text {
  fill: var(--gold); font-family: var(--font-kai); font-size: 15px;
  letter-spacing: .12em; opacity: .9;
}
/* 烫金渐变的色标随主题令牌变化：浅色主题自动改用深金，保证对比度 */
#goldFoil stop.f1, #goldFoil stop.f5 { stop-color: var(--gold-3); }
#goldFoil stop.f2, #goldFoil stop.f4 { stop-color: var(--gold); }
#goldFoil stop.f3 { stop-color: var(--foil-hi); }
#goldFoil stop.f6 { stop-color: var(--gold-2); }
#goldSweep stop.g1 { stop-color: var(--foil-hi); }
#goldSweep stop.g2 { stop-color: var(--gold-2); }
#goldSweep stop.g3 { stop-color: var(--gold-3); }
[data-theme="xuanzhi"] .sweep-rect { opacity: .35; }
.hdr-sub {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 2px; color: var(--gold); font-family: var(--font-kai);
  font-size: 13px; letter-spacing: .32em; opacity: .88;
  /* 静态可见，不依赖入场动画（避免动画未启动时首帧透明） */
}
.hdr-sub .dash { width: 42px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hdr-sub .dash.r { transform: rotate(180deg); }
.hdr-motto {
  font-size: 11px; letter-spacing: .22em; color: var(--text-dim);
  margin-top: 6px; font-family: var(--font-serif);
}
.hdr-motto em { font-style: normal; color: var(--gold); margin: 0 10px; }

/* 页眉右侧控制区 */
.hdr-tools { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hdr-search {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--panel); border: 1px solid var(--gold-line);
  color: var(--text-dim); border-radius: 999px;
  padding: 8px 14px; font-size: 12.5px; cursor: pointer;
  transition: var(--ease-fast); white-space: nowrap;
}
.hdr-search:hover { color: var(--gold); border-color: var(--gold); box-shadow: 0 0 16px var(--gold-soft); }
.hdr-search kbd {
  font-family: var(--font-mono); font-size: 10px; padding: 1px 6px;
  border: 1px solid var(--card-border); border-radius: 4px; color: var(--text-dim);
}
.theme-switch { display: flex; align-items: center; gap: 8px; }
.theme-switch > span { font-size: 11px; color: var(--text-dim); letter-spacing: .12em; }
.theme-dots { display: flex; gap: 7px; }
.theme-dot {
  position: relative; width: 25px; height: 25px; border-radius: 50%;
  border: 1px solid var(--line); cursor: pointer; padding: 0;
  transition: transform var(--ease-fast), box-shadow var(--ease-fast);
  display: grid; place-items: center;
}
.theme-dot::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255, 255, 255, .28); opacity: 0; transition: var(--ease-fast);
}
.theme-dot:hover { transform: translateY(-2px) scale(1.08); }
.theme-dot.on {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--gold), 0 0 14px var(--gold-soft);
}
.theme-dot.on::after { opacity: 1; }
.theme-dot[data-t="xuanjin"]  { background: linear-gradient(135deg, #090c12, #e3bd6b); }
.theme-dot[data-t="zhusha"]  { background: linear-gradient(135deg, #3c0f10, #eec47c); }
.theme-dot[data-t="tianqing"]{ background: linear-gradient(135deg, #0d2c33, #a5dcd2); }
.theme-dot[data-t="zichen"]  { background: linear-gradient(135deg, #1c1038, #cdb0f2); }
.theme-dot[data-t="xuanzhi"] { background: linear-gradient(135deg, #f3ecdd, #9a6f28); }
.theme-name { font-size: 11px; color: var(--gold); font-family: var(--font-serif); letter-spacing: .1em; }

/* 题字字体切换：每个小样直接用该字体渲染「聚」字，一目了然 */
.font-switch { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.font-switch-label { font-size: 11px; color: var(--text-dim); letter-spacing: .12em; }
.font-switch-label b {
  color: var(--gold); font-weight: 500; font-family: var(--font-serif); letter-spacing: .08em;
}
.font-swatches { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.font-swatch {
  width: 27px; height: 27px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 5px;
  background: var(--panel); color: var(--gold);
  font-size: 17px; line-height: 1; display: grid; place-items: center;
  transition: transform var(--ease-fast), border-color var(--ease-fast), box-shadow var(--ease-fast);
}
.font-swatch:hover { transform: translateY(-2px); border-color: var(--gold); }
.font-swatch.on {
  border-color: var(--gold-2); background: var(--gold-soft);
  box-shadow: 0 0 0 1px var(--gold), 0 0 12px var(--gold-soft);
}
.font-swatch[data-f="kai"]       { font-family: "KaiTi", "楷体", var(--font-serif); }
.font-swatch[data-f="mashan"]    { font-family: "JBP-MaShan", "KaiTi", serif; }
.font-swatch[data-f="longcang"]  { font-family: "JBP-LongCang", "KaiTi", serif; }
.font-swatch[data-f="zhimang"]   { font-family: "JBP-ZhiMang", "KaiTi", serif; }
.font-swatch[data-f="xiaowei"]   { font-family: "JBP-XiaoWei", "KaiTi", serif; }
.font-swatch[data-f="songheavy"] { font-family: "JBP-SongHeavy", var(--font-serif); font-size: 15px; }
.font-swatch[data-f="zhuan"]     { font-family: var(--font-kai); font-size: 13px; }

/* ============================ 6. 布局骨架 ============================ */
.shell { position: relative; z-index: 2; display: flex; align-items: flex-start; }

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  width: 236px; flex: 0 0 236px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border-right: 1px solid var(--gold-line);
  z-index: 100; overflow-y: auto; overflow-x: hidden;
  box-shadow: inset -1px 0 0 var(--line-soft);
}
.sidebar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 4%, var(--gold-soft), transparent 55%);
}
.sb-brand {
  position: relative; padding: 20px 18px 16px; text-align: center;
  border-bottom: 1px solid var(--line);
}
.sb-brand .sb-mark {
  width: 44px; height: 44px; margin: 0 auto 8px;
  border: 1px solid var(--gold-line); border-radius: 50%;
  display: grid; place-items: center; color: var(--gold);
  font-family: var(--font-serif); font-size: 21px; font-weight: 700;
  background: var(--gold-soft);
  box-shadow: 0 0 0 4px var(--line-soft);
}
.sb-brand .sb-name { font-family: var(--font-serif); font-size: 16px; letter-spacing: .22em; color: var(--gold); }
.sb-brand .sb-ver { font-size: 10px; color: var(--text-dim); letter-spacing: .1em; margin-top: 3px; }

.sb-scroll { flex: 1 1 auto; overflow-y: auto; padding: 12px 0 8px; }
.nav-group { margin-bottom: 6px; }
.nav-group-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 18px 7px; cursor: pointer; user-select: none;
  color: var(--text-dim); font-size: 11px; letter-spacing: .18em;
  font-family: var(--font-serif);
  transition: color var(--ease-fast);
}
.nav-group-head:hover { color: var(--gold); }
.nav-group-head .ng-line { flex: 1; height: 1px; background: var(--line); }
.nav-group-head .ng-toggle { font-size: 9px; color: var(--gold-3); transition: transform var(--ease-fast); }
.nav-group.collapsed .ng-toggle { transform: rotate(-90deg); }
.nav-group.collapsed .nav-item { display: none; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 18px 9px 21px; color: var(--text-dim);
  font-size: 13px; text-decoration: none; cursor: pointer;
  border-left: 2px solid transparent;
  transition: color var(--ease-fast), background var(--ease-fast), border-color var(--ease-fast);
}
.nav-item .ni-ico {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 5px;
  display: grid; place-items: center; font-size: 13px;
  background: var(--line-soft); border: 1px solid transparent;
  transition: var(--ease-fast);
}
.nav-item .ni-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item .ni-arrow { font-size: 10px; opacity: 0; transform: translateX(-4px); transition: var(--ease-fast); color: var(--gold); }
.nav-item:hover {
  color: var(--text); background: var(--primary-dim);
}
.nav-item:hover .ni-arrow { opacity: .7; transform: translateX(0); }
.nav-item.active {
  color: var(--gold); font-weight: 700;
  border-left-color: var(--gold);
  background: linear-gradient(90deg, var(--primary-dim), transparent 85%);
}
.nav-item.active .ni-ico { border-color: var(--gold-line); background: var(--gold-soft); }
.nav-item.active::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 5px; height: 5px;
  transform: translateY(-50%) rotate(45deg); background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.sb-foot {
  border-top: 1px solid var(--line); padding: 12px 16px 14px;
  font-size: 10.5px; color: var(--text-dim); line-height: 1.7; text-align: center;
}
.sb-foot .sf-gold { color: var(--gold); font-family: var(--font-serif); letter-spacing: .1em; }
.sb-foot .sf-line { width: 60%; height: 1px; background: var(--line); margin: 7px auto; }

/* ---------------- 主区 ---------------- */
.main { flex: 1 1 auto; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 28px; position: sticky; top: 0; z-index: 50;
  background: var(--bg2);
  background: color-mix(in srgb, var(--bg2) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 {
  font-family: var(--font-serif); font-size: 17px; font-weight: 600;
  letter-spacing: .04em; color: var(--text);
  display: flex; align-items: center; gap: 10px; min-width: 0;
  flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-right: 12px;
}
.topbar h1::before {
  content: ""; width: 3px; height: 17px; flex: 0 0 3px;
  background: var(--gold-grad); border-radius: 2px;
  box-shadow: 0 0 8px var(--gold-soft);
}
.topbar-right {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: flex-end; flex: 0 0 auto;
}
.content { padding: 24px 28px 56px; position: relative; z-index: 2; overflow-wrap: break-word; }
.content > * { min-width: 0; }

/* ============================ 7. 组件库 ============================ */
/* ---- 卡片 ---- */
.card {
  position: relative; background: var(--card);
  border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px;
  box-shadow: var(--shadow);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.card::before {
  /* 左上 / 右下 描金角饰 */
  content: ""; position: absolute; left: 7px; top: 7px; width: 12px; height: 12px;
  border-left: 1px solid var(--gold-line); border-top: 1px solid var(--gold-line);
  pointer-events: none; opacity: .85;
}
.card::after {
  content: ""; position: absolute; right: 7px; bottom: 7px; width: 12px; height: 12px;
  border-right: 1px solid var(--gold-line); border-bottom: 1px solid var(--gold-line);
  pointer-events: none; opacity: .85;
}
.card:hover { border-color: var(--gold-line); box-shadow: var(--shadow-lift); }
.card-title {
  font-family: var(--font-serif); font-size: 15px; font-weight: 700;
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; min-width: 0; word-break: break-word; overflow-wrap: anywhere;
  color: var(--text); letter-spacing: .03em;
}
.card-title > * { min-width: 0; }
.card-title .ct-bar {
  width: 3px; height: 15px; flex: 0 0 3px; border-radius: 2px;
  background: var(--gold-grad);
}

/* ---- 栅格 ---- */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 > .card, .grid-3 > .card, .grid-4 > .card { margin-bottom: 0; }

/* ---- 数据卡 ---- */
.stat {
  background: linear-gradient(160deg, var(--panel), var(--card));
  border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 15px 12px; text-align: center; position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--gold-soft), transparent 65%);
  pointer-events: none;
}
.stat .v { font-size: 26px; font-weight: 800; color: var(--gold); margin: 4px 0; font-family: var(--font-serif); line-height: 1.2; }
.stat .k { font-size: 12px; color: var(--text-dim); }

/* ---- 表格 ---- */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  color: var(--text-dim); font-weight: 600; text-align: left;
  padding: 9px 10px; border-bottom: 1px solid var(--gold-line); white-space: nowrap;
  font-family: var(--font-serif); letter-spacing: .05em;
}
.data-table td { padding: 9px 10px; border-bottom: 1px solid var(--card-border); }
.data-table tr:hover { background: var(--primary-dim); }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--gold-grad); color: var(--btn-ink);
  border: 1px solid var(--gold-line); border-radius: var(--radius-sm);
  padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
  text-decoration: none; user-select: none;
  box-shadow: 0 2px 10px var(--gold-soft);
  transition: transform var(--ease-fast), box-shadow var(--ease-fast), filter var(--ease-fast);
  background-size: 180% 100%;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.09); box-shadow: 0 6px 18px var(--gold-soft); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-secondary {
  background: var(--panel); color: var(--text); border-color: var(--card-border); box-shadow: none;
  background-image: none;
}
.btn-secondary:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.btn-danger { background: var(--danger); color: #fff; background-image: none; border-color: transparent; }
.btn-ghost {
  background: transparent; color: var(--gold); border: 1px solid var(--gold-line);
  box-shadow: none; background-image: none;
}
.btn-ghost:hover { background: var(--gold-soft); }

/* ---- 表单 ---- */
.form-input, .form-group input, .form-group select {
  background: var(--panel-2); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 8px 11px; font-size: 13px; outline: none; transition: var(--ease-fast);
}
.form-input:focus, .form-group input:focus, .form-group select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
.form-group { margin-bottom: 12px; }
.form-group input, .form-group select { width: 100%; }
.form-label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 5px; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.tab {
  padding: 8px 18px; border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text-dim); cursor: pointer;
  font-size: 13px; border: 1px solid var(--card-border); transition: var(--ease-fast);
}
.tab:hover { color: var(--gold); border-color: var(--gold-line); }
.tab.active {
  background: var(--gold-grad); color: var(--btn-ink);
  font-weight: 700; border-color: var(--gold-line);
  box-shadow: 0 2px 12px var(--gold-soft);
}

/* ---- 号码球 ---- */
.ball {
  display: inline-flex; width: 34px; height: 34px; border-radius: 50%;
  align-items: center; justify-content: center; font-weight: 700;
  margin: 2px; font-size: 14px; color: #fff;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.28), 0 2px 6px rgba(0,0,0,.3);
}
.ball.red { background: linear-gradient(135deg, #e0574b, #a52a24); }
.ball.blue { background: linear-gradient(135deg, #4a90d9, #1f4e9c); }
.ball.green { background: linear-gradient(135deg, #3fa981, #12694c); }
.ball.dim { background: var(--card-border); color: var(--text-dim); }
.badge { padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.badge-hit { background: rgba(111, 214, 168, .16); color: var(--success); }
.badge-miss { background: rgba(240, 131, 122, .16); color: var(--danger); }
.empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 22px 0; }
.pos-badge {
  width: 26px; height: 26px; border-radius: 50%; background: var(--primary-dim);
  color: var(--gold); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; border: 1px solid var(--gold-line);
}
.res-tag {
  display: inline-flex; width: 30px; height: 30px; border-radius: 6px;
  align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff;
}
.res-3 { background: linear-gradient(135deg, #ff4d4d, #c81e1e); }
.res-1 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.res-0 { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.match-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--card-border); }
.match-row:last-child { border-bottom: none; }

/* ---- 自动开奖状态条 ---- */
.auto-bar {
  display: flex; align-items: center; gap: 7px;
  background: rgba(111, 214, 168, .09);
  border: 1px solid rgba(111, 214, 168, .35);
  border-radius: 999px; padding: 5px 13px; color: var(--success);
}
.auto-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 rgba(111, 214, 168, .6); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(111, 214, 168, .5); }
  70% { box-shadow: 0 0 0 7px rgba(111, 214, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 214, 168, 0); }
}

/* ---- 移动端菜单控件 ---- */
.nav-toggle {
  display: none; background: none; border: none; color: var(--gold);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 8px 2px 0;
}
.nav-mask { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 99; }

/* ============================ 8. 首页 · 国风入口门户 ============================ */
/* ---- 卷首语 ---- */
.portal-hero {
  position: relative; text-align: center; padding: 26px 20px 22px; margin-bottom: 22px;
  border: 1px solid var(--gold-line); border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, var(--gold-soft), transparent 70%),
    linear-gradient(160deg, var(--panel), var(--card));
  overflow: hidden;
}
.portal-hero::before, .portal-hero::after {
  content: ""; position: absolute; width: 90px; height: 90px;
  border: 1px solid var(--gold-line); opacity: .55;
}
.portal-hero::before { left: -45px; top: -45px; transform: rotate(45deg); }
.portal-hero::after { right: -45px; bottom: -45px; transform: rotate(45deg); }
.hero-cloud { position: absolute; width: 190px; color: var(--gold); opacity: .18; }
.hero-cloud.l { left: -22px; top: -30px; }
.hero-cloud.r { right: -22px; bottom: -34px; transform: rotate(180deg); }
.hero-eyebrow {
  font-family: var(--font-serif); font-size: 11px; letter-spacing: .42em;
  color: var(--gold); opacity: .85; margin-bottom: 10px;
}
.hero-title {
  font-family: var(--font-kai); font-size: clamp(24px, 3.4vw, 38px);
  letter-spacing: .18em; color: var(--gold-2); font-weight: 700;
  text-shadow: 0 2px 18px var(--gold-soft); line-height: 1.45;
}
.hero-title .dot { color: var(--cinnabar); margin: 0 14px; font-size: .6em; vertical-align: middle; }
.hero-desc { color: var(--text-dim); font-size: 13px; margin-top: 10px; letter-spacing: .06em; }
.hero-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-chip {
  font-size: 11.5px; color: var(--text-dim); padding: 4px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2);
  font-family: var(--font-serif); letter-spacing: .08em;
}
.hero-chip b { color: var(--gold); font-weight: 600; }

/* ---- 区块标题 ---- */
.sec-head {
  display: flex; align-items: center; gap: 14px; margin: 26px 0 15px;
}
.sec-head .sh-mark {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px;
  color: var(--gold); border: 1px solid var(--gold-line);
  background: var(--gold-soft); box-shadow: 0 0 0 4px var(--line-soft);
}
.sec-head .sh-txt { min-width: 0; }
.sec-head h2 {
  font-family: var(--font-serif); font-size: 18px; letter-spacing: .1em;
  color: var(--text); font-weight: 700; line-height: 1.3;
}
.sec-head .sh-sub { font-size: 11.5px; color: var(--text-dim); letter-spacing: .05em; margin-top: 1px; }
.sec-head .sh-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-line), transparent); }
.sec-head .sh-extra { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.sec-head .sh-extra a { color: var(--gold); }
.sec-head .sh-extra a:hover { text-decoration: underline; }

/* ---- 常用入口（六宫格） ---- */
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.quick-card {
  position: relative; display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 16px; min-height: 108px;
  background: linear-gradient(150deg, var(--card), var(--panel));
  border: 1px solid var(--card-border); border-radius: var(--radius);
  text-decoration: none; color: var(--text); overflow: hidden;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.quick-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 100% 0%, var(--gold-soft), transparent 58%);
  opacity: 0; transition: opacity var(--ease);
}
.quick-card::after {
  content: ""; position: absolute; right: -28px; bottom: -28px;
  width: 76px; height: 76px; border: 1px solid var(--line);
  transform: rotate(45deg); transition: var(--ease);
}
.quick-card:hover {
  transform: translateY(-3px); border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35), 0 0 20px var(--gold-soft);
  color: var(--text); text-decoration: none;
}
.quick-card:hover::before { opacity: 1; }
.quick-card:hover::after { border-color: var(--gold-line); transform: rotate(45deg) scale(1.15); }
.quick-card .qc-ico {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center; font-size: 21px;
  color: var(--gold); background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  box-shadow: inset 0 0 12px var(--line-soft);
}
.quick-card .qc-body { min-width: 0; flex: 1; }
.quick-card .qc-t {
  font-family: var(--font-serif); font-size: 15.5px; font-weight: 700;
  letter-spacing: .05em; color: var(--gold-2); display: flex; align-items: center; gap: 8px;
}
.quick-card .qc-t .qc-arrow {
  font-size: 12px; color: var(--gold); opacity: 0; transform: translateX(-5px);
  transition: var(--ease-fast);
}
.quick-card:hover .qc-arrow { opacity: 1; transform: translateX(0); }
.quick-card .qc-d { font-size: 12px; color: var(--text-dim); margin-top: 5px; line-height: 1.65; }
.quick-card .qc-tag {
  display: inline-block; margin-top: 8px; font-size: 10px; padding: 1px 8px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--text-dim);
  letter-spacing: .08em;
}

/* ---- 最新开奖四宫格 ---- */
.draw-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.draw-card {
  position: relative; padding: 15px 15px 16px; min-height: 132px;
  background: linear-gradient(160deg, var(--card), var(--panel-2));
  border: 1px solid var(--card-border); border-radius: var(--radius);
  cursor: pointer; overflow: hidden;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.draw-card:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: var(--shadow-lift); }
.draw-card .dc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.draw-card .dc-name { font-family: var(--font-serif); font-size: 13px; color: var(--text-dim); letter-spacing: .08em; }
.draw-card .dc-seal {
  font-size: 10px; color: var(--gold); border: 1px solid var(--gold-line);
  border-radius: 3px; padding: 1px 5px; background: var(--gold-soft);
}
.draw-card .dc-body { margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--primary); min-height: 30px; }
.draw-card .dc-body .ball { width: 29px; height: 29px; font-size: 13px; margin: 1px; }
.draw-card .dc-body .res-tag { width: 25px; height: 25px; font-size: 12px; }
.draw-card .dc-hint {
  position: absolute; right: 12px; bottom: 10px; font-size: 10.5px;
  color: var(--text-dim); opacity: 0; transform: translateX(-4px); transition: var(--ease-fast);
}
.draw-card:hover .dc-hint { opacity: 1; transform: translateX(0); }
.dc-loading {
  display: inline-block; width: 74px; height: 12px; border-radius: 4px;
  background: linear-gradient(90deg, var(--skeleton) 25%, var(--gold-soft) 50%, var(--skeleton) 75%);
  background-size: 200% 100%; animation: shimmer 1.6s linear infinite;
}

/* ---- 全部功能矩阵 ---- */
.matrix-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.matrix-col {
  background: var(--panel-2); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 14px 12px 12px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.matrix-col:hover { border-color: var(--gold-line); box-shadow: var(--shadow); }
.matrix-col .mc-head {
  display: flex; align-items: center; gap: 8px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.matrix-col .mc-head .mc-ico { font-size: 14px; color: var(--gold); }
.matrix-col .mc-head h3 {
  font-family: var(--font-serif); font-size: 13.5px; letter-spacing: .08em;
  color: var(--gold-2); font-weight: 700;
}
.matrix-col .mc-head .mc-n {
  margin-left: auto; font-size: 10px; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 6px;
}
.matrix-link {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px;
  border-radius: var(--radius-sm); font-size: 12.5px; color: var(--text-dim);
  transition: var(--ease-fast); text-decoration: none;
}
.matrix-link:hover { background: var(--primary-dim); color: var(--gold); transform: translateX(2px); }
.matrix-link .ml-dot {
  width: 4px; height: 4px; flex: 0 0 4px; border-radius: 50%;
  background: var(--gold-3); transition: var(--ease-fast);
}
.matrix-link:hover .ml-dot { background: var(--gold); box-shadow: 0 0 7px var(--gold); }
.matrix-link .ml-go { margin-left: auto; font-size: 10px; opacity: 0; }
.matrix-link:hover .ml-go { opacity: .8; }

/* ---- 喜报跑马灯 ---- */
.win-marquee {
  position: relative; margin-bottom: 16px; border-radius: var(--radius);
  overflow: hidden; display: none; align-items: center; height: 46px;
  background: linear-gradient(90deg, #3a1208, #5c1d0d 55%, #3a1208);
  border: 1px solid #b8762f; box-shadow: 0 4px 18px rgba(217, 119, 6, .22);
}
.win-marquee .wm-ico {
  flex: 0 0 auto; padding: 0 12px; font-weight: 800; color: #ffd27a; font-size: 14px;
  background: linear-gradient(135deg, #d97706, #92400e);
  align-self: stretch; display: flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--font-serif); letter-spacing: .06em;
}
.win-marquee .wm-track { flex: 1 1 auto; overflow: hidden; position: relative; white-space: nowrap; }
.win-marquee .wm-inner { display: inline-flex; white-space: nowrap; animation: wmscroll 90s linear infinite; will-change: transform; }
.win-marquee:hover .wm-inner { animation-play-state: paused; }
.win-marquee a.wm-item {
  display: inline-flex; align-items: center; margin-right: 52px;
  color: #ffe6b8; font-size: 13.5px; text-decoration: none; white-space: nowrap;
}
.win-marquee a.wm-item b { color: #ffce54; font-size: 16px; margin: 0 3px; }
.win-marquee a.wm-item .wm-loc { color: #ffd27a; font-weight: 700; }
@keyframes wmscroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- 喜报专区 ---- */
.win-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.win-tab {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--card-border);
  background: var(--panel); color: var(--text-dim); font-size: 13px;
  cursor: pointer; transition: var(--ease-fast);
}
.win-tab.on { background: var(--primary-dim); border-color: var(--gold); color: var(--gold); font-weight: 700; }
.win-tab .n { opacity: .7; margin-left: 4px; font-size: 12px; }
.win-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.win-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: var(--ease);
}
.win-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.win-card .wc-img { width: 100%; height: 172px; object-fit: cover; background: var(--panel-2); cursor: zoom-in; display: block; }
.win-card .wc-body { padding: 12px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.win-amt { font-size: 22px; font-weight: 800; color: var(--gold); line-height: 1.05; font-family: var(--font-serif); }
.win-amt small { font-size: 12px; color: var(--text-dim); font-weight: 500; margin-left: 2px; font-family: var(--font-sans); }
.win-t { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.4; }
.win-meta { font-size: 12px; color: var(--text-dim); line-height: 1.7; }
.win-meta b { color: var(--text); }
.win-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.win-tg { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--primary-dim); color: var(--gold); }
.win-tg.lt { background: var(--cinnabar-soft); color: var(--danger); }
.win-src {
  margin-top: auto; font-size: 11px; color: var(--text-dim);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding-top: 6px; border-top: 1px dashed var(--card-border);
}
.win-src a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.win-empty { grid-column: 1 / -1; text-align: center; color: var(--text-dim); padding: 34px 12px; font-size: 13px; line-height: 1.9; }
.win-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.win-head-side { display: flex; align-items: center; gap: 12px; }
.win-refresh {
  font-size: 12px; padding: 5px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--gold-line); background: transparent;
  color: var(--gold); cursor: pointer; transition: var(--ease-fast);
}
.win-refresh:hover { background: var(--gold-soft); }
.win-refresh:disabled { opacity: .5; cursor: default; }

/* ---- 理性提示 ---- */
.rationale {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; margin-top: 22px;
  border: 1px solid var(--gold-line); border-radius: var(--radius);
  background: linear-gradient(100deg, var(--gold-soft), transparent 70%);
  color: var(--text-dim); font-size: 12px; line-height: 1.8;
}
.rationale .rt-ico { font-size: 17px; color: var(--gold); flex: 0 0 auto; }
.rationale b { color: var(--gold); font-family: var(--font-serif); letter-spacing: .08em; }

/* ============================ 9. 命令面板（快速入口） ============================ */
.cmd-overlay {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(4, 6, 11, .7); backdrop-filter: blur(6px);
  align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
}
.cmd-overlay.open { display: flex; animation: fadeIn 180ms ease both; }
.cmd-panel {
  width: min(100%, 620px); max-height: 72vh; display: flex; flex-direction: column;
  background: linear-gradient(160deg, var(--panel), var(--card));
  border: 1px solid var(--gold); border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 0 40px var(--gold-soft);
  overflow: hidden; animation: cmdIn 260ms cubic-bezier(.2, .8, .2, 1) both;
}
.cmd-input-wrap {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  border-bottom: 1px solid var(--gold-line);
  background: linear-gradient(90deg, var(--gold-soft), transparent);
}
.cmd-input-wrap .ci-ico { color: var(--gold); font-size: 17px; }
.cmd-input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: var(--text); font-size: 15px; font-family: var(--font-sans);
}
.cmd-input::placeholder { color: var(--text-dim); }
.cmd-input-wrap kbd {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-dim);
  border: 1px solid var(--card-border); border-radius: 4px; padding: 2px 7px;
}
.cmd-list { flex: 1; overflow-y: auto; padding: 8px; }
.cmd-group-label {
  font-family: var(--font-serif); font-size: 11px; letter-spacing: .18em;
  color: var(--gold); padding: 10px 12px 5px;
}
.cmd-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text-dim);
  border: 1px solid transparent;
}
.cmd-item .cm-ico {
  width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center;
  background: var(--gold-soft); border: 1px solid var(--line); font-size: 13px; color: var(--gold);
}
.cmd-item .cm-name { flex: 1; font-size: 13.5px; color: var(--text); }
.cmd-item .cm-path { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.cmd-item.sel, .cmd-item:hover {
  background: var(--primary-dim); border-color: var(--gold-line); color: var(--gold);
}
.cmd-item.sel .cm-name, .cmd-item:hover .cm-name { color: var(--gold-2); }
.cmd-empty { text-align: center; color: var(--text-dim); padding: 30px 12px; font-size: 13px; }
.cmd-foot {
  display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--text-dim);
}
.cmd-foot kbd {
  font-family: var(--font-mono); border: 1px solid var(--card-border);
  border-radius: 3px; padding: 1px 5px; margin-right: 4px;
}

/* ============================ 10. 入场动效 ============================ */
@keyframes titleIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes sealIn {
  from { opacity: 0; transform: rotate(-24deg) scale(.6); }
  to { opacity: 1; transform: rotate(-6deg) scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmdIn {
  from { opacity: 0; transform: translateY(-14px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes shimmer {
  from { background-position: 200% 0; } to { background-position: -200% 0; }
}
@keyframes foilTwinkle {
  0%, 100% { opacity: .88; filter: brightness(1); }
  45% { opacity: 1; filter: brightness(1.28); }
  55% { opacity: .95; filter: brightness(1.12); }
}
/* 真实字形：高光带在字内往复扫过 + 整字呼吸闪烁（不覆盖 drop-shadow） */
@keyframes foilSweep {
  0%, 12% { background-position: 220% 0, 0 0; }
  58%, 100% { background-position: -120% 0, 0 0; }
}
@keyframes foilBreathe {
  0%, 100% { opacity: .9; }
  45% { opacity: 1; }
  60% { opacity: .94; }
}
@keyframes sweepMove {
  0% { transform: translateX(-320px); }
  55%, 100% { transform: translateX(760px); }
}
@keyframes slowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
/* 篆体流光：整字轻微呼吸闪烁 + 光带扫过 */
.seal-script-title .foil-shine { animation: foilTwinkle 5.5s ease-in-out infinite; }
.seal-script-title .sweep-rect { animation: sweepMove 5.5s cubic-bezier(.4, 0, .25, 1) infinite; }
.hdr-cloud.c1 { animation: slowFloat 9s ease-in-out infinite; }
.hdr-cloud.c2 { animation: slowFloat 11s ease-in-out infinite reverse; }
.portal-hero .hero-title { animation: fadeUp 700ms ease both .2s; }
.quick-card, .draw-card, .matrix-col { animation: fadeUp 500ms ease both; }
.quick-card:nth-child(2), .draw-card:nth-child(2), .matrix-col:nth-child(2) { animation-delay: 60ms; }
.quick-card:nth-child(3), .draw-card:nth-child(3), .matrix-col:nth-child(3) { animation-delay: 120ms; }
.quick-card:nth-child(4), .draw-card:nth-child(4), .matrix-col:nth-child(4) { animation-delay: 180ms; }
.quick-card:nth-child(5), .matrix-col:nth-child(5) { animation-delay: 240ms; }
.quick-card:nth-child(6) { animation-delay: 300ms; }

/* ============================ 11. 响应式 ============================ */
@media (max-width: 1280px) {
  .matrix-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hdr-inner { padding: 18px 22px 16px; gap: 18px; }
  .seal-script-title { width: min(100%, 480px); }
}
@media (max-width: 1080px) {
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .draw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hdr-tools .theme-name { display: none; }
}
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .win-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hdr-inner { flex-wrap: wrap; justify-content: center; padding: 16px 16px 14px; }
  .hdr-seal { width: 48px; height: 48px; font-size: 15px; }
  .hdr-title-wrap { order: 3; flex: 1 0 100%; }
  .hdr-tools { order: 2; flex-direction: row; align-items: center; }
  .font-switch { flex-direction: row; align-items: center; }
  .seal-script-title { width: min(100%, 420px); }
  .nav-toggle { display: inline-flex; }
  .topbar { padding: 10px 14px; gap: 6px 10px; flex-wrap: wrap; }
  .topbar h1 { flex: 1; min-width: 0; width: auto; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { width: 100%; justify-content: flex-start !important; gap: 8px !important; }
  #autoLatest { width: 100%; text-align: left !important; }
  .content { padding: 16px 14px 44px; }
  /* 侧边栏改抽屉 */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100vh;
    width: 258px; flex-basis: auto;
    transform: translateX(-100%); transition: transform .28s ease;
    box-shadow: none;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 3px 0 26px rgba(0, 0, 0, .6); }
  .nav-mask.show { display: block; }
  .card { padding: 14px 13px; }
  .card-title { font-size: 14px; flex-wrap: wrap; }
  .stat .v { font-size: 21px; }
  .ball { width: 30px; height: 30px; font-size: 13px; margin: 1.5px; }
  .pos-badge { width: 23px; height: 23px; font-size: 12px; }
  .res-tag { width: 27px; height: 27px; font-size: 13px; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  canvas, img { max-width: 100%; }
  #dadi > div > span { width: 34px !important; font-size: 11px !important; }
  .form-input, .btn { max-width: 100%; }
  .ornaments .orn-dragon { opacity: calc(var(--orn-op) * .6); }
}
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .main { max-width: 100vw; overflow-x: hidden; }
  .content { max-width: 100%; overflow-x: hidden; word-break: break-word; overflow-wrap: anywhere; }
  .content * { min-width: 0; }
  .content .flex, .content .tabs, .content .sl-tabs, .content .sl-filters, .content .sl-drawbar,
  .content [style*="display:flex"], .content [style*="display: flex"] { flex-wrap: wrap !important; }
  .content select.form-input { width: 100%; min-width: 0 !important; max-width: 100%; }
  .resp-grid { grid-template-columns: 1fr !important; }
  .quick-grid, .draw-grid, .matrix-grid, .win-grid { grid-template-columns: 1fr; }
  .quick-card { min-height: 92px; }
  .draw-card { min-height: 112px; }
  .hdr-seal { display: none; }
  .hdr-inner { gap: 8px; padding: 12px 10px; }
  .hdr-tools { flex-wrap: wrap; justify-content: center; width: 100%; gap: 8px 14px; }
  .font-switch-label { display: none; }
  .seal-script-title { width: 100%; max-width: 330px; }
  .jbp-cell { width: clamp(72px, 22vw, 92px); height: clamp(84px, 25vw, 106px); border-radius: 4px; }
  .jbp-glyph { font-size: clamp(50px, 15.5vw, 68px); }
  .jbp-wordmark { gap: 7px; }
  .portal-hero { padding: 22px 14px 18px; }
  .hero-title { letter-spacing: .1em; }
  .hdr-sub { font-size: 10.5px; letter-spacing: .12em; }
  .hdr-sub .dash { width: 20px; }
  .hdr-motto { font-size: 9.5px; }
  .sec-head h2 { font-size: 16px; }
  .cmd-overlay { padding-top: 8vh; }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .ball { width: 28px; height: 28px; font-size: 12px; }
  .tab { padding: 7px 12px; font-size: 12px; }
  .tabs { gap: 5px; }
  .data-table { font-size: 12px; }
  .card-title { display: block; white-space: normal; }
  .content { word-break: break-word; overflow-wrap: anywhere; }
  .form-input { width: 100%; min-width: 0; }
  .card, .grid-2, .grid-3, .grid-4 { min-width: 0; }
  #dadi > div > span { width: 31px !important; font-size: 10.5px !important; padding: 2px 0 !important; }
  .theme-dots { gap: 5px; }
  .theme-dot { width: 21px; height: 21px; }
  .font-swatches { gap: 4px; }
  .font-swatch { width: 24px; height: 24px; font-size: 15px; }
  .hdr-search kbd { display: none; }
}

/* ============================ 12. 可访问性 ============================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  #goldParticles { display: none; }
}
@media (prefers-contrast: more) {
  :root { --text-dim: #cbd3e0; --line: rgba(227, 189, 107, .4); }
}

/* ============================ 13. 会员授权 · 锁遮罩与激活弹窗 ============================ */
.sb-license {
  margin: 10px 12px 0; padding: 9px 12px; border-radius: 9px;
  border: 1px solid var(--gold-line); background: var(--gold-soft);
  color: var(--gold); font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 8px; width: calc(100% - 24px);
}
.sb-license:hover { filter: brightness(1.08); }
.sb-license .lic-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.sb-license.on .lic-dot { background: var(--success); }
.sb-license .lic-txt { flex: 1; text-align: left; }

/* 卡片加锁：容器相对定位，遮罩绝对覆盖（不隐藏卡片，仅盖住内容引导升级） */
.lock-wrap { position: relative; }
.lock-mask {
  position: relative; width: 100%; min-height: 104px; border-radius: inherit;
  background: rgba(9, 12, 18, .82); backdrop-filter: blur(2px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 12px 16px; text-align: center; box-sizing: border-box;
}
.lock-mask.cover {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 5; min-height: 104px;
}
.lock-mask .lock-ico {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--gold-line); background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--gold);
}
.lock-mask .lock-title { font-size: 14px; font-weight: 800; color: var(--gold); }
.lock-mask .lock-desc { font-size: 11.5px; color: var(--text-dim); line-height: 1.6; max-width: 280px; }

/* 激活弹窗 */
.lic-overlay {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(5, 7, 11, .78); align-items: center; justify-content: center; padding: 18px;
}
.lic-overlay.show { display: flex; }
.lic-modal {
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--gold-line); border-radius: 14px;
  padding: 22px; box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}
.lic-modal h2 {
  margin: 0 0 4px; font-size: 19px; color: var(--gold);
  font-family: var(--font-serif); letter-spacing: .06em;
}
.lic-modal .lic-sub { font-size: 12px; color: var(--text-dim); margin-bottom: 16px; line-height: 1.6; }
.lic-status {
  border: 1px solid var(--card-border); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 14px; font-size: 13px; line-height: 1.8; background: var(--bg2);
}
.lic-status b { color: var(--gold); }
.lic-input-row { display: flex; gap: 8px; margin-bottom: 16px; }
.lic-input-row input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--card-border); background: var(--bg);
  color: var(--text); font-size: 13.5px; letter-spacing: .04em;
}
.lic-input-row input:focus { outline: none; border-color: var(--gold); }
.lic-msg { font-size: 12.5px; min-height: 18px; margin-bottom: 12px; }
.lic-msg.err { color: var(--danger); }
.lic-msg.ok { color: var(--success); }
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.plan-cell {
  border: 1px solid var(--card-border); border-radius: 10px; padding: 12px;
  background: var(--bg2); font-size: 12.5px; line-height: 1.7;
}
.plan-cell .pc-name { font-weight: 800; color: var(--gold); font-size: 13.5px; }
.plan-cell .pc-price { font-size: 16px; font-weight: 800; color: var(--text); margin: 2px 0; }
.plan-cell .pc-inc { color: var(--text-dim); font-size: 11.5px; }
.lic-foot-note { font-size: 11px; color: var(--text-dim); margin-top: 14px; line-height: 1.7; }
.lic-close { float: right; background: none; border: none; color: var(--text-dim); font-size: 20px; cursor: pointer; }

@media (max-width: 640px) {
  .plan-grid { grid-template-columns: 1fr; }
  .lic-modal { padding: 16px; }
  .lic-input-row { flex-direction: column; }
}

/* ============ 半自动收款 / 订单（用户侧） ============ */
.pc-buy { width: 100%; margin-top: 10px; padding: 6px 10px; font-size: 12px; }
.pay-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.pay-tab { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--card-border);
  background: var(--bg2); color: var(--text-dim); font-size: 12.5px; cursor: pointer; }
.pay-tab.on { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.pay-amount { font-size: 24px; font-weight: 800; color: var(--gold); text-align: center; margin: 4px 0 2px; }
.pay-amount-sub { text-align: center; font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }
.pay-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.pay-ch { border: 1px solid var(--card-border); border-radius: 10px; padding: 12px; text-align: center;
  background: var(--bg2); color: var(--text-dim); cursor: pointer; font-size: 13px; font-weight: 700; }
.pay-ch.on { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.pay-ch.disabled { opacity: .4; cursor: not-allowed; }
.pay-qr-wrap { width: 220px; max-width: 100%; margin: 6px auto 12px; background: #fff;
  padding: 12px; border-radius: 12px; box-sizing: border-box; }
.pay-qr-wrap img { width: 100%; display: block; }
.pay-orderno { display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12.5px; color: var(--text-dim); margin-bottom: 10px; flex-wrap: wrap; }
.pay-orderno code { color: var(--gold); font-size: 13px; letter-spacing: .03em; }
.pay-copy { padding: 3px 10px; font-size: 11px; }
.pay-field { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--card-border);
  background: var(--bg); color: var(--text); font-size: 13px; margin-bottom: 10px; box-sizing: border-box; }
.pay-field:focus { outline: none; border-color: var(--gold); }
.pay-upload { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pay-upload .pu-preview { width: 64px; height: 64px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--card-border); }
.pay-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.badge-pending { background: rgba(233, 180, 91, .15); color: var(--warn); }
.badge-submitted { background: rgba(111, 214, 168, .15); color: var(--success); }
.badge-approved { background: var(--gold-soft); color: var(--gold); }
.badge-rejected { background: rgba(240, 131, 122, .15); color: var(--danger); }
.badge-canceled { background: rgba(155, 166, 185, .15); color: var(--text-dim); }
.badge-refunded { background: rgba(240, 131, 122, .18); color: var(--danger); }
.pay-result { text-align: center; padding: 18px 8px; }
.pay-result .pr-ico { font-size: 40px; }
.pay-result h3 { color: var(--gold); margin: 10px 0 6px; }
.pay-result p { color: var(--text-dim); font-size: 12.5px; line-height: 1.7; }
.pay-order-list { display: flex; flex-direction: column; gap: 10px; }
.pay-order-item { border: 1px solid var(--card-border); border-radius: 10px; padding: 12px;
  background: var(--bg2); cursor: pointer; }
.poi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-bottom: 6px; flex-wrap: wrap; }
.poi-meta { font-size: 12px; color: var(--text-dim); line-height: 1.7; }
.pay-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pay-actions .btn { flex: 1; }
.pay-note-line { font-size: 11.5px; color: var(--text-dim); background: var(--bg2);
  border: 1px solid var(--card-border); border-radius: 8px; padding: 8px 10px;
  margin-bottom: 12px; line-height: 1.6; }

/* ============ 收款审核管理页（管理员） ============ */
.pa-wrap { max-width: 1180px; margin: 0 auto; padding: 18px; box-sizing: border-box; }
.pa-stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.pa-stat { border: 1px solid var(--card-border); border-radius: 12px; padding: 14px; background: var(--card); }
.pa-stat .ps-num { font-size: 22px; font-weight: 800; color: var(--gold); }
.pa-stat .ps-label { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.pa-card { border: 1px solid var(--gold-line); border-radius: 14px; padding: 18px;
  background: var(--card); margin-bottom: 16px; }
.pa-card h2 { font-size: 16px; color: var(--gold); margin: 0 0 14px; font-family: var(--font-serif); }
.pa-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pa-order { border: 1px solid var(--card-border); border-radius: 12px; padding: 14px;
  margin-bottom: 12px; background: var(--bg2); }
.pao-head { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 8px; }
.pao-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; font-size: 12.5px;
  color: var(--text-dim); line-height: 1.7; }
.pao-grid b { color: var(--text); font-weight: 700; }
.pao-proof { width: 120px; border-radius: 8px; border: 1px solid var(--card-border);
  margin-top: 8px; cursor: pointer; }
.pao-refund { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px;
  line-height: 1.8; color: var(--danger); border: 1px solid rgba(240, 131, 122, .4);
  background: rgba(240, 131, 122, .1); }
.pao-refund b { font-weight: 800; }
.pao-refund.is-partial { color: var(--warn); border-color: rgba(233, 180, 91, .45);
  background: rgba(233, 180, 91, .1); }
.pa-qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pa-qr-box { border: 1px solid var(--card-border); border-radius: 12px; padding: 14px; background: var(--bg2); }
.pa-qr-box .pqb-img { width: 140px; height: 140px; object-fit: cover; background: #fff;
  border-radius: 10px; padding: 6px; box-sizing: border-box; }
.pa-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.pa-row label { font-size: 12.5px; color: var(--text-dim); min-width: 64px; }
.pa-row input, .pa-row select { flex: 1; min-width: 120px; }
@media (max-width: 640px) {
  .pa-stat-grid { grid-template-columns: 1fr 1fr; }
  .pa-qr-grid, .pao-grid, .pay-channels { grid-template-columns: 1fr; }
  .pa-wrap { padding: 12px; }
}

/* ==================== 模块权限：普通用户仅 core/lottery/bet 分组 ==================== */
/* body 默认无 jbp-admin 类，管理员登录后由 updateAdminFlag 注入；本地单机模式初始化即注入 */
body:not(.jbp-admin) .nav-group[data-group="strategy"],
body:not(.jbp-admin) .nav-group[data-group="data"] { display: none; }
/* 通用管理员专属元素（写库按钮等），静态与动态生成均生效，默认隐藏防闪烁 */
body:not(.jbp-admin) .admin-only { display: none !important; }

/* 收款审核侧边栏待审核角标 */
.pay-nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; margin-right: 6px;
  border-radius: 999px; background: #d9480f; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}
