2026-01-12 12:23:44 +08:00
|
|
|
:root {
|
2026-02-15 15:44:09 +08:00
|
|
|
font-family: 'Noto Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
|
2026-01-12 12:23:44 +08:00
|
|
|
line-height: 1.5;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-synthesis: none;
|
|
|
|
|
text-rendering: optimizeLegibility;
|
|
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-15 15:44:09 +08:00
|
|
|
:root,
|
|
|
|
|
:root[data-theme='light'] {
|
|
|
|
|
color-scheme: light;
|
|
|
|
|
--app-bg: #f4f6fb;
|
|
|
|
|
--app-text: #1f2937;
|
2026-02-19 10:22:27 +08:00
|
|
|
--panel-bg: rgba(255, 255, 255, 0.5);
|
2026-02-15 15:44:09 +08:00
|
|
|
--panel-border: #d7deea;
|
|
|
|
|
--panel-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
|
2026-02-19 10:22:27 +08:00
|
|
|
--btn-bg: rgba(255, 255, 255, 0.5);
|
2026-02-15 15:44:09 +08:00
|
|
|
--btn-fg: #5b6470;
|
|
|
|
|
--btn-hover-bg: #4a90d9;
|
|
|
|
|
--btn-hover-fg: #ffffff;
|
2026-02-19 10:22:27 +08:00
|
|
|
--btn-disabled-bg: rgba(207, 213, 223, 0.5);
|
2026-02-15 15:44:09 +08:00
|
|
|
--btn-disabled-fg: #8a92a0;
|
|
|
|
|
--overlay-bg: rgba(15, 23, 42, 0.3);
|
|
|
|
|
--tooltip-bg: #111827;
|
|
|
|
|
--tooltip-fg: #f9fafb;
|
|
|
|
|
--muted-text: #6b7280;
|
|
|
|
|
--danger-text: #dc2626;
|
|
|
|
|
--scrollbar-thumb: #d4dae4;
|
|
|
|
|
--scrollbar-thumb-hover: #bbc4d2;
|
|
|
|
|
--focus-ring: #3b82f6;
|
2026-02-19 10:22:27 +08:00
|
|
|
--toggle-bg-start: rgba(255, 248, 221, 0.5);
|
|
|
|
|
--toggle-bg-end: rgba(242, 244, 255, 0.5);
|
2026-02-15 15:44:09 +08:00
|
|
|
--toggle-thumb-bg: #ffffff;
|
|
|
|
|
--toggle-sun: #f59e0b;
|
|
|
|
|
--toggle-moon: #475569;
|
|
|
|
|
--ghost-text: #7d8796;
|
|
|
|
|
--ghost-code-bg: rgba(15, 23, 42, 0.06);
|
2026-02-25 19:00:17 +08:00
|
|
|
--mermaid-max-height: 420px;
|
2026-03-10 22:21:11 +08:00
|
|
|
--mermaid-mobile-max-height: 320px;
|
|
|
|
|
--mermaid-action-bg: linear-gradient(180deg, #ffffff 0%, #f4f7fc 100%);
|
|
|
|
|
--mermaid-action-hover-bg: linear-gradient(180deg, #ffffff 0%, #e9f2ff 100%);
|
|
|
|
|
--mermaid-action-fg: #1f2937;
|
|
|
|
|
--mermaid-action-border: #cfd8e6;
|
|
|
|
|
--mermaid-action-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
|
|
|
|
|
--mermaid-action-shadow-hover: 0 4px 10px rgba(37, 99, 235, 0.16);
|
|
|
|
|
--mermaid-action-disabled-bg: rgba(148, 163, 184, 0.18);
|
|
|
|
|
--mermaid-action-disabled-fg: #9aa4b2;
|
2026-01-12 12:23:44 +08:00
|
|
|
|
2026-02-15 15:44:09 +08:00
|
|
|
--crepe-color-background: #ffffff;
|
|
|
|
|
--crepe-color-on-background: #000000;
|
|
|
|
|
--crepe-color-surface: #f7f7f7;
|
|
|
|
|
--crepe-color-surface-low: #ededed;
|
|
|
|
|
--crepe-color-on-surface: #1c1c1c;
|
|
|
|
|
--crepe-color-on-surface-variant: #4d4d4d;
|
|
|
|
|
--crepe-color-outline: #a8a8a8;
|
|
|
|
|
--crepe-color-primary: #333333;
|
|
|
|
|
--crepe-color-secondary: #cfcfcf;
|
|
|
|
|
--crepe-color-on-secondary: #000000;
|
|
|
|
|
--crepe-color-inverse: #f0f0f0;
|
|
|
|
|
--crepe-color-on-inverse: #1a1a1a;
|
|
|
|
|
--crepe-color-inline-code: #ba1a1a;
|
|
|
|
|
--crepe-color-error: #ba1a1a;
|
|
|
|
|
--crepe-color-hover: #e0e0e0;
|
|
|
|
|
--crepe-color-selected: #d5d5d5;
|
|
|
|
|
--crepe-color-inline-area: #cacaca;
|
2026-01-12 12:23:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-02-15 15:44:09 +08:00
|
|
|
:root[data-theme='dark'] {
|
|
|
|
|
color-scheme: dark;
|
|
|
|
|
--app-bg: #0f1117;
|
|
|
|
|
--app-text: #e5e7eb;
|
2026-02-19 10:22:27 +08:00
|
|
|
--panel-bg: rgba(26, 30, 39, 0.5);
|
2026-02-15 15:44:09 +08:00
|
|
|
--panel-border: #2f3644;
|
|
|
|
|
--panel-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
|
2026-02-19 10:22:27 +08:00
|
|
|
--btn-bg: rgba(34, 40, 52, 0.5);
|
2026-02-15 15:44:09 +08:00
|
|
|
--btn-fg: #d2d8e4;
|
|
|
|
|
--btn-hover-bg: #6ea8ff;
|
|
|
|
|
--btn-hover-fg: #0d1117;
|
2026-02-19 10:22:27 +08:00
|
|
|
--btn-disabled-bg: rgba(46, 52, 65, 0.5);
|
2026-02-15 15:44:09 +08:00
|
|
|
--btn-disabled-fg: #7a8498;
|
|
|
|
|
--overlay-bg: rgba(2, 6, 23, 0.65);
|
|
|
|
|
--tooltip-bg: #f8fafc;
|
|
|
|
|
--tooltip-fg: #0f172a;
|
|
|
|
|
--muted-text: #aeb6c5;
|
|
|
|
|
--danger-text: #f87171;
|
|
|
|
|
--scrollbar-thumb: #40485a;
|
|
|
|
|
--scrollbar-thumb-hover: #5f6980;
|
|
|
|
|
--focus-ring: #60a5fa;
|
2026-02-19 10:22:27 +08:00
|
|
|
--toggle-bg-start: rgba(45, 49, 64, 0.5);
|
|
|
|
|
--toggle-bg-end: rgba(31, 36, 48, 0.5);
|
2026-02-15 15:44:09 +08:00
|
|
|
--toggle-thumb-bg: #dbe3f2;
|
|
|
|
|
--toggle-sun: #fbbf24;
|
|
|
|
|
--toggle-moon: #e2e8f0;
|
|
|
|
|
--ghost-text: #95a0b4;
|
|
|
|
|
--ghost-code-bg: rgba(226, 232, 240, 0.12);
|
2026-03-10 22:21:11 +08:00
|
|
|
--mermaid-action-bg: linear-gradient(180deg, #30394b 0%, #242c3a 100%);
|
|
|
|
|
--mermaid-action-hover-bg: linear-gradient(180deg, #3a4760 0%, #2a3445 100%);
|
|
|
|
|
--mermaid-action-fg: #e5e7eb;
|
|
|
|
|
--mermaid-action-border: #3e4a61;
|
|
|
|
|
--mermaid-action-shadow: 0 1px 2px rgba(2, 6, 23, 0.45);
|
|
|
|
|
--mermaid-action-shadow-hover: 0 5px 12px rgba(2, 6, 23, 0.55);
|
|
|
|
|
--mermaid-action-disabled-bg: rgba(82, 93, 110, 0.3);
|
|
|
|
|
--mermaid-action-disabled-fg: #9aa4b2;
|
2026-02-15 15:44:09 +08:00
|
|
|
|
|
|
|
|
--crepe-color-background: #1a1a1a;
|
|
|
|
|
--crepe-color-on-background: #e6e6e6;
|
|
|
|
|
--crepe-color-surface: #121212;
|
|
|
|
|
--crepe-color-surface-low: #1c1c1c;
|
|
|
|
|
--crepe-color-on-surface: #d1d1d1;
|
|
|
|
|
--crepe-color-on-surface-variant: #a9a9a9;
|
|
|
|
|
--crepe-color-outline: #757575;
|
|
|
|
|
--crepe-color-primary: #b5b5b5;
|
|
|
|
|
--crepe-color-secondary: #4d4d4d;
|
|
|
|
|
--crepe-color-on-secondary: #d6d6d6;
|
|
|
|
|
--crepe-color-inverse: #e5e5e5;
|
|
|
|
|
--crepe-color-on-inverse: #2a2a2a;
|
|
|
|
|
--crepe-color-inline-code: #ff6666;
|
|
|
|
|
--crepe-color-error: #ff6666;
|
|
|
|
|
--crepe-color-hover: #232323;
|
|
|
|
|
--crepe-color-selected: #2f2f2f;
|
|
|
|
|
--crepe-color-inline-area: #2b2b2b;
|
2026-01-12 12:23:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-02-15 15:44:09 +08:00
|
|
|
:root[data-theme='light'] .milkdown {
|
2026-02-19 10:22:27 +08:00
|
|
|
--crepe-color-background: transparent;
|
2026-02-15 15:44:09 +08:00
|
|
|
--crepe-color-on-background: #000000;
|
2026-02-19 10:22:27 +08:00
|
|
|
--crepe-color-surface: rgba(247, 247, 247, 0.5);
|
|
|
|
|
--crepe-color-surface-low: rgba(237, 237, 237, 0.5);
|
2026-02-15 15:44:09 +08:00
|
|
|
--crepe-color-on-surface: #1c1c1c;
|
|
|
|
|
--crepe-color-on-surface-variant: #4d4d4d;
|
|
|
|
|
--crepe-color-outline: #a8a8a8;
|
|
|
|
|
--crepe-color-primary: #333333;
|
|
|
|
|
--crepe-color-secondary: #cfcfcf;
|
|
|
|
|
--crepe-color-on-secondary: #000000;
|
|
|
|
|
--crepe-color-inverse: #f0f0f0;
|
|
|
|
|
--crepe-color-on-inverse: #1a1a1a;
|
|
|
|
|
--crepe-color-inline-code: #ba1a1a;
|
|
|
|
|
--crepe-color-error: #ba1a1a;
|
|
|
|
|
--crepe-color-hover: #e0e0e0;
|
|
|
|
|
--crepe-color-selected: #d5d5d5;
|
|
|
|
|
--crepe-color-inline-area: #cacaca;
|
2026-01-12 12:23:44 +08:00
|
|
|
}
|
2026-02-15 15:44:09 +08:00
|
|
|
|
|
|
|
|
:root[data-theme='dark'] .milkdown {
|
2026-02-19 10:22:27 +08:00
|
|
|
--crepe-color-background: transparent;
|
2026-02-15 15:44:09 +08:00
|
|
|
--crepe-color-on-background: #e6e6e6;
|
2026-02-19 10:22:27 +08:00
|
|
|
--crepe-color-surface: rgba(18, 18, 18, 0.5);
|
|
|
|
|
--crepe-color-surface-low: rgba(28, 28, 28, 0.5);
|
2026-02-15 15:44:09 +08:00
|
|
|
--crepe-color-on-surface: #d1d1d1;
|
|
|
|
|
--crepe-color-on-surface-variant: #a9a9a9;
|
|
|
|
|
--crepe-color-outline: #757575;
|
|
|
|
|
--crepe-color-primary: #b5b5b5;
|
|
|
|
|
--crepe-color-secondary: #4d4d4d;
|
|
|
|
|
--crepe-color-on-secondary: #d6d6d6;
|
|
|
|
|
--crepe-color-inverse: #e5e5e5;
|
|
|
|
|
--crepe-color-on-inverse: #2a2a2a;
|
|
|
|
|
--crepe-color-inline-code: #ff6666;
|
|
|
|
|
--crepe-color-error: #ff6666;
|
|
|
|
|
--crepe-color-hover: #232323;
|
|
|
|
|
--crepe-color-selected: #2f2f2f;
|
|
|
|
|
--crepe-color-inline-area: #2b2b2b;
|
2026-01-12 12:23:44 +08:00
|
|
|
}
|
2026-02-15 15:44:09 +08:00
|
|
|
|
|
|
|
|
html,
|
|
|
|
|
body {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
background: var(--app-bg);
|
|
|
|
|
color: var(--app-text);
|
2026-01-12 12:23:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-02-15 15:44:09 +08:00
|
|
|
body {
|
|
|
|
|
min-width: 320px;
|
2026-01-12 12:23:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#app {
|
2026-01-18 09:08:38 +08:00
|
|
|
width: 100vw;
|
2026-01-12 12:23:44 +08:00
|
|
|
height: 100vh;
|
2026-01-18 09:08:38 +08:00
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
max-width: none;
|
2026-02-15 15:44:09 +08:00
|
|
|
background: var(--app-bg);
|
|
|
|
|
color: var(--app-text);
|
2026-01-12 12:23:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-02-15 15:44:09 +08:00
|
|
|
*,
|
|
|
|
|
*::before,
|
|
|
|
|
*::after {
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
transition:
|
|
|
|
|
background-color 220ms ease,
|
|
|
|
|
color 220ms ease,
|
|
|
|
|
border-color 220ms ease,
|
|
|
|
|
box-shadow 220ms ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
|
|
|
*,
|
|
|
|
|
*::before,
|
|
|
|
|
*::after {
|
|
|
|
|
transition: none !important;
|
|
|
|
|
}
|
2026-01-12 12:23:44 +08:00
|
|
|
}
|
2026-02-25 19:00:17 +08:00
|
|
|
|
|
|
|
|
/* ── Mermaid diagram blocks ─────────────────────────────────────────── */
|
|
|
|
|
.mermaid-block {
|
|
|
|
|
display: block;
|
2026-03-10 22:21:11 +08:00
|
|
|
width: fit-content;
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
margin: 1em auto;
|
|
|
|
|
padding: 12px;
|
2026-02-25 19:00:17 +08:00
|
|
|
background: var(--crepe-color-surface, #f7f7f7);
|
|
|
|
|
border: 1px solid var(--panel-border, #d7deea);
|
2026-03-10 22:21:11 +08:00
|
|
|
border-radius: 10px;
|
|
|
|
|
transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
|
2026-02-25 19:00:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-block:hover {
|
|
|
|
|
border-color: var(--focus-ring, #3b82f6);
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-10 22:21:11 +08:00
|
|
|
.mermaid-controls {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-action-btn {
|
|
|
|
|
appearance: none;
|
|
|
|
|
border: 1px solid var(--mermaid-action-border);
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
padding: 6px 12px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
letter-spacing: 0.01em;
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
background: var(--mermaid-action-bg);
|
|
|
|
|
color: var(--mermaid-action-fg);
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
box-shadow: var(--mermaid-action-shadow);
|
|
|
|
|
transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-action-btn:hover:not([disabled]) {
|
|
|
|
|
border-color: var(--focus-ring);
|
|
|
|
|
background: var(--mermaid-action-hover-bg);
|
|
|
|
|
box-shadow: var(--mermaid-action-shadow-hover);
|
|
|
|
|
transform: translateY(-1px);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-action-btn:active:not([disabled]) {
|
|
|
|
|
transform: translateY(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-action-btn[disabled] {
|
|
|
|
|
background: var(--mermaid-action-disabled-bg);
|
|
|
|
|
color: var(--mermaid-action-disabled-fg);
|
|
|
|
|
cursor: not-allowed;
|
2026-02-25 19:00:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-inner {
|
|
|
|
|
display: block;
|
2026-03-10 22:21:11 +08:00
|
|
|
max-width: 100%;
|
2026-02-25 19:00:17 +08:00
|
|
|
max-height: var(--mermaid-max-height);
|
|
|
|
|
overflow: auto;
|
2026-03-10 22:21:11 +08:00
|
|
|
border-radius: 8px;
|
|
|
|
|
padding: 8px;
|
2026-04-04 23:56:18 +08:00
|
|
|
background: rgba(255, 255, 255, 0.88);
|
2026-03-10 22:21:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-inner::-webkit-scrollbar {
|
|
|
|
|
width: 8px;
|
|
|
|
|
height: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-inner::-webkit-scrollbar-thumb {
|
|
|
|
|
background-color: var(--scrollbar-thumb);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-image {
|
|
|
|
|
display: block;
|
|
|
|
|
width: auto;
|
|
|
|
|
height: auto;
|
|
|
|
|
max-width: none;
|
|
|
|
|
margin: 0 auto;
|
2026-02-25 19:00:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-inner svg {
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-loading {
|
|
|
|
|
padding: 24px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 1.4em;
|
|
|
|
|
color: var(--muted-text, #6b7280);
|
|
|
|
|
letter-spacing: 0.2em;
|
|
|
|
|
animation: mermaid-pulse 1.2s ease-in-out infinite;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes mermaid-pulse {
|
|
|
|
|
0%, 100% { opacity: 0.4; }
|
|
|
|
|
50% { opacity: 1; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mermaid-error {
|
|
|
|
|
padding: 12px 16px;
|
|
|
|
|
margin: 0;
|
2026-04-04 23:56:18 +08:00
|
|
|
background: rgba(220, 38, 38, 0.08);
|
2026-02-25 19:00:17 +08:00
|
|
|
border: 1px solid var(--danger-text, #dc2626);
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
color: var(--danger-text, #dc2626);
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
|
|
|
|
|
white-space: pre-wrap;
|
|
|
|
|
word-break: break-word;
|
|
|
|
|
}
|
2026-03-10 22:21:11 +08:00
|
|
|
|
|
|
|
|
:root[data-theme='dark'] .milkdown .katex {
|
|
|
|
|
color: var(--crepe-color-on-background);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:root[data-theme='dark'] .milkdown .cm-editor,
|
|
|
|
|
:root[data-theme='dark'] .milkdown .cm-scroller {
|
2026-04-04 23:56:18 +08:00
|
|
|
background-color: rgba(237, 237, 237, 0.86);
|
2026-03-10 22:21:11 +08:00
|
|
|
color: var(--crepe-color-on-surface);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:root[data-theme='dark'] .milkdown .cm-gutters {
|
2026-04-04 23:56:18 +08:00
|
|
|
background-color: rgba(237, 237, 237, 0.86);
|
2026-03-10 22:21:11 +08:00
|
|
|
color: var(--crepe-color-on-surface-variant);
|
|
|
|
|
border-right-color: var(--panel-border);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.mermaid-inner {
|
|
|
|
|
max-height: var(--mermaid-mobile-max-height);
|
|
|
|
|
}
|
|
|
|
|
}
|