/* ============================================================
   吉安律师工作台 · 样式 v5「法典质感 · 多主题」
   基座：Pico CSS v2（本地 vendor/pico.min.css，仅用于表单/排版控件）
   架构：全部颜色走设计令牌（token），主题只换令牌不改组件
   主题：墨蓝鎏金(默认) / 夜阑(深色) / 宣纸 / 竹青 / 朱砂 / 素白
   切换：assets/theme.js 写 html[data-skin] + html[data-theme]（Pico 兼容）
   约束：无外部字体、无 CDN，file:// 双击与静态托管均可用
   ============================================================ */

/* ================= 字体（各主题共用） ================= */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
  /* 标题用衬线（宋体系），只在 ≥16px 的标题上使用，避免小字号点阵发虚 */
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong",
    "STZhongsong", "华文中宋", "SimSun", "宋体", Georgia, "Times New Roman", serif;

  --radius: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --side-w: 252px;
}

/* ================= 主题一：墨蓝鎏金（默认） ================= */
:root,
html[data-skin="ink"] {
  color-scheme: light;

  /* 表面 */
  --bg: #f6f5f1;
  --card: #ffffff;
  --surface-2: #faf9f5;
  --surface-3: #f4f2ec;
  --input-bg: #ffffff;
  --topbar-bg: rgba(255, 255, 255, .88);
  --line: #e6e3dc;
  --line-soft: #efede7;

  /* 文字 */
  --ink: #151a22;
  --ink-2: #39424f;
  --ink-soft: #5f6878;
  --ink-faint: #8b93a1;

  /* 品牌：操作色（文字/链接） + 实心色（按钮填充） */
  --accent: #1f4fd8;
  --accent-soft: #eef3ff;
  --accent-ink: #173a9c;
  --accent-solid: #1f4fd8;
  --accent-solid-2: #2b5ce2;
  --accent-solid-ink: #1b43b8;
  --on-accent: #ffffff;

  /* 鎏金点缀 */
  --gold: #c8a45a;
  --gold-deep: #96752f;
  --gold-soft: #fbf5e7;
  --gold-line: #eadcb8;

  /* 侧栏 */
  --side-bg: #0e131a;
  --side-bg2: #18202b;
  --side-line: rgba(255, 255, 255, .07);
  --side-txt: #a7b0bd;
  --side-txt-on: #ffffff;
  --side-sub: #69737f;
  --side-sub-on: #cdb98c;
  --side-hover: rgba(255, 255, 255, .055);
  --side-ic: rgba(255, 255, 255, .045);
  --side-ic-hover: rgba(255, 255, 255, .09);
  --side-active: rgba(200, 164, 90, .16);
  --side-ic-on: rgba(200, 164, 90, .22);
  --side-bar: #c8a45a;
  --side-glow: rgba(200, 164, 90, .11);

  /* 语义色 */
  --ok: #0f7b55;      --ok-soft: #effaf3;
  --warn: #b45309;    --warn-soft: #fdf3dc;
  --danger: #c62828;  --danger-soft: #fdecec;

  /* 实心反白（胶囊选中态等） */
  --solid-bg: #151a22;
  --solid-fg: #ffffff;

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(21, 26, 34, .04);
  --shadow-sm: 0 1px 2px rgba(21, 26, 34, .05), 0 8px 20px -14px rgba(21, 26, 34, .16);
  --shadow-md: 0 2px 4px rgba(21, 26, 34, .05), 0 16px 34px -16px rgba(21, 26, 34, .22);
  --shadow-lg: 0 26px 64px -22px rgba(21, 26, 34, .38);

  /* 机构配色（通讯录分类） */
  --c-court: #1f4fd8;  --c-judge: #4f46e5;  --c-detention: #c26a09;
  --c-prison: #c62828; --c-lawyer: #0f7b55; --c-forensic: #0e7490;
  --c-notary: #6d28d9; --c-procuratorate: #b91c1c; --c-police: #1d4ed8;
  --c-arbitration: #0f766e;

  /* 独立页（collect / pack）页头 */
  --head-bg: #0e131a;
  --head-bg2: #18202b;
  --head-fg: #ffffff;
  --head-sub: #e3cf9f;

  /* Pico 主题定制 */
  --pico-font-family: var(--font-sans);
  --pico-border-radius: 10px;
  --pico-primary: var(--accent);
  --pico-primary-background: var(--accent-solid);
  --pico-primary-hover: var(--accent-solid-ink);
  --pico-primary-focus: rgba(31, 79, 216, .16);
  --pico-primary-inverse: var(--on-accent);
  --pico-border-color: var(--line);
  --pico-muted-border-color: #d9d5cc;
  --pico-background-color: var(--bg);
  --pico-card-background-color: var(--card);
  --pico-form-element-border-color: #d9d5cc;
  --pico-form-element-active-border-color: var(--accent);
  --pico-form-element-background-color: var(--input-bg);
  --pico-form-element-placeholder-color: #a7aeb9;
  --pico-typography-spacing-vertical: 1.05rem;
  --pico-spacing: .85rem;

  /* 兼容别名：collect.html / pack-template.html 沿用的旧变量 */
  --blue-900: var(--head-bg);
  --blue-800: var(--accent-ink);
  --blue-700: var(--accent-solid);
  --blue-100: var(--accent-soft);
  --gold-light: var(--head-sub);
}

/* ================= 主题二：夜阑（深色） ================= */
html[data-skin="dark"] {
  color-scheme: dark;

  --bg: #0f1216;
  --card: #171b21;
  --surface-2: #1b2027;
  --surface-3: #20262e;
  --input-bg: #1b2027;
  --topbar-bg: rgba(23, 27, 33, .86);
  --line: #2a313b;
  --line-soft: #232932;

  --ink: #e9ecf1;
  --ink-2: #c6ccd6;
  --ink-soft: #98a1ae;
  --ink-faint: #6f7886;

  --accent: #7aa2ff;
  --accent-soft: rgba(122, 162, 255, .14);
  --accent-ink: #a9c4ff;
  --accent-solid: #2f5fe8;
  --accent-solid-2: #3d6ff5;
  --accent-solid-ink: #244fc9;
  --on-accent: #ffffff;

  --gold: #d9b872;
  --gold-deep: #d2b06c;
  --gold-soft: rgba(217, 184, 114, .12);
  --gold-line: rgba(217, 184, 114, .28);

  --side-bg: #090c10;
  --side-bg2: #10151b;
  --side-line: rgba(255, 255, 255, .06);
  --side-txt: #97a0ad;
  --side-txt-on: #ffffff;
  --side-sub: #687280;
  --side-sub-on: #d6bf8c;
  --side-hover: rgba(255, 255, 255, .05);
  --side-ic: rgba(255, 255, 255, .04);
  --side-ic-hover: rgba(255, 255, 255, .08);
  --side-active: rgba(217, 184, 114, .14);
  --side-ic-on: rgba(217, 184, 114, .2);
  --side-bar: #d9b872;
  --side-glow: rgba(217, 184, 114, .09);

  --ok: #4ec08f;      --ok-soft: rgba(78, 192, 143, .14);
  --warn: #e0a04a;    --warn-soft: rgba(224, 160, 74, .14);
  --danger: #ef6b6b;  --danger-soft: rgba(239, 107, 107, .14);

  --solid-bg: #e9ecf1;
  --solid-fg: #0f1216;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 20px -14px rgba(0, 0, 0, .6);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .35), 0 16px 34px -16px rgba(0, 0, 0, .7);
  --shadow-lg: 0 26px 64px -22px rgba(0, 0, 0, .8);

  --c-court: #5b86f5;  --c-judge: #8b84f7;  --c-detention: #d98b2b;
  --c-prison: #e05555; --c-lawyer: #3fae7f; --c-forensic: #3aa6bd;
  --c-notary: #9b7bf0; --c-procuratorate: #d9534f; --c-police: #5b86f5;
  --c-arbitration: #3fa39a;

  --head-bg: #090c10;
  --head-bg2: #10151b;
  --head-fg: #ffffff;
  --head-sub: #d6bf8c;

  --pico-primary: var(--accent);
  --pico-primary-background: var(--accent-solid);
  --pico-primary-hover: var(--accent-solid-ink);
  --pico-primary-focus: rgba(122, 162, 255, .22);
  --pico-primary-inverse: var(--on-accent);
  --pico-border-color: var(--line);
  --pico-muted-border-color: #2f3641;
  --pico-background-color: var(--bg);
  --pico-card-background-color: var(--card);
  --pico-form-element-border-color: #333b46;
  --pico-form-element-active-border-color: var(--accent);
  --pico-form-element-background-color: var(--input-bg);
  --pico-form-element-placeholder-color: #6f7886;
  --pico-color: var(--ink);
  --pico-h1-color: var(--ink);
  --pico-h2-color: var(--ink);
  --pico-h3-color: var(--ink);
  --pico-muted-color: var(--ink-soft);
  --pico-card-sectioning-background-color: var(--surface-2);
}

