/* =========================================================================
   全局主题语义变量（柔暗暖炭 / 柔暗靛灰 / 淡彩浅色）+ 淡色彩虹弥散背景
   ========================================================================= */
:root,
html[data-theme="dim-warm"] {
  color-scheme: dark;
  --aurora-opacity: 0.55;

  /* 柔暗暖炭基底：温馨柔和、不沉闷、绝不死黑 */
  --bg-page: #25232C;
  --surface-card: rgba(46, 43, 55, 0.78);
  --surface-card-solid: rgba(44, 41, 53, 0.96);
  --surface-topbar: rgba(40, 37, 49, 0.78);
  --surface-elevated: rgba(51, 47, 61, 0.95);
  --surface-subtle: rgba(255, 246, 240, 0.045);
  --surface-hover: rgba(255, 246, 240, 0.08);
  --surface-input: rgba(29, 27, 36, 0.62);
  --surface-control: rgba(255, 246, 240, 0.06);
  --surface-seg: rgba(24, 22, 30, 0.44);
  --surface-seg-active: rgba(70, 65, 84, 0.94);
  --surface-sticky-th: rgba(46, 43, 55, 0.96);
  --surface-highlight: rgba(255, 244, 236, 0.08);
  --surface-row-active: rgba(235, 134, 158, 0.14);
  --surface-drawer-body: #27252F;

  --border-card: rgba(255, 244, 236, 0.10);
  --border-default: rgba(255, 244, 236, 0.12);
  --border-strong: rgba(255, 244, 236, 0.22);
  --border-subtle: rgba(255, 244, 236, 0.07);
  --border-dashed: rgba(255, 244, 236, 0.12);

  /* 柔和层次文字 */
  --text-strong: #F7F2EE;
  --text-primary: #EAE2DD;
  --text-secondary: #B9AFAC;
  --text-muted: #93898A;
  --text-faint: #6B6268;

  /* 主题强调（暖蜜桃紫渐变，激活态更有愉悦感） */
  --accent-bg: linear-gradient(135deg, #DF7B95 0%, #9E7CF2 100%);
  --accent-border: rgba(235, 145, 170, 0.55);
  --accent-text: #FFFFFF;
  --accent-link: #78B9FA;
  --accent-soft-bg: rgba(223, 123, 149, 0.16);
  --accent-soft-border: rgba(235, 145, 170, 0.34);
  --accent-soft-text: #F9B4C6;
  --accent-pin-fill: rgba(249, 180, 198, 0.22);
  --primary-btn-bg: #5D9CEB;
  --primary-btn-hover: #4A8CE0;

  /* 股票四色（柔光粉彩高可读版） */
  --color-up: #F67A7A;
  --color-up-bar: #F27272;
  --color-up-soft: rgba(246, 122, 122, 0.16);
  --color-up-border: rgba(246, 122, 122, 0.32);
  --color-up-text: #FFA5A5;
  --color-up-prev: rgba(246, 122, 122, 0.48);
  --color-up-retrace-a: rgba(246, 122, 122, 0.55);
  --color-up-retrace-b: rgba(246, 122, 122, 0.18);

  --color-down: #3DD69E;
  --color-down-bar: #34C792;
  --color-down-soft: rgba(61, 214, 158, 0.16);
  --color-down-border: rgba(61, 214, 158, 0.32);
  --color-down-text: #7AE8BE;
  --color-down-prev: rgba(61, 214, 158, 0.48);
  --color-down-retrace-a: rgba(61, 214, 158, 0.55);
  --color-down-retrace-b: rgba(61, 214, 158, 0.18);

  --color-hold: #BFA2FF;
  --color-hold-fill: #B392FF;
  --color-hold-axis: #B9A5E8;
  --color-hold-soft: rgba(191, 162, 255, 0.16);
  --color-hold-border: rgba(191, 162, 255, 0.32);
  --color-hold-text: #D6C3FF;

  --color-sh: #F7BE60;
  --color-sh-axis: #DFB26A;
  --color-sh-soft: rgba(247, 190, 96, 0.15);
  --color-sh-border: rgba(247, 190, 96, 0.32);
  --color-sh-text: #FAD48E;

  --color-ok: #34D399;
  --color-ok-soft: rgba(52, 211, 153, 0.16);
  --color-ok-text: #6EE7B7;

  /* 中性进度条 */
  --bar-track: rgba(255, 244, 236, 0.09);
  --bar-prev-neutral: #7A7484;
  --bar-fill-neutral: #9E96A8;
  --bar-split-line: #2E2B37;

  /* 阴影、遮罩与滚动条 */
  --shadow-card: 0 6px 24px rgba(14, 11, 20, 0.24), inset 0 1px 0 var(--surface-highlight);
  --shadow-popover: 0 14px 34px rgba(10, 8, 16, 0.42), inset 0 1px 0 var(--surface-highlight);
  --shadow-drawer: 12px 0 38px rgba(10, 8, 16, 0.44);
  --shadow-tooltip: 0 10px 28px rgba(10, 8, 16, 0.38), inset 0 1px 0 var(--surface-highlight);
  --shadow-seg-active: 0 1px 4px rgba(10, 8, 16, 0.28);
  --mask-modal: rgba(15, 13, 21, 0.54);
  --mask-drawer: rgba(15, 13, 21, 0.32);
  --scroll-thumb: rgba(255, 244, 236, 0.18);
  --scroll-thumb-hover: rgba(255, 244, 236, 0.32);

  /* SVG 图表响应式色值 */
  --chart-grid: rgba(255, 244, 236, 0.065);
  --chart-axis: rgba(255, 244, 236, 0.14);
  --chart-zero: rgba(255, 244, 236, 0.24);
  --chart-text: #978D90;
  --chart-text-band: #B7ADAB;
  --chart-band-even: rgba(255, 246, 240, 0.04);
  --chart-band-odd: rgba(255, 246, 240, 0.015);
  --chart-band-hover-bg: rgba(235, 134, 158, 0.14);
  --chart-band-hover-text: #F9B4C6;
  --chart-band-sel-bg: rgba(235, 134, 158, 0.24);
  --chart-band-sel-text: #FFD1DC;
  --chart-dot-stroke: #2E2B37;
  --chart-dot-hollow-fill: #2E2B37;
  --chart-price-stroke: #C4BAC0;
  --chart-hold-low: #8A8189;
  --chart-profile-buy-closed: #B37B7E;
  --chart-profile-sell-closed: #5E9E8B;
  --chart-profile-hover: rgba(255, 244, 236, 0.09);
  --chart-profile-band-bg: rgba(255, 244, 236, 0.06);
  --chart-profile-band-stroke: rgba(255, 244, 236, 0.22);
  --chart-span-buy: rgba(246, 122, 122, 0.11);
  --chart-span-sell: rgba(61, 214, 158, 0.11);
  --chart-crosshair: rgba(255, 244, 236, 0.34);
  --chart-live-line: #F7BE60;
  --chart-live-bg: rgba(58, 49, 40, 0.94);
  --chart-live-border: rgba(247, 190, 96, 0.55);
  --chart-live-text: #FAD48E;
  --chart-brush-fill: rgba(235, 134, 158, 0.16);
  --chart-brush-stroke: #EB869E;
  --chart-tooltip-bg: rgba(39, 36, 48, 0.92);
  --chart-tooltip-border: rgba(255, 244, 236, 0.14);
  --chart-ruler-track: linear-gradient(90deg, rgba(61, 214, 158, 0.36) 0%, rgba(255, 244, 236, 0.14) 50%, rgba(246, 122, 122, 0.38) 100%);
  --code-block-bg: rgba(22, 20, 28, 0.85);
  --code-block-text: #E9E2DC;
  --env-guide-bg: rgba(247, 190, 96, 0.11);
  --env-guide-border: rgba(247, 190, 96, 0.28);
  --env-guide-title: #FAD48E;
  --env-guide-text: #E9D7B7;
  --user-bubble-bg: rgba(107, 182, 250, 0.14);
  --user-bubble-border: rgba(107, 182, 250, 0.28);
  --user-bubble-text: #CBE5FF;
  --layout-edit-outline: rgba(235, 134, 158, 0.55);
  --layout-edit-hover: #EB869E;
  --layout-edit-placeholder-bg: rgba(235, 134, 158, 0.12);

  /* 三套基础 + 两套明快流彩光晕（暗色柔和版） */
  --aurora-grad-peach:
    radial-gradient(46% 52% at 14% 16%, rgba(251, 146, 168, 0.40) 0%, transparent 72%),
    radial-gradient(48% 54% at 84% 18%, rgba(253, 186, 116, 0.32) 0%, transparent 72%),
    radial-gradient(50% 54% at 52% 88%, rgba(212, 146, 250, 0.34) 0%, transparent 72%),
    radial-gradient(40% 46% at 16% 84%, rgba(253, 224, 130, 0.25) 0%, transparent 70%),
    radial-gradient(38% 44% at 88% 82%, rgba(244, 140, 185, 0.28) 0%, transparent 70%);
  --aurora-grad-aurora:
    radial-gradient(46% 52% at 18% 18%, rgba(244, 130, 178, 0.38) 0%, transparent 72%),
    radial-gradient(48% 54% at 82% 16%, rgba(96, 180, 255, 0.36) 0%, transparent 72%),
    radial-gradient(50% 52% at 54% 86%, rgba(167, 139, 250, 0.36) 0%, transparent 72%),
    radial-gradient(42% 48% at 16% 82%, rgba(94, 234, 212, 0.30) 0%, transparent 70%),
    radial-gradient(36% 42% at 86% 78%, rgba(253, 224, 130, 0.24) 0%, transparent 70%);
  --aurora-grad-mint:
    radial-gradient(48% 54% at 16% 20%, rgba(94, 234, 212, 0.36) 0%, transparent 72%),
    radial-gradient(48% 54% at 84% 22%, rgba(125, 211, 252, 0.36) 0%, transparent 72%),
    radial-gradient(46% 52% at 70% 84%, rgba(196, 181, 253, 0.32) 0%, transparent 72%),
    radial-gradient(42% 48% at 22% 84%, rgba(217, 249, 157, 0.24) 0%, transparent 70%),
    radial-gradient(38% 44% at 50% 18%, rgba(165, 243, 252, 0.24) 0%, transparent 70%);
  --aurora-grad-lemon:
    radial-gradient(46% 52% at 16% 18%, rgba(253, 224, 110, 0.36) 0%, transparent 72%),
    radial-gradient(48% 54% at 84% 20%, rgba(110, 231, 183, 0.30) 0%, transparent 72%),
    radial-gradient(48% 52% at 52% 86%, rgba(253, 186, 116, 0.30) 0%, transparent 72%),
    radial-gradient(40% 46% at 18% 82%, rgba(165, 243, 252, 0.26) 0%, transparent 70%),
    radial-gradient(38% 44% at 86% 80%, rgba(254, 240, 138, 0.28) 0%, transparent 70%);
  --aurora-grad-berry:
    radial-gradient(46% 52% at 16% 18%, rgba(249, 136, 180, 0.42) 0%, transparent 72%),
    radial-gradient(48% 54% at 82% 20%, rgba(216, 160, 255, 0.36) 0%, transparent 72%),
    radial-gradient(50% 54% at 50% 86%, rgba(253, 164, 175, 0.34) 0%, transparent 72%),
    radial-gradient(40% 46% at 18% 84%, rgba(254, 205, 211, 0.26) 0%, transparent 70%),
    radial-gradient(38% 44% at 86% 82%, rgba(196, 181, 253, 0.30) 0%, transparent 70%);

  /* 猫猫对话语录与治愈签文专属字体（默认霞鹜文楷） */
  --font-cat: "LXGW WenKai Screen", "KaiTi", "STKaiti", "Microsoft YaHei UI", sans-serif;
}

html[data-cat-font="wenkai"] {
  --font-cat: "LXGW WenKai Screen", "KaiTi", "STKaiti", "Microsoft YaHei UI", sans-serif;
}

html[data-cat-font="round"] {
  --font-cat: "幼圆加粗", "YouYuan", "STYuanti", "Microsoft YaHei UI", sans-serif;
}

html[data-cat-font="serif"] {
  --font-cat: "Noto Serif SC", "Songti SC", "SimSun", "Microsoft YaHei UI", serif;
}

html[data-cat-font="system"] {
  --font-cat: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

/* 柔暗靛灰：清透冷静现代蓝灰 */
html[data-theme="dim"] {
  color-scheme: dark;

  --bg-page: #1F2533;
  --surface-card: rgba(38, 45, 62, 0.78);
  --surface-card-solid: rgba(36, 43, 59, 0.96);
  --surface-topbar: rgba(33, 40, 56, 0.78);
  --surface-elevated: rgba(44, 52, 72, 0.95);
  --surface-subtle: rgba(235, 244, 255, 0.045);
  --surface-hover: rgba(235, 244, 255, 0.08);
  --surface-input: rgba(24, 29, 42, 0.64);
  --surface-control: rgba(235, 244, 255, 0.06);
  --surface-seg: rgba(20, 25, 36, 0.45);
  --surface-seg-active: rgba(60, 71, 96, 0.94);
  --surface-sticky-th: rgba(39, 46, 63, 0.96);
  --surface-highlight: rgba(235, 244, 255, 0.08);
  --surface-row-active: rgba(139, 156, 252, 0.14);
  --surface-drawer-body: #222838;

  --border-card: rgba(226, 238, 255, 0.10);
  --border-default: rgba(226, 238, 255, 0.12);
  --border-strong: rgba(226, 238, 255, 0.22);
  --border-subtle: rgba(226, 238, 255, 0.07);
  --border-dashed: rgba(226, 238, 255, 0.12);

  --text-strong: #F0F4FA;
  --text-primary: #DFE6F2;
  --text-secondary: #A9B6CC;
  --text-muted: #8292AD;
  --text-faint: #5A6882;

  --accent-bg: linear-gradient(135deg, #677CF7 0%, #9876F4 100%);
  --accent-border: rgba(139, 156, 252, 0.55);
  --accent-link: #6CB4FA;
  --accent-soft-bg: rgba(114, 134, 248, 0.16);
  --accent-soft-border: rgba(139, 156, 252, 0.34);
  --accent-soft-text: #BDC8FF;
  --accent-pin-fill: rgba(189, 200, 255, 0.22);

  --bar-track: rgba(226, 238, 255, 0.09);
  --bar-prev-neutral: #6C7B95;
  --bar-fill-neutral: #8F9FB8;
  --bar-split-line: #262D3E;

  --chart-grid: rgba(226, 238, 255, 0.065);
  --chart-axis: rgba(226, 238, 255, 0.14);
  --chart-zero: rgba(226, 238, 255, 0.24);
  --chart-text: #8595B0;
  --chart-text-band: #A8B5CC;
  --chart-band-even: rgba(226, 238, 255, 0.04);
  --chart-band-odd: rgba(226, 238, 255, 0.015);
  --chart-band-hover-bg: rgba(114, 134, 248, 0.15);
  --chart-band-hover-text: #BDC8FF;
  --chart-band-sel-bg: rgba(114, 134, 248, 0.25);
  --chart-band-sel-text: #DCE2FF;
  --chart-dot-stroke: #262D3E;
  --chart-dot-hollow-fill: #262D3E;
  --chart-price-stroke: #B2C0D6;
  --chart-hold-low: #7B8BA6;
  --chart-profile-hover: rgba(226, 238, 255, 0.09);
  --chart-profile-band-bg: rgba(226, 238, 255, 0.06);
  --chart-profile-band-stroke: rgba(226, 238, 255, 0.22);
  --chart-crosshair: rgba(226, 238, 255, 0.34);
  --chart-live-bg: rgba(50, 48, 42, 0.94);
  --chart-brush-fill: rgba(107, 182, 250, 0.16);
  --chart-brush-stroke: #6BB6FA;
  --chart-tooltip-bg: rgba(31, 38, 53, 0.92);
  --chart-tooltip-border: rgba(226, 238, 255, 0.14);
  --code-block-bg: rgba(19, 24, 35, 0.88);
  --layout-edit-outline: rgba(139, 156, 252, 0.55);
  --layout-edit-hover: #8B9CFC;
  --layout-edit-placeholder-bg: rgba(114, 134, 248, 0.12);
}

/* 淡彩浅色：通透水彩玻璃 */
html[data-theme="light"] {
  color-scheme: light;

  --bg-page: #F3F5F8;
  --surface-card: rgba(255, 255, 255, 0.82);
  --surface-card-solid: rgba(255, 255, 255, 0.98);
  --surface-topbar: rgba(246, 248, 252, 0.80);
  --surface-elevated: rgba(255, 255, 255, 0.96);
  --surface-subtle: rgba(248, 250, 252, 0.86);
  --surface-hover: rgba(241, 245, 249, 0.86);
  --surface-input: rgba(255, 255, 255, 0.92);
  --surface-control: rgba(255, 255, 255, 0.88);
  --surface-seg: rgba(241, 245, 249, 0.88);
  --surface-seg-active: #FFFFFF;
  --surface-sticky-th: rgba(255, 255, 255, 0.95);
  --surface-highlight: rgba(255, 255, 255, 0.92);
  --surface-row-active: rgba(239, 246, 255, 0.88);
  --surface-drawer-body: #F8FAFC;

  --border-card: rgba(226, 232, 240, 0.82);
  --border-default: #E2E8F0;
  --border-strong: #CBD5E1;
  --border-subtle: #F1F5F9;
  --border-dashed: #E2E8F0;

  --text-strong: #0F172A;
  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-faint: #94A3B8;

  --accent-bg: #1E293B;
  --accent-border: #1E293B;
  --accent-text: #FFFFFF;
  --accent-link: #2B82D9;
  --accent-soft-bg: #EFF6FF;
  --accent-soft-border: #BFDBFE;
  --accent-soft-text: #1D4ED8;
  --accent-pin-fill: rgba(37, 99, 235, 0.18);
  --primary-btn-bg: #2B82D9;
  --primary-btn-hover: #1D6FD1;

  --color-up: #D63B3B;
  --color-up-bar: #D84A4A;
  --color-up-soft: #FEF2F2;
  --color-up-border: #FECACA;
  --color-up-text: #B91C1C;
  --color-up-prev: #FCA5A5;
  --color-up-retrace-a: rgba(214, 59, 59, 0.45);
  --color-up-retrace-b: rgba(254, 226, 226, 0.92);

  --color-down: #0D9F6E;
  --color-down-bar: #14AD7A;
  --color-down-soft: #ECFDF5;
  --color-down-border: #A7F3D0;
  --color-down-text: #047857;
  --color-down-prev: #6EE7B7;
  --color-down-retrace-a: rgba(13, 159, 110, 0.45);
  --color-down-retrace-b: rgba(209, 250, 229, 0.92);

  --color-hold: #7C3AED;
  --color-hold-fill: #8B5CF6;
  --color-hold-axis: #7C6BA8;
  --color-hold-soft: #F5F3FF;
  --color-hold-border: #DDD6FE;
  --color-hold-text: #6D28D9;

  --color-sh: #D97706;
  --color-sh-axis: #B47B38;
  --color-sh-soft: #FFFBEB;
  --color-sh-border: #FDE68A;
  --color-sh-text: #B45309;

  --color-ok: #10B981;
  --color-ok-soft: #DCFCE7;
  --color-ok-text: #15803D;

  --bar-track: #F1F5F9;
  --bar-prev-neutral: #A7B4C4;
  --bar-fill-neutral: #64748B;
  --bar-split-line: #FFFFFF;

  --shadow-card: 0 2px 10px rgba(15, 23, 42, 0.04), inset 0 1px 0 var(--surface-highlight);
  --shadow-popover: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-drawer: 12px 0 36px rgba(15, 23, 42, 0.14);
  --shadow-tooltip: 0 8px 24px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-seg-active: 0 1px 2px rgba(15, 23, 42, 0.06);
  --mask-modal: rgba(15, 23, 42, 0.36);
  --mask-drawer: rgba(15, 23, 42, 0.14);
  --scroll-thumb: #CBD5E1;
  --scroll-thumb-hover: #94A3B8;

  --chart-grid: #F1F5F9;
  --chart-axis: #E2E8F0;
  --chart-zero: #CBD5E1;
  --chart-text: #94A3B8;
  --chart-text-band: #64748B;
  --chart-band-even: #F8FAFC;
  --chart-band-odd: #FFFFFF;
  --chart-band-hover-bg: #EFF6FF;
  --chart-band-hover-text: #2563EB;
  --chart-band-sel-bg: #DBEAFE;
  --chart-band-sel-text: #1D4ED8;
  --chart-dot-stroke: #FFFFFF;
  --chart-dot-hollow-fill: #FFFFFF;
  --chart-price-stroke: #475569;
  --chart-hold-low: #94A3B8;
  --chart-profile-buy-closed: #C98A8A;
  --chart-profile-sell-closed: #7BB5A2;
  --chart-profile-hover: rgba(148, 163, 184, 0.13);
  --chart-profile-band-bg: rgba(148, 163, 184, 0.09);
  --chart-profile-band-stroke: rgba(148, 163, 184, 0.34);
  --chart-span-buy: rgba(216, 74, 74, 0.08);
  --chart-span-sell: rgba(20, 173, 122, 0.08);
  --chart-crosshair: #94A3B8;
  --chart-live-line: #F59E0B;
  --chart-live-bg: #FFFBEB;
  --chart-live-border: #FCD34D;
  --chart-live-text: #D97706;
  --chart-brush-fill: rgba(43, 130, 217, 0.12);
  --chart-brush-stroke: #2B82D9;
  --chart-tooltip-bg: rgba(255, 255, 255, 0.92);
  --chart-tooltip-border: rgba(226, 232, 240, 0.95);
  --chart-ruler-track: linear-gradient(90deg, #D1FAE5 0%, #E2E8F0 50%, #FEE2E2 100%);
  --code-block-bg: #1E293B;
  --code-block-text: #E2E8F0;
  --env-guide-bg: #FFFBEB;
  --env-guide-border: #FDE68A;
  --env-guide-title: #92400E;
  --env-guide-text: #78350F;
  --user-bubble-bg: #EFF6FF;
  --user-bubble-border: #DBEAFE;
  --user-bubble-text: #1E3A8A;
  --layout-edit-outline: #93C5FD;
  --layout-edit-hover: #2B82D9;
  --layout-edit-placeholder-bg: rgba(43, 130, 217, 0.08);

  /* 浅色水彩云朵版三套流彩光晕 */
  --aurora-grad-peach:
    radial-gradient(48% 54% at 14% 16%, rgba(254, 195, 208, 0.64) 0%, transparent 72%),
    radial-gradient(48% 54% at 84% 18%, rgba(254, 215, 170, 0.58) 0%, transparent 72%),
    radial-gradient(52% 54% at 52% 88%, rgba(233, 213, 255, 0.56) 0%, transparent 72%),
    radial-gradient(40% 46% at 16% 84%, rgba(254, 243, 199, 0.60) 0%, transparent 70%),
    radial-gradient(38% 44% at 88% 82%, rgba(251, 207, 232, 0.52) 0%, transparent 70%);
  --aurora-grad-aurora:
    radial-gradient(46% 52% at 18% 18%, rgba(251, 182, 206, 0.58) 0%, transparent 72%),
    radial-gradient(48% 54% at 82% 16%, rgba(147, 210, 255, 0.58) 0%, transparent 72%),
    radial-gradient(50% 52% at 54% 86%, rgba(196, 181, 253, 0.54) 0%, transparent 72%),
    radial-gradient(42% 48% at 16% 82%, rgba(153, 246, 228, 0.52) 0%, transparent 70%),
    radial-gradient(36% 42% at 86% 78%, rgba(254, 240, 165, 0.48) 0%, transparent 70%);
  --aurora-grad-mint:
    radial-gradient(48% 54% at 16% 20%, rgba(153, 246, 228, 0.60) 0%, transparent 72%),
    radial-gradient(48% 54% at 84% 22%, rgba(186, 230, 253, 0.60) 0%, transparent 72%),
    radial-gradient(46% 52% at 70% 84%, rgba(221, 214, 254, 0.54) 0%, transparent 72%),
    radial-gradient(42% 48% at 22% 84%, rgba(236, 252, 203, 0.56) 0%, transparent 70%),
    radial-gradient(38% 44% at 50% 18%, rgba(207, 250, 254, 0.50) 0%, transparent 70%);
  --aurora-grad-lemon:
    radial-gradient(48% 54% at 16% 18%, rgba(254, 240, 138, 0.68) 0%, transparent 72%),
    radial-gradient(48% 54% at 84% 20%, rgba(167, 243, 208, 0.58) 0%, transparent 72%),
    radial-gradient(48% 52% at 52% 86%, rgba(254, 215, 170, 0.58) 0%, transparent 72%),
    radial-gradient(42% 48% at 18% 82%, rgba(186, 230, 253, 0.52) 0%, transparent 70%),
    radial-gradient(38% 44% at 86% 80%, rgba(254, 249, 195, 0.62) 0%, transparent 70%);
  --aurora-grad-berry:
    radial-gradient(48% 54% at 16% 18%, rgba(251, 207, 232, 0.68) 0%, transparent 72%),
    radial-gradient(48% 54% at 82% 20%, rgba(233, 213, 255, 0.62) 0%, transparent 72%),
    radial-gradient(50% 54% at 50% 86%, rgba(254, 205, 211, 0.62) 0%, transparent 72%),
    radial-gradient(40% 46% at 18% 84%, rgba(255, 228, 230, 0.56) 0%, transparent 70%),
    radial-gradient(38% 44% at 86% 82%, rgba(221, 214, 254, 0.56) 0%, transparent 70%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 16px 20px;
  min-height: 100vh;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.28s ease, color 0.24s ease;
}

/* 全局无缝流彩柔光背景层（三层 GPU 错峰交叉淡入淡出 + 互质周期慢漂移） */
.aurora-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: var(--aurora-opacity, 0.55);
  transition: opacity 0.35s ease;
}

.aurora-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  will-change: opacity;
}

.aurora-mesh {
  position: absolute;
  inset: -16%;
  filter: blur(44px);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.aurora-layer.is-peach .aurora-mesh { background: var(--aurora-grad-peach); }
.aurora-layer.is-aurora .aurora-mesh { background: var(--aurora-grad-aurora); }
.aurora-layer.is-mint .aurora-mesh { background: var(--aurora-grad-mint); }
.aurora-layer.is-lemon .aurora-mesh { background: var(--aurora-grad-lemon); }
.aurora-layer.is-berry .aurora-mesh { background: var(--aurora-grad-berry); }

/* 固定单色模式：平滑交叉淡入所选色系 */
html[data-aurora="peach"] .aurora-layer.is-peach,
html[data-aurora="aurora"] .aurora-layer.is-aurora,
html[data-aurora="mint"] .aurora-layer.is-mint,
html[data-aurora="lemon"] .aurora-layer.is-lemon,
html[data-aurora="berry"] .aurora-layer.is-berry {
  opacity: 1;
}

/* 自动流彩模式（默认）：三层 36s 周期错峰 12s 交叉溶解，无缝过渡、永无暗谷 */
html[data-aurora="auto"] .aurora-layer.is-peach,
html[data-aurora="auto"] .aurora-layer.is-aurora,
html[data-aurora="auto"] .aurora-layer.is-mint {
  animation: auroraCycle 36s linear infinite;
}

html[data-aurora="auto"] .aurora-layer.is-peach {
  animation-delay: 0s;
}

html[data-aurora="auto"] .aurora-layer.is-aurora {
  animation-delay: -24s;
}

html[data-aurora="auto"] .aurora-layer.is-mint {
  animation-delay: -12s;
}

@keyframes auroraCycle {
  0%   { opacity: 1; }
  22%  { opacity: 1; }
  40%  { opacity: 0; }
  82%  { opacity: 0; }
  100% { opacity: 1; }
}

/* 多层互质周期超慢呼吸漂移，避免轨迹重复感 */
html[data-aurora-motion="on"] .aurora-layer.is-peach .aurora-mesh,
html[data-aurora-motion="on"] .aurora-layer.is-berry .aurora-mesh {
  animation: auroraDriftA 24s ease-in-out infinite alternate;
}

html[data-aurora-motion="on"] .aurora-layer.is-aurora .aurora-mesh,
html[data-aurora-motion="on"] .aurora-layer.is-lemon .aurora-mesh {
  animation: auroraDriftB 29s ease-in-out infinite alternate;
}

html[data-aurora-motion="on"] .aurora-layer.is-mint .aurora-mesh {
  animation: auroraDriftC 34s ease-in-out infinite alternate;
}

@keyframes auroraDriftA {
  0%   { transform: translate3d(-1.8%, -1.2%, 0) scale(1) rotate(0deg); }
  50%  { transform: translate3d(2.2%, 1.4%, 0) scale(1.045) rotate(1.4deg); }
  100% { transform: translate3d(-1.0%, 2.0%, 0) scale(1.02) rotate(-1.0deg); }
}

@keyframes auroraDriftB {
  0%   { transform: translate3d(1.8%, -1.4%, 0) scale(1.02) rotate(-1.2deg); }
  50%  { transform: translate3d(-2.0%, 1.6%, 0) scale(1.05) rotate(1.2deg); }
  100% { transform: translate3d(1.2%, 1.8%, 0) scale(1) rotate(0.6deg); }
}

@keyframes auroraDriftC {
  0%   { transform: translate3d(-1.2%, 1.8%, 0) scale(1.01) rotate(0.8deg); }
  50%  { transform: translate3d(1.8%, -1.6%, 0) scale(1.04) rotate(-1.3deg); }
  100% { transform: translate3d(-1.6%, -0.8%, 0) scale(1.03) rotate(1.1deg); }
}

@media (prefers-reduced-motion: reduce) {
  html[data-aurora-motion="on"] .aurora-mesh {
    animation: none;
  }
}

.hidden {
  display: none !important;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.page-wrap {
  position: relative;
  z-index: 2;
  max-width: 1860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--surface-card);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* 解锁 & 授权居中页 */
.auth-shell {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 40px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 380px;
  padding: 28px;
  text-align: center;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-strong);
}

.auth-desc {
  margin: 0 0 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-input {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface-input);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  margin-bottom: 12px;
}

.auth-input:focus {
  border-color: var(--accent-link);
}

.auth-err {
  margin-top: 10px;
  font-size: 12px;
  color: var(--color-up);
  min-height: 16px;
}

.full-width {
  width: 100%;
  display: inline-block;
  text-align: center;
}

/* 顶栏（吸顶保持可见） */
.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  margin: -10px -8px 0;
  border-radius: 0 0 14px 14px;
  background: var(--surface-topbar);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.topbar-left {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 顶栏圆形宠物猫头像 + 宽幅悬浮流彩横幅（覆盖右侧区域、支持优雅两行、9秒轻柔收回） */
.cat-companion-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 56;
}

.cat-avatar-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 2px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  background: conic-gradient(from 0deg, #F9A8B8, #FDBA74, #FEF08A, #5EEAD4, #7DD3FC, #C4B5FD, #F9A8B8);
  box-shadow: 0 3px 12px rgba(244, 130, 178, 0.28);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.cat-avatar-btn:hover {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 5px 16px rgba(249, 168, 184, 0.44);
}

.cat-avatar-btn:focus:not(:focus-visible) {
  outline: none;
}

.cat-avatar-btn.is-speaking {
  box-shadow: 0 4px 16px rgba(249, 168, 184, 0.46);
}

/* 播放音乐时外圈流彩柔光脉动 */
.cat-avatar-btn.is-playing {
  box-shadow: 0 0 0 3px rgba(249, 168, 184, 0.2), 0 0 18px rgba(249, 168, 184, 0.5);
  animation: catVinylGlow 3.2s ease-in-out infinite alternate;
}

@keyframes catVinylGlow {
  0%   { box-shadow: 0 0 0 2.5px rgba(249, 168, 184, 0.16), 0 0 14px rgba(249, 168, 184, 0.36); }
  100% { box-shadow: 0 0 0 4px rgba(196, 181, 253, 0.24), 0 0 22px rgba(249, 168, 184, 0.56); }
}

.cat-avatar-btn.is-pop {
  animation: catAvatarBounce 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes catAvatarBounce {
  0%   { transform: scale(1) rotate(0deg); }
  35%  { transform: scale(1.16) rotate(-7deg); }
  70%  { transform: scale(0.95) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* 黑胶唱片缓慢匀速旋转：用 animation-play-state 启停，暂停时丝滑定格在原角度不回弹 */
.cat-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface-card-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: catVinylSpin 14s linear infinite;
  animation-play-state: paused;
  will-change: transform;
}

.cat-avatar-btn.is-playing .cat-avatar-inner {
  animation-play-state: running;
}

@keyframes catVinylSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.cat-vinyl-groove {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: repeating-radial-gradient(
    circle,
    transparent 0 3px,
    rgba(255, 255, 255, 0.065) 3px 4px
  );
  transition: opacity 0.35s ease;
}

.cat-avatar-btn.is-playing .cat-vinyl-groove {
  opacity: 1;
}

.cat-music-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg-page);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.cat-avatar-btn.is-playing .cat-music-badge {
  opacity: 1;
  transform: scale(1);
}

.cat-avatar-inner svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cat-eyes {
  transform-origin: 50% 54%;
  animation: catEyeBlink 4.8s infinite;
}

@keyframes catEyeBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}

.cat-heart-pop {
  position: absolute;
  top: -8px;
  left: 14px;
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
  z-index: 62;
  animation: catHeartFloat 0.86s ease-out forwards;
}

.cat-heart-pop.is-note {
  color: var(--accent-soft-text);
  font-size: 12px;
  animation: catNoteFloat 1.35s ease-out forwards;
}

@keyframes catHeartFloat {
  0%   { opacity: 1; transform: translate3d(0, 0, 0) scale(0.7); }
  100% { opacity: 0; transform: translate3d(4px, -24px, 0) scale(1.18); }
}

@keyframes catNoteFloat {
  0%   { opacity: 0.92; transform: translate3d(0, 0, 0) scale(0.75); }
  100% { opacity: 0; transform: translate3d(10px, -26px, 0) scale(1.15); }
}

.cat-banner {
  position: absolute;
  left: calc(100% + 12px);
  top: -4px;
  z-index: 58;
  width: max-content;
  min-width: min(410px, 74vw);
  max-width: min(560px, 80vw);
  border-radius: 16px;
  padding: 1.3px;
  background: linear-gradient(
    115deg,
    rgba(249, 168, 184, 0.84),
    rgba(253, 186, 116, 0.66),
    rgba(196, 181, 253, 0.72),
    rgba(125, 211, 252, 0.62)
  );
  box-shadow: var(--shadow-popover), 0 8px 28px rgba(249, 168, 184, 0.18);
  transform: translate3d(-10px, -4px, 0) scale(0.95);
  transform-origin: left 22px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.26s ease,
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.26s;
}

.cat-banner.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.cat-banner-tail {
  position: absolute;
  left: -5px;
  top: 22px;
  width: 10px;
  height: 10px;
  background: var(--surface-elevated);
  border-left: 1.3px solid rgba(249, 168, 184, 0.8);
  border-bottom: 1.3px solid rgba(249, 168, 184, 0.8);
  transform: translateY(-50%) rotate(45deg);
}

.cat-banner-inner {
  position: relative;
  background: var(--surface-elevated);
  backdrop-filter: blur(22px) saturate(138%);
  -webkit-backdrop-filter: blur(22px) saturate(138%);
  border-radius: 14.8px;
  padding: 8px 12px 10px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
}

.cat-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

/* 横幅上行工具胶囊组（音乐 + 佛系遮金额 + 休息 + 喂鱼 + 收工） */
.cat-banner-tools {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1 1 auto;
  min-width: 0;
}

.cat-banner-tools .privacy-mask-btn,
.cat-banner-tools .rest-trigger-btn,
.cat-banner-tools .cat-feed-btn,
.cat-banner-tools .cat-closing-btn {
  height: auto;
  min-height: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 1.35;
  white-space: nowrap;
}

.cat-banner-tools .privacy-mask-btn {
  padding: 3px 7px;
}

.cat-feed-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-sh-soft);
  border-color: var(--color-sh-border);
  color: var(--color-sh-text);
  font-weight: 600;
}

.cat-feed-btn:hover {
  filter: brightness(1.09);
  transform: translateY(-0.5px);
}

.cat-feed-btn.is-fed {
  animation: catAvatarBounce 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-bond-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  line-height: 1.4;
}

.cat-closing-btn {
  background: var(--color-hold-soft);
  border-color: var(--color-hold-border);
  color: var(--color-hold-text);
  font-weight: 600;
}

.cat-closing-btn:hover {
  filter: brightness(1.09);
  transform: translateY(-0.5px);
}

.cat-banner-body {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 1px 2px 1px 1px;
}

.cat-banner-progress {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  overflow: hidden;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.cat-banner.is-paused .cat-banner-progress,
.cat-banner.is-pinned .cat-banner-progress {
  opacity: 0;
}

.cat-banner-progress i {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #F9A8B8, #FDBA74, #C4B5FD, #7DD3FC);
  transform: scaleX(0);
}

.cat-banner-progress i.is-running {
  animation: catBannerCountdown var(--cat-hide-ms, 9000ms) linear forwards;
}

.cat-banner.is-paused .cat-banner-progress i.is-running {
  animation-play-state: paused;
}

@keyframes catBannerCountdown {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* 横幅左端音乐播放胶囊按键（原地替换原 🐾 喵 徽章） */
.cat-music-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.35;
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  border: 1px solid var(--accent-soft-border);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
}

.cat-music-pill:hover {
  filter: brightness(1.08);
  border-color: var(--accent-border);
  transform: translateY(-0.5px);
}

.cat-music-pill:focus:not(:focus-visible) {
  outline: none;
}

.cat-music-pill.is-playing {
  background: var(--color-hold-soft);
  border-color: var(--color-hold-border);
  color: var(--color-hold-text);
  box-shadow: 0 0 12px rgba(191, 162, 255, 0.22);
}

.cat-music-play-icon {
  font-size: 10px;
  line-height: 1;
}

.cat-music-pill.is-playing .cat-music-play-icon {
  display: none;
}

.cat-music-eq {
  display: none;
  align-items: flex-end;
  gap: 1.5px;
  height: 10px;
  width: 10px;
}

.cat-music-pill.is-playing .cat-music-eq {
  display: inline-flex;
}

.cat-music-eq i {
  display: block;
  width: 2px;
  border-radius: 1px;
  background: currentColor;
  height: 3px;
}

.cat-music-pill.is-playing .cat-music-eq i:nth-child(1) {
  animation: catEq1 0.85s ease-in-out infinite alternate;
}

.cat-music-pill.is-playing .cat-music-eq i:nth-child(2) {
  animation: catEq2 0.62s ease-in-out infinite alternate;
}

.cat-music-pill.is-playing .cat-music-eq i:nth-child(3) {
  animation: catEq3 0.94s ease-in-out infinite alternate;
}

@keyframes catEq1 { from { height: 3px; } to { height: 10px; } }
@keyframes catEq2 { from { height: 9px; } to { height: 3px; } }
@keyframes catEq3 { from { height: 4px; } to { height: 8.5px; } }

.cat-music-label {
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-banner-act.is-ai-active {
  background: var(--color-hold-soft);
  border-color: var(--color-hold-border);
  color: var(--color-hold-text);
}

/* 外观面板中的治愈轻音乐控制区 */
.theme-music-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-music-ctrls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.theme-mini-icon-btn {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid var(--border-default);
  background: var(--surface-control);
  color: var(--text-secondary);
  font-size: 11px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.14s ease;
}

.theme-mini-icon-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-strong);
}

.music-track-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.music-track-btn {
  border: 1px solid var(--border-default);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  border-radius: 7px;
  padding: 5px 4px;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.14s ease;
}

.music-track-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-strong);
}

.music-track-btn.active {
  background: var(--color-hold-soft);
  border-color: var(--color-hold-border);
  color: var(--color-hold-text);
  font-weight: 600;
}

.cat-banner-text {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-cat);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.62;
  letter-spacing: 0.02em;
  color: var(--text-strong);
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.cat-banner-text.is-swap {
  opacity: 0;
  transform: translateY(3px);
}

.cat-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.cat-banner-act {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: var(--surface-control);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.14s ease;
}

.cat-banner-act:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-strong);
}

