/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */
/* Hallmark · macrostructure: Workbench (app) + Split Studio (auth) · genre: modern-minimal · design-system: design.md · themes: P/Q/R/U/C/I · default: P · enrichment: none · contrast: pass (40–41) · nav: N2 · footer: Ft1 · slop: pass (42–45) · honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · icons: pass (30) · mobile: pass (34, 49, 50–57) */
:root,
html[data-style-theme="p"] {
  --theme-primary-50: oklch(96% 0.025 28);
  --theme-primary-100: oklch(92% 0.05 28);
  --theme-primary-200: oklch(84% 0.09 28);
  --theme-primary-300: oklch(73% 0.15 28);
  --theme-primary-400: oklch(63% 0.19 28);
  --theme-primary-500: oklch(57% 0.21 28);
  --theme-primary-600: oklch(51% 0.2 28);
  --theme-primary-700: oklch(44% 0.17 28);
  --theme-primary-soft: oklch(94% 0.035 28 / 0.72);
  --theme-primary-soft-strong: oklch(80% 0.11 28 / 0.42);
  --theme-primary-soft-dark: oklch(45% 0.13 28 / 0.36);
  --theme-primary-border: oklch(57% 0.16 28 / 0.62);
  --theme-primary-shadow: oklch(31% 0.05 28 / 0.18);
  --theme-secondary-600: oklch(51% 0.2 28);
  --theme-secondary-500: oklch(57% 0.21 28);
  --theme-page-light: oklch(97% 0.012 85);
  --theme-page-dark: oklch(16% 0.014 85);
  --theme-paper-2-light: oklch(94% 0.015 85);
  --theme-paper-2-dark: oklch(20% 0.016 85);
  --theme-paper-3-light: oklch(89% 0.018 85);
  --theme-paper-3-dark: oklch(24% 0.018 85);
  --theme-ink-light: oklch(18% 0.018 70);
  --theme-ink-dark: oklch(94% 0.012 85);
  --theme-ink-2-light: oklch(31% 0.016 70);
  --theme-ink-2-dark: oklch(78% 0.014 85);
  --theme-muted-light: oklch(47% 0.014 70);
  --theme-muted-dark: oklch(67% 0.014 85);
  --theme-rule-light: oklch(79% 0.018 85);
  --theme-rule-dark: oklch(34% 0.018 85);
  --theme-rule-strong-light: oklch(54% 0.022 70);
  --theme-rule-strong-dark: oklch(62% 0.02 85);
  --theme-story-light: oklch(93% 0.016 85);
  --theme-story-dark: oklch(13% 0.016 70);
  --theme-story-2-light: oklch(76% 0.022 85);
  --theme-story-2-dark: oklch(28% 0.02 70);
  --theme-on-story-light: oklch(18% 0.018 70);
  --theme-on-story-dark: oklch(94% 0.012 85);
  --theme-on-story-muted-light: oklch(42% 0.016 70);
  --theme-on-story-muted-dark: oklch(72% 0.014 85);
  --theme-panel-bg-light: oklch(98% 0.01 85 / 0.96);
  --theme-panel-bg-dark: oklch(20% 0.016 85 / 0.96);
  --theme-panel-border-light: oklch(61% 0.02 70 / 0.42);
  --theme-panel-border-dark: oklch(72% 0.018 85 / 0.24);
  --theme-app-bg-light:
    linear-gradient(var(--theme-rule-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--theme-rule-light) 1px, transparent 1px),
    var(--theme-page-light);
  --theme-app-bg-dark:
    linear-gradient(var(--theme-rule-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--theme-rule-dark) 1px, transparent 1px),
    var(--theme-page-dark);
  --theme-background-size: 32px 32px;
  --theme-card-shadow-light: none;
  --theme-card-shadow-dark: none;
  --theme-radius-control: 0.125rem;
  --theme-radius-panel: 0.25rem;
  --theme-font-display: "Noto Sans SC", "SimHei", sans-serif;
  --theme-font-body: "DengXian", "Microsoft YaHei UI", sans-serif;
  --theme-font-outlier: "Cascadia Code", "Microsoft YaHei UI", monospace;
  --theme-accent-ink: oklch(97% 0.012 85);
  --theme-focus-light: oklch(43% 0.17 28);
  --theme-focus-dark: oklch(75% 0.14 28);
}

html[data-style-theme="q"] {
  --theme-primary-50: oklch(95% 0.025 135);
  --theme-primary-100: oklch(91% 0.045 135);
  --theme-primary-200: oklch(83% 0.065 135);
  --theme-primary-300: oklch(72% 0.09 135);
  --theme-primary-400: oklch(61% 0.12 135);
  --theme-primary-500: oklch(52% 0.13 135);
  --theme-primary-600: oklch(45% 0.12 135);
  --theme-primary-700: oklch(38% 0.105 135);
  --theme-primary-soft: oklch(92% 0.035 135 / 0.76);
  --theme-primary-soft-strong: oklch(74% 0.08 135 / 0.42);
  --theme-primary-soft-dark: oklch(41% 0.08 135 / 0.36);
  --theme-primary-border: oklch(52% 0.1 135 / 0.52);
  --theme-primary-shadow: oklch(29% 0.035 105 / 0.16);
  --theme-secondary-600: oklch(45% 0.12 135);
  --theme-secondary-500: oklch(52% 0.13 135);
  --theme-page-light: oklch(96% 0.02 82);
  --theme-page-dark: oklch(16% 0.018 120);
  --theme-paper-2-light: oklch(93% 0.024 82);
  --theme-paper-2-dark: oklch(20% 0.02 120);
  --theme-paper-3-light: oklch(88% 0.03 72);
  --theme-paper-3-dark: oklch(25% 0.022 120);
  --theme-ink-light: oklch(22% 0.028 125);
  --theme-ink-dark: oklch(93% 0.018 95);
  --theme-ink-2-light: oklch(36% 0.026 120);
  --theme-ink-2-dark: oklch(77% 0.018 105);
  --theme-muted-light: oklch(49% 0.022 105);
  --theme-muted-dark: oklch(66% 0.018 105);
  --theme-rule-light: oklch(80% 0.026 90);
  --theme-rule-dark: oklch(34% 0.024 120);
  --theme-rule-strong-light: oklch(56% 0.035 105);
  --theme-rule-strong-dark: oklch(62% 0.026 115);
  --theme-story-light: oklch(93% 0.03 82);
  --theme-story-dark: oklch(14% 0.025 125);
  --theme-story-2-light: oklch(77% 0.035 90);
  --theme-story-2-dark: oklch(29% 0.028 125);
  --theme-on-story-light: oklch(25% 0.03 125);
  --theme-on-story-dark: oklch(93% 0.018 95);
  --theme-on-story-muted-light: oklch(45% 0.026 110);
  --theme-on-story-muted-dark: oklch(72% 0.02 105);
  --theme-panel-bg-light: oklch(97% 0.018 82 / 0.96);
  --theme-panel-bg-dark: oklch(21% 0.02 120 / 0.96);
  --theme-panel-border-light: oklch(76% 0.032 92 / 0.55);
  --theme-panel-border-dark: oklch(59% 0.028 120 / 0.26);
  --theme-app-bg-light: linear-gradient(135deg, var(--theme-page-light) 0 72%, var(--theme-paper-3-light) 72%);
  --theme-app-bg-dark: linear-gradient(135deg, var(--theme-page-dark) 0 72%, var(--theme-paper-3-dark) 72%);
  --theme-background-size: auto;
  --theme-card-shadow-light: 0 1px 2px oklch(28% 0.025 105 / 0.08);
  --theme-card-shadow-dark: none;
  --theme-radius-control: 1rem;
  --theme-radius-panel: 1.75rem;
  --theme-font-display: "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  --theme-font-body: "DengXian", "Microsoft YaHei UI", sans-serif;
  --theme-font-outlier: "Cascadia Code", "Microsoft YaHei UI", monospace;
  --theme-accent-ink: oklch(96% 0.018 95);
  --theme-focus-light: oklch(43% 0.15 135);
  --theme-focus-dark: oklch(75% 0.12 135);
}