/* ================= 主题三：宣纸（暖调护眼） ================= */
html[data-skin="paper"] {
  color-scheme: light;

  --bg: #f4eee1;
  --card: #fdfaf2;
  --surface-2: #f8f3e6;
  --surface-3: #f1ead9;
  --input-bg: #fffdf8;
  --topbar-bg: rgba(253, 250, 242, .9);
  --line: #e2d8c2;
  --line-soft: #ece4d2;

  --ink: #2b2418;
  --ink-2: #4a3f2e;
  --ink-soft: #7a6c55;
  --ink-faint: #a3967e;

  --accent: #8a5a2b;
  --accent-soft: #f6ecd9;
  --accent-ink: #6e4520;
  --accent-solid: #8a5a2b;
  --accent-solid-2: #9b6835;
  --accent-solid-ink: #6e4520;
  --on-accent: #ffffff;

  --gold: #b08a3e;
  --gold-deep: #866526;
  --gold-soft: #f7efd9;
  --gold-line: #e4d3a8;

  --side-bg: #241d14;
  --side-bg2: #33291c;
  --side-line: rgba(255, 244, 220, .08);
  --side-txt: #b7aa93;
  --side-txt-on: #fffaf0;
  --side-sub: #857862;
  --side-sub-on: #d9c391;
  --side-hover: rgba(255, 244, 220, .06);
  --side-ic: rgba(255, 244, 220, .05);
  --side-ic-hover: rgba(255, 244, 220, .1);
  --side-active: rgba(176, 138, 62, .2);
  --side-ic-on: rgba(176, 138, 62, .26);
  --side-bar: #c9a45a;
  --side-glow: rgba(176, 138, 62, .13);

  --ok: #3f7a4d;      --ok-soft: #eef5ea;
  --warn: #a9641a;    --warn-soft: #f9eed9;
  --danger: #b23b2f;  --danger-soft: #f9e7e2;

  --solid-bg: #2b2418;
  --solid-fg: #fffaf0;

  --shadow-xs: 0 1px 2px rgba(43, 36, 24, .05);
  --shadow-sm: 0 1px 2px rgba(43, 36, 24, .06), 0 8px 20px -14px rgba(43, 36, 24, .2);
  --shadow-md: 0 2px 4px rgba(43, 36, 24, .06), 0 16px 34px -16px rgba(43, 36, 24, .26);
  --shadow-lg: 0 26px 64px -22px rgba(43, 36, 24, .42);

  --c-court: #8a5a2b;  --c-judge: #7a5a8a;  --c-detention: #a9641a;
  --c-prison: #b23b2f; --c-lawyer: #3f7a4d; --c-forensic: #2f6f7a;
  --c-notary: #6f4fa0; --c-procuratorate: #a23a2f; --c-police: #8a5a2b;
  --c-arbitration: #3d6b62;

  --head-bg: #241d14;
  --head-bg2: #33291c;
  --head-fg: #fffaf0;
  --head-sub: #dcc795;

  --pico-primary: var(--accent);
  --pico-primary-background: var(--accent-solid);
  --pico-primary-hover: var(--accent-solid-ink);
  --pico-primary-focus: rgba(138, 90, 43, .18);
  --pico-primary-inverse: var(--on-accent);
  --pico-border-color: var(--line);
  --pico-muted-border-color: #d8ccb2;
  --pico-background-color: var(--bg);
  --pico-card-background-color: var(--card);
  --pico-form-element-border-color: #d8ccb2;
  --pico-form-element-active-border-color: var(--accent);
  --pico-form-element-background-color: var(--input-bg);
  --pico-form-element-placeholder-color: #a3967e;
}

/* ================= 主题四：竹青（清雅绿） ================= */
html[data-skin="bamboo"] {
  color-scheme: light;

  --bg: #f2f5f1;
  --card: #ffffff;
  --surface-2: #f7faf6;
  --surface-3: #eef3ec;
  --input-bg: #ffffff;
  --topbar-bg: rgba(255, 255, 255, .88);
  --line: #dfe6dc;
  --line-soft: #e9efe7;

  --ink: #14201b;
  --ink-2: #35443d;
  --ink-soft: #64756c;
  --ink-faint: #94a39a;

  --accent: #1f7a5c;
  --accent-soft: #e9f4ef;
  --accent-ink: #165c45;
  --accent-solid: #1f7a5c;
  --accent-solid-2: #278a69;
  --accent-solid-ink: #165c45;
  --on-accent: #ffffff;

  --gold: #c0a04e;
  --gold-deep: #8b7229;
  --gold-soft: #f9f4e4;
  --gold-line: #e7dcb6;

  --side-bg: #101a16;
  --side-bg2: #18261f;
  --side-line: rgba(255, 255, 255, .07);
  --side-txt: #a3b3aa;
  --side-txt-on: #ffffff;
  --side-sub: #66786e;
  --side-sub-on: #c7d3a8;
  --side-hover: rgba(255, 255, 255, .055);
  --side-ic: rgba(255, 255, 255, .045);
  --side-ic-hover: rgba(255, 255, 255, .09);
  --side-active: rgba(192, 160, 78, .16);
  --side-ic-on: rgba(192, 160, 78, .22);
  --side-bar: #c9a85a;
  --side-glow: rgba(120, 190, 150, .1);

  --ok: #17795a;      --ok-soft: #e8f5ef;
  --warn: #a8641b;    --warn-soft: #fbf1dc;
  --danger: #bd3a34;  --danger-soft: #fbeae8;

  --solid-bg: #14201b;
  --solid-fg: #ffffff;

  --shadow-xs: 0 1px 2px rgba(20, 32, 27, .04);
  --shadow-sm: 0 1px 2px rgba(20, 32, 27, .05), 0 8px 20px -14px rgba(20, 32, 27, .18);
  --shadow-md: 0 2px 4px rgba(20, 32, 27, .05), 0 16px 34px -16px rgba(20, 32, 27, .24);
  --shadow-lg: 0 26px 64px -22px rgba(20, 32, 27, .4);

  --c-court: #1f7a5c;  --c-judge: #4f6fa8;  --c-detention: #a8641b;
  --c-prison: #bd3a34; --c-lawyer: #17795a; --c-forensic: #1f6f80;
  --c-notary: #6a55a8; --c-procuratorate: #b0382f; --c-police: #2b6cb0;
  --c-arbitration: #2a6f66;

  --head-bg: #101a16;
  --head-bg2: #18261f;
  --head-fg: #ffffff;
  --head-sub: #d9cf9f;

  --pico-primary: var(--accent);
  --pico-primary-background: var(--accent-solid);
  --pico-primary-hover: var(--accent-solid-ink);
  --pico-primary-focus: rgba(31, 122, 92, .18);
  --pico-primary-inverse: var(--on-accent);
  --pico-border-color: var(--line);
  --pico-muted-border-color: #d3ddd2;
  --pico-background-color: var(--bg);
  --pico-card-background-color: var(--card);
  --pico-form-element-border-color: #d3ddd2;
  --pico-form-element-active-border-color: var(--accent);
  --pico-form-element-background-color: var(--input-bg);
  --pico-form-element-placeholder-color: #94a39a;
}