.cat-banner-act.is-pinned {
  background: var(--accent-soft-bg);
  border-color: var(--accent-soft-border);
  color: var(--accent-soft-text);
  box-shadow: 0 0 10px rgba(249, 168, 184, 0.22);
}

.cat-banner-act.is-ai-btn:hover {
  background: var(--color-hold-soft);
  border-color: var(--color-hold-border);
  color: var(--color-hold-text);
}

.cat-banner-act.is-loading {
  animation: auroraDotSpin 1.1s linear infinite;
  pointer-events: none;
  opacity: 0.78;
}

.theme-popover-sep {
  height: 1px;
  background: var(--border-subtle);
  margin: 0 -2px;
}

@media (max-width: 900px) {
  .cat-banner {
    min-width: min(300px, 78vw);
    max-width: min(460px, 86vw);
  }
}

.kpi-pill-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.kpi-happy-tip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 54;
  width: max-content;
  max-width: min(440px, 84vw);
  padding: 8px 13px;
  border-radius: 12px;
  border: 1px solid var(--accent-soft-border);
  background: var(--surface-elevated);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  box-shadow: var(--shadow-tooltip), 0 0 18px rgba(249, 168, 184, 0.14);
  color: var(--text-strong);
  font-family: var(--font-cat);
  font-size: 13.5px;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.97);
  transform-origin: top left;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.2s;
}