html[data-style-theme="r"] {
  --theme-primary-50: oklch(95% 0.025 294);
  --theme-primary-100: oklch(91% 0.05 294);
  --theme-primary-200: oklch(83% 0.08 294);
  --theme-primary-300: oklch(73% 0.13 294);
  --theme-primary-400: oklch(66% 0.17 294);
  --theme-primary-500: oklch(60% 0.19 294);
  --theme-primary-600: oklch(54% 0.18 294);
  --theme-primary-700: oklch(47% 0.16 294);
  --theme-primary-soft: oklch(92% 0.04 294 / 0.72);
  --theme-primary-soft-strong: oklch(72% 0.12 294 / 0.42);
  --theme-primary-soft-dark: oklch(47% 0.12 294 / 0.38);
  --theme-primary-border: oklch(64% 0.14 294 / 0.58);
  --theme-primary-shadow: oklch(18% 0.025 285 / 0.22);
  --theme-secondary-600: oklch(54% 0.18 294);
  --theme-secondary-500: oklch(60% 0.19 294);
  --theme-page-light: oklch(95% 0.008 275);
  --theme-page-dark: oklch(13% 0.014 275);
  --theme-paper-2-light: oklch(90% 0.012 275);
  --theme-paper-2-dark: oklch(18% 0.018 275);
  --theme-paper-3-light: oklch(84% 0.016 275);
  --theme-paper-3-dark: oklch(23% 0.02 275);
  --theme-ink-light: oklch(17% 0.02 275);
  --theme-ink-dark: oklch(94% 0.012 280);
  --theme-ink-2-light: oklch(30% 0.02 275);
  --theme-ink-2-dark: oklch(76% 0.014 280);
  --theme-muted-light: oklch(47% 0.018 275);
  --theme-muted-dark: oklch(64% 0.016 280);
  --theme-rule-light: oklch(72% 0.02 275);
  --theme-rule-dark: oklch(31% 0.022 275);
  --theme-rule-strong-light: oklch(51% 0.028 275);
  --theme-rule-strong-dark: oklch(58% 0.03 285);
  --theme-story-light: oklch(17% 0.022 275);
  --theme-story-dark: oklch(11% 0.016 275);
  --theme-story-2-light: oklch(31% 0.028 275);
  --theme-story-2-dark: oklch(26% 0.024 275);
  --theme-on-story-light: oklch(94% 0.012 280);
  --theme-on-story-dark: oklch(94% 0.012 280);
  --theme-on-story-muted-light: oklch(72% 0.016 280);
  --theme-on-story-muted-dark: oklch(68% 0.016 280);
  --theme-panel-bg-light: oklch(91% 0.01 275 / 0.97);
  --theme-panel-bg-dark: oklch(18% 0.018 275 / 0.97);
  --theme-panel-border-light: oklch(54% 0.025 275 / 0.48);
  --theme-panel-border-dark: oklch(67% 0.04 290 / 0.32);
  --theme-app-bg-light: linear-gradient(145deg, var(--theme-page-light), var(--theme-paper-3-light));
  --theme-app-bg-dark: linear-gradient(145deg, var(--theme-page-dark), var(--theme-paper-3-dark));
  --theme-background-size: auto;
  --theme-card-shadow-light: 0 1px 2px oklch(17% 0.02 275 / 0.12);
  --theme-card-shadow-dark: none;
  --theme-radius-control: 0.375rem;
  --theme-radius-panel: 0.625rem;
  --theme-font-display: "Noto Sans SC", "SimHei", sans-serif;
  --theme-font-body: "DengXian", "Microsoft YaHei UI", sans-serif;
  --theme-font-outlier: "Cascadia Code", "Microsoft YaHei UI", monospace;
  --theme-accent-ink: oklch(97% 0.01 280);
  --theme-focus-light: oklch(45% 0.18 294);
  --theme-focus-dark: oklch(72% 0.18 294);
}

html[data-style-theme="u"] {
  --theme-primary-50: oklch(96% 0.025 305);
  --theme-primary-100: oklch(92% 0.05 305);
  --theme-primary-200: oklch(84% 0.09 305);
  --theme-primary-300: oklch(75% 0.14 305);
  --theme-primary-400: oklch(68% 0.18 305);
  --theme-primary-500: oklch(61% 0.2 305);
  --theme-primary-600: oklch(55% 0.19 305);
  --theme-primary-700: oklch(48% 0.17 305);
  --theme-primary-soft: oklch(94% 0.04 305 / 0.74);
  --theme-primary-soft-strong: oklch(77% 0.12 305 / 0.42);
  --theme-primary-soft-dark: oklch(48% 0.13 305 / 0.38);
  --theme-primary-border: oklch(65% 0.15 305 / 0.55);
  --theme-primary-shadow: oklch(36% 0.09 305 / 0.18);
  --theme-secondary-600: oklch(55% 0.19 305);
  --theme-secondary-500: oklch(61% 0.2 305);
  --theme-page-light: oklch(98% 0.012 305);
  --theme-page-dark: oklch(15% 0.018 305);
  --theme-paper-2-light: oklch(95% 0.02 305);
  --theme-paper-2-dark: oklch(20% 0.022 305);
  --theme-paper-3-light: oklch(90% 0.03 305);
  --theme-paper-3-dark: oklch(25% 0.026 305);
  --theme-ink-light: oklch(18% 0.022 285);
  --theme-ink-dark: oklch(95% 0.014 305);
  --theme-ink-2-light: oklch(31% 0.022 285);
  --theme-ink-2-dark: oklch(78% 0.016 305);
  --theme-muted-light: oklch(49% 0.02 290);
  --theme-muted-dark: oklch(67% 0.018 305);
  --theme-rule-light: oklch(81% 0.028 305);
  --theme-rule-dark: oklch(34% 0.03 305);
  --theme-rule-strong-light: oklch(58% 0.06 305);
  --theme-rule-strong-dark: oklch(63% 0.07 305);
  --theme-story-light: oklch(96% 0.018 305);
  --theme-story-dark: oklch(13% 0.02 290);
  --theme-story-2-light: oklch(79% 0.035 305);
  --theme-story-2-dark: oklch(29% 0.03 300);
  --theme-on-story-light: oklch(18% 0.022 285);
  --theme-on-story-dark: oklch(95% 0.014 305);
  --theme-on-story-muted-light: oklch(44% 0.022 290);
  --theme-on-story-muted-dark: oklch(72% 0.018 305);
  --theme-panel-bg-light: oklch(98% 0.014 305 / 0.94);
  --theme-panel-bg-dark: oklch(20% 0.022 305 / 0.96);
  --theme-panel-border-light: oklch(67% 0.09 305 / 0.42);
  --theme-panel-border-dark: oklch(68% 0.1 305 / 0.3);
  --theme-app-bg-light: linear-gradient(155deg, var(--theme-page-light), var(--theme-paper-3-light));
  --theme-app-bg-dark: linear-gradient(155deg, var(--theme-page-dark), var(--theme-paper-3-dark));
  --theme-background-size: auto;
  --theme-card-shadow-light: 0 1px 2px oklch(30% 0.05 305 / 0.1);
  --theme-card-shadow-dark: none;
  --theme-radius-control: 0.75rem;
  --theme-radius-panel: 1rem;
  --theme-font-display: "Noto Sans SC", "SimHei", sans-serif;
  --theme-font-body: "DengXian", "Microsoft YaHei UI", sans-serif;
  --theme-font-outlier: "Cascadia Code", "Microsoft YaHei UI", monospace;
  --theme-accent-ink: oklch(97% 0.012 305);
  --theme-focus-light: oklch(50% 0.21 305);
  --theme-focus-dark: oklch(72% 0.18 305);
}