/* ================= 主题五：朱砂（印章红） ================= */
html[data-skin="cinnabar"] {
  color-scheme: light;

  --bg: #f7f3f1;
  --card: #ffffff;
  --surface-2: #fbf8f6;
  --surface-3: #f4eeeb;
  --input-bg: #ffffff;
  --topbar-bg: rgba(255, 255, 255, .88);
  --line: #e8dfdb;
  --line-soft: #f0e9e5;

  --ink: #221614;
  --ink-2: #453431;
  --ink-soft: #756561;
  --ink-faint: #a29692;

  --accent: #b3261e;
  --accent-soft: #fbeeed;
  --accent-ink: #8e1c16;
  --accent-solid: #b3261e;
  --accent-solid-2: #c5342b;
  --accent-solid-ink: #8e1c16;
  --on-accent: #ffffff;

  --gold: #c4a15a;
  --gold-deep: #8f6f2c;
  --gold-soft: #faf4e6;
  --gold-line: #e9dcb9;

  --side-bg: #1d1211;
  --side-bg2: #2a1a18;
  --side-line: rgba(255, 240, 235, .07);
  --side-txt: #b5a29f;
  --side-txt-on: #fff7f5;
  --side-sub: #806d6a;
  --side-sub-on: #dcc6a0;
  --side-hover: rgba(255, 240, 235, .055);
  --side-ic: rgba(255, 240, 235, .045);
  --side-ic-hover: rgba(255, 240, 235, .09);
  --side-active: rgba(196, 161, 90, .16);
  --side-ic-on: rgba(196, 161, 90, .22);
  --side-bar: #c9a45a;
  --side-glow: rgba(179, 38, 30, .16);

  --ok: #17795a;      --ok-soft: #eaf5f0;
  --warn: #a9641a;    --warn-soft: #fbf1dc;
  --danger: #b3261e;  --danger-soft: #fbeeed;

  --solid-bg: #221614;
  --solid-fg: #fff7f5;

  --shadow-xs: 0 1px 2px rgba(34, 22, 20, .04);
  --shadow-sm: 0 1px 2px rgba(34, 22, 20, .05), 0 8px 20px -14px rgba(34, 22, 20, .18);
  --shadow-md: 0 2px 4px rgba(34, 22, 20, .05), 0 16px 34px -16px rgba(34, 22, 20, .24);
  --shadow-lg: 0 26px 64px -22px rgba(34, 22, 20, .4);

  --c-court: #2b5fa8;  --c-judge: #5a4aa8;  --c-detention: #a9641a;
  --c-prison: #b3261e; --c-lawyer: #17795a; --c-forensic: #1f6f80;
  --c-notary: #6a4fa0; --c-procuratorate: #a02c25; --c-police: #2b5fa8;
  --c-arbitration: #2a6f66;

  --head-bg: #1d1211;
  --head-bg2: #2a1a18;
  --head-fg: #fff7f5;
  --head-sub: #e0cda3;

  --pico-primary: var(--accent);
  --pico-primary-background: var(--accent-solid);
  --pico-primary-hover: var(--accent-solid-ink);
  --pico-primary-focus: rgba(179, 38, 30, .18);
  --pico-primary-inverse: var(--on-accent);
  --pico-border-color: var(--line);
  --pico-muted-border-color: #ddd2cd;
  --pico-background-color: var(--bg);
  --pico-card-background-color: var(--card);
  --pico-form-element-border-color: #ddd2cd;
  --pico-form-element-active-border-color: var(--accent);
  --pico-form-element-background-color: var(--input-bg);
  --pico-form-element-placeholder-color: #a29692;
}

/* ================= 主题六：素白（极简黑白） ================= */
html[data-skin="mono"] {
  color-scheme: light;

  --bg: #fafafa;
  --card: #ffffff;
  --surface-2: #f6f6f6;
  --surface-3: #f0f0f0;
  --input-bg: #ffffff;
  --topbar-bg: rgba(255, 255, 255, .9);
  --line: #e3e3e3;
  --line-soft: #ededed;

  --ink: #111111;
  --ink-2: #333333;
  --ink-soft: #6b6b6b;
  --ink-faint: #9b9b9b;

  --accent: #111111;
  --accent-soft: #f0f0f0;
  --accent-ink: #000000;
  --accent-solid: #1a1a1a;
  --accent-solid-2: #2b2b2b;
  --accent-solid-ink: #000000;
  --on-accent: #ffffff;

  --gold: #8a8a8a;
  --gold-deep: #5f5f5f;
  --gold-soft: #f4f4f4;
  --gold-line: #dedede;

  --side-bg: #141414;
  --side-bg2: #1c1c1c;
  --side-line: rgba(255, 255, 255, .08);
  --side-txt: #a8a8a8;
  --side-txt-on: #ffffff;
  --side-sub: #6e6e6e;
  --side-sub-on: #bdbdbd;
  --side-hover: rgba(255, 255, 255, .06);
  --side-ic: rgba(255, 255, 255, .05);
  --side-ic-hover: rgba(255, 255, 255, .1);
  --side-active: rgba(255, 255, 255, .1);
  --side-ic-on: rgba(255, 255, 255, .16);
  --side-bar: #ffffff;
  --side-glow: rgba(255, 255, 255, .05);

  --ok: #1f6f4a;      --ok-soft: #eef4f1;
  --warn: #8a5a12;    --warn-soft: #f7f1e6;
  --danger: #a82a2a;  --danger-soft: #f8ebeb;

  --solid-bg: #111111;
  --solid-fg: #ffffff;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 20px -14px rgba(0, 0, 0, .16);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .05), 0 16px 34px -16px rgba(0, 0, 0, .22);
  --shadow-lg: 0 26px 64px -22px rgba(0, 0, 0, .36);

  --c-court: #2b2b2b;  --c-judge: #444444;  --c-detention: #5a5a5a;
  --c-prison: #7a2a2a; --c-lawyer: #2b5a44; --c-forensic: #2b5a66;
  --c-notary: #4a3a6a; --c-procuratorate: #7a2a2a; --c-police: #2b2b2b;
  --c-arbitration: #2b5a56;

  --head-bg: #141414;
  --head-bg2: #1c1c1c;
  --head-fg: #ffffff;
  --head-sub: #c8c8c8;

  --pico-primary: var(--accent);
  --pico-primary-background: var(--accent-solid);
  --pico-primary-hover: var(--accent-solid-ink);
  --pico-primary-focus: rgba(0, 0, 0, .14);
  --pico-primary-inverse: var(--on-accent);
  --pico-border-color: var(--line);
  --pico-muted-border-color: #d9d9d9;
  --pico-background-color: var(--bg);
  --pico-card-background-color: var(--card);
  --pico-form-element-border-color: #d9d9d9;
  --pico-form-element-active-border-color: var(--accent);
  --pico-form-element-background-color: var(--input-bg);
  --pico-form-element-placeholder-color: #9b9b9b;
}

/* ================= 基础 ================= */
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
::selection { background: var(--gold-soft); color: var(--ink); }

/* 细滚动条 */
.sidebar::-webkit-scrollbar, .main::-webkit-scrollbar,
#t-preview::-webkit-scrollbar, .dlg-body::-webkit-scrollbar { width: 8px; height: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 99px; }
.main::-webkit-scrollbar-thumb, #t-preview::-webkit-scrollbar-thumb,
.dlg-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.main::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* ================= 应用外壳 ================= */
.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