.kpi-pill-wrap:hover .kpi-happy-tip.has-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.kpi-pill-wrap:has(.kpi-pill-btn.is-open) .kpi-happy-tip {
  opacity: 0;
  visibility: hidden;
}

.kpi-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 29px;
  padding: 0 11px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--surface-control);
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.kpi-pill-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.kpi-pill-btn.is-open {
  background: var(--surface-elevated);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-seg-active);
}

.kpi-pill-btn.is-pinned {
  border-color: var(--accent-soft-border);
  background: var(--accent-soft-bg);
}

.kpi-pill-btn:focus:not(:focus-visible) {
  outline: none;
}

.kpi-pill-label {
  color: var(--text-muted);
  font-weight: 500;
}

.kpi-pill-val {
  font-weight: 600;
  color: var(--text-primary);
}

.kpi-pill-val.text-up { color: var(--color-up); }
.kpi-pill-val.text-down { color: var(--color-down); }

.kpi-pill-caret {
  color: var(--text-faint);
  flex-shrink: 0;
  transition: transform 0.18s ease, color 0.14s ease;
}

.kpi-pill-btn.is-open .kpi-pill-caret {
  transform: rotate(180deg);
  color: var(--text-secondary);
}

/* 顶栏下方覆盖式下拉汇总通栏 */
.kpi-drawer {
  position: absolute;
  top: calc(100% + 6px);
  left: 8px;
  right: 8px;
  z-index: 44;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.18s;
}