html[data-style-theme="c"] {
  --theme-primary-50: oklch(96% 0.022 292);
  --theme-primary-100: oklch(92% 0.04 292);
  --theme-primary-200: oklch(85% 0.07 292);
  --theme-primary-300: oklch(76% 0.105 292);
  --theme-primary-400: oklch(67% 0.14 292);
  --theme-primary-500: oklch(59% 0.16 292);
  --theme-primary-600: oklch(53% 0.15 292);
  --theme-primary-700: oklch(46% 0.13 292);
  --theme-primary-soft: oklch(94% 0.035 292 / 0.78);
  --theme-primary-soft-strong: oklch(78% 0.09 292 / 0.38);
  --theme-primary-soft-dark: oklch(47% 0.1 292 / 0.34);
  --theme-primary-border: oklch(66% 0.11 292 / 0.48);
  --theme-primary-shadow: oklch(37% 0.05 292 / 0.14);
  --theme-secondary-600: oklch(53% 0.15 292);
  --theme-secondary-500: oklch(59% 0.16 292);
  --theme-page-light: oklch(97% 0.018 292);
  --theme-page-dark: oklch(16% 0.018 292);
  --theme-paper-2-light: oklch(94% 0.026 292);
  --theme-paper-2-dark: oklch(21% 0.022 292);
  --theme-paper-3-light: oklch(89% 0.035 292);
  --theme-paper-3-dark: oklch(26% 0.026 292);
  --theme-ink-light: oklch(22% 0.022 285);
  --theme-ink-dark: oklch(94% 0.014 292);
  --theme-ink-2-light: oklch(36% 0.022 285);
  --theme-ink-2-dark: oklch(78% 0.016 292);
  --theme-muted-light: oklch(50% 0.02 288);
  --theme-muted-dark: oklch(68% 0.018 292);
  --theme-rule-light: oklch(83% 0.028 292);
  --theme-rule-dark: oklch(35% 0.026 292);
  --theme-rule-strong-light: oklch(61% 0.045 292);
  --theme-rule-strong-dark: oklch(62% 0.05 292);
  --theme-story-light: oklch(94% 0.028 292);
  --theme-story-dark: oklch(14% 0.02 292);
  --theme-story-2-light: oklch(80% 0.035 292);
  --theme-story-2-dark: oklch(30% 0.028 292);
  --theme-on-story-light: oklch(26% 0.026 285);
  --theme-on-story-dark: oklch(94% 0.014 292);
  --theme-on-story-muted-light: oklch(48% 0.022 288);
  --theme-on-story-muted-dark: oklch(72% 0.018 292);
  --theme-panel-bg-light: oklch(98% 0.014 292 / 0.96);
  --theme-panel-bg-dark: oklch(21% 0.022 292 / 0.96);
  --theme-panel-border-light: oklch(82% 0.03 292 / 0.64);
  --theme-panel-border-dark: oklch(61% 0.04 292 / 0.26);
  --theme-app-bg-light: linear-gradient(150deg, var(--theme-page-light), var(--theme-paper-2-light));
  --theme-app-bg-dark: linear-gradient(150deg, var(--theme-page-dark), var(--theme-paper-2-dark));
  --theme-background-size: auto;
  --theme-card-shadow-light: 0 1px 2px oklch(36% 0.035 292 / 0.1);
  --theme-card-shadow-dark: none;
  --theme-radius-control: 0.875rem;
  --theme-radius-panel: 1.5rem;
  --theme-font-display: "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  --theme-font-body: "DengXian", "Microsoft YaHei UI", sans-serif;
  --theme-font-outlier: "Cascadia Code", "Microsoft YaHei UI", monospace;
  --theme-accent-ink: oklch(97% 0.012 292);
  --theme-focus-light: oklch(48% 0.17 292);
  --theme-focus-dark: oklch(72% 0.15 292);
}

html[data-style-theme="i"] {
  --theme-primary-50: oklch(95% 0.018 145);
  --theme-primary-100: oklch(91% 0.032 145);
  --theme-primary-200: oklch(84% 0.05 145);
  --theme-primary-300: oklch(74% 0.075 145);
  --theme-primary-400: oklch(64% 0.095 145);
  --theme-primary-500: oklch(55% 0.105 145);
  --theme-primary-600: oklch(48% 0.1 145);
  --theme-primary-700: oklch(41% 0.09 145);
  --theme-primary-soft: oklch(93% 0.025 145 / 0.78);
  --theme-primary-soft-strong: oklch(76% 0.06 145 / 0.38);
  --theme-primary-soft-dark: oklch(43% 0.065 145 / 0.34);
  --theme-primary-border: oklch(59% 0.075 145 / 0.48);
  --theme-primary-shadow: oklch(30% 0.025 165 / 0.12);
  --theme-secondary-600: oklch(48% 0.1 145);
  --theme-secondary-500: oklch(55% 0.105 145);
  --theme-page-light: oklch(97% 0.01 210);
  --theme-page-dark: oklch(16% 0.014 210);
  --theme-paper-2-light: oklch(94% 0.014 190);
  --theme-paper-2-dark: oklch(21% 0.017 205);
  --theme-paper-3-light: oklch(90% 0.02 160);
  --theme-paper-3-dark: oklch(26% 0.02 195);
  --theme-ink-light: oklch(24% 0.022 215);
  --theme-ink-dark: oklch(94% 0.012 190);
  --theme-ink-2-light: oklch(38% 0.02 210);
  --theme-ink-2-dark: oklch(78% 0.014 190);
  --theme-muted-light: oklch(51% 0.018 205);
  --theme-muted-dark: oklch(68% 0.016 195);
  --theme-rule-light: oklch(83% 0.018 190);
  --theme-rule-dark: oklch(35% 0.02 205);
  --theme-rule-strong-light: oklch(61% 0.028 180);
  --theme-rule-strong-dark: oklch(62% 0.028 195);
  --theme-story-light: oklch(94% 0.018 175);
  --theme-story-dark: oklch(14% 0.018 205);
  --theme-story-2-light: oklch(80% 0.025 170);
  --theme-story-2-dark: oklch(30% 0.022 200);
  --theme-on-story-light: oklch(28% 0.026 205);
  --theme-on-story-dark: oklch(94% 0.012 190);
  --theme-on-story-muted-light: oklch(48% 0.022 195);
  --theme-on-story-muted-dark: oklch(72% 0.016 195);
  --theme-panel-bg-light: oklch(98% 0.008 200 / 0.96);
  --theme-panel-bg-dark: oklch(21% 0.017 205 / 0.96);
  --theme-panel-border-light: oklch(82% 0.02 185 / 0.62);
  --theme-panel-border-dark: oklch(60% 0.025 195 / 0.24);
  --theme-app-bg-light: linear-gradient(160deg, var(--theme-page-light), var(--theme-paper-3-light));
  --theme-app-bg-dark: linear-gradient(160deg, var(--theme-page-dark), var(--theme-paper-3-dark));
  --theme-background-size: auto;
  --theme-card-shadow-light: 0 1px 2px oklch(29% 0.02 205 / 0.08);
  --theme-card-shadow-dark: none;
  --theme-radius-control: 0.75rem;
  --theme-radius-panel: 1.25rem;
  --theme-font-display: "DengXian", "Microsoft YaHei UI", sans-serif;
  --theme-font-body: "Microsoft YaHei UI", "DengXian", sans-serif;
  --theme-font-outlier: "Cascadia Code", "Microsoft YaHei UI", monospace;
  --theme-accent-ink: oklch(97% 0.012 175);
  --theme-focus-light: oklch(43% 0.13 145);
  --theme-focus-dark: oklch(72% 0.1 145);
}

:root {
  --color-paper: var(--theme-page-light);
  --color-paper-2: var(--theme-paper-2-light);
  --color-paper-3: var(--theme-paper-3-light);
  --color-ink: var(--theme-ink-light);
  --color-ink-2: var(--theme-ink-2-light);
  --color-muted: var(--theme-muted-light);
  --color-rule: var(--theme-rule-light);
  --color-rule-strong: var(--theme-rule-strong-light);
  --color-accent: var(--theme-primary-600);
  --color-accent-hover: var(--theme-primary-700);
  --color-accent-soft: var(--theme-primary-50);
  --color-accent-ink: var(--theme-accent-ink);
  --color-focus: var(--theme-focus-light);
  --color-graphite: var(--theme-story-light);
  --color-graphite-2: var(--theme-story-2-light);
  --color-on-dark: var(--theme-on-story-light);
  --color-on-dark-muted: var(--theme-on-story-muted-light);
  --color-success: oklch(47% 0.14 155);
  --color-success-soft: oklch(95% 0.03 155);
  --color-error: oklch(52% 0.19 28);
  --color-error-soft: oklch(96% 0.03 28);
  --color-shadow: var(--theme-primary-shadow);
  --theme-panel-bg: var(--theme-panel-bg-light);
  --theme-panel-border: var(--theme-panel-border-light);
  --theme-panel-shadow: var(--theme-card-shadow-light);
  --theme-assistant-header: var(--theme-primary-soft);
  --theme-selection: var(--theme-primary-soft-strong);
  --theme-app-bg: var(--theme-app-bg-light);
  --theme-card-shadow: var(--theme-card-shadow-light);

  --font-display: var(--theme-font-display);
  --font-body: var(--theme-font-body);
  --font-outlier: var(--theme-font-outlier);

  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-control-icon: 1.75rem;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.25rem;
  --text-lg: 1.5625rem;
  --text-xl: 1.9531rem;
  --text-display: clamp(2.5rem, 5vw, 4.75rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 420ms;
  --radius-control: var(--theme-radius-control);
  --radius-panel: var(--theme-radius-panel);
  --rule: 1px solid var(--color-rule);
  --swatch-p-a: oklch(51% 0.2 28);
  --swatch-p-b: oklch(18% 0.018 70);
  --swatch-q-a: oklch(45% 0.12 135);
  --swatch-q-b: oklch(78% 0.06 72);
  --swatch-r-a: oklch(32% 0.025 275);
  --swatch-r-b: oklch(66% 0.17 294);
  --swatch-u-a: oklch(61% 0.2 305);
  --swatch-u-b: oklch(88% 0.04 305);
  --swatch-c-a: oklch(59% 0.16 292);
  --swatch-c-b: oklch(90% 0.035 292);
  --swatch-i-a: oklch(48% 0.1 145);
  --swatch-i-b: oklch(90% 0.02 160);
}

html.dark {
  --color-paper: var(--theme-page-dark);
  --color-paper-2: var(--theme-paper-2-dark);
  --color-paper-3: var(--theme-paper-3-dark);
  --color-ink: var(--theme-ink-dark);
  --color-ink-2: var(--theme-ink-2-dark);
  --color-muted: var(--theme-muted-dark);
  --color-rule: var(--theme-rule-dark);
  --color-rule-strong: var(--theme-rule-strong-dark);
  --color-graphite: var(--theme-story-dark);
  --color-graphite-2: var(--theme-story-2-dark);
  --color-on-dark: var(--theme-on-story-dark);
  --color-on-dark-muted: var(--theme-on-story-muted-dark);
  --color-focus: var(--theme-focus-dark);
  --theme-panel-bg: var(--theme-panel-bg-dark);
  --theme-panel-border: var(--theme-panel-border-dark);
  --theme-panel-shadow: var(--theme-card-shadow-dark);
  --theme-assistant-header: var(--theme-primary-soft-dark);
  --theme-app-bg: var(--theme-app-bg-dark);
  --theme-card-shadow: var(--theme-card-shadow-dark);
}

html,
body {
  overflow-x: clip;
}

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
}