/* ---------- 左侧导航 ---------- */
.sidebar {
  background:
    radial-gradient(130% 55% at 0% 0%, var(--side-glow), transparent 62%),
    linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg2) 100%);
  color: var(--side-txt);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid rgba(0, 0, 0, .22);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid var(--side-line);
}
.brand-mark {
  width: 40px; height: 40px; flex: none;
  background: linear-gradient(145deg, rgba(200, 164, 90, .22), rgba(200, 164, 90, .06));
  border: 1px solid rgba(200, 164, 90, .42);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.brand-text { min-width: 0; }
.brand-text b {
  display: block; color: var(--side-txt-on);
  font-family: var(--font-serif);
  font-size: 16.5px; font-weight: 700; letter-spacing: 1.5px;
}
.brand-text span {
  display: block; margin-top: 3px;
  font-size: 9.5px; color: var(--side-sub); letter-spacing: 2.2px; text-transform: uppercase;
}

.nav { flex: 1; padding: 8px 10px 16px; }
.nav-group {
  font-size: 10.5px; color: var(--side-sub);
  padding: 16px 10px 6px; letter-spacing: 2.5px;
  display: flex; align-items: center; gap: 8px;
}
.nav-group::after { content: ""; flex: 1; height: 1px; background: var(--side-line); }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; margin: 3px 0;
  border-radius: 10px;
  color: var(--side-txt);
  text-decoration: none;
  font-size: 13.5px;
  position: relative;
  transition: background .16s var(--ease), color .16s;
}
.nav-item i {
  font-style: normal; font-size: 15px;
  width: 28px; height: 28px; flex: none;
  border-radius: 8px;
  background: var(--side-ic);
  display: flex; align-items: center; justify-content: center;
  transition: background .16s var(--ease);
}
/* 双行导航：主标题 + 亮点副标题 */
.nv-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.nv-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-txt small {
  font-size: 11.5px; color: var(--side-sub); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400;
}
.nav-item:hover { background: var(--side-hover); color: #e7ecf3; }
.nav-item:hover i { background: var(--side-ic-hover); }
.nav-item.active {
  background: var(--side-active);
  color: var(--side-txt-on);
  font-weight: 600;
}
.nav-item.active i { background: var(--side-ic-on); }
.nav-item.active .nv-txt small { color: var(--side-sub-on); }
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--side-bar);
}
.nav-badge {
  margin-left: auto; font-style: normal;
  background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700;
  min-width: 18px; height: 18px; line-height: 18px;
  border-radius: 999px; text-align: center; padding: 0 5px;
}
.sidebar-foot { padding: 14px 18px 16px; border-top: 1px solid var(--side-line); }
.sf-line { font-size: 11px; color: var(--side-txt); line-height: 1.95; display: flex; align-items: center; gap: 7px; opacity: .85; }
.sf-line::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--side-bar); flex: none; opacity: .85;
}
.sf-line.dim { opacity: .55; }
.sf-line.dim::before { background: var(--side-sub); }

/* ---------- 主区与顶栏 ---------- */
.main {
  display: flex; flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 26px;
  flex: none;
}
.tb-title { min-width: 0; }
.tb-title h1 {
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 700; margin: 0;
  color: var(--ink); letter-spacing: 1px;
}
.tb-title p { font-size: 12.5px; color: var(--ink-soft); margin: 2px 0 0; }
.tb-side { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }
.tb-badge {
  font-size: 11.5px; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.tb-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); flex: none;
}
.tb-badge.free { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-deep); font-weight: 600; }
.tb-badge.free::before { background: var(--gold-deep); }
.menu-btn {
  display: none;
  border: 1px solid var(--line); background: var(--card);
  width: 34px; height: 34px; border-radius: 9px;
  font-size: 16px; cursor: pointer; padding: 0; margin: 0;
  color: var(--ink);
}

.container {
  width: 100%; max-width: 1280px;
  margin: 0 auto;
  padding: 22px 26px 64px;
  flex: 1;
}
.tab-panel.hidden, .hidden { display: none !important; }

/* ================= 主题切换器 ================= */
.theme-btn {
  height: 32px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-xs); cursor: pointer; white-space: nowrap;
  transition: border-color .16s, background .16s, color .16s;
}
.theme-btn:hover { border-color: var(--gold-line); background: var(--gold-soft); color: var(--ink); }
.theme-btn .tb-ic { font-size: 14px; line-height: 1; }
.theme-btn .tb-dot {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--accent) 0 33%, var(--gold) 33% 66%, var(--side-bg) 66% 100%);
  border: 1px solid rgba(0, 0, 0, .12);
}
.theme-pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 90;
  width: 272px; padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: tp-in .16s var(--ease);
}
.theme-pop[hidden] { display: none; }
@keyframes tp-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tp-title {
  font-size: 10.5px; letter-spacing: 2.5px; color: var(--ink-faint);
  padding: 6px 10px 8px; display: flex; align-items: center; justify-content: space-between;
}
.tp-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; margin: 0;
  border: none; background: none; border-radius: 10px;
  font-family: inherit; text-align: left; color: var(--ink); cursor: pointer;
  transition: background .14s;
}
.tp-item:hover { background: var(--surface-3); }
.tp-item.on { background: var(--accent-soft); }
.tp-sw { display: flex; flex: none; }
.tp-sw i {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .14);
  margin-left: -4px;
}
.tp-sw i:first-child { margin-left: 0; }
.tp-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.tp-name { font-size: 13.5px; font-weight: 600; }
.tp-desc { font-size: 11px; color: var(--ink-soft); }
.tp-check { margin-left: auto; color: var(--accent); font-weight: 700; font-size: 13px; visibility: hidden; }
.tp-item.on .tp-check { visibility: visible; }

/* ================= 按钮系统（.btn 中性 / .btn-primary 主操作） ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; margin: 0;
  font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1;
  white-space: nowrap; text-decoration: none;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease),
              color .16s, box-shadow .16s var(--ease), transform .12s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-faint); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-solid-2), var(--accent-solid));
  border-color: var(--accent-solid-ink); color: var(--on-accent) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--accent-solid), var(--accent-solid-ink));
  border-color: var(--accent-solid-ink); color: var(--on-accent) !important;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 30px; font-size: 15.5px; border-radius: 12px; }
.btn-danger {
  color: #fff !important;
  background: linear-gradient(180deg, #d64545, #c62828) !important;
  border-color: #b01f1f !important;
}
.btn-danger:hover { background: linear-gradient(180deg, #c93434, #b01f1f) !important; }

/* ================= 表单控件 ================= */
input[type=text], input[type=search], input[type=date], input[type=time],
input[type=number], input[type=password], input[type=tel], input[type=email],
select, textarea {
  border-radius: 10px;
  border: 1px solid var(--line);
  background-color: var(--input-bg);
  color: var(--ink);
  box-shadow: none;
  font-family: inherit;
  transition: border-color .16s, box-shadow .16s;
}
input[type=text]:focus, input[type=search]:focus, input[type=date]:focus,
input[type=time]:focus, input[type=number]:focus, input[type=password]:focus,
input[type=tel]:focus, input[type=email]:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}
input[type=checkbox], input[type=radio] { accent-color: var(--accent-solid); }

/* ================= 通用组件 ================= */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.search-input { flex: 1; min-width: 200px; margin: 0; height: 38px; }

.hint, .empty { color: var(--ink-soft); font-size: 13px; margin: 4px 2px 14px; }
.empty {
  text-align: center; padding: 48px 20px; font-size: 14px;
  background: var(--card); border: 1.5px dashed var(--line); border-radius: var(--radius);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  overflow: hidden;
}

/* 分类胶囊 */
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  height: 34px; padding: 0 15px; margin: 0;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  border-radius: 999px;
  background: var(--card); color: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  cursor: pointer; transition: all .15s var(--ease);
}
.chip-n {
  font-size: 11px; font-weight: 700; color: var(--ink-faint);
  background: var(--surface-3); border-radius: 999px; padding: 1px 7px; margin-left: 2px;
}
.chip.active .chip-n { background: rgba(255, 255, 255, .18); color: inherit; }
.chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.chip.active {
  background: var(--solid-bg); color: var(--solid-fg) !important; border-color: var(--solid-bg);
  font-weight: 600;
}
.chip.active:hover { background: var(--solid-bg); color: var(--solid-fg) !important; }