.kpi-drawer.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.kpi-drawer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 10px 18px;
  background: var(--surface-elevated);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border-color: var(--border-default);
  box-shadow: var(--shadow-popover);
}

.kpi-drawer-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding-left: 10px;
  border-left: 1px solid var(--border-subtle);
}

.kpi-pin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.14s ease;
}

.kpi-pin-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.kpi-pin-btn.is-pinned {
  background: var(--accent-soft-bg);
  border-color: var(--accent-soft-border);
  color: var(--accent-soft-text);
}

.kpi-pin-btn.is-pinned svg {
  fill: var(--accent-pin-fill);
  transform: rotate(-32deg);
}

.kpi-pin-btn svg {
  transition: transform 0.16s ease, fill 0.16s ease;
}

.kpi-pin-btn:focus:not(:focus-visible) {
  outline: none;
}

.page-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip {
  border: 1px solid var(--border-default);
  background: var(--surface-control);
  color: var(--text-secondary);
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip:hover {
  background: var(--surface-hover);
  color: var(--text-strong);
  border-color: var(--border-strong);
}

.chip.active {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent-text);
}

.chip:focus:not(:focus-visible),
.mini-seg-btn:focus:not(:focus-visible),
.btn-light:focus:not(:focus-visible),
.btn-ghost:focus:not(:focus-visible),
.aurora-swatch-btn:focus:not(:focus-visible),
.theme-switch-btn:focus:not(:focus-visible) {
  outline: none;
}

.date-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 4px 10px;
}

.date-input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

.date-sep {
  color: var(--text-faint);
  font-size: 12px;
}

.select-input {
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
}

.select-input:focus {
  border-color: var(--accent-link);
}

.select-input option {
  background: var(--surface-card-solid);
  color: var(--text-primary);
}

.btn-dark,
.btn-primary,
.btn-light,
.btn-ghost {
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.14s ease;
}

.btn-dark {
  border: 1px solid var(--accent-border);
  background: var(--accent-bg);
  color: var(--accent-text);
  padding: 8px 14px;
}

.btn-dark:hover {
  filter: brightness(1.06);
}

.btn-primary {
  border: 1px solid var(--primary-btn-bg);
  background: var(--primary-btn-bg);
  color: #FFFFFF;
  padding: 9px 16px;
}

.btn-primary:hover {
  background: var(--primary-btn-hover);
  border-color: var(--primary-btn-hover);
}

.btn-light {
  border: 1px solid var(--border-default);
  background: var(--surface-control);
  color: var(--text-primary);
  padding: 5px 12px;
}

.btn-light:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.topbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  padding: 0;
  color: var(--text-secondary);
}

.topbar-icon-btn:hover {
  color: var(--text-strong);
  border-color: var(--border-strong);
}

/* 顶栏快捷外观面板 */
.theme-anchor {
  position: relative;
}

.theme-trigger-btn.is-open {
  background: var(--accent-soft-bg);
  border-color: var(--accent-soft-border);
  color: var(--accent-soft-text);
}

.theme-popover {
  width: 296px;
  max-height: calc(100vh - 76px);
  overflow-y: auto;
  z-index: 60;
}

#tp-cat-font-seg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
}

#tp-cat-font-seg .mini-seg-btn {
  white-space: nowrap;
}

.aurora-swatch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.aurora-swatch-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--border-default);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s ease;
}

.aurora-swatch-btn:hover {
  background: var(--surface-hover);
  color: var(--text-strong);
  border-color: var(--border-strong);
}

.aurora-swatch-btn.active {
  background: var(--accent-soft-bg);
  border-color: var(--accent-soft-border);
  color: var(--accent-soft-text);
  font-weight: 600;
}

.aurora-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-block;
}

.aurora-dot.is-auto {
  background: conic-gradient(from 0deg, #F9A8B8, #FDBA74, #FEF08A, #5EEAD4, #7DD3FC, #C4B5FD, #F9A8B8);
  animation: auroraDotSpin 8s linear infinite;
}

@keyframes auroraDotSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.aurora-dot.is-peach {
  background: linear-gradient(135deg, #F9A8B8 0%, #FDBA74 52%, #D8B4FE 100%);
}

.aurora-dot.is-aurora {
  background: linear-gradient(135deg, #F48FB1 0%, #7DD3FC 52%, #A78BFA 100%);
}

.aurora-dot.is-mint {
  background: linear-gradient(135deg, #5EEAD4 0%, #7DD3FC 55%, #C4B5FD 100%);
}

.aurora-dot.is-lemon {
  background: linear-gradient(135deg, #FEF08A 0%, #6EE7B7 55%, #FDBA74 100%);
}

.aurora-dot.is-berry {
  background: linear-gradient(135deg, #F9A8D4 0%, #D8B4FE 55%, #FDA4AF 100%);
}

.theme-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-range {
  width: 100%;
  accent-color: #DF7B95;
  cursor: pointer;
  margin: 0;
}

html[data-theme="dim"] .theme-range {
  accent-color: #7C8CF8;
}

html[data-theme="light"] .theme-range {
  accent-color: #2B82D9;
}

.gs-theme-range {
  width: 112px;
}

.gs-intensity-val {
  min-width: 32px;
  text-align: right;
}

.theme-motion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
}

.theme-switch-btn {
  border: 1px solid var(--border-default);
  background: var(--surface-control);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 11.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s ease;
}

.theme-switch-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-strong);
}

.theme-switch-btn.active {
  background: var(--accent-soft-bg);
  border-color: var(--accent-soft-border);
  color: var(--accent-soft-text);
  font-weight: 600;
}

.btn-layout-active {
  background: var(--accent-bg) !important;
  border-color: var(--accent-border) !important;
  color: var(--accent-text) !important;
}

.btn-light:disabled,
.btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 5px 8px;
}

.btn-ghost:hover {
  color: var(--text-strong);
  background: var(--surface-hover);
}

.status-banner {
  background: var(--color-up-soft);
  border: 1px solid var(--color-up-border);
  color: var(--color-up-text);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
}

.muted-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* 情绪双色（柔和红 / 翡翠绿）与全景图主题色（优雅紫 / 琥珀金） */
.text-up { color: var(--color-up); }
.text-down { color: var(--color-down); }
.text-hold { color: var(--color-hold); }
.text-sh { color: var(--color-sh); }
.text-muted { color: var(--text-faint); }

/* GridStack 自由网格适配（默认锁定零干扰，编辑态柔和清晰） */
#dashboard-grid {
  margin: -7px;
  min-height: 760px;
}

.grid-stack-item-content {
  overflow: visible !important;
}

.grid-stack-item-content > .card {
  width: 100%;
  height: 100%;
}

.kpi-strip {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 0;
}

.kpi-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 22px;
  min-height: 0;
  white-space: nowrap;
}