#app-gradient-bg {
  background: var(--theme-app-bg) !important;
  background-size: var(--theme-background-size) !important;
}

.glass-card,
.assistant-shell {
  background-color: var(--theme-panel-bg) !important;
  border: 1px solid var(--theme-panel-border) !important;
  border-radius: var(--radius-panel) !important;
  box-shadow: var(--theme-card-shadow) !important;
}

.assistant-header {
  background: var(--theme-assistant-header) !important;
}

html[data-style-theme] :where(button, input, select, textarea, .nav-btn, .auth-login__register-link) {
  border-radius: var(--radius-control) !important;
}

.theme-switcher {
  position: relative;
  color: var(--color-ink);
  font-family: var(--font-body);
}

.auth-appearance-slot {
  position: fixed;
  inset-block-start: max(var(--space-md), env(safe-area-inset-top));
  inset-inline-start: max(var(--space-md), env(safe-area-inset-left));
  z-index: 200;
}

.auth-appearance-slot .theme-switcher__panel {
  inset-inline-start: 0;
  inset-inline-end: auto;
}

.theme-switcher__toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding-inline: var(--space-sm);
  border: 1px solid var(--theme-panel-border);
  background: var(--theme-panel-bg);
  color: var(--color-ink-2);
  box-shadow: var(--theme-card-shadow);
  font: 600 var(--text-xs)/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}

.theme-switcher__panel {
  position: absolute;
  inset-block-start: calc(100% + var(--space-sm));
  inset-inline-end: 0;
  width: min(20rem, calc(100dvi - 2rem));
  max-height: min(42rem, calc(100dvh - 6rem));
  overflow-y: auto;
  padding: var(--space-md);
  border: 1px solid var(--theme-panel-border);
  border-radius: var(--radius-panel);
  background: var(--theme-panel-bg);
  color: var(--color-ink);
  box-shadow: var(--theme-card-shadow);
  z-index: 100;
}

.theme-switcher__panel[hidden] {
  display: none;
}

.theme-switcher__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: var(--rule);
}

.theme-switcher__title,
.theme-switcher__heading p {
  margin: 0;
}

.theme-switcher__title {
  display: block;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: 700;
}

.theme-switcher__heading p {
  margin-top: var(--space-2xs);
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.theme-switcher__heading > svg {
  color: var(--color-accent);
}

.theme-switcher__group {
  min-width: 0;
  margin: var(--space-md) 0 0;
  padding: 0;
  border: 0;
}

.theme-switcher__group legend {
  margin-bottom: var(--space-xs);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 600;
}

.theme-switcher__segments,
.theme-switcher__themes {
  display: grid;
  gap: var(--space-xs);
}

.theme-switcher__segments {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-switcher__segments button,
.theme-switcher__option {
  min-height: 44px;
  border: 1px solid var(--color-rule);
  background: var(--color-paper);
  color: var(--color-ink-2);
  cursor: pointer;
  transition:
    background-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}

.theme-switcher__segments button {
  padding-inline: var(--space-xs);
  font: 600 var(--text-xs)/1 var(--font-body);
  white-space: nowrap;
}

.theme-switcher__option {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  text-align: start;
}

.theme-switcher__option > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: var(--space-3xs);
}

.theme-switcher__option strong,
.theme-switcher__option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-switcher__option strong {
  color: var(--color-ink);
  font-size: var(--text-xs);
}

.theme-switcher__option small {
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.theme-switcher__swatch {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-rule);
  border-radius: inherit;
}

.theme-switcher__option[data-style-theme="p"] .theme-switcher__swatch {
  background: linear-gradient(135deg, var(--swatch-p-a) 0 50%, var(--swatch-p-b) 50%);
}

.theme-switcher__option[data-style-theme="q"] .theme-switcher__swatch {
  background: linear-gradient(135deg, var(--swatch-q-a) 0 50%, var(--swatch-q-b) 50%);
}

.theme-switcher__option[data-style-theme="r"] .theme-switcher__swatch {
  background: linear-gradient(135deg, var(--swatch-r-a) 0 50%, var(--swatch-r-b) 50%);
}

.theme-switcher__option[data-style-theme="u"] .theme-switcher__swatch {
  background: linear-gradient(135deg, var(--swatch-u-a) 0 50%, var(--swatch-u-b) 50%);
}

.theme-switcher__option[data-style-theme="c"] .theme-switcher__swatch {
  background: linear-gradient(135deg, var(--swatch-c-a) 0 50%, var(--swatch-c-b) 50%);
}

.theme-switcher__option[data-style-theme="i"] .theme-switcher__swatch {
  background: linear-gradient(135deg, var(--swatch-i-a) 0 50%, var(--swatch-i-b) 50%);
}

.theme-switcher__option > svg {
  color: var(--color-accent);
  opacity: 0;
}

.theme-switcher__segments button[data-active="true"],
.theme-switcher__option[data-active="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.theme-switcher__option[data-active="true"] > svg {
  opacity: 1;
}

.theme-switcher button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.theme-switcher button:active {
  transform: translateY(1px);
}

.theme-switcher button:disabled,
.theme-switcher button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.theme-switcher button[data-state="loading"] {
  cursor: progress;
  opacity: 0.72;
}

.theme-switcher button[data-state="error"] {
  border-color: var(--color-error);
}

.theme-switcher button[data-state="success"] {
  border-color: var(--color-success);
}

@media (hover: hover) and (pointer: fine) {
  .theme-switcher__toggle:hover,
  .theme-switcher__segments button:hover,
  .theme-switcher__option:hover {
    background: var(--color-paper-2);
    color: var(--color-ink);
  }
}

@media (max-width: 25rem) {
  .theme-switcher__toggle > span,
  .theme-switcher__toggle > svg:last-child {
    display: none;
  }
}

.auth-login,
.auth-login *,
.auth-login *::before,
.auth-login *::after {
  box-sizing: border-box;
}

.auth-login {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--color-paper);
  color: var(--color-ink);
}

body.bg-slate-50,
.dark body.dark\:bg-slate-900 {
  background: var(--color-paper) !important;
  color: var(--color-ink) !important;
}

.auth-login__nav,
.auth-login__footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-md) clamp(var(--space-md), 4vw, var(--space-2xl));
}

.auth-login__nav {
  border-bottom: var(--rule);
}

.auth-login__brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
}

.auth-login__brand img {
  width: 44px;
  height: 44px;
  border: var(--rule);
  border-radius: var(--radius-control);
  object-fit: cover;
}

.auth-login__brand span {
  display: grid;
  gap: var(--space-3xs);
}

.auth-login__brand strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-login__brand small,
.auth-login__security {
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.auth-login__security {
  position: absolute;
  inset-inline-end: clamp(var(--space-md), 4vw, var(--space-2xl));
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-outlier);
  font-size: 0;
  white-space: nowrap;
}