/* ================= 导航网址 ================= */
.link-group { margin-bottom: 26px; }
.link-group h2 {
  font-family: var(--font-serif);
  font-size: 16.5px; font-weight: 700; color: var(--ink);
  padding: 0 0 0 12px; margin: 0 0 12px;
  border-left: 3px solid var(--gold);
  letter-spacing: .5px;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px;
}
.link-group .group-badge { font-family: var(--font-sans); font-size: 11.5px; font-weight: 400; color: var(--ink-faint); margin-left: 8px; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.link-card {
  display: block; position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 17px 14px;
  text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-xs);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
.link-card::after {
  content: "↗"; position: absolute; top: 13px; right: 15px;
  font-size: 12px; color: var(--ink-faint); opacity: .55;
  transition: transform .18s var(--ease), color .18s, opacity .18s;
}
.link-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  border-color: var(--gold-line); color: var(--ink);
}
.link-card:hover::after { transform: translate(2px, -2px); color: var(--gold-deep); opacity: 1; }
.link-card .lc-name { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; padding-right: 18px; }
.link-card:hover .lc-name { color: var(--accent); }
.link-card .lc-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; margin: 0; }
.link-card .lc-url { display: none; }
.link-card .lc-del {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px; line-height: 20px; text-align: center;
  border: none; padding: 0; margin: 0; border-radius: 50%;
  background: transparent; color: var(--ink-faint); font-size: 13px; cursor: pointer;
}
.link-card .lc-del:hover { background: var(--danger-soft); color: var(--danger); }
.link-card.custom-card { border-left: 3px solid var(--gold); }
.link-card.custom-card::after { display: none; }

/* ================= 通讯录 ================= */
.privacy-banner {
  font-size: 12.5px; color: var(--warn);
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  border-radius: 10px; padding: 9px 15px; margin-bottom: 16px;
}
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 17px 15px 20px;
  box-shadow: var(--shadow-xs);
  position: relative; overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
.contact-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold-line); }
.contact-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--type-color, var(--accent));
}
.contact-card .cc-type {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: #fff; background: var(--type-color, var(--accent));
  border-radius: 5px; padding: 2px 8px; margin-bottom: 8px; letter-spacing: 1.5px;
}
.contact-card .cc-name { font-size: 15.5px; font-weight: 700; margin-bottom: 5px; letter-spacing: .2px; }
.contact-card .cc-row { display: flex; gap: 6px; font-size: 13px; color: var(--ink-soft); align-items: baseline; }
.contact-card .cc-row + .cc-row { margin-top: 3px; }
.contact-card .cc-lb { flex: none; white-space: nowrap; }
.contact-card .cc-row b { color: var(--ink-2); font-weight: 600; font-size: 13px; }
.contact-card a.cc-tel {
  color: var(--accent); text-decoration: none; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: .3px;
}
.contact-card a.cc-tel:hover { text-decoration: underline; }
.contact-card .cc-note {
  margin-top: 8px; font-size: 11.5px; color: var(--warn);
  background: var(--warn-soft); border-radius: 6px; padding: 3px 9px; display: inline-block;
}
.contact-card .cc-copy {
  margin-left: auto; font-size: 11px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); color: var(--ink-soft);
  cursor: pointer; padding: 1px 8px; margin-bottom: 0;
  transition: all .14s;
}
.contact-card .cc-copy:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ================= 开庭时间表 ================= */
.schedule-form { margin-bottom: 16px; }
.schedule-form h3, .dg-form-card h3 {
  font-size: 14.5px; font-weight: 700; color: var(--ink);
  padding: 12px 17px; margin: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  letter-spacing: .3px;
}
.schedule-form h3 { border-left: 3px solid var(--gold); border-radius: var(--radius) var(--radius) 0 0; }
.dg-form-card h3 { border-left: 3px solid var(--accent); border-radius: var(--radius) var(--radius) 0 0; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 16px 17px 4px; }
.form-grid label { display: flex; flex-direction: column; font-size: 12.5px; color: var(--ink-soft); gap: 5px; margin: 0; }
.form-grid label em { color: var(--danger); font-style: normal; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input { margin: 0; }
.form-actions { margin: 16px 17px 18px; display: flex; gap: 10px; }

.hearing-list { display: flex; flex-direction: column; gap: 10px; }
.hearing-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 17px;
  box-shadow: var(--shadow-xs);
  display: flex; gap: 15px; align-items: stretch; flex-wrap: wrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.hearing-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.hearing-card.past { opacity: .58; }
.hc-date {
  min-width: 86px; text-align: center;
  background: var(--accent-soft); border-radius: 10px; padding: 9px 10px; align-self: flex-start;
  border: 1px solid var(--line-soft);
}
.hc-date .hc-day { font-size: 25px; font-weight: 800; color: var(--accent-ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
.hc-date .hc-rest { font-size: 11.5px; color: var(--accent-ink); opacity: .8; }
.hc-date.today { background: var(--danger-soft); border-color: transparent; }
.hc-date.today .hc-day, .hc-date.today .hc-rest { color: var(--danger); opacity: 1; }
.hc-date.soon { background: var(--warn-soft); border-color: transparent; }
.hc-date.soon .hc-day, .hc-date.soon .hc-rest { color: var(--warn); opacity: 1; }

.hc-body { flex: 1; min-width: 230px; }
.hc-body .hc-case { font-size: 16px; font-weight: 700; margin-bottom: 4px; letter-spacing: .2px; }
.hc-body .hc-meta { display: flex; flex-wrap: wrap; gap: 3px 16px; font-size: 13px; color: var(--ink-soft); }
.hc-body .hc-meta b { color: var(--ink-2); font-weight: 600; }
.hc-body .hc-note {
  margin-top: 7px; font-size: 12px; color: var(--ink-soft);
  background: var(--surface-3); border-radius: 6px; padding: 3px 10px; display: inline-block;
}
.hc-actions { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.hc-countdown {
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 11px;
  align-self: center; white-space: nowrap;
}
.hc-countdown.today { background: var(--danger-soft); color: var(--danger); }
.hc-countdown.soon { background: var(--warn-soft); color: var(--warn); }
.hc-countdown.future { background: var(--accent-soft); color: var(--accent-ink); }
.hc-countdown.past { background: var(--surface-3); color: var(--ink-soft); }

/* ================= 委托手续 ================= */
.dg-form-card .fields { padding: 6px 17px 14px; }
.frow { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }
.frow:last-child { border-bottom: 0; }
.fl { width: 146px; min-width: 146px; font-size: 13.5px; color: var(--ink-2); }
.fl .req { color: var(--danger); margin-left: 2px; }
.frow input, .frow select { flex: 1; min-width: 0; margin: 0; font-size: 13.5px; height: 38px; }
.auto-flag {
  font-size: 10.5px; color: var(--ok); border: 1px solid var(--ok-soft);
  background: var(--ok-soft); border-radius: 5px; padding: 1px 6px; white-space: nowrap;
}

.dg-form-card h3 .hint { font-size: 11.5px; color: var(--ink-soft); font-weight: 400; margin: 0; }
.dg-form-card h3 .gset {
  margin-left: auto; font-size: 11.5px; color: var(--accent); cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 10px;
  user-select: none; background: var(--card); font-family: inherit;
}
.dg-form-card h3 .gset:hover { background: var(--accent-soft); border-color: var(--accent); }
.dg-form-card h3 .gset2 {
  margin-left: auto; font-size: 11.5px; color: var(--ink-soft); cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 10px;
  user-select: none; background: var(--card); font-family: inherit;
}
.dg-form-card h3 .gset2:hover { color: var(--ink); border-color: var(--ink-faint); }

.hist-item { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px dashed var(--line-soft); font-size: 12.5px; }
.hist-item:last-child { border-bottom: 0; }
.hist-item .tag { font-size: 10.5px; border-radius: 5px; padding: 1px 7px; white-space: nowrap; }
.hist-item .tag.civil { color: var(--accent-ink); background: var(--accent-soft); }
.hist-item .tag.crim { color: var(--warn); background: var(--warn-soft); }
.hist-item .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hist-item .op {
  font-size: 12px; color: var(--accent); cursor: pointer; white-space: nowrap;
  background: none; border: none; padding: 0; margin: 0; font-family: inherit;
}
.hist-item .op.del { color: var(--ink-faint); }
.hist-item .op:hover { text-decoration: underline; }
.hist-empty { font-size: 12.5px; color: var(--ink-soft); padding: 10px 4px; }
.privacy-line {
  font-size: 11.5px; color: var(--ink-soft);
  background: var(--surface-2); border: 1px dashed var(--line);
  border-radius: 8px; padding: 8px 13px; margin: 8px 17px 13px;
}

.dg-footer {
  position: sticky; bottom: 10px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 12px 16px; z-index: 5;
}
.doc-chks { display: flex; gap: 14px; flex-wrap: wrap; }
.dg-footer .doc-chk, .doc-chk {
  font-size: 13.5px; color: var(--ink-2);
  display: flex; align-items: center; gap: 6px; cursor: pointer; margin: 0;
}
.dg-footer .status { font-size: 12.5px; color: var(--ink-soft); flex: 1; min-width: 150px; margin: 0; }
.dg-footer .status.ok { color: var(--ok); }
.dg-footer .status.err { color: var(--danger); }

.dg-customs { margin-bottom: 14px; }
.dg-customs h3 {
  font-size: 14.5px; color: var(--ink); padding: 12px 17px; margin: 0;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--gold);
}
.dg-cust-list { padding: 6px 17px 11px; }
.dg-cust { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); }
.dg-cust:last-child { border-bottom: 0; }
.dg-cust.on .name { color: var(--accent); font-weight: 700; }
.dg-cust .name { font-size: 14px; }
.dg-cust .meta { font-size: 11.5px; color: var(--ink-soft); flex: 1; }

/* 结果弹窗 */
dialog.dlg {
  border: none; border-radius: var(--radius-lg); padding: 0;
  width: min(620px, 92vw); max-height: 80vh;
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-lg);
}
dialog.dlg::backdrop { background: rgba(14, 19, 26, .52); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog.dlg h3 {
  padding: 16px 22px; font-size: 16px; font-family: var(--font-serif);
  border-bottom: 1px solid var(--line); color: var(--ink); margin: 0; letter-spacing: .5px;
}
.dlg-body { padding: 14px 22px; overflow: auto; }
.dlg-files div { padding: 7px 0; color: var(--accent); display: flex; align-items: center; gap: 10px; border-bottom: 1px dashed var(--line-soft); }
.dlg-files .dl {
  margin-left: auto; font-size: 11.5px; color: var(--accent);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 10px;
  cursor: pointer; white-space: nowrap; background: var(--card); font-family: inherit;
}
.dlg-files .dl:hover { background: var(--accent-soft); border-color: var(--accent); }
.dlg-tip { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }
.dlg-btns { padding: 13px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2); }

/* ================= 律师工具卡片 ================= */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 14px; }
.tool-card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-xs);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold-line); }
.tool-card .tc-ic {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; margin-bottom: 13px;
}
.tool-card .tc-name { font-size: 16px; font-weight: 700; margin: 0 0 7px; line-height: 1.45; letter-spacing: .2px; }
.tool-card .tc-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.72; margin: 0 0 16px; flex: 1; }
.tool-card .tc-open { width: 100%; }