.kpi-item:first-child {
  padding-left: 0;
}

.kpi-item + .kpi-item {
  border-left: 1px solid var(--border-subtle);
}

.kpi-main-row {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.25;
}

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.kpi-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.kpi-val.text-up { color: var(--color-up); }
.kpi-val.text-down { color: var(--color-down); }

.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.25;
}

/* 编辑布局状态下的清爽反馈 */
.layout-editing .grid-stack-item-content {
  cursor: grab;
  border-radius: 14px;
  outline: 1.5px dashed var(--layout-edit-outline);
  outline-offset: -1px;
  transition: outline-color 0.12s ease, box-shadow 0.12s ease;
}

.layout-editing .grid-stack-item-content:hover {
  outline-color: var(--layout-edit-hover);
  box-shadow: 0 4px 16px var(--layout-edit-placeholder-bg);
}

.layout-editing .grid-stack-item.ui-draggable-dragging .grid-stack-item-content {
  cursor: grabbing;
  outline-color: var(--layout-edit-hover);
  box-shadow: var(--shadow-popover);
}

.layout-editing .plot-hitbox,
.layout-editing .profile-hitbox {
  pointer-events: none;
}

.layout-editing .grid-stack-placeholder > .placeholder-content {
  background: var(--layout-edit-placeholder-bg) !important;
  border: 1.5px dashed var(--layout-edit-hover) !important;
  border-radius: 14px !important;
}

.layout-editing .ui-resizable-se {
  background-image: none !important;
  width: 16px !important;
  height: 16px !important;
  right: 4px !important;
  bottom: 4px !important;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  border-radius: 0 0 4px 0;
  opacity: 0.7;
}

.layout-editing .ui-resizable-se:hover {
  border-color: var(--layout-edit-hover);
  opacity: 1;
}

/* 通栏横幅：持仓·上证·盈亏联动图 */
.overview-card {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.overview-body {
  flex: 1;
  min-height: 0;
  position: relative;
}

.legend-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 4px;
}

.overview-card .traj-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-up { background: var(--color-up-bar); }
.dot-down { background: var(--color-down-bar); }

.swatch-hold {
  width: 12px;
  height: 8px;
  background: var(--color-hold-soft);
  border-top: 2px solid var(--color-hold);
  border-radius: 1px;
  display: inline-block;
}

.dash-sh {
  width: 13px;
  height: 2.2px;
  background: var(--color-sh);
  display: inline-block;
  border-radius: 1.5px;
}

.dash-sh.is-dashed {
  width: 14px;
  height: 0;
  background: transparent;
  border-top: 2px dashed var(--color-sh);
  opacity: 0.72;
  border-radius: 0;
}

.dash-pnl {
  width: 13px;
  height: 2.2px;
  background: linear-gradient(90deg, var(--color-up) 0%, var(--color-up) 50%, var(--color-down) 50%, var(--color-down) 100%);
  display: inline-block;
  border-radius: 1.5px;
}

.sh-pct-sub {
  font-size: 11px;
  margin-left: 3px;
}

.ov-foot-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

/* 图表卡片（高度跟随 GridStack 容器） */
.chart-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.title-pair {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
}

/* 合并后的持仓价格与盈亏决策表 */
.holding-card {
  padding: 14px 16px 10px;
}

.holding-table-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -16px;
}

.setting-anchor {
  position: relative;
}

.setting-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  width: 280px;
  background: var(--surface-elevated);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: var(--shadow-popover);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.setting-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.setting-seg-full {
  width: 100%;
}

.setting-seg-full .mini-seg-btn {
  flex: 1;
  text-align: center;
  padding: 3px 6px;
}

.setting-num-input {
  width: 82px;
  padding: 4px 8px;
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: 7px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
}

.setting-num-input:focus {
  border-color: var(--accent-link);
}

table.holding-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

table.holding-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-sticky-th);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-muted);
  font-weight: 500;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

table.holding-table thead th:first-child,
table.holding-table tbody td:first-child,
table.holding-table tfoot td:first-child {
  padding-left: 16px;
}

table.holding-table thead th:last-child,
table.holding-table tbody td:last-child,
table.holding-table tfoot td:last-child {
  padding-right: 16px;
}

table.holding-table th.sortable,
table.holding-table .th-sort-part.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.12s ease;
}

table.holding-table th.sortable:hover,
table.holding-table th.sortable.sorted,
table.holding-table .th-sort-part.sortable:hover,
table.holding-table .th-sort-part.sortable.sorted {
  color: var(--text-strong);
}

.th-sort-sep {
  margin: 0 4px;
  color: var(--text-faint);
  font-weight: 400;
}

.sort-ind {
  display: inline-block;
  margin-left: 3px;
  font-size: 10px;
  color: var(--accent-link);
}

table.holding-table tbody td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

table.holding-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--surface-sticky-th);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 10px 7px;
  border-bottom: none;
  vertical-align: middle;
  box-shadow: inset 0 1px 0 var(--border-strong), 0 -4px 12px rgba(0, 0, 0, 0.08);
}

.holding-summary-row .stock-cell-main {
  font-weight: 700;
}

.holding-summary-row .prog-main {
  font-weight: 700;
}

.holding-summary-row .prog-top {
  line-height: 1.35;
}

.center-col {
  text-align: center !important;
}

.stock-cell-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.25;
  white-space: nowrap;
}

.stock-star-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  height: 17px;
  border-radius: 999px;
  border: 1px solid var(--color-sh-border);
  background: var(--color-sh-soft);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.14s ease, box-shadow 0.16s ease;
  animation: starGlowPulse 2.8s ease-in-out infinite alternate;
}

.stock-star-badge:hover {
  transform: scale(1.22) rotate(-8deg);
  filter: brightness(1.12);
  box-shadow: 0 0 10px rgba(247, 190, 96, 0.45);
}

@keyframes starGlowPulse {
  0%   { box-shadow: 0 0 0 rgba(247, 190, 96, 0); }
  100% { box-shadow: 0 0 8px rgba(247, 190, 96, 0.34); }
}

.tbl-row.active .stock-cell-main {
  color: var(--accent-soft-text);
}

.stock-cell-sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.25;
}

.prog-col {
  width: 18.5%;
  min-width: 110px;
}

.prog-col-mv {
  width: 20%;
  min-width: 128px;
}

.prog-col-pnl {
  width: 26%;
  min-width: 186px;
}

.prog-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  line-height: 1.3;
}

.prog-main-group {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.prog-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.prog-age {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
}

.pnl-today-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 17px;
  white-space: nowrap;
}

.pnl-today-pill.is-up {
  color: var(--color-up-text);
  background: var(--color-up-soft);
}

.pnl-today-pill.is-down {
  color: var(--color-down-text);
  background: var(--color-down-soft);
}

.pnl-today-pill.is-flat {
  color: var(--text-muted);
  background: var(--surface-subtle);
}

.pnl-today-pill.is-loading {
  opacity: 0.72;
}

.pnl-today-pill .pill-stock-pct {
  margin-left: 4px;
}

.prog-main.text-up { color: var(--color-up); }
.prog-main.text-down { color: var(--color-down); }

.prog-pct {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0.9;
}

.prog-bar-bg {
  margin-top: 4px;
  height: 4px;
  width: 100%;
  background: var(--bar-track);
  border-radius: 999px;
  overflow: hidden;
}

.prog-bar-bg.is-merged {
  height: 5px;
  display: flex;
  align-items: stretch;
}

.prog-bar-group {
  display: inline-flex;
  align-items: stretch;
  height: 100%;
  max-width: 100%;
  border-radius: 999px;
  overflow: hidden;
}

.prog-seg {
  height: 100%;
}

.prog-seg.has-split {
  border-left: 1px solid var(--bar-split-line);
}

.seg-prev-neutral {
  background: var(--bar-prev-neutral);
}

.seg-prev-up {
  background: var(--color-up-prev);
}

.seg-today-up {
  background: var(--color-up);
}

.seg-prev-down {
  background: var(--color-down-prev);
}

.seg-today-down {
  background: var(--color-down);
}

.seg-retrace-up {
  background: repeating-linear-gradient(
    -45deg,
    var(--color-up-retrace-a) 0px,
    var(--color-up-retrace-a) 2.5px,
    var(--color-up-retrace-b) 2.5px,
    var(--color-up-retrace-b) 5px
  );
}

.seg-retrace-up.has-cap {
  border-left: 1.5px solid var(--color-down);
}

.seg-retrace-down {
  background: repeating-linear-gradient(
    -45deg,
    var(--color-down-retrace-a) 0px,
    var(--color-down-retrace-a) 2.5px,
    var(--color-down-retrace-b) 2.5px,
    var(--color-down-retrace-b) 5px
  );
}

.seg-retrace-down.has-cap {
  border-left: 1.5px solid var(--color-up);
}

.seg-retrace-down.has-cap-neutral {
  border-left: 1.5px solid var(--text-secondary);
}

.prog-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.fill-neutral {
  background: var(--bar-fill-neutral);
  opacity: 0.6;
}

.fill-up {
  background: var(--color-up-bar);
  opacity: 0.88;
}

.fill-down {
  background: var(--color-down-bar);
  opacity: 0.88;
}

.bar-empty-dash {
  color: var(--text-faint);
}

/* 单股轨迹图与互动控制 */
.traj-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.price-toggle-btn,
.hold-toggle-btn,
.pnl-toggle-btn,
.axis-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border-default);
  border-radius: 7px;
  background: var(--surface-control);
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.price-toggle-btn:hover,
.hold-toggle-btn:hover,
.pnl-toggle-btn:hover,
.axis-toggle-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.price-toggle-btn.active {
  background: var(--surface-seg-active);
  border-color: var(--border-strong);
  color: var(--text-strong);
  font-weight: 500;
}

.hold-toggle-btn.active {
  background: var(--color-hold-soft);
  border-color: var(--color-hold-border);
  color: var(--color-hold-text);
  font-weight: 500;
}

.pnl-toggle-btn.active {
  background: var(--color-up-soft);
  border-color: var(--color-up-border);
  color: var(--color-up-text);
  font-weight: 500;
}

.axis-toggle-btn.active {
  background: var(--color-down-soft);
  border-color: var(--color-down-border);
  color: var(--color-down-text);
  font-weight: 500;
}

.line-price-mini {
  width: 10px;
  height: 1.5px;
  background: var(--chart-price-stroke);
  border-radius: 1px;
  display: inline-block;
  opacity: 0.5;
}

.swatch-hold-mini {
  width: 9px;
  height: 6px;
  background: var(--color-hold-soft);
  border-top: 1.8px solid var(--color-hold);
  border-radius: 1px;
  display: inline-block;
  opacity: 0.5;
}

.dash-pnl-mini {
  width: 11px;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--color-up) 0,
    var(--color-up) 3.5px,
    transparent 3.5px,
    transparent 5.5px,
    var(--color-down) 5.5px,
    var(--color-down) 9px,
    transparent 9px,
    transparent 11px
  );
  border-radius: 1px;
  display: inline-block;
  opacity: 0.5;
}

.price-toggle-btn.active .line-price-mini,
.hold-toggle-btn.active .swatch-hold-mini,
.pnl-toggle-btn.active .dash-pnl-mini {
  opacity: 1;
}