.auth-login__security svg {
  width: 17px;
  height: 17px;
  color: var(--color-accent);
}

.auth-login__main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.auth-login__story {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-2xl);
  padding: var(--space-2xl) clamp(var(--space-md), 6vw, var(--space-3xl));
  background: var(--color-graphite);
  color: var(--color-on-dark);
}

.auth-login__story-copy {
  max-width: 65ch;
}

.auth-login__signal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin: 0 0 var(--space-xl);
  color: var(--color-on-dark-muted);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
}

.auth-login__signal span {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-accent);
}

.auth-login__story h1 {
  max-width: 12ch;
  min-width: 0;
  margin: 0;
  color: var(--color-on-dark);
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.auth-login__lede {
  max-width: 60ch;
  margin: var(--space-lg) 0 0;
  color: var(--color-on-dark-muted);
  font-size: var(--text-base);
  line-height: 1.65;
}

.auth-login__proof {
  display: grid;
  gap: var(--space-lg);
  margin: 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-graphite-2);
}

.auth-login__proof div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-lg);
}

.auth-login__proof dt {
  color: var(--color-on-dark-muted);
  font-size: var(--text-sm);
}

.auth-login__proof dd {
  margin: 0;
  color: var(--color-on-dark);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.auth-login__panel {
  min-width: 0;
  display: grid;
  align-items: center;
  padding: var(--space-2xl) clamp(var(--space-md), 6vw, var(--space-3xl));
  background: var(--color-paper);
  color: var(--color-ink);
}

.auth-login__panel-inner {
  width: min(100%, 31rem);
  margin-inline: auto;
}

.auth-login__heading {
  margin-bottom: var(--space-xl);
}

.auth-login__heading p {
  margin: 0 0 var(--space-xs);
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
}

.auth-login__heading h2 {
  min-width: 0;
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.auth-login__heading span {
  display: block;
  margin-top: var(--space-xs);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.auth-login__messages {
  display: grid;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.auth-login__message {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-sm);
  border: 1px solid currentColor;
  border-radius: var(--radius-control);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.auth-login__message svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.auth-login__message--error {
  background: var(--color-error-soft);
  color: var(--color-error);
}

.auth-login__message--success {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.auth-login__form {
  display: grid;
  gap: var(--space-lg);
}

.auth-login__field {
  display: grid;
  gap: var(--space-xs);
}

.auth-login__field label,
.auth-login__label-row a {
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

.auth-login__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.auth-login__label-row a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
}

.auth-login__control {
  position: relative;
}

.auth-login__control svg {
  position: absolute;
  inset-inline-start: var(--space-md);
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--color-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.auth-login__control input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-xl) 0 calc(var(--space-md) + var(--space-control-icon));
  border: var(--rule);
  border-radius: var(--radius-control);
  outline: 2px solid transparent;
  outline-offset: 1px;
  background: var(--color-paper);
  color: var(--color-ink);
  font: 400 var(--text-base)/1.5 var(--font-body);
}

.auth-login__helper {
  min-height: 1lh;
  color: var(--color-muted);
  font-size: var(--text-xs);
  line-height: 1;
}

.auth-login__control input::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

.auth-login__control input:focus-visible {
  border-color: var(--color-rule-strong);
  outline-color: var(--color-focus);
}

.auth-login__control input[aria-invalid="true"] {
  border-color: var(--color-error);
  background: var(--color-error-soft);
}

.auth-login__control input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-login__primary,
.auth-login__wechat,
.auth-login__register-link {
  min-height: 48px;
  white-space: nowrap;
}

.auth-login__primary,
.auth-login__wechat {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0 var(--space-lg);
  border-radius: var(--radius-control);
  font: 600 var(--text-sm)/1 var(--font-body);
  text-decoration: none;
  transition: background-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}

.auth-login__primary {
  border: 1px solid var(--color-accent);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  box-shadow: 0 1px 2px var(--color-shadow);
}

.auth-login__wechat {
  border: var(--rule);
  background: var(--color-paper);
  color: var(--color-ink-2);
}

.auth-login__wechat svg {
  width: 18px;
  height: 18px;
}

.auth-login__wechat:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-login__primary:disabled,
.auth-login__register-link[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-login__primary[data-state="loading"] {
  cursor: progress;
  opacity: 0.72;
}

.auth-login__primary[data-state="error"] {
  border-color: var(--color-error);
}

.auth-login__primary[data-state="success"] {
  border-color: var(--color-success);
}

.auth-login__register {
  display: grid;
  gap: var(--space-sm);
}

.auth-login__register > p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.auth-login__register-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xs);
}

.auth-login__register-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border: var(--rule);
  border-radius: var(--radius-control);
  background: var(--color-paper);
  color: var(--color-ink);
  text-decoration: none;
  transition: background-color var(--dur-short) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}

.auth-login__register-link svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--color-accent);
}

.auth-login__register-link span {
  min-width: 0;
  display: grid;
  gap: var(--space-3xs);
}

.auth-login__register-link strong,
.auth-login__register-link small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-login__register-link strong {
  font-size: var(--text-sm);
}

.auth-login__register-link small {
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.auth-login__support {
  display: grid;
  gap: var(--space-2xs);
  padding-top: var(--space-md);
  border-top: var(--rule);
  color: var(--color-muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.auth-login__support p {
  margin: 0;
}

.auth-login__footer {
  border-top: var(--rule);
  color: var(--color-muted);
  font-size: var(--text-xs);
  text-align: center;
}

.auth-login__footer span:first-child:nth-last-child(2)::after {
  content: " · 陪玩管理系统";
}

.auth-login__footer span:last-child:nth-child(2) {
  display: none;
}

html[data-style-theme="p"] .auth-login__story {
  background:
    linear-gradient(var(--color-graphite-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-graphite-2) 1px, transparent 1px),
    var(--color-graphite);
  background-size: 32px 32px;
}

html[data-style-theme="p"] .auth-login__main {
  border-bottom: 2px solid var(--color-ink);
}

html[data-style-theme="p"] .auth-login__nav,
html[data-style-theme="p"] .auth-login__footer,
html[data-style-theme="p"] .auth-login__panel {
  border-color: var(--color-ink);
}

html[data-style-theme="q"] .auth-login__panel-inner,
html[data-style-theme="c"] .auth-login__panel-inner,
html[data-style-theme="i"] .auth-login__panel-inner {
  padding: var(--space-xl);
  border: var(--rule);
  border-radius: var(--radius-panel);
  background: var(--color-paper-2);
  box-shadow: var(--theme-card-shadow);
}

html[data-style-theme="r"] .auth-login__nav,
html[data-style-theme="r"] .auth-login__footer,
html[data-style-theme="r"] .auth-login__main {
  border-color: var(--color-rule-strong);
}

html[data-style-theme="r"] .auth-login__panel-inner {
  padding: var(--space-xl);
  border: var(--rule);
  border-radius: var(--radius-panel);
  background: var(--color-paper-2);
}

html[data-style-theme="u"] .auth-login__panel-inner {
  padding: var(--space-xl);
  border: var(--rule);
  border-radius: var(--radius-panel);
  background: var(--color-paper-2);
  box-shadow: var(--theme-card-shadow);
}

html[data-style-theme="u"] .auth-login__brand strong,
html[data-style-theme="u"] .auth-login__story h1 {
  text-shadow: 2px 2px 0 var(--color-accent-soft);
}

.auth-login a:focus-visible,
.auth-login button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.auth-login__primary:active,
.auth-login__register-link:active,
.auth-login__wechat:not(:disabled):active {
  transform: translateY(1px);
}

@media (hover: hover) and (pointer: fine) {
  .auth-login__label-row a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  .auth-login__control input:hover {
    background: var(--color-paper-2);
  }

  .auth-login__primary:hover {
    background: var(--color-accent-hover);
  }

  .auth-login__register-link:hover,
  .auth-login__wechat:not(:disabled):hover {
    background: var(--color-accent-soft);
  }
}

@media (min-width: 40rem) {
  .auth-login__security {
    font-size: var(--text-xs);
  }

  .auth-login__register-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60rem) {
  .auth-login__main {
    grid-template-columns: minmax(0, 1.12fr) minmax(28rem, 0.88fr);
  }

  .auth-login__story,
  .auth-login__panel {
    padding-block: var(--space-3xl);
  }

  .auth-login__story {
    padding-block-start: var(--space-2xl);
    padding-block-end: var(--space-3xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-fade-in-up {
    animation: none !important;
  }

  .theme-switcher *,
  .theme-switcher *::before,
  .theme-switcher *::after,
  .auth-login *,
  .auth-login *::before,
  .auth-login *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .theme-switcher button:active,
  .auth-login__primary:active,
  .auth-login__register-link:active,
  .auth-login__wechat:not(:disabled):active {
    transform: none;
  }
}

/* Hallmark · structural app rebuild · Workbench */
::selection {
  background: var(--theme-selection);
}

.ui-app,
.auth-shell {
  background: var(--theme-app-bg);
  background-attachment: fixed;
  background-size: var(--theme-background-size);
  color: var(--color-ink);
  font-family: var(--font-body) !important;
}

.ui-app *,
.ui-app *::before,
.ui-app *::after,
.auth-shell *,
.auth-shell *::before,
.auth-shell *::after {
  box-sizing: border-box;
}

.ui-app .font-sans,
.auth-shell .font-sans {
  font-family: var(--font-body) !important;
}

.ui-app .font-mono,
.auth-shell .font-mono {
  font-family: var(--font-outlier) !important;
  font-variant-numeric: tabular-nums;
}

.ui-app :where(h1, h2, h3),
.auth-shell :where(h1, h2, h3) {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-style: normal;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.ui-app :where(a, button, input, select, textarea, summary) {
  -webkit-tap-highlight-color: transparent;
}

.ui-app :where(a, button),
.auth-shell :where(a, button) {
  white-space: nowrap;
}

.ui-app a.glass-card {
  white-space: normal;
}

.ui-app :where(button, a, input, select, textarea):focus-visible,
.auth-shell :where(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--color-focus) !important;
  outline-offset: 2px;
}

.ui-app :where(button, input, select),
.auth-shell :where(button, input, select) {
  min-height: 44px;
}

.ui-app :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
.auth-shell :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border: 1px solid var(--color-rule-strong) !important;
  border-radius: var(--radius-control) !important;
  background: var(--color-paper) !important;
  color: var(--color-ink) !important;
  box-shadow: none !important;
  outline: 2px solid transparent;
  outline-offset: 1px;
  transition: background-color var(--dur-short) var(--ease-out);
}

.ui-app textarea,
.auth-shell textarea {
  min-height: 6rem;
  resize: vertical;
}

.ui-app :where(input, textarea)::placeholder,
.auth-shell :where(input, textarea)::placeholder {
  color: var(--color-muted) !important;
  opacity: 1;
}

.ui-app :where(input, select, textarea):disabled,
.auth-shell :where(input, select, textarea):disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ui-app :where(input, select, textarea)[aria-invalid="true"],
.auth-shell :where(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--color-error) !important;
}

.app-shell {
  width: 100%;
  margin-inline: 0;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
}

.app-sidebar {
  background: var(--color-paper-2) !important;
  color: var(--color-ink);
  border-inline-end: 1px solid var(--color-rule);
  box-shadow: none !important;
}

.app-sidebar--mobile {
  width: min(19rem, calc(100% - 2rem)) !important;
}

#mobile-overlay {
  background: var(--color-ink-2) !important;
  opacity: 0;
  transition: opacity var(--dur-short) var(--ease-out);
}

#mobile-overlay.opacity-100 {
  opacity: 0.56;
}

#mobile-drawer {
  transition: transform var(--dur-long) var(--ease-out);
}