/* ================= 刑事会见模块（资料库已移除，保留会见提纲/须知） ================= */
.xs-notice { padding: 6px 17px 14px 34px; }
.xs-notice li { margin: 9px 0; line-height: 1.7; font-size: 13.5px; }

#m-out .card { padding: 16px 22px; }
#m-preview { line-height: 1.85; }
#m-preview h1 { font-family: var(--font-serif); font-size: 20px; color: var(--ink); letter-spacing: .5px; }
#m-preview h2 {
  font-family: var(--font-serif); font-size: 16px; color: var(--ink);
  border-left: 3px solid var(--gold); padding-left: 11px; margin-top: 22px; letter-spacing: .3px;
}
#m-preview h3 { font-size: 14px; margin-top: 13px; }
#m-preview blockquote {
  border-left: 3px solid var(--gold); background: var(--gold-soft);
  margin: 8px 0; padding: 6px 12px; font-size: 12.5px; color: var(--ink-2);
}
#m-preview table { border-collapse: collapse; }
#m-preview td { border: 1px solid var(--line); padding: 6px 12px; font-size: 13px; }
#m-preview ul { padding-left: 21px; }
#m-preview li { margin: 4px 0; }

/* ================= 页脚：公检法公开数据收集 ================= */
.foot-collect {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 30px;
  background: linear-gradient(135deg, var(--gold-soft), var(--card) 55%, var(--accent-soft));
  border: 1px solid var(--gold-line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}
.foot-collect .fc-body { flex: 1; min-width: 260px; }
.foot-collect .fc-title {
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px; letter-spacing: .5px;
}
.foot-collect .fc-desc { font-size: 13px; color: var(--ink-2); margin: 0 0 7px; line-height: 1.75; }
.foot-collect .fc-desc b { color: var(--accent-ink); font-weight: 600; }
.foot-collect .fc-tip { font-size: 12px; color: var(--ink-soft); margin: 0; line-height: 1.7; }
.foot-collect .fc-btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; text-decoration: none;
  background: linear-gradient(180deg, var(--accent-solid-2), var(--accent-solid));
  color: var(--on-accent) !important;
  border: 1px solid var(--accent-solid-ink); border-radius: 10px;
  height: 42px; padding: 0 22px; font-size: 14px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: background .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease);
}
.foot-collect .fc-btn:hover {
  background: linear-gradient(180deg, var(--accent-solid), var(--accent-solid-ink));
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .18);
}

/* ================= 关于本工作台（网站介绍，置于每个 Tab 底部） ================= */
.about {
  margin-top: 18px;
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--card), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px 30px 24px;
}
.about::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-line) 38%, transparent 78%);
}
.ab-head { max-width: 820px; }
.ab-kicker {
  font-size: 10.5px; letter-spacing: 3.5px; color: var(--gold-deep);
  font-weight: 700; text-transform: uppercase;
}
.about h2 {
  font-family: var(--font-serif);
  font-size: 25px; font-weight: 700; color: var(--ink);
  margin: 8px 0 12px; letter-spacing: 2px;
}
.about .ab-lead { font-size: 14px; color: var(--ink-2); line-height: 1.9; margin: 0 0 22px; }
.about .ab-lead b { color: var(--ink); font-weight: 600; }

.ab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(236px, 1fr)); gap: 12px; }
.ab-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 17px 19px 16px;
  transition: border-color .18s, box-shadow .18s var(--ease), transform .18s var(--ease);
}
.ab-card:hover { border-color: var(--gold-line); box-shadow: var(--shadow-xs); transform: translateY(-1px); }
.ab-card .ab-ic {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 11px;
}
.ab-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; color: var(--ink); letter-spacing: .3px; }
.ab-card p { font-size: 13px; color: var(--ink-soft); line-height: 1.78; margin: 0; }
.ab-card p b { color: var(--ink-2); font-weight: 600; }

.ab-credits {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
  margin-top: 20px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.ab-credit .ab-label {
  display: inline-block; font-size: 10.5px; letter-spacing: 2.5px;
  color: var(--gold-deep); border: 1px solid var(--gold-line);
  background: var(--gold-soft); border-radius: 999px; padding: 2px 11px; margin-bottom: 9px;
}
.ab-credit b {
  display: block; font-family: var(--font-serif);
  font-size: 18px; letter-spacing: 1px; color: var(--ink); font-weight: 700;
}
.ab-credit .ab-sub { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }

.ab-note {
  margin: 20px 0 0; padding-top: 15px;
  border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--ink-faint); line-height: 1.85;
}
.colophon {
  text-align: center; font-size: 11.5px; color: var(--ink-faint);
  margin: 18px 0 0; letter-spacing: .5px;
}
.colophon b { color: var(--ink-soft); font-weight: 600; }