.icon-btn {
  border: 1px solid var(--border-default);
  background: var(--surface-control);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  transition: all 0.12s ease;
}

.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text-strong);
  border-color: var(--border-strong);
}

.traj-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  position: relative;
}

.traj-interactive-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  user-select: none;
}

.traj-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.plot-hitbox {
  cursor: crosshair;
}

.profile-hitbox {
  cursor: pointer;
}

.profile-band .profile-band-bg {
  transition: fill 0.12s ease;
}

.profile-band.is-hovered .profile-band-bg {
  fill: var(--chart-profile-hover);
}

.profile-hover-band {
  fill: var(--chart-profile-band-bg);
  stroke: var(--chart-profile-band-stroke);
  stroke-width: 0.75;
  stroke-dasharray: 3 2.5;
  pointer-events: none;
}

.pt-node {
  transition: opacity 0.14s ease, filter 0.14s ease;
}

.pt-node.is-profile-dim {
  opacity: 0.18;
}

.pt-node.is-profile-match {
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.35));
}

.brush-rect {
  fill: var(--chart-brush-fill);
  stroke: var(--chart-brush-stroke);
  stroke-width: 1;
  pointer-events: none;
}

.time-band-cell {
  cursor: pointer;
}

.time-band-cell .time-band-bg {
  transition: fill 0.12s ease;
}

.time-band-cell .time-band-text {
  user-select: none;
  pointer-events: none;
  transition: fill 0.12s ease;
}

.time-band-cell:hover .time-band-bg {
  fill: var(--chart-band-hover-bg);
}

.time-band-cell:hover .time-band-text {
  fill: var(--chart-band-hover-text);
}

.time-band-cell.selected .time-band-bg {
  fill: var(--chart-band-sel-bg);
}

.time-band-cell.selected .time-band-text {
  fill: var(--chart-band-sel-text);
  font-weight: 600;
}

.layout-editing .time-band-cell {
  pointer-events: none;
}

.hover-span-band,
.hover-hold-dot,
.hover-pnl-dot,
.hover-sh-dot,
.cross-x,
.cross-y {
  pointer-events: none;
}

.chart-tooltip {
  position: fixed;
  top: 5px;
  right: 5px;
  left: auto;
  z-index: 320;
  width: 234px;
  max-width: calc(100vw - 10px);
  background: var(--chart-tooltip-bg);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  border: 1px solid var(--chart-tooltip-border);
  border-radius: 11px;
  box-shadow: var(--shadow-tooltip);
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--text-primary);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.chart-tooltip.is-compact {
  width: 214px;
  padding: 6px 7px;
  gap: 4px;
  border-radius: 9px;
  font-size: 11px;
}

.hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 2px 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.chart-tooltip.is-compact .hud-head {
  padding: 0 2px 3px;
}

.hud-title {
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  flex-shrink: 0;
}

.hud-badge.is-neutral {
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

.hud-badge.is-buy {
  background: var(--color-up-soft);
  color: var(--color-up-text);
}

.hud-badge.is-sell {
  background: var(--color-down-soft);
  color: var(--color-down-text);
}

.hud-badge.is-hold {
  background: var(--color-hold-soft);
  color: var(--color-hold-text);
}

.hud-badge.is-index {
  background: var(--color-sh-soft);
  color: var(--color-sh-text);
}

/* 内部语义彩色胶囊 */
.hud-cap {
  border-radius: 7px;
  padding: 5px 8px;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chart-tooltip.is-compact .hud-cap {
  padding: 3.5px 6.5px;
  border-radius: 6px;
  gap: 2px;
}

.hud-cap-buy {
  background: var(--color-up-soft);
  border-color: var(--color-up-border);
}

.hud-cap-sell {
  background: var(--color-down-soft);
  border-color: var(--color-down-border);
}

.hud-cap-trade {
  background: var(--surface-subtle);
  border-color: var(--border-subtle);
}

.hud-cap-price {
  background: var(--surface-subtle);
  border-color: var(--border-subtle);
  box-shadow: inset 2.5px 0 0 var(--chart-price-stroke);
}

.hud-cap-index {
  background: var(--color-sh-soft);
  border-color: var(--color-sh-border);
}

.hud-cap-hold {
  background: var(--color-hold-soft);
  border-color: var(--color-hold-border);
}

.hud-cap-pnl-up {
  background: var(--color-up-soft);
  border-color: var(--color-up-border);
}

.hud-cap-pnl-down {
  background: var(--color-down-soft);
  border-color: var(--color-down-border);
}

.hud-cap-pnl-mix {
  background: var(--surface-subtle);
  border-color: var(--border-subtle);
}

.hud-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.4;
}

.hud-line.is-primary strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-strong);
}

.chart-tooltip.is-compact .hud-line.is-primary strong {
  font-size: 12px;
}

.hud-line.is-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.chart-tooltip.is-compact .hud-line.is-sub {
  font-size: 10.5px;
}

.hud-lbl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.hud-cap-buy .hud-lbl { color: var(--color-up-text); }
.hud-cap-sell .hud-lbl { color: var(--color-down-text); }
.hud-cap-hold .hud-lbl { color: var(--color-hold-text); }
.hud-cap-index .hud-lbl { color: var(--color-sh-text); }
.hud-cap-pnl-up .hud-lbl { color: var(--color-up-text); }
.hud-cap-pnl-down .hud-lbl { color: var(--color-down-text); }
.hud-cap .hud-lbl.is-muted { color: var(--text-muted); font-weight: 400; }

.hud-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hud-dot.is-buy { background: var(--color-up); }
.hud-dot.is-sell { background: var(--color-down); }
.hud-dot.is-buy-dim { background: var(--chart-profile-buy-closed); opacity: 0.65; }
.hud-dot.is-sell-dim { background: var(--chart-profile-sell-closed); opacity: 0.65; }

.hud-val {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-strong);
  font-weight: 600;
  white-space: nowrap;
}

.hud-val.text-up { color: var(--color-up); }
.hud-val.text-down { color: var(--color-down); }
.hud-val.text-hold { color: var(--color-hold); }
.hud-val.text-muted { color: var(--text-muted); font-weight: 500; }

.hud-val-pair {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 4.5px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.45;
}

.hud-pill.is-up {
  color: var(--color-up-text);
  background: var(--color-up-soft);
}

.hud-pill.is-down {
  color: var(--color-down-text);
  background: var(--color-down-soft);
}

.hud-pill.is-flat {
  color: var(--text-secondary);
  background: var(--surface-subtle);
}

.hud-sub-muted {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.hud-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hud-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.hud-col + .hud-col {
  padding-left: 8px;
  border-left: 1px solid var(--border-subtle);
}

.hud-col-lbl {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.3;
}

.hud-col-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.35;
  white-space: nowrap;
}

.chart-tooltip.is-compact .hud-col-val {
  font-size: 11px;
}

.hud-col-val.text-up { color: var(--color-up); }
.hud-col-val.text-down { color: var(--color-down); }
.hud-col-val.text-muted { color: var(--text-muted); font-weight: 500; }

.traj-footer {
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
  white-space: nowrap;
}

.traj-footer em {
  font-style: normal;
  color: var(--text-muted);
  font-size: 11px;
}

.brush-badge {
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 11px;
}

.brush-clear-btn {
  border: 1px solid var(--border-default);
  background: var(--surface-control);
  color: var(--text-secondary);
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}

.brush-clear-btn:hover {
  color: var(--text-strong);
  background: var(--surface-hover);
}

.traj-foot-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.traj-foot-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.brush-review-btn {
  border: 1px solid var(--accent-border);
  background: var(--accent-bg);
  color: var(--accent-text);
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.12s ease;
}

.brush-review-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

/* 放大精研弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--mask-modal);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-panel {
  width: min(1240px, 92vw);
  height: min(760px, 88vh);
  padding: 18px 22px;
  background: var(--surface-card-solid);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
  white-space: nowrap;
}

.custom-chunk-input {
  width: 82px;
  padding: 4px 8px;
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: 7px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
}

.custom-chunk-input:focus {
  border-color: var(--accent-link);
}

.modal-traj-body {
  height: 410px;
  flex-shrink: 0;
  position: relative;
}

.modal-traj-body-full {
  flex: 1;
  height: auto;
  min-height: 0;
}

.modal-traj-footer {
  margin-top: 0;
  padding: 8px 4px;
}

.modal-chunk-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

/* 全局默认设置弹窗 */
.settings-modal-panel {
  width: min(680px, 94vw);
  max-height: 88vh;
  padding: 18px 22px 16px;
  background: var(--surface-card-solid);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-modal-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 4px;
}

.settings-section {
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.settings-section-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.settings-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.settings-item-inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.settings-item-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

.settings-preset-wrap {
  flex-wrap: wrap;
  gap: 5px;
}

.settings-inline-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.settings-modal-foot {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-foot-left,
.settings-foot-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-save-btn {
  padding: 6px 14px;
}

.partial-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  background: var(--surface-subtle);
  color: var(--text-muted);
}

/* 汇总表卡片（高度跟随 GridStack 容器） */
.table-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.table-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.mini-seg {
  display: inline-flex;
  background: var(--surface-seg);
  padding: 2px;
  border-radius: 7px;
  gap: 2px;
}

.mini-seg-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.mini-seg-btn:hover {
  color: var(--text-primary);
}

.mini-seg-btn.active {
  background: var(--surface-seg-active);
  color: var(--text-strong);
  font-weight: 500;
  box-shadow: var(--shadow-seg-active);
}

.table-scroll {
  flex: 1;
  overflow-y: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

table.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-sticky-th);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-muted);
  font-weight: 500;
  padding: 9px 8px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

table.data-table thead th:first-child,
table.data-table tbody td:first-child {
  padding-left: 16px;
}

table.data-table thead th:last-child,
table.data-table tbody td:last-child {
  padding-right: 16px;
}

table.data-table tbody td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.num-col {
  text-align: right !important;
}

.code-link {
  font-family: Consolas, Monaco, monospace;
  color: var(--accent-link);
}

.expand-arrow {
  display: inline-block;
  width: 16px;
  color: var(--text-muted);
  user-select: none;
}

.expand-arrow:hover {
  color: var(--text-strong);
}

.tbl-row {
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.tbl-row:hover {
  background: var(--surface-hover);
}

.tbl-row.active {
  background: var(--surface-row-active);
}

.price-strong {
  font-weight: 600;
  color: var(--text-strong);
}

.qty-muted {
  color: var(--text-secondary);
}

.day-group-row td {
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-subtle) !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
  font-size: 12px;
}

.day-label {
  font-weight: 600;
  color: var(--text-primary);
}

.day-week {
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.day-summary {
  color: var(--text-secondary);
}

.day-summary strong {
  color: var(--text-strong);
  font-weight: 600;
}

.day-sep {
  margin: 0 8px;
  color: var(--text-faint);
}

.count-tag {
  color: var(--text-muted);
  margin-left: 4px;
  font-weight: 400;
}

.detail-row td {
  background: var(--surface-subtle);
  padding: 6px 18px 8px 32px !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item {
  display: grid;
  grid-template-columns: 90px 1fr 46px 76px 82px 92px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 2px 0;
  border-bottom: 1px dashed var(--border-dashed);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-acc {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  height: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* 极细滚动条 */
.thin-scroll::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.thin-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.thin-scroll::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
}

.thin-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

/* =========================================================================
   左侧滑出式「区间完整复盘」抽屉（右侧不模糊，方便边看走势图边复盘）
   ========================================================================= */
.sr-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}

.sr-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: var(--mask-drawer);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: auto;
}

.sr-drawer-root.is-open .sr-drawer-backdrop {
  opacity: 1;
}

.sr-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(760px, 55vw);
  max-width: 96vw;
  background: var(--surface-card-solid);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  border-right: 1px solid var(--border-default);
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), width 0.2s ease;
  pointer-events: auto;
}

.sr-drawer-panel.is-wide {
  width: min(1180px, 86vw);
}

.sr-drawer-root.is-open .sr-drawer-panel {
  transform: translateX(0);
}

.sr-drawer-head {
  flex-shrink: 0;
  padding: 14px 18px 0;
  background: var(--surface-card-solid);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sr-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sr-head-titles {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.sr-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--color-down-soft);
  color: var(--color-down-text);
  flex-shrink: 0;
}