#mobile-drawer.drawer-closed {
  transform: translateX(-100%);
}

#mobile-drawer.drawer-open {
  transform: translateX(0);
}

.app-sidebar .nav-btn {
  min-height: 44px;
  border: 1px solid transparent !important;
  border-radius: var(--radius-control) !important;
  color: var(--color-muted) !important;
  background: transparent !important;
  box-shadow: none !important;
  transition:
    background-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}

.app-sidebar .nav-btn.text-purple-600,
.app-sidebar .nav-btn[class*="dark:text-purple"] {
  border-color: var(--color-rule-strong) !important;
  background: var(--color-paper) !important;
  color: var(--color-accent) !important;
  font-weight: 700;
}

.app-sidebar nav > div > p {
  color: var(--color-muted) !important;
  font-family: var(--font-outlier);
  letter-spacing: 0.08em;
}

.app-main {
  min-width: 0;
  padding: 0 clamp(var(--space-md), 3vw, var(--space-xl)) var(--space-2xl);
}

.app-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 200;
  min-width: 0;
  gap: var(--space-md);
  padding-block: var(--space-md);
  border-bottom: 1px solid var(--color-rule);
  background: var(--color-paper);
}

.app-header > div {
  min-width: 0;
}

.app-header h1 {
  font-size: clamp(var(--text-lg), 2.2vw, var(--text-xl)) !important;
  line-height: 1.12;
}

.app-header #current-date {
  color: var(--color-muted) !important;
  font-weight: 400;
}

.app-content {
  min-width: 0;
  padding-block-start: var(--space-lg);
}