/* ================= 独立页（collect / pack）通用页头 ================= */
.page-head {
  background: linear-gradient(135deg, var(--head-bg), var(--head-bg2));
  color: var(--head-fg);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 18px;
  border-bottom: 3px solid var(--gold);
}
.page-head h1 { font-family: var(--font-serif); font-size: 21px; margin: 0 0 6px; letter-spacing: 1px; color: var(--head-fg); }
.page-head p { font-size: 13px; color: var(--head-sub); margin: 0; line-height: 1.75; }
.page-head p b { color: var(--head-fg); }

/* ================= 底部导航（移动端） ================= */
.bottom-nav { display: none; }

/* ================= 响应式 ================= */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 60; top: 0; bottom: 0; left: 0;
    width: min(80vw, 300px);
    transform: translateX(-102%);
    transition: transform .2s var(--ease);
    box-shadow: none;
  }
  body.sidebar-open .sidebar { transform: none; box-shadow: 24px 0 60px rgba(0, 0, 0, .4); }
  body::after {
    content: ""; position: fixed; inset: 0; z-index: 55;
    background: rgba(14, 19, 26, .48);
    display: none;
  }
  body.sidebar-open::after { display: block; }
  .menu-btn { display: block; }

  .main { overflow-y: auto; }
  .topbar { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .tb-title { flex: 1; min-width: 0; }
  .tb-title h1 { font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tb-title p { display: none; }
  .tb-badge { display: none; }
  .gs { order: 3; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .gs-kbd { display: none; }
  .gs-input { height: 36px; font-size: 14px; padding-left: 32px; }
  .chip { height: 32px; padding: 0 12px; font-size: 12.5px; }
  .theme-btn .tb-label { display: none; }
  .container { padding: 16px 14px calc(74px + 20px); }

  .foot-collect { flex-direction: column; align-items: stretch; gap: 12px; padding: 15px 17px; }
  .foot-collect .fc-btn { width: 100%; }

  .about { padding: 22px 18px 20px; }
  .about h2 { font-size: 21px; letter-spacing: 1px; }
  .about .ab-lead { font-size: 13.5px; }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(6, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--topbar-bg);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .08);
    margin: 0; padding: 0;
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 0 7px; text-decoration: none;
    color: var(--ink-soft); font-size: 10px;
  }
  .bottom-nav a i { font-style: normal; font-size: 18px; }
  .bottom-nav a.active { color: var(--accent); font-weight: 700; }

  .links-grid { grid-template-columns: 1fr 1fr; }
  .contacts-grid, .tools-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .btn, .toolbar .search-input { width: 100%; }
  .hearing-card { gap: 10px; }
  .fl { width: 96px; min-width: 96px; }
  .frow { flex-wrap: wrap; }
  .frow input, .frow select { flex-basis: 100%; }
  .dg-footer { flex-direction: column; align-items: stretch; bottom: 60px; }
  .dg-footer .status { flex: none; }
}

@media (max-width: 480px) {
  .links-grid { grid-template-columns: 1fr; }
  .brand-text b { font-size: 15px; }
  .ab-credits { gap: 14px; }
  .theme-pop { width: 248px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   M13 新增组件：全局搜索 / 最近用过 / 数据备份 / 页内表单 / 校验标红 / 空状态
   ============================================================ */

/* ---------- 全局搜索（顶栏） ---------- */
.gs {
  position: relative;
  flex: 0 1 340px; min-width: 180px; margin-left: auto;
}
/* 用 #id 提权：Pico 对 input[type=search] 的图标/内边距规则特异度很高（0,5,1），普通类选择器压不住 */
#gs-input {
  width: 100%; height: 36px; margin: 0;
  padding-block: 0;
  padding-inline-end: 58px;
  font-size: 13.5px; border-radius: 999px;
  background-color: var(--surface-2);
  border: 1px solid var(--line);
}
#gs-input:focus { background-color: var(--input-bg); }
.gs-kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: inherit; font-size: 10.5px; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
  background: var(--card); pointer-events: none;
}
.gs-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 95;
  width: min(460px, 92vw); max-height: 62vh; overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
}
.gs-group + .gs-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.gs-gh {
  font-size: 11px; letter-spacing: 1.5px; color: var(--ink-faint);
  padding: 6px 10px 4px; display: flex; align-items: center; gap: 6px;
}
.gs-gh span {
  font-size: 10.5px; background: var(--surface-3); border-radius: 999px; padding: 0 6px; letter-spacing: 0;
}
.gs-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; margin: 0;
  border: none; background: none; border-radius: 10px;
  font-family: inherit; text-align: left; color: var(--ink); cursor: pointer;
}
.gs-item.on, .gs-item:hover { background: var(--accent-soft); }
.gs-ic { font-size: 17px; flex: none; width: 22px; text-align: center; }
.gs-tx { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.4; }
.gs-tx b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-tx small { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-go { flex: none; font-size: 11px; color: var(--accent); font-weight: 600; }
.gs-empty { padding: 18px 14px; text-align: center; font-size: 13px; color: var(--ink-soft); line-height: 1.8; }
.gs-empty small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--ink-faint); }