.sr-mode-pill.is-ov {
  background: var(--color-hold-soft);
  color: var(--color-hold-text);
}

.sr-drawer-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
  white-space: nowrap;
}

.sr-drawer-sub {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.sr-head-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sr-tool-btn {
  padding: 4px 10px;
  font-size: 11.5px;
}

.sr-head-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sr-auto-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.sr-auto-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.sr-auto-badge.is-up { background: var(--color-up-soft); color: var(--color-up-text); }
.sr-auto-badge.is-down { background: var(--color-down-soft); color: var(--color-down-text); }
.sr-auto-badge.is-warn { background: var(--color-sh-soft); color: var(--color-sh-text); }
.sr-auto-badge.is-neutral { background: var(--surface-subtle); color: var(--text-secondary); }

.sr-tab-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 2px;
}

.sr-tab-btn {
  position: relative;
  border: none;
  background: transparent;
  padding: 8px 2px 9px;
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.12s ease;
}

.sr-tab-btn:hover {
  color: var(--text-strong);
}

.sr-tab-btn.active {
  color: var(--text-strong);
  font-weight: 700;
}

.sr-tab-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent-bg);
  border-radius: 2px;
}

.sr-tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-link);
  display: inline-block;
}

.sr-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 18px 24px;
  background: var(--surface-drawer-body);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* KPI 6宫格 */
.sr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.sr-kpi-card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sr-kpi-lbl {
  font-size: 11px;
  color: var(--text-muted);
}

.sr-kpi-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.3;
}

.sr-kpi-val.text-up { color: var(--color-up); }
.sr-kpi-val.text-down { color: var(--color-down); }
.sr-kpi-val.text-hold { color: var(--color-hold); }

.sr-kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 通用分组卡片 */
.sr-section {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 11px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sr-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.sr-section-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-strong);
}

.sr-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.sr-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.sr-pill.is-up { background: var(--color-up-soft); color: var(--color-up-text); }
.sr-pill.is-down { background: var(--color-down-soft); color: var(--color-down-text); }
.sr-pill.is-warn { background: var(--color-sh-soft); color: var(--color-sh-text); }
.sr-pill.is-flat { background: var(--surface-subtle); color: var(--text-secondary); }

/* 反事实躺平对照 */
.sr-cf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.sr-cf-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sr-cf-lbl {
  font-size: 11px;
  color: var(--text-muted);
}

.sr-cf-num {
  font-size: 15px;
  font-weight: 700;
}

.sr-cf-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.sr-cf-vs {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  padding: 0 2px;
}

/* 区间价格位置标尺 */
.sr-ruler-wrap {
  padding: 26px 8px 2px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sr-ruler-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--chart-ruler-track);
}

.sr-ruler-pin {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.sr-ruler-dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--chart-dot-stroke);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.sr-ruler-pin.is-buy .sr-ruler-dot { background: var(--color-up); }
.sr-ruler-pin.is-sell .sr-ruler-dot { background: var(--color-down); }
.sr-ruler-pin.is-end .sr-ruler-dot { background: var(--text-secondary); }
.sr-ruler-pin.is-live .sr-ruler-dot { background: var(--color-sh); }

.sr-ruler-tag {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
}

.sr-ruler-pin.is-top .sr-ruler-tag { bottom: 14px; }
.sr-ruler-pin.is-bottom .sr-ruler-tag { top: 14px; }
.sr-ruler-pin.is-buy .sr-ruler-tag { background: var(--color-up-soft); color: var(--color-up-text); border: 1px solid var(--color-up-border); }
.sr-ruler-pin.is-sell .sr-ruler-tag { background: var(--color-down-soft); color: var(--color-down-text); border: 1px solid var(--color-down-border); }
.sr-ruler-pin.is-end .sr-ruler-tag { background: var(--surface-subtle); color: var(--text-primary); border: 1px solid var(--border-default); }
.sr-ruler-pin.is-live .sr-ruler-tag { background: var(--color-sh-soft); color: var(--color-sh-text); border: 1px solid var(--color-sh-border); }

.sr-ruler-ends {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* 双栏诊断键值表 */
.sr-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sr-kv-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sr-kv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--border-subtle);
}

.sr-kv-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.sr-kv-row > span {
  color: var(--text-muted);
  white-space: nowrap;
}

.sr-kv-row > strong {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.sr-kv-row em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

/* 事后验证卡片 */
.sr-hindsight-desc {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface-subtle);
  border-radius: 7px;
  padding: 7px 10px;
}

.sr-horizon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.sr-horizon-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sr-horizon-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.sr-horizon-top em {
  font-style: normal;
  color: var(--text-faint);
}

.sr-horizon-px {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
}

.sr-horizon-chg {
  font-size: 11.5px;
  font-weight: 600;
}

.sr-horizon-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* 区间价格带筹码分布 */
.sr-profile-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sr-profile-row {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
}

.sr-profile-band {
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

.sr-profile-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sr-pbar {
  height: 16px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  min-width: max-content;
}

.sr-pbar.is-buy { background: var(--color-up-soft); color: var(--color-up-text); }
.sr-pbar.is-sell { background: var(--color-down-soft); color: var(--color-down-text); }

/* AI 深度诊断区域 */
.sr-ai-toolbar {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sr-ai-status-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.sr-ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.sr-ai-dot.is-on { background: var(--color-ok); box-shadow: 0 0 0 3px var(--color-ok-soft); }
.sr-ai-dot.is-off { background: var(--color-sh); box-shadow: 0 0 0 3px var(--color-sh-soft); }

.sr-ai-provider {
  font-weight: 600;
  color: var(--text-strong);
}

.sr-ai-gen-btn {
  padding: 6px 14px;
  font-size: 12px;
}

.sr-env-guide {
  background: var(--env-guide-bg);
  border: 1px solid var(--env-guide-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--env-guide-text);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sr-env-title {
  font-weight: 700;
  color: var(--env-guide-title);
}

.sr-env-desc {
  margin: 0;
  line-height: 1.55;
}

.sr-env-code pre {
  margin: 5px 0 8px;
  padding: 9px 11px;
  background: var(--code-block-bg);
  color: var(--code-block-text);
  border-radius: 7px;
  font-family: Consolas, Monaco, monospace;
  font-size: 11.5px;
  overflow-x: auto;
}

.sr-env-code code {
  background: var(--color-sh-soft);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
  font-size: 11.5px;
}

.sr-ai-error {
  background: var(--color-up-soft);
  border: 1px solid var(--color-up-border);
  color: var(--color-up-text);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12px;
}

.sr-ai-context-chip {
  font-size: 11.5px;
  color: var(--color-down-text);
  background: var(--color-down-soft);
  border: 1px solid var(--color-down-border);
  border-radius: 8px;
  padding: 6px 10px;
}

.sr-ai-context-chip.is-muted {
  color: var(--text-muted);
  background: var(--surface-card);
  border-color: var(--border-card);
}

.sr-ai-report-card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 11px;
  padding: 15px 17px;
}

.sr-ai-empty {
  background: var(--surface-card);
  border: 1px dashed var(--border-strong);
  border-radius: 11px;
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
}

.sr-ai-empty-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 6px;
}

.sr-ai-empty p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

/* Markdown 正文样式 */
.sr-md-body {
  font-size: 13px;
  line-height: 1.68;
  color: var(--text-primary);
}

.sr-md-body p {
  margin: 0 0 8px;
}

.sr-md-body p:last-child {
  margin-bottom: 0;
}

.sr-md-h {
  margin: 14px 0 7px;
  padding-left: 8px;
  border-left: 3px solid var(--accent-link);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-strong);
}

.sr-md-h:first-child {
  margin-top: 0;
}

.sr-md-list {
  margin: 4px 0 10px;
  padding-left: 18px;
}

.sr-md-list li {
  margin-bottom: 5px;
}

.sr-md-body code {
  background: var(--surface-subtle);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  color: var(--text-strong);
}

.sr-md-body blockquote {
  margin: 8px 0;
  padding: 7px 11px;
  background: var(--surface-subtle);
  border-left: 3px solid var(--text-muted);
  color: var(--text-secondary);
  border-radius: 0 6px 6px 0;
}

.sr-md-hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 10px 0;
}

.sr-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--accent-link);
  margin-left: 3px;
  vertical-align: -2px;
  animation: srBlink 0.9s steps(2, start) infinite;
}

@keyframes srBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 多轮追问区 */
.sr-chat-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sr-chat-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sr-chat-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.sr-chat-bubble {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 10px 13px;
}

.sr-chat-row.is-user .sr-chat-bubble {
  background: var(--user-bubble-bg);
  border-color: var(--user-bubble-border);
  color: var(--user-bubble-text);
  font-weight: 500;
}

.sr-followup-wrap {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sr-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sr-quick-chip {
  border: 1px solid var(--border-default);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s ease;
}

.sr-quick-chip:hover:not(:disabled) {
  background: var(--accent-soft-bg);
  border-color: var(--accent-soft-border);
  color: var(--accent-soft-text);
}

.sr-followup-form {
  display: flex;
  gap: 8px;
}

.sr-followup-input {
  flex: 1;
  min-width: 0;
  padding: 7px 11px;
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
}

.sr-followup-input:focus {
  border-color: var(--accent-link);
}

/* 时间线与表格 */
.sr-tl-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sr-check-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-secondary);
  cursor: pointer;
}

.sr-table-wrap {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  overflow: auto;
}

.sr-compact-table thead th,
.sr-compact-table tbody td {
  padding: 8px 8px;
}

.sr-compact-table thead th:first-child,
.sr-compact-table tbody td:first-child {
  padding-left: 12px;
}

.sr-compact-table thead th:last-child,
.sr-compact-table tbody td:last-child {
  padding-right: 12px;
}

.sr-cell-sub {
  font-size: 10.5px;
  line-height: 1.3;
}

.sr-ms-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
  padding-left: 16px;
}

.sr-ms-tag {
  display: inline-block;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.sr-ms-tag.is-buy,
.sr-ms-tag.is-up { background: var(--color-up-soft); color: var(--color-up-text); }
.sr-ms-tag.is-sell,
.sr-ms-tag.is-down { background: var(--color-down-soft); color: var(--color-down-text); }
.sr-ms-tag.is-hold { background: var(--color-hold-soft); color: var(--color-hold-text); }

.sr-tl-trades {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sr-tl-trade-item {
  display: grid;
  grid-template-columns: 76px 56px 76px 84px 1fr;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.sr-empty-box {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* 复盘笔记与归档 */
.sr-mood-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sr-mood-chip {
  border: 1px solid var(--border-default);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s ease;
}

.sr-mood-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-strong);
}

.sr-mood-chip.active {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent-text);
  font-weight: 600;
}

.sr-note-textarea {
  width: 100%;
  resize: vertical;
  min-height: 120px;
  padding: 10px 12px;
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: 9px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-primary);
  outline: none;
}

.sr-note-textarea:focus {
  border-color: var(--accent-link);
}

.sr-note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sr-save-status {
  font-size: 11px;
  color: var(--text-muted);
}

.sr-save-status.is-ok { color: var(--color-ok); }
.sr-save-status.is-err { color: var(--color-up); }

.sr-arc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sr-arc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 12px;
}

.sr-arc-item.is-current {
  background: var(--accent-soft-bg);
  border-color: var(--accent-soft-border);
}

.sr-arc-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: wrap;
}

.sr-arc-badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--color-down-soft);
  color: var(--color-down-text);
}

.sr-arc-badge.is-ov {
  background: var(--color-hold-soft);
  color: var(--color-hold-text);
}

.sr-arc-span {
  font-size: 11px;
  color: var(--text-muted);
}

.sr-arc-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sr-arc-flag {
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  background: var(--surface-seg);
  color: var(--text-secondary);
  font-weight: 600;
}

.sr-arc-flag.is-ai {
  background: var(--color-ok-soft);
  color: var(--color-ok-text);
}

.sr-arc-del {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 11px;
}

.sr-arc-del:hover {
  color: var(--color-up);
}

@media (max-width: 900px) {
  .sr-drawer-panel,
  .sr-drawer-panel.is-wide {
    width: 94vw;
  }
  .sr-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sr-two-col,
  .sr-cf-grid {
    grid-template-columns: 1fr;
  }
  .sr-cf-vs {
    text-align: center;
  }
}