.ui-app .glass-card,
.ui-app .assistant-shell,
.auth-shell__card {
  background: var(--color-paper-2) !important;
  color: var(--color-ink);
  border: 1px solid var(--color-rule) !important;
  border-radius: var(--radius-panel) !important;
  box-shadow: var(--theme-card-shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.ui-app .glass-card :where(.glass-card) {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.integration-page {
  display: grid;
  gap: var(--space-lg);
}

.integration-page__head,
.integration-card__head,
.integration-card__title {
  display: flex;
  align-items: center;
}

.integration-page__head {
  gap: var(--space-md);
  justify-content: space-between;
}

.integration-page__head h2 {
  margin-top: var(--space-xs);
  font-size: var(--text-xl);
  font-weight: 800;
}

.integration-page__head p,
.integration-page__note {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.integration-page__eyebrow {
  color: var(--color-accent) !important;
  font-family: var(--font-outlier);
  font-size: var(--text-xs) !important;
  letter-spacing: 0.08em;
}

.integration-page__back,
.integration-card__save {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  border-radius: var(--radius-control);
  font-size: var(--text-sm);
  font-weight: 700;
}

.integration-page__back {
  padding-inline: var(--space-md);
  border: 1px solid var(--color-rule-strong);
  color: var(--color-ink);
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: var(--space-lg);
}

.integration-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-lg);
}

.integration-card__head {
  justify-content: space-between;
  gap: var(--space-md);
}

.integration-card__title {
  min-width: 0;
  gap: var(--space-sm);
}

.integration-card__title h3 {
  font-size: var(--text-lg);
  font-weight: 800;
}

.integration-card__title p {
  margin-top: 0.15rem;
  font-size: var(--text-xs);
}

.integration-card__title .is-ready {
  color: var(--color-success);
}

.integration-card__title .is-missing {
  color: var(--color-warning);
}

.integration-card__icon {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.integration-card__fields {
  display: grid;
  gap: var(--space-md);
}

.integration-card__fields label {
  display: grid;
  gap: var(--space-xs);
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.integration-card__fields input {
  width: 100%;
  padding-inline: var(--space-sm);
}

.integration-card__save {
  margin-top: auto;
  padding-inline: var(--space-md);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.ui-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  cursor: pointer;
}

.ui-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0 !important;
  opacity: 0;
}

.ui-switch > span {
  position: relative;
  display: block;
  width: 3rem;
  height: 1.75rem;
  border: 1px solid var(--color-rule-strong);
  border-radius: calc(var(--radius-control) * 2);
  background: var(--color-paper-3);
  transition: background-color var(--dur-short) var(--ease-out);
}

.ui-switch > span::after {
  position: absolute;
  inset-block-start: 0.1875rem;
  inset-inline-start: 0.1875rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-control);
  background: var(--color-paper);
  content: "";
  transition: transform var(--dur-short) var(--ease-out);
}

.ui-switch input:checked + span {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.ui-switch input:checked + span::after {
  transform: translateX(1.25rem);
}

.ui-switch input:focus-visible {
  outline: none !important;
}

.ui-switch input:focus-visible + span {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.ui-app :where(.bg-white, .bg-white\/40, .bg-white\/50, .bg-white\/60, .bg-white\/70, .bg-white\/80),
.dark .ui-app :where(.dark\:bg-slate-800, .dark\:bg-slate-800\/40, .dark\:bg-slate-800\/50, .dark\:bg-slate-800\/60, .dark\:bg-slate-800\/80) {
  background-color: var(--color-paper-2) !important;
}

.ui-app :where(.bg-slate-50, .bg-slate-100),
.dark .ui-app :where(.dark\:bg-slate-700, .dark\:bg-slate-700\/30, .dark\:bg-slate-700\/50) {
  background-color: var(--color-paper-3) !important;
}

.ui-app :where(.text-slate-800, .text-slate-700, .text-slate-600),
.dark .ui-app :where(.dark\:text-white, .dark\:text-slate-100, .dark\:text-slate-200, .dark\:text-slate-300) {
  color: var(--color-ink) !important;
}

.ui-app :where(.text-slate-500, .text-slate-400),
.dark .ui-app :where(.dark\:text-slate-400, .dark\:text-slate-500) {
  color: var(--color-muted) !important;
}

.ui-app :where(.text-purple-400, .text-purple-500, .text-purple-600, .text-purple-700),
.dark .ui-app :where(.dark\:text-purple-300, .dark\:text-purple-400) {
  color: var(--color-accent) !important;
}

.ui-app :where(.bg-purple-400, .bg-purple-500, .bg-purple-600, .bg-purple-700) {
  background: var(--color-accent) !important;
  color: var(--color-accent-ink) !important;
}

.ui-app :where(.bg-purple-50, .bg-purple-100, .bg-purple-500\/10),
.dark .ui-app :where(.dark\:bg-purple-900\/20, .dark\:bg-purple-900\/30, .dark\:bg-purple-900\/40) {
  background: var(--color-accent-soft) !important;
}

.ui-app :where(.border-white, .border-white\/40, .border-white\/50, .border-white\/60, .border-white\/70, .border-white\/80, .border-slate-100, .border-slate-200, .border-slate-300),
.dark .ui-app :where(.dark\:border-slate-600, .dark\:border-slate-700, .dark\:border-slate-700\/50, .dark\:border-slate-700\/60, .dark\:border-slate-700\/70) {
  border-color: var(--color-rule) !important;
}

.ui-app :where(.shadow-sm, .shadow-lg, .shadow-xl, .shadow-2xl) {
  box-shadow: none !important;
}

.ui-app details > summary {
  list-style: none;
}

.ui-app details > summary::-webkit-details-marker {
  display: none;
}

.ui-app .custom-scrollbar {
  scrollbar-color: var(--color-rule-strong) transparent;
  scrollbar-width: thin;
}

.ui-app .custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.ui-app .custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.ui-app .custom-scrollbar::-webkit-scrollbar-thumb {
  border-radius: var(--radius-control);
  background: var(--color-rule-strong);
}

.ui-app :where(table) {
  width: 100%;
  border-collapse: collapse;
  color: var(--color-ink);
  font-variant-numeric: tabular-nums;
}

.ui-app :where(th) {
  color: var(--color-muted) !important;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  text-align: start;
}

.ui-app :where(th, td) {
  border-bottom: 1px solid var(--color-rule) !important;
}

.ui-app :where(tbody tr) {
  transition: background-color var(--dur-short) var(--ease-out);
}

.dashboard-workbench {
  display: grid;
  gap: var(--space-xl);
}

.ui-section {
  display: grid;
  gap: var(--space-md);
}

.ui-section__head,
.ui-panel__head {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

.ui-section__head h2,
.ui-panel__head h2 {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin: 0;
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.2;
}

.ui-section__head h2::after,
.ui-panel__head h2::after {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: var(--color-accent);
}

.ui-panel__head p {
  margin: var(--space-2xs) 0 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.ui-segmented {
  display: inline-flex;
  max-width: 100%;
  overflow-x: auto;
  padding: var(--space-2xs);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-control);
  background: var(--color-paper-2);
}

.ui-segmented a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--space-sm);
  border-radius: calc(var(--radius-control) * 0.7);
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.ui-segmented a.is-active {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.ui-metric-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--color-rule-strong);
  border-radius: var(--radius-panel);
  overflow: clip;
  background: var(--color-paper-2);
  box-shadow: var(--theme-card-shadow);
}

.ui-metric {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-rule);
  color: var(--color-ink);
  text-decoration: none;
  transition: background-color var(--dur-short) var(--ease-out);
}

.ui-app .ui-metric.glass-card {
  border: 0 !important;
  border-bottom: 1px solid var(--color-rule) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ui-metric:last-child {
  border-bottom: 0;
}

.ui-metric__top {
  align-self: start;
}

.ui-metric__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-control);
  background: var(--color-paper);
  color: var(--color-accent);
}

.ui-metric__body {
  min-width: 0;
  display: grid;
  gap: var(--space-2xs);
}

.ui-metric__body h3 {
  margin: 0;
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0;
}

.ui-metric__body p {
  min-width: 0;
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: clamp(var(--text-md), 3vw, var(--text-xl));
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.ui-metric__body small {
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.ui-metric__top + span,
.ui-metric__top ~ span {
  align-self: start;
}

.ui-todo-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: clip;
  border: 1px solid var(--color-rule-strong);
  border-radius: var(--radius-panel);
  background: var(--color-paper-2);
  box-shadow: var(--theme-card-shadow);
}

.ui-todo {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xs);
  color: var(--color-ink);
  text-decoration: none;
  transition: background-color var(--dur-short) var(--ease-out);
}

.ui-todo + .ui-todo {
  border-top: 1px solid var(--color-rule);
}

.ui-todo.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.ui-workbench-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
}

.ui-workbench-grid__main,
.ui-workbench-grid__side {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: var(--space-xl);
}

.ui-panel {
  min-width: 0;
  padding: var(--space-lg);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-panel);
  background: var(--color-paper-2);
  color: var(--color-ink);
  box-shadow: var(--theme-card-shadow);
}

.ui-panel__head {
  margin-bottom: var(--space-lg);
}

.ui-text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
}

.ui-chart {
  height: 12rem;
  display: flex;
  align-items: flex-end;
  gap: clamp(var(--space-2xs), 2vw, var(--space-md));
  padding-top: var(--space-lg);
  border-bottom: 1px solid var(--color-rule-strong);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(25% - 1px),
    var(--color-rule) 25%
  );
}

.ui-chart__column {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.ui-chart__bar {
  width: 100%;
  min-height: 2px;
  background: var(--color-accent);
  opacity: 0.78;
  transition: opacity var(--dur-short) var(--ease-out);
}

.ui-chart__tooltip {
  position: absolute;
  inset-block-start: -2.5rem;
  inset-inline-start: 50%;
  z-index: 100;
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-control);
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity var(--dur-short) var(--ease-out);
}

.ui-chart__column:focus-within .ui-chart__tooltip {
  opacity: 1;
}

.ui-chart__labels {
  display: flex;
  justify-content: space-between;
  gap: var(--space-xs);
  padding-top: var(--space-xs);
  color: var(--color-muted);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
}

.ui-table {
  text-align: start;
}

.ui-ranking {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ui-ranking__row {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-sm);
  padding-block: var(--space-md);
  border-bottom: 1px solid var(--color-rule);
}

.ui-ranking__row:last-child {
  border-bottom: 0;
}

.ui-ranking__position {
  position: absolute;
  inset-block-start: -0.35rem;
  inset-inline-end: -0.35rem;
  min-width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-control);
  background: var(--color-paper);
  color: var(--color-accent);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 700;
}

.ui-ranking__action {
  margin-top: auto;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-rule);
}

.ui-primary-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-control);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color var(--dur-short) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}

.orders-workbench {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: var(--space-lg);
}

.orders-workbench > *,
.orders-filter,
.orders-filter__grid,
.orders-data-panel {
  min-width: 0;
  max-width: 100%;
}

.orders-tabs {
  padding: var(--space-xs) !important;
  border-radius: var(--radius-control) !important;
}

.orders-tabs > div {
  gap: var(--space-2xs) !important;
}

.orders-tabs a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: var(--space-md) !important;
  border: 1px solid transparent;
  border-radius: var(--radius-control) !important;
  background: transparent !important;
  color: var(--color-muted) !important;
  text-decoration: none;
}

.orders-tabs a.bg-purple-600 {
  border-color: var(--color-accent) !important;
  background: var(--color-accent) !important;
  color: var(--color-accent-ink) !important;
}

.orders-filter {
  padding: var(--space-lg) !important;
  border-radius: var(--radius-panel) !important;
}

.orders-filter__grid {
  gap: var(--space-sm) !important;
}

.orders-filter label {
  color: var(--color-muted) !important;
  font-size: var(--text-xs);
  font-weight: 700;
}

.orders-metric-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-block: 1px solid var(--color-rule-strong);
}

.orders-metric {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xs);
  border-bottom: 1px solid var(--color-rule);
}