/* ---------- 最近用过 ---------- */
.recent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.recent-lb { font-size: 11.5px; color: var(--ink-faint); letter-spacing: 1px; }
.recent-chip {
  height: 30px; padding: 0 12px; margin: 0;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit; font-size: 12.5px; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; transition: all .14s;
}
.recent-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- 数据备份卡（关于 · 共建页） ---------- */
.bk-card { margin-bottom: 16px; }
.bk-card h3 {
  font-size: 15px; font-weight: 700; color: var(--ink);
  padding: 13px 18px; margin: 0;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.bk-card h3 .hint { margin: 0; font-size: 12px; font-weight: 400; }
.bk-body { padding: 14px 18px 16px; }
.bk-lead { margin: 0 0 12px; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.bk-lead b { color: var(--ink); }
.bk-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bk-status { font-size: 12.5px; color: var(--ok); line-height: 1.6; flex: 1; min-width: 200px; }
.bk-status.err { color: var(--warn); }
.bk-note { margin: 12px 0 0; font-size: 12px; color: var(--ink-faint); line-height: 1.8; }
.bk-note b { color: var(--ink-soft); }

/* ---------- 页内表单（添加网址） ---------- */
.link-form { margin-bottom: 16px; }
.link-form h3 {
  font-size: 14.5px; font-weight: 700; color: var(--ink);
  padding: 12px 17px; margin: 0;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--accent);
}
.form-msg { margin: 12px 17px 0; font-size: 13px; color: var(--ok); }
.form-msg.err { color: var(--danger); }
.form-tip { font-size: 12px; color: var(--ink-faint); align-self: center; }

/* ---------- 必填项标红 ---------- */
.frow.missing { background: var(--danger-soft); border-radius: 8px; padding-left: 8px; padding-right: 8px; margin-left: -8px; margin-right: -8px; }
.frow.missing .fl { color: var(--danger); font-weight: 600; }
.frow.missing input, .frow.missing select { border-color: var(--danger); }

/* ---------- 强化提示 / 折叠说明 ---------- */
.hint-strong {
  font-size: 13.5px; color: var(--ink-2); line-height: 1.75;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  border-radius: 10px; padding: 9px 14px; margin: 0 0 10px;
}
.hint-strong b { color: var(--gold-deep); }
.hint-more { margin: 0 0 14px; font-size: 12.5px; color: var(--ink-soft); }
.hint-more > summary { cursor: pointer; color: var(--accent); font-size: 12.5px; list-style: none; }
.hint-more > summary::-webkit-details-marker { display: none; }
.hint-more > summary::after { content: " ▾"; }
.hint-more[open] > summary::after { content: " ▴"; }
.hint-more p { margin: 8px 0 0; line-height: 1.8; background: var(--surface-2); border-radius: 8px; padding: 9px 12px; }
.hint-more p b { color: var(--ink-2); }

/* ---------- 空状态（开庭表） ---------- */
.empty-ic { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.empty-sub { margin: 0 auto 16px; max-width: 560px; font-size: 13px; line-height: 1.8; color: var(--ink-soft); }
.empty-sub b { color: var(--ink-2); }
.empty-tip { margin: 14px 0 0; font-size: 12px; color: var(--ink-faint); }

/* ---------- 关于 · 共建页：区块间距 ---------- */
#tab-about .foot-collect { margin-top: 0; }
#tab-about .about { margin-top: 16px; }
#tab-about .colophon { margin-top: 20px; }

/* ---------- 移动端覆盖（M13 组件） ----------
   必须放在文件末尾：上方组件基础规则在响应式区块之后，媒体查询要压过它们 */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .tb-title { flex: 1; min-width: 0; }
  .tb-title h1 { font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tb-title p { display: none; }
  .tb-badge { display: none; }
  .gs { order: 3; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .gs-kbd { display: none; }
  #gs-input { height: 36px; font-size: 14px; padding-inline-end: 16px; }
  .chip { height: 32px; padding: 0 12px; font-size: 12.5px; }
  .bk-actions .btn { width: 100%; }
  .theme-btn .tb-label { display: none; }
}
@media (max-width: 480px) {
  .gs-panel { width: 92vw; right: auto; left: 0; }
}

/* ============================================================
   M14：工作台首页大入口 / 通讯录部门分机 / AI 徽章迷你版
   ============================================================ */

/* ---------- 首页问候条 ---------- */
.home-hero {
  background: linear-gradient(135deg, var(--gold-soft), var(--card) 45%, var(--accent-soft));
  border: 1px solid var(--gold-line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.home-hero .hh-date { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: .5px; margin-bottom: 6px; }
.home-hero .hh-hearing { font-size: 13.5px; color: var(--danger); font-weight: 600; line-height: 1.6; }
.home-hero .hh-hearing .hh-more { color: var(--accent); font-weight: 600; margin-left: 8px; }
.home-hero .hh-quiet { font-size: 12.5px; color: var(--ink-soft); }

.home-sec { margin-bottom: 22px; }
.hs-title {
  font-family: var(--font-serif);
  font-size: 17px; font-weight: 700; color: var(--ink);
  margin: 0 0 12px; letter-spacing: 1px;
  padding-left: 10px; border-left: 3px solid var(--gold);
}

/* ---------- 核心亮点卡（一组大卡，免 AI 前置） ---------- */
.hot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.hot-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 19px 20px;
  text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-xs);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
.hot-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold-line); }
.hot-card .hc-ic {
  width: 48px; height: 48px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; border-radius: 13px;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
}
.hot-card .hc-tx { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.45; gap: 2px; }
.hot-card .hc-tx b { font-size: 15.5px; font-weight: 700; }
.hot-card .hc-tx small { font-size: 12.5px; color: var(--ink-soft); }
.hot-card .hc-go { color: var(--ink-faint); font-size: 20px; font-weight: 700; }
.hot-card:hover .hc-go { color: var(--gold-deep); }

/* ---------- 条线大入口 ---------- */
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.home-line {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 17px 15px;
  box-shadow: var(--shadow-xs);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.home-line:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold-line); }
.hl-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.hl-head .hl-ic {
  width: 42px; height: 42px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; border-radius: 12px;
  background: linear-gradient(180deg, #fcfbf8, var(--surface-3));
  border: 1px solid var(--line-soft);
}
html[data-skin="dark"] .hl-head .hl-ic { background: var(--surface-3); }
.hl-tx { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.hl-tx b { font-size: 15.5px; font-weight: 700; letter-spacing: .2px; }
.hl-tx small { font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-n {
  flex: none; font-size: 11.5px; font-weight: 700; color: var(--gold-deep);
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  border-radius: 999px; padding: 2px 9px;
}
.hl-list { display: flex; flex-direction: column; flex: 1; margin-bottom: 12px; }
.hl-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 8px 9px; margin: 0;
  font-family: inherit; font-size: 13.5px; text-align: left;
  color: var(--ink-2); background: none; border: none;
  border-bottom: 1px dashed var(--line-soft);
  border-radius: 8px; cursor: pointer;
  transition: background .13s, color .13s;
}
.hl-item:last-child { border-bottom: 0; }
.hl-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-item i { font-style: normal; color: var(--ink-faint); flex: none; }
.hl-item:hover { background: var(--accent-soft); color: var(--accent); }
.hl-item:hover i { color: var(--accent); }
.hl-item .ai-mini {
  display: inline-block; font-size: 9.5px; font-weight: 700; font-style: normal;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 0 4px; vertical-align: 1px; margin-left: 4px;
}
.hl-enter { align-self: stretch; }

/* ---------- 通讯录：部门分机行 ---------- */
.cc-depts {
  margin-top: 9px; padding: 8px 10px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 9px;
  display: flex; flex-direction: column; gap: 2px;
}
.cc-dept { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; }
.cc-dept + .cc-dept { border-top: 1px dashed var(--line-soft); }
.cc-dept .cc-dname {
  flex: none; min-width: 72px; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.cc-dept a.cc-dtel {
  color: var(--accent); text-decoration: none; font-weight: 700;
  font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: .2px;
}
.cc-dept a.cc-dtel:hover { text-decoration: underline; }
.cc-note-raw { margin-top: 8px; font-size: 11px; color: var(--ink-faint); }
.cc-note-raw summary { cursor: pointer; list-style: none; }
.cc-note-raw summary::-webkit-details-marker { display: none; }
.cc-note-raw summary::before { content: "📝 备注原文 "; }
.cc-note-raw summary::after { content: "▸"; }
.cc-note-raw[open] summary::after { content: "▾"; }
.cc-note-raw > div {
  margin-top: 5px; font-size: 11.5px; color: var(--ink-soft); line-height: 1.7;
  background: var(--surface-2); border-radius: 6px; padding: 6px 9px;
}
.cc-aggr {
  margin-top: 8px; font-size: 11.5px; color: var(--warn);
  background: var(--warn-soft); border-radius: 6px; padding: 4px 9px; display: inline-block;
}
.cc-aggr b { font-weight: 700; }

/* 通讯录看守所卡：导航按钮 */
.cc-navbtns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; align-items: center; }
.cc-navbtns .cc-nav { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; text-decoration: none; }
.cc-navbtns .cc-nav:first-child {
  color: #fff !important;
  background: linear-gradient(180deg, #2b5ce2, #1f4fd8) !important;
  border-color: #1b43b8 !important;
}
.cc-navbtns .cc-nav-tip { font-size: 10.5px; color: var(--ink-faint); }

/* 首页：看守所定位专属大卡 */
.kss-card {
  background: var(--card);
  border: 1px solid var(--gold-line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  box-shadow: var(--shadow-sm);
}
.kss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 9px; }
.kss-chip {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  text-decoration: none; color: var(--ink);
  transition: transform .16s var(--ease), border-color .16s, background .16s;
}
.kss-chip:hover { transform: translateY(-2px); border-color: var(--gold); background: var(--gold-soft); }
.kss-chip b { font-size: 13.5px; font-weight: 700; }
.kss-chip small { font-size: 11px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kss-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--ink-soft);
}

/* 首页亮点卡：需 AI 小标 */
.hc-ai {
  display: inline-block; font-size: 9.5px; font-weight: 700;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 0 5px; vertical-align: 2px; margin-left: 5px;
}

/* 品牌区可点击回首页 */
.brand { cursor: pointer; transition: opacity .15s; }
.brand:hover { opacity: .88; }
.brand:hover .brand-mark { border-color: var(--gold); }

@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .hot-grid { grid-template-columns: 1fr 1fr; }
  .hot-card { padding: 15px 16px; }
  .hot-card .hc-ic { width: 42px; height: 42px; font-size: 21px; }
  .home-hero { padding: 14px 15px; }
  .home-hero .hh-date { font-size: 14px; }
}
@media (max-width: 480px) {
  .hot-grid { grid-template-columns: 1fr; }
}

/* 移动端全局搜索面板贴左（顶栏搜索为整行时） */
@media (max-width: 900px) {
  .gs-panel { width: min(460px, 94vw); right: auto; left: 0; }
}