/* =========================================================================
   欢乐彩蛋、佛系遮金额与全屏「招财猫休息模式」样式
   ========================================================================= */
.kpi-mood-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kpi-mood-emoji:hover {
  transform: scale(1.22) rotate(-6deg);
}

.privacy-mask-btn {
  font-size: 13px;
}

.privacy-mask-btn.is-masked {
  background: var(--accent-soft-bg);
  border-color: var(--accent-soft-border);
  color: var(--accent-soft-text);
}

.rest-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-soft-bg);
  border-color: var(--accent-soft-border);
  color: var(--accent-soft-text);
  font-weight: 600;
}

.rest-trigger-btn:hover {
  filter: brightness(1.08);
  border-color: var(--accent-border);
}

/* 指尖淡彩星光粒子 & 漂浮鼓励小字 & 微彩带 Canvas */
.joy-sparkle-dot {
  position: fixed;
  z-index: 270;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 6px currentColor;
  transform: translate(-50%, -50%) scale(0.9);
  animation: joySparkleFly 0.52s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes joySparkleFly {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(0.15);
  }
}

.joy-float-text {
  position: fixed;
  z-index: 275;
  pointer-events: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-soft-text);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
  white-space: nowrap;
  transform: translate(-50%, 0);
  animation: joyFloatUp 0.95s ease-out forwards;
}

@keyframes joyFloatUp {
  0%   { opacity: 1; transform: translate(-50%, 0) scale(0.84); }
  100% { opacity: 0; transform: translate(-50%, -38px) scale(1.1); }
}

.joy-confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 260;
  pointer-events: none;
}

/* 进入休息模式时主工作台轻柔退隐，底层流彩微微提亮 */
body.rest-mode-active {
  overflow: hidden;
}

body.rest-mode-active .page-wrap {
  opacity: 0.08;
  filter: blur(14px);
  transform: scale(0.985);
  pointer-events: none;
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
}

body.rest-mode-active .aurora-backdrop {
  opacity: min(0.9, calc(var(--aurora-opacity, 0.55) + 0.25));
}

.rest-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 42%, transparent 0%, rgba(16, 13, 24, 0.32) 100%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

html[data-theme="light"] .rest-overlay {
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.24) 0%, rgba(240, 244, 250, 0.45) 100%);
}

.rest-overlay.is-open {
  opacity: 1;
}

.rest-bubble-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.rest-bubble {
  position: absolute;
  bottom: -90px;
  border-radius: 50%;
  border: 1.2px solid rgba(255, 255, 255, 0.36);
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.58) 0%, var(--bub-color) 42%, rgba(255, 255, 255, 0.08) 100%);
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.24), 0 6px 20px rgba(15, 12, 24, 0.14);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  padding: 0;
  animation: restBubbleRise 13s linear forwards;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.rest-bubble:hover {
  border-color: rgba(255, 255, 255, 0.65);
}

.rest-bubble.is-popping {
  animation-play-state: paused;
  transform: scale(1.45) !important;
  opacity: 0 !important;
  pointer-events: none;
}

.rest-bubble-mark {
  font-size: 16px;
  opacity: 0.78;
  pointer-events: none;
}

@keyframes restBubbleRise {
  0% {
    transform: translate3d(0, 0, 0) scale(0.86);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  50% {
    transform: translate3d(var(--bub-sway), -52vh, 0) scale(1);
    opacity: 0.88;
  }
  90% {
    opacity: 0.72;
  }
  100% {
    transform: translate3d(calc(var(--bub-sway) * -0.5), -112vh, 0) scale(1.06);
    opacity: 0;
  }
}

.rest-shell {
  position: relative;
  z-index: 2;
  width: min(1040px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.rest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  background: var(--surface-card);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.rest-clock-group {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.rest-clock-time {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}

.rest-clock-date {
  font-size: 12.5px;
  color: var(--text-muted);
}

.rest-header-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.rest-timer-bar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--surface-seg);
  border: 1px solid var(--border-subtle);
}

.rest-timer-display {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 7px;
}

.rest-timer-display.is-running {
  color: var(--accent-soft-text);
}

.rest-chip-btn {
  border: 1px solid var(--border-default);
  background: var(--surface-control);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s ease;
}

.rest-chip-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-strong);
}

.rest-chip-btn.active {
  background: var(--accent-soft-bg);
  border-color: var(--accent-soft-border);
  color: var(--accent-soft-text);
  font-weight: 600;
}

.rest-exit-btn {
  border: 1px solid var(--accent-border);
  background: var(--accent-bg);
  color: var(--accent-text);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.14s ease, transform 0.14s ease;
}

.rest-exit-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.rest-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  gap: 22px;
  align-items: center;
}

.rest-cat-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 28px 24px;
  background: var(--surface-card);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.rest-big-cat-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.rest-breathe-ring {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 2.5px solid rgba(249, 168, 184, 0.55);
  box-shadow: 0 0 32px rgba(249, 168, 184, 0.32), inset 0 0 24px rgba(196, 181, 253, 0.25);
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.rest-big-cat-wrap.is-breathing .rest-breathe-ring {
  opacity: 1;
  animation: restBreathePulse 10s ease-in-out infinite;
}

@keyframes restBreathePulse {
  0%, 100% { transform: scale(0.86); border-color: rgba(249, 168, 184, 0.5); }
  40%      { transform: scale(1.26); border-color: rgba(125, 211, 252, 0.72); }
  60%      { transform: scale(1.26); border-color: rgba(196, 181, 253, 0.72); }
}

.rest-big-cat-disc {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  padding: 3.5px;
  background: conic-gradient(from 0deg, #F9A8B8, #FDBA74, #FEF08A, #5EEAD4, #7DD3FC, #C4B5FD, #F9A8B8);
  box-shadow: 0 12px 34px rgba(10, 8, 22, 0.42), 0 0 26px rgba(249, 168, 184, 0.28);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.rest-big-cat-wrap:hover .rest-big-cat-disc {
  transform: scale(1.05);
}

.rest-big-cat-wrap.is-petted .rest-big-cat-disc {
  transform: scale(1.12) rotate(-4deg);
}

.rest-big-cat-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface-card-solid);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: catVinylSpin 16s linear infinite;
  animation-play-state: paused;
}

.rest-big-cat-disc.is-playing .rest-big-cat-inner {
  animation-play-state: running;
}

.rest-big-vinyl-groove {
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: repeating-radial-gradient(circle, transparent 0 5px, rgba(255, 255, 255, 0.07) 5px 6.2px);
  transition: opacity 0.4s ease;
}

.rest-big-cat-disc.is-playing .rest-big-vinyl-groove {
  opacity: 1;
}

.rest-eyes-happy {
  display: none;
}

.rest-big-cat-wrap.is-happy .rest-eyes-normal {
  display: none;
}

.rest-big-cat-wrap.is-happy .rest-eyes-happy {
  display: block;
}

.rest-pet-reply {
  margin: 0;
  font-family: var(--font-cat);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text-strong);
  line-height: 1.6;
  max-width: 400px;
}

.rest-breathe-guide {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.rest-daily-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.rest-stat-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
}

.rest-stat-pill strong {
  color: var(--accent-soft-text);
  margin-left: 2px;
}

.rest-toys-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rest-glass-card {
  background: var(--surface-card);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.rest-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rest-card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-strong);
}

.rest-card-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.rest-muyu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid var(--color-sh-border);
  background: var(--color-sh-soft);
  color: var(--color-sh-text);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s ease, filter 0.14s ease;
}

.rest-muyu-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.rest-muyu-btn.is-hit {
  animation: restMuyuHit 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes restMuyuHit {
  0%   { transform: scale(1); }
  45%  { transform: scale(0.9) rotate(-3deg); }
  100% { transform: scale(1); }
}

.rest-fortune-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rest-fortune-card.is-shake {
  animation: restFortuneShake 0.36s ease;
}

@keyframes restFortuneShake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px) rotate(-0.5deg); }
  75%      { transform: translateX(4px) rotate(0.5deg); }
}

.rest-fortune-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.rest-fortune-rank {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--color-sh-soft);
  color: var(--color-sh-text);
  border: 1px solid var(--color-sh-border);
}

.rest-fortune-rank.is-super {
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  border-color: var(--accent-soft-border);
}

.rest-fortune-name {
  font-size: 13.5px;
  color: var(--text-strong);
}

.rest-fortune-text {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--color-sh-soft);
  border: 1px solid var(--color-sh-border);
  color: var(--text-strong);
  font-family: var(--font-cat);
  font-size: 14.5px;
  line-height: 1.7;
}

.rest-music-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 10px 14px;
  background: var(--surface-card);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.rest-music-tracks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.rest-track-chip {
  border: 1px solid var(--border-default);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s ease;
}

.rest-exit-btn:focus:not(:focus-visible),
.rest-chip-btn:focus:not(:focus-visible),
.rest-track-chip:focus:not(:focus-visible),
.rest-muyu-btn:focus:not(:focus-visible),
.rest-bubble:focus:not(:focus-visible) {
  outline: none;
}

.rest-track-chip:hover {
  background: var(--surface-hover);
  color: var(--text-strong);
}

.rest-track-chip.active {
  background: var(--color-hold-soft);
  border-color: var(--color-hold-border);
  color: var(--color-hold-text);
  font-weight: 600;
}

.rest-music-vol-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.rest-music-now {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.rest-vol-range {
  width: 96px;
}

@media (max-width: 860px) {
  .rest-main {
    grid-template-columns: 1fr;
  }
  .rest-shell {
    overflow-y: auto;
  }
}

/* =========================================================================
   全局微粒子环境氛围层 & 今日收工仪式奖状弹窗
   ========================================================================= */
.joy-ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.45s ease;
}

.closing-modal-mask {
  z-index: 95;
}

.closing-card {
  position: relative;
  width: min(560px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 24px 20px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface-elevated);
  border: 1px solid var(--accent-soft-border);
  box-shadow: var(--shadow-popover), 0 0 42px rgba(249, 168, 184, 0.16);
}

.closing-ribbon {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, #F9A8B8, #FDBA74, #FEF08A, #5EEAD4, #7DD3FC, #C4B5FD);
}

.closing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.closing-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.closing-seal {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--accent-soft-bg);
  border: 1px solid var(--accent-soft-border);
  box-shadow: 0 4px 16px rgba(249, 168, 184, 0.22);
  flex-shrink: 0;
}

.closing-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.closing-date-label {
  font-size: 12px;
  color: var(--text-muted);
}

.closing-medal-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-sh-soft);
  border: 1px solid var(--color-sh-border);
  color: var(--color-sh-text);
}

.closing-title {
  margin: 4px 0 0;
  font-family: var(--font-cat);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.3;
}

.closing-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.closing-stat-box {
  padding: 10px 10px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.closing-stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.closing-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.closing-happy-equiv {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-soft-bg);
  border: 1px solid var(--accent-soft-border);
  color: var(--text-strong);
  font-family: var(--font-cat);
  font-size: 14.5px;
  line-height: 1.55;
  text-align: center;
}

.closing-mood-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.closing-mood-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.closing-mood-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.closing-mood-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.closing-mood-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.closing-mood-btn {
  padding: 7px 6px;
  border-radius: 10px;
  border: 1px solid var(--border-default);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.closing-mood-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-strong);
  transform: translateY(-1px);
}

.closing-mood-btn.active {
  background: var(--color-hold-soft);
  border-color: var(--color-hold-border);
  color: var(--color-hold-text);
  font-weight: 600;
}

.closing-mood-feedback {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px dashed var(--border-strong);
  font-family: var(--font-cat);
  font-size: 13.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.closing-mood-apply-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-soft-border);
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  font-size: 11.5px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.14s ease;
}

.closing-mood-apply-btn:hover {
  filter: brightness(1.1);
}

.closing-wish-box {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--color-sh-soft);
  border: 1px solid var(--color-sh-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.closing-wish-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.closing-wish-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-sh-text);
}

.closing-wish-refresh {
  border: none;
  background: transparent;
  color: var(--color-sh-text);
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background-color 0.14s ease;
}

.closing-wish-refresh:hover {
  background: rgba(255, 255, 255, 0.1);
}

.closing-wish-text {
  margin: 0;
  font-family: var(--font-cat);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-strong);
}

.closing-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.closing-done-btn {
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .closing-stats-grid,
  .closing-mood-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