.orders-metric:last-child {
  border-bottom: 0;
}

.orders-metric__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-control);
  background: var(--color-paper-2);
  color: var(--color-accent);
}

.orders-metric p {
  margin: 0;
}

.orders-metric p:last-child {
  color: var(--color-ink) !important;
  font-family: var(--font-display);
  font-size: var(--text-lg) !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.orders-data-panel {
  padding: var(--space-lg) !important;
}

#assistant-fab,
#assistant-send-btn {
  border: 1px solid var(--color-accent) !important;
  border-radius: var(--radius-control) !important;
  background: var(--color-accent) !important;
  color: var(--color-accent-ink) !important;
  box-shadow: var(--theme-card-shadow) !important;
  transition: transform var(--dur-micro) var(--ease-out) !important;
}

#assistant-panel {
  width: min(23.75rem, calc(100% - (2 * var(--space-md))));
  max-height: min(37.5rem, 75dvh);
}

.assistant-header {
  background: var(--color-paper-3) !important;
  color: var(--color-ink) !important;
}

.assistant-message--user {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.assistant-reply__table {
  width: 100%;
  margin-block: var(--space-xs);
  border-collapse: collapse;
  font-size: var(--text-xs);
}

.assistant-reply__table :where(th, td) {
  padding: var(--space-xs);
  border: 1px solid var(--color-rule);
  text-align: start;
}

.assistant-reply__heading {
  background: var(--color-accent-soft);
  font-weight: 600;
}

.assistant-reply__row-even {
  background: var(--color-paper-3);
}

.assistant-reply__code {
  padding: var(--space-3xs) var(--space-2xs);
  border-radius: calc(var(--radius-control) * 0.5);
  background: var(--color-accent-soft);
  font-size: var(--text-xs);
}

.assistant-reply__rule {
  margin-block: var(--space-xs);
  border: 0;
  border-top: 1px solid var(--color-rule);
}

.assistant-reply__list-item {
  padding-inline-start: var(--space-sm);
  text-indent: calc(-1 * var(--space-sm));
}

.assistant-reply__numbered-item {
  padding-inline-start: var(--space-md);
  text-indent: calc(-1 * var(--space-md));
}

.auth-shell__card {
  margin: clamp(var(--space-md), 4vw, var(--space-xl));
  padding: var(--space-xl) !important;
}

html[data-style-theme="p"] .app-sidebar,
html[data-style-theme="p"] .ui-metric-strip,
html[data-style-theme="p"] .ui-todo-list,
html[data-style-theme="p"] .ui-panel,
html[data-style-theme="p"] .auth-shell__card {
  border-color: var(--color-ink) !important;
}

html[data-style-theme="p"] .app-sidebar .nav-btn.text-purple-600 {
  border-color: var(--color-ink) !important;
  box-shadow: 3px 3px 0 var(--color-accent) !important;
}

html[data-style-theme="q"] .ui-metric-strip,
html[data-style-theme="q"] .ui-panel:nth-child(even) {
  border-radius: calc(var(--radius-panel) * 1.2) calc(var(--radius-panel) * 0.8);
}

html[data-style-theme="r"] .app-sidebar {
  background: var(--color-graphite) !important;
  color: var(--color-on-dark);
}

html[data-style-theme="r"] .app-sidebar .nav-btn {
  color: var(--color-on-dark-muted) !important;
}

html[data-style-theme="r"] .app-sidebar .nav-btn.text-purple-600 {
  border-color: var(--color-accent) !important;
  background: var(--color-graphite-2) !important;
  color: var(--color-on-dark) !important;
}

html[data-style-theme="u"] .ui-panel,
html[data-style-theme="u"] .ui-metric-strip {
  box-shadow: 5px 5px 0 var(--color-accent-soft) !important;
}

html[data-style-theme="c"] .ui-panel,
html[data-style-theme="c"] .ui-metric-strip {
  border-color: var(--color-accent-soft) !important;
}

html[data-style-theme="i"] .app-header {
  background-image: linear-gradient(90deg, var(--color-rule) 1px, transparent 1px);
  background-size: 2rem 100%;
}

@media (hover: hover) and (pointer: fine) {
  .app-sidebar .nav-btn:hover,
  .ui-metric:hover,
  .ui-todo:not(.is-disabled):hover,
  .ui-ranking__row:hover {
    background: var(--color-paper-3) !important;
    color: var(--color-ink) !important;
  }

  .ui-text-link:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  .ui-chart__column:hover .ui-chart__bar {
    opacity: 1;
  }

  .ui-chart__column:hover .ui-chart__tooltip {
    opacity: 1;
  }

  .ui-primary-action:hover,
  #assistant-fab:hover {
    transform: translateY(-1px);
  }
}

.ui-primary-action:active,
#assistant-fab:active,
.app-sidebar .nav-btn:active {
  transform: translateY(1px);
}

@media (min-width: 40rem) {
  .ui-section__head,
  .ui-panel__head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .ui-metric-strip {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.92fr);
  }

  .ui-metric {
    border-bottom: 1px solid var(--color-rule);
    border-inline-end: 1px solid var(--color-rule);
  }

  .ui-metric:nth-child(2n) {
    border-inline-end: 0;
  }

  .ui-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .ui-todo-list {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  .ui-todo + .ui-todo {
    border-top: 0;
    border-inline-start: 1px solid var(--color-rule);
  }

  .orders-metric-strip {
    grid-template-columns: 1.25fr 1fr 0.85fr;
  }

  .orders-metric {
    border-bottom: 0;
    border-inline-end: 1px solid var(--color-rule);
  }

  .orders-metric:last-child {
    border-inline-end: 0;
  }
}

@media (min-width: 48rem) {
  .app-shell {
    grid-template-columns: 15rem minmax(0, 1fr);
  }
}

@media (min-width: 60rem) {
  .app-main {
    padding-inline: clamp(var(--space-lg), 3vw, var(--space-2xl));
  }

  .ui-metric-strip {
    grid-template-columns: 1.25fr 0.9fr 0.9fr 1fr;
  }

  .ui-metric-strip--five {
    grid-template-columns: 1.35fr 1.08fr 0.82fr 0.82fr 0.93fr;
  }

  .ui-metric {
    border-bottom: 0 !important;
    border-inline-end: 1px solid var(--color-rule) !important;
  }

  .ui-app .ui-metric.glass-card {
    border-bottom: 0 !important;
    border-inline-end: 1px solid var(--color-rule) !important;
  }

  .ui-metric:last-child {
    border-inline-end: 0 !important;
  }

  .ui-app .ui-metric.glass-card:last-child {
    border-inline-end: 0 !important;
  }

  .ui-workbench-grid {
    grid-template-columns: minmax(0, 1.72fr) minmax(18rem, 0.72fr);
  }

  .ui-panel {
    padding: var(--space-xl);
  }
}

@media (pointer: coarse) {
  .ui-app :where(button, a.nav-btn, .ui-text-link, .ui-primary-action) {
    min-height: 48px;
  }
}

@media (min-width: 40rem) and (max-width: 63.999rem) {
  .app-header {
    flex-wrap: wrap;
  }

  .app-header > div:last-child {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 39.999rem) {
  .app-main {
    padding-inline: var(--space-sm);
  }

  .integration-page__head {
    align-items: stretch;
    flex-direction: column;
  }

  .integration-page__back {
    width: 100%;
  }

  .app-header {
    align-items: flex-start !important;
  }

  .app-header > div:last-child {
    gap: var(--space-xs) !important;
  }

  .app-header h1 {
    font-size: var(--text-md) !important;
    white-space: nowrap;
  }

  .app-header #current-date {
    display: none;
  }

  .app-header [aria-label="个人中心"],
  .app-header a[href*="logout"] {
    display: none;
  }

  .theme-switcher__toggle {
    padding-inline: var(--space-xs);
  }

  .theme-switcher__toggle > span,
  .theme-switcher__toggle > svg:last-child {
    display: none;
  }

  .ui-panel {
    padding: var(--space-md);
  }

  .orders-filter {
    padding: var(--space-md) !important;
  }

  .orders-filter__grid {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .orders-filter__grid > div {
    grid-column: auto !important;
  }

  .orders-filter__grid > .flex {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .ui-panel .overflow-x-auto,
  .glass-card.overflow-x-auto,
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui-app *,
  .ui-app *::before,
  .ui-app *::after,
  .auth-shell *,
  .auth-shell *::before,
  .auth-shell *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ui-primary-action:active,
  #assistant-fab:active,
  .app-sidebar .nav-btn:active {
    transform: none;
  }
}
