body {
    background-color: var(--jn-bg);
    color: var(--jn-text);
    font-family: 'Noto Sans SC', 'Plus Jakarta Sans', system-ui, sans-serif;
    font-feature-settings: 'kern' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    background-image: var(--jn-bg-noise);
}

:root {
    --jn-bg: #ffffff;
    --jn-bg-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    --jn-surface: #ffffff;
    --jn-surface-muted: #fafafa;
    --jn-surface-subtle: rgba(249, 250, 251, 0.8);
    --jn-surface-section: rgba(249, 250, 251, 0.5);
    --jn-surface-hover: #f5f5f5;
    --jn-border: #000000;
    --jn-border-soft: #e5e7eb;
    --jn-text: #000000;
    --jn-text-muted: #666666;
    --jn-text-dim: #888888;
    --jn-text-faint: #aaaaaa;
    --jn-active-bg: #000000;
    --jn-active-text: #ffffff;
    --jn-active-border: #000000;
    --jn-btn-hover-bg: #000000;
    --jn-btn-hover-text: #ffffff;
    --jn-scrollbar: #e5e7eb;
    --jn-scrollbar-hover: #1f2937;
    --jn-gutter-bg: rgba(255, 255, 255, 0.72);
    --jn-gutter-border: #f3f4f6;
    --jn-gutter-ln: #c4c4c4;
    --jn-editor-fade: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 88%);
    --jn-editor-grid: radial-gradient(#e5e7eb 1px, transparent 1px);
    --jn-caret: #000000;
    --jn-code-text: #111111;
    --jn-tip-bg: #000000;
    --jn-tip-text: #ffffff;
    --jn-nav-blur: rgba(255, 255, 255, 0.9);
    --jn-drop-mask: rgba(255, 255, 255, 0.88);
    --jn-search-hit: #fef08a;
    --jn-tree-hover: #f5f5f5;
    --jn-tree-children-border: #e5e7eb;
    --jn-mmap-root-bg: #000000;
    --jn-mmap-root-text: #ffffff;
    --jn-error-bg: #fef2f2;
    --jn-error-border: #fecaca;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --jn-bg: #0a0a0a;
    --jn-bg-noise: none;
    --jn-surface: #141414;
    --jn-surface-muted: #1a1a1a;
    --jn-surface-subtle: rgba(255, 255, 255, 0.04);
    --jn-surface-section: rgba(255, 255, 255, 0.03);
    --jn-surface-hover: #222222;
    --jn-border: #525252;
    --jn-border-soft: #333333;
    --jn-text: #f0f0f0;
    --jn-text-muted: #a8a8a8;
    --jn-text-dim: #8a8a8a;
    --jn-text-faint: #737373;
    --jn-active-bg: #262626;
    --jn-active-text: #ffffff;
    --jn-active-border: #d4d4d4;
    --jn-btn-hover-bg: #e5e5e5;
    --jn-btn-hover-text: #0a0a0a;
    --jn-scrollbar: #444444;
    --jn-scrollbar-hover: #666666;
    --jn-gutter-bg: rgba(20, 20, 20, 0.95);
    --jn-gutter-border: #2a2a2a;
    --jn-gutter-ln: #666666;
    --jn-editor-fade: linear-gradient(180deg, rgba(10, 10, 10, 0), #0a0a0a 88%);
    --jn-editor-grid: radial-gradient(#2a2a2a 1px, transparent 1px);
    --jn-caret: #ffffff;
    --jn-code-text: #e5e7eb;
    --jn-tip-bg: #e5e5e5;
    --jn-tip-text: #0a0a0a;
    --jn-nav-blur: rgba(10, 10, 10, 0.92);
    --jn-drop-mask: rgba(10, 10, 10, 0.9);
    --jn-search-hit: #854d0e;
    --jn-tree-hover: #1f1f1f;
    --jn-tree-children-border: #333333;
    --jn-mmap-root-bg: #262626;
    --jn-mmap-root-text: #f0f0f0;
    --jn-error-bg: #2a1212;
    --jn-error-border: #5c2020;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        color-scheme: dark;
        --jn-bg: #0a0a0a;
        --jn-bg-noise: none;
        --jn-surface: #141414;
        --jn-surface-muted: #1a1a1a;
        --jn-surface-subtle: rgba(255, 255, 255, 0.04);
        --jn-surface-section: rgba(255, 255, 255, 0.03);
        --jn-surface-hover: #222222;
        --jn-border: #525252;
        --jn-border-soft: #333333;
        --jn-text: #f0f0f0;
        --jn-text-muted: #a8a8a8;
        --jn-text-dim: #8a8a8a;
        --jn-text-faint: #737373;
        --jn-active-bg: #262626;
        --jn-active-text: #ffffff;
        --jn-active-border: #d4d4d4;
        --jn-btn-hover-bg: #e5e5e5;
        --jn-btn-hover-text: #0a0a0a;
        --jn-scrollbar: #444444;
        --jn-scrollbar-hover: #666666;
        --jn-gutter-bg: rgba(20, 20, 20, 0.95);
        --jn-gutter-border: #2a2a2a;
        --jn-gutter-ln: #666666;
        --jn-editor-fade: linear-gradient(180deg, rgba(10, 10, 10, 0), #0a0a0a 88%);
        --jn-editor-grid: radial-gradient(#2a2a2a 1px, transparent 1px);
        --jn-caret: #ffffff;
        --jn-code-text: #e5e7eb;
        --jn-tip-bg: #e5e5e5;
        --jn-tip-text: #0a0a0a;
        --jn-nav-blur: rgba(10, 10, 10, 0.92);
        --jn-drop-mask: rgba(10, 10, 10, 0.9);
        --jn-search-hit: #854d0e;
        --jn-tree-hover: #1f1f1f;
        --jn-tree-children-border: #333333;
        --jn-mmap-root-bg: #262626;
        --jn-mmap-root-text: #f0f0f0;
        --jn-error-bg: #2a1212;
        --jn-error-border: #5c2020;
    }
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--jn-scrollbar); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--jn-scrollbar-hover); }

.wireframe-box {
    border: 1px solid var(--jn-border);
    background-color: var(--jn-surface);
    color: var(--jn-text);
    box-shadow: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.wireframe-interactive:hover {
    border-color: var(--jn-active-border);
    background-color: var(--jn-surface-muted);
}

.wireframe-interactive.is-active {
    border-width: 2px;
    border-color: var(--jn-active-border);
    background-color: var(--jn-active-bg);
    color: var(--jn-active-text);
}
.wireframe-interactive.is-active h2,
.wireframe-interactive.is-active h3,
.wireframe-interactive.is-active p {
    color: inherit;
}
.wireframe-interactive.is-active .label-meta {
    color: rgba(255, 255, 255, 0.78);
    opacity: 1;
}
.wireframe-interactive.is-active .tool-icon {
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.title-display {
    font-family: 'Plus Jakarta Sans', 'Noto Sans SC', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.ide-textarea {
    background-color: transparent;
    color: #000;
    resize: none;
    outline: none;
    font-size: 0.875rem;
    line-height: 1.7;
    letter-spacing: 0;
}
.ide-textarea::placeholder { color: #d1d5db; }
.ide-textarea.has-error { color: #E53935; }

.btn-wire {
    border: 1px solid var(--jn-border);
    background-color: transparent;
    color: var(--jn-text);
    font-family: 'Plus Jakarta Sans', 'Noto Sans SC', system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    border-radius: 9999px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-wire:hover {
    background-color: var(--jn-btn-hover-bg);
    color: var(--jn-btn-hover-text);
    border-color: var(--jn-btn-hover-bg);
}
.btn-wire.is-active {
    background-color: var(--jn-btn-hover-bg);
    color: var(--jn-btn-hover-text);
    border-color: var(--jn-btn-hover-bg);
}

.lang-switch.is-open .lang-switch-caret { transform: rotate(180deg); }
.lang-switch-caret {
    display: inline-block;
    font-size: 0.625rem;
    line-height: 1;
    transition: transform 0.15s ease;
    opacity: 0.7;
}
.lang-switch-menu {
    list-style: none;
    margin: 0;
    padding: 0.25rem;
    max-height: min(20rem, 70vh);
    overflow-y: auto;
}
.lang-switch-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.625rem;
    font-family: 'Plus Jakarta Sans', 'Noto Sans SC', system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--jn-text);
    text-decoration: none;
    transition: background-color 0.12s ease;
}
.lang-switch-option:hover { background-color: var(--jn-surface-hover); }
.lang-switch-option.is-active {
    background-color: var(--jn-surface-hover);
    font-weight: 600;
}
.lang-switch-option.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.lang-switch-option.is-disabled:hover { background-color: transparent; }
.lang-switch-flag { font-size: 1rem; line-height: 1; }
.lang-switch-label { white-space: nowrap; }

.btn-wire-red {
    border: 2px solid #000;
    background-color: #E53935;
    color: #fff;
    font-family: 'Plus Jakarta Sans', 'Noto Sans SC', system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    border-radius: 9999px;
    transition: transform 0.1s, opacity 0.2s;
}
.btn-wire-red:hover { opacity: 0.9; }
.btn-wire-red:active { transform: scale(0.97); }
.btn-wire-red:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.has-tip {
    position: relative;
}
.has-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 0.35rem 0.7rem;
    font-family: 'Noto Sans SC', 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    color: var(--jn-tip-text);
    background: var(--jn-tip-bg);
    border: 1px solid var(--jn-tip-bg);
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
    z-index: 80;
}
.has-tip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--jn-tip-bg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease, visibility 0.12s;
    z-index: 80;
}
.has-tip:hover::after,
.has-tip:focus-visible::after,
.has-tip:hover::before,
.has-tip:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.has-tip:hover::before,
.has-tip:focus-visible::before {
    transform: translateX(-50%);
}

/* 工具栏在面板顶部，提示向下弹出避免被 overflow 裁切 */
.tip-bar .has-tip:hover,
.tip-bar .has-tip:focus-visible {
    z-index: 90;
}
.tip-bar .has-tip::after {
    bottom: auto;
    top: calc(100% + 10px);
    transform: translateX(-50%) translateY(-4px);
}
.tip-bar .has-tip::before {
    bottom: auto;
    top: calc(100% + 4px);
    border-top-color: transparent;
    border-bottom-color: var(--jn-tip-bg);
}
.tip-bar .has-tip:hover::after,
.tip-bar .has-tip:focus-visible::after {
    transform: translateX(-50%) translateY(0);
}
.tip-bar .has-tip:hover::before,
.tip-bar .has-tip:focus-visible::before {
    transform: translateX(-50%);
}

.nav-blur {
    background: var(--jn-nav-blur);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.workspace-panel {
    border: 1.5px solid var(--jn-border);
    border-radius: 1.5rem;
    overflow: hidden;
    background-color: var(--jn-surface);
}

.filter-btn.is-active {
    background-color: var(--jn-btn-hover-bg) !important;
    color: var(--jn-btn-hover-text) !important;
    border-color: var(--jn-btn-hover-bg) !important;
}

.status-ok { color: #059669; }
.status-error { color: #E53935; }

.label-meta {
    font-family: 'JetBrains Mono', 'Noto Sans Mono', Menlo, monospace;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--jn-text-dim);
}

.hero-tool-card {
    min-height: 5.25rem;
    padding: 0.75rem;
}
.hero-tool-card .tool-icon {
    height: 2rem;
    width: 2rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    border: none;
    border-radius: 0.625rem;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wireframe-interactive:hover .tool-icon {
    transform: scale(1.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.tool-icon--format {
    background: linear-gradient(145deg, #3B82F6 0%, #2563EB 100%);
}
.tool-icon--diff {
    background: linear-gradient(145deg, #EF5350 0%, #E53935 100%);
}
.tool-icon--yaml {
    background: linear-gradient(145deg, #14B8A6 0%, #0D9488 100%);
}
.tool-icon--type {
    background: linear-gradient(145deg, #8B5CF6 0%, #7C3AED 100%);
}
.tool-icon--path {
    background: linear-gradient(145deg, #10B981 0%, #059669 100%);
}
.tool-icon--jwt {
    background: linear-gradient(145deg, #F59E0B 0%, #D97706 100%);
}
.tool-icon--escape {
    background: linear-gradient(145deg, #6366F1 0%, #4F46E5 100%);
}
.tool-icon--xml {
    background: linear-gradient(145deg, #06B6D4 0%, #0891B2 100%);
}
.tool-icon--csv {
    background: linear-gradient(145deg, #65A30D 0%, #4D7C0F 100%);
}
.tool-icon--query {
    background: linear-gradient(145deg, #0EA5E9 0%, #0284C7 100%);
}
.tool-icon--merge {
    background: linear-gradient(145deg, #F43F5E 0%, #E11D48 100%);
}
.tool-icon--mind {
    background: linear-gradient(145deg, #D946EF 0%, #C026D3 100%);
}
.tool-icon--lottie {
    background: linear-gradient(145deg, #EC4899 0%, #DB2777 100%);
}
.tool-icon--postman {
    background: linear-gradient(145deg, #F97316 0%, #EA580C 100%);
}
.tool-icon--sql {
    background: linear-gradient(145deg, #64748B 0%, #475569 100%);
}
.hero-tool-card h3 {
    font-size: 0.75rem;
    line-height: 1.25;
}
.hero-tool-card .label-meta {
    display: none;
}

/* 工具分类筛选：隐藏不符合当前分类的卡片 */
.tool-card.is-filtered-out {
    display: none !important;
}
@media (min-width: 768px) {
    .hero-tool-card {
        min-height: 6rem;
        padding: 1rem;
    }
    .hero-tool-card .tool-icon {
        height: 2.5rem;
        width: 2.5rem;
    }
    .hero-tool-card h3 {
        font-size: 0.8125rem;
    }
    .hero-tool-card .label-meta {
        display: block;
    }
}

.opt-field {
    font-family: 'JetBrains Mono', 'Noto Sans Mono', Menlo, monospace;
    font-size: 0.75rem;
    border: 1px solid var(--jn-border);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    outline: none;
    background: var(--jn-surface);
    color: var(--jn-text);
    min-width: 8rem;
}
.opt-field:focus { border-color: #E53935; }

.error-banner {
    padding: 0.6rem 1.25rem;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.75rem;
    color: #E53935;
    background: var(--jn-error-bg);
    border-bottom: 1px solid var(--jn-error-border);
}

.editor-grid {
    display: grid;
    grid-template-columns: 1fr;
    height: 36rem;
    min-height: 0;
    overflow: hidden;
}
@media (min-width: 1024px) {
    .editor-grid {
        height: 32rem;
    }
    .editor-grid.is-dual { grid-template-columns: 1fr 1fr; }
    .editor-grid.is-triple { grid-template-columns: 1fr 1fr 1fr; }
}
.workspace-panel.is-expanded .editor-grid {
    height: auto;
    min-height: 32rem;
    overflow: visible;
}

.editor-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    position: relative;
    border-bottom: 1.5px solid var(--jn-border);
    overflow: hidden;
}
@media (min-width: 1024px) {
    .editor-pane { border-bottom: 0; border-right: 1.5px solid var(--jn-border); }
    .editor-pane:last-child { border-right: 0; }
}
.editor-pane::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3.25rem;
    background: var(--jn-editor-fade);
    pointer-events: none;
    z-index: 4;
}
.workspace-panel.is-expanded .editor-pane {
    height: auto;
    overflow: visible;
}
.workspace-panel.is-expanded .editor-pane::after { display: none; }
.workspace-panel.is-expanded .code-editor,
.workspace-panel.is-expanded .output-stack,
.workspace-panel.is-expanded .visual-pane {
    flex: none;
    min-height: 20rem;
}
.editor-pane-out {
    background-image: var(--jn-editor-grid);
    background-size: 16px 16px;
}

.pane-label {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}
.pane-label span {
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: var(--jn-text-muted);
}
.pane-actions {
    pointer-events: auto;
    margin-left: auto;
    display: flex;
    gap: 0.4rem;
}
.editor-pane .pane-label { right: 1rem; }
.tree-action {
    border: 1px solid var(--jn-border);
    border-radius: 9999px;
    padding: 0.1rem 0.55rem;
    font-size: 10px;
    font-weight: 600;
    background: var(--jn-surface);
    color: var(--jn-text);
    line-height: 1.6;
}

.code-editor {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.code-gutter {
    flex: 0 0 46px;
    overflow: hidden;
    padding: 2.5rem 0 1.25rem;
    text-align: right;
    user-select: none;
    border-right: 1px solid var(--jn-gutter-border);
    background: var(--jn-gutter-bg);
}
.gutter-ln {
    display: block;
    height: 1.4875rem;
    padding-right: 10px;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.6875rem;
    line-height: 1.4875rem;
    color: var(--jn-gutter-ln);
}
.gutter-ln.is-error {
    background: #FEE2E2;
    color: #E53935;
    font-weight: 600;
}
.code-body {
    flex: 1;
    position: relative;
    overflow: auto;
    min-width: 0;
}
.code-highlight,
.ide-textarea {
    margin: 0;
    padding: 2.5rem 1.25rem 1.25rem;
    border: 0;
    font-family: 'JetBrains Mono', 'Noto Sans Mono', Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    letter-spacing: 0;
    white-space: pre;
    tab-size: 2;
    box-sizing: border-box;
}
.code-highlight {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    pointer-events: none;
    color: var(--jn-code-text);
}
.code-highlight.is-static {
    position: relative;
    pointer-events: auto;
    min-height: 100%;
}
.ide-textarea {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100%;
    color: transparent;
    caret-color: var(--jn-caret);
    background: transparent;
    overflow: hidden;
    resize: none;
}
.ide-textarea::placeholder { color: #d1d5db; }
.ide-textarea.has-error { caret-color: #E53935; }
.code-highlight.has-error { color: #E53935; }

.tok-key { color: #2563EB; }
.tok-str { color: #047857; }
.tok-num { color: #7C3AED; }
.tok-kw { color: #C2410C; }
.tok-cmt { color: #9CA3AF; }

.output-stack,
.visual-pane {
    flex: 1;
    min-height: 0;
    overflow: auto;
}
.visual-pane { padding: 2.5rem 1rem 1rem; }

.tree-node, .tree-leaf {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.78rem;
    line-height: 1.7;
}
.tree-node { margin-left: 0.15rem; }
.tree-node > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.1rem 0.25rem;
    border-radius: 0.35rem;
}
.tree-node > summary::-webkit-details-marker { display: none; }
.tree-node > summary::before {
    content: '▸';
    color: #999;
    width: 0.8rem;
}
.tree-node[open] > summary::before { content: '▾'; }
.tree-node > summary:hover { background: var(--jn-tree-hover); }
.tree-children { margin-left: 1.1rem; border-left: 1px dashed var(--jn-tree-children-border); padding-left: 0.65rem; }
.tree-leaf {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.1rem 0.25rem 0.1rem 1.3rem;
}
.tree-key { color: #2563EB; font-weight: 500; }
.tree-type {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--jn-text-dim);
    border: 1px solid var(--jn-border-soft);
    border-radius: 999px;
    padding: 0 0.4rem;
    line-height: 1.4;
}
.tree-meta { color: var(--jn-text-faint); font-size: 0.68rem; }
.tree-val { color: var(--jn-code-text); word-break: break-all; }

.mmap {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    min-width: max-content;
    padding: 0.5rem;
}
.mmap-node {
    border: 1.5px solid var(--jn-border);
    background: var(--jn-surface);
    color: var(--jn-text);
    border-radius: 0.75rem;
    padding: 0.45rem 0.7rem;
    min-width: 4.5rem;
    max-width: 14rem;
}
.mmap-node .mmap-k {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.72rem;
    font-weight: 600;
}
.mmap-node .mmap-t {
    display: block;
    font-size: 0.62rem;
    color: var(--jn-text-dim);
    margin-top: 0.15rem;
}
.mmap-root { background: var(--jn-mmap-root-bg); color: var(--jn-mmap-root-text); }
.mmap-root .mmap-t { color: var(--jn-text-muted); }
.mmap-kids {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    border-left: 1.5px solid var(--jn-border);
    padding-left: 1.25rem;
}
.mmap-branch { display: flex; align-items: flex-start; gap: 1.25rem; }

.lottie-stage {
    min-height: 280px;
    max-width: 360px;
    margin: 0 auto;
}

.editor-expand-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-top: 1.5px solid var(--jn-border);
    background: var(--jn-surface);
}

.drop-mask {
    position: absolute;
    inset: 0;
    z-index: 30;
    background: var(--jn-drop-mask);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.5rem;
}
.drop-mask-card {
    border: 2px dashed var(--jn-border);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    font-weight: 600;
    color: var(--jn-text);
}

.history-drawer {
    position: absolute;
    top: 4.5rem;
    right: 1rem;
    width: min(360px, calc(100% - 2rem));
    max-height: 26rem;
    overflow: auto;
    z-index: 20;
    background: var(--jn-surface);
    border: 1.5px solid var(--jn-border);
    border-radius: 1rem;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.04);
}
.history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--jn-border-soft);
}
.history-list { padding: 0.4rem; }
.history-item {
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.75rem;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    color: var(--jn-text);
}
.history-item:hover { background: var(--jn-surface-hover); border-color: var(--jn-border); }
.history-item .h-tool { font-weight: 600; font-size: 0.75rem; }
.history-item .h-preview {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.68rem;
    color: var(--jn-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-item .h-time { font-size: 0.62rem; color: var(--jn-text-faint); margin-top: 0.15rem; }

.diff-add { color: #047857; }
.diff-del { color: #E53935; }
.diff-chg { color: #B45309; }

.tool-icon--codec { background: linear-gradient(145deg, #2563EB 0%, #1D4ED8 100%); }
.tool-icon--time { background: linear-gradient(145deg, #78716C 0%, #57534E 100%); }
.tool-icon--mock { background: linear-gradient(145deg, #22C55E 0%, #16A34A 100%); }
.tool-icon--toml { background: linear-gradient(145deg, #7C3AED 0%, #6D28D9 100%); }

.search-panel {
    position: fixed;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    width: min(560px, calc(100% - 2rem));
}
.search-panel-inner {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border-radius: 9999px;
    background: var(--jn-surface);
    color: var(--jn-text);
}
.search-input {
    flex: 1;
    border: 0;
    outline: none;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.8125rem;
    background: transparent;
    color: var(--jn-text);
}
.search-hit {
    background: var(--jn-search-hit);
    color: inherit;
    border-radius: 2px;
}
.gutter-ln.is-folded { opacity: 0.35; }

.tree-val-editable {
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    padding: 0;
    font: inherit;
    color: inherit;
}
.tree-val-editable:hover {
    background: #FEF3C7;
    border-radius: 0.25rem;
}
.tree-edit-input {
    font-family: inherit;
    font-size: inherit;
    border: 1px solid var(--jn-border);
    border-radius: 0.25rem;
    padding: 0 0.25rem;
    min-width: 6rem;
    background: var(--jn-surface);
    color: var(--jn-text);
}

.diff-head {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--jn-border-soft);
    color: var(--jn-text-muted);
}
.diff-col {
    min-width: 0;
    border-right: 1px solid var(--jn-border-soft);
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.78rem;
    line-height: 1.6;
}
.diff-col-label {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--jn-gutter-bg);
    border-bottom: 1px solid var(--jn-border-soft);
    padding: 0.35rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--jn-text-dim);
}
.diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 100%;
}
.diff-col:last-child { border-right: 0; }
.diff-line {
    padding: 0 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 1.35rem;
}
.diff-line.diff-same { background: var(--jn-bg); }
.diff-line.diff-add { background: #ecfdf5; }
.diff-line.diff-del { background: #fef2f2; }
.diff-line.diff-chg { background: #fffbeb; }
.diff-line.diff-pad { background: var(--jn-surface-muted); min-height: 1.35rem; }
.diff-add-text, .diff-line.diff-add .diff-line-text { color: #047857; }
.diff-del-text, .diff-line.diff-del .diff-line-text { color: #E53935; }
.diff-chg-text, .diff-line.diff-chg .diff-line-text { color: #B45309; }

body.focus-mode nav,
body.focus-mode header > :not(#workspace),
body.focus-mode #features,
body.focus-mode #scenarios,
body.focus-mode #workflow,
body.focus-mode #compare,
body.focus-mode #faq,
body.focus-mode #about,
body.focus-mode .tool-seo-about,
body.focus-mode .tool-seo-detail,
body.focus-mode .tool-seo-features,
body.focus-mode .tool-seo-steps,
body.focus-mode .tool-seo-workflow,
body.focus-mode .tool-seo-scenarios,
body.focus-mode .tool-seo-tips,
body.focus-mode .tool-seo-compare,
body.focus-mode .tool-seo-pitfalls,
body.focus-mode .tool-seo-faq,
body.focus-mode .tool-seo-related,
body.focus-mode footer {
    display: none !important;
}
body.focus-mode main { padding-top: 5rem; }
body.focus-mode #workspace { margin-bottom: 2rem; }

/* Tailwind token overrides + dark-only accents */
html[data-theme="dark"] .text-ui-textMuted { color: var(--jn-text-muted) !important; }
html[data-theme="dark"] .text-ui-textMain,
html[data-theme="dark"] .text-ui-text { color: var(--jn-text) !important; }
html[data-theme="dark"] .ide-textarea::placeholder { color: #525252; }

html[data-theme="dark"] .border-ui-line { border-color: var(--jn-border) !important; }
html[data-theme="dark"] .bg-ui-bg { background-color: var(--jn-surface) !important; }
html[data-theme="dark"] .bg-gray-50\/50 { background-color: var(--jn-surface-section) !important; }
html[data-theme="dark"] #toolOptions,
html[data-theme="dark"] .bg-gray-50\/80 { background-color: var(--jn-surface-subtle) !important; }
html[data-theme="dark"] .hover\:bg-gray-100:hover { background-color: var(--jn-surface-hover) !important; }

html[data-theme="dark"] .tok-key,
html[data-theme="dark"] .tree-key { color: #60a5fa; }
html[data-theme="dark"] .tok-str { color: #34d399; }
html[data-theme="dark"] .tok-num { color: #c084fc; }
html[data-theme="dark"] .tok-kw { color: #fb923c; }
html[data-theme="dark"] .tok-cmt { color: #737373; }
html[data-theme="dark"] .tree-node > summary::before { color: var(--jn-text-dim); }
html[data-theme="dark"] .tree-val-editable:hover { background: rgba(251, 191, 36, 0.15); }
html[data-theme="dark"] .diff-line.diff-add { background: #0f1f18; }
html[data-theme="dark"] .diff-line.diff-del { background: #241010; }
html[data-theme="dark"] .diff-line.diff-chg { background: #241f0d; }
html[data-theme="dark"] .diff-add-text,
html[data-theme="dark"] .diff-line.diff-add .diff-line-text { color: #34d399; }
html[data-theme="dark"] .diff-del-text,
html[data-theme="dark"] .diff-line.diff-del .diff-line-text { color: #f87171; }
html[data-theme="dark"] .diff-chg-text,
html[data-theme="dark"] .diff-line.diff-chg .diff-line-text { color: #fbbf24; }
html[data-theme="dark"] .status-ok { color: #34d399; }

html[data-theme="dark"] .tool-seo details summary { color: var(--jn-text); }
html[data-theme="dark"] .tool-seo details p { color: var(--jn-text-muted); }

html[data-theme="dark"] .hero-tool-card h2 { color: var(--jn-text); }
html[data-theme="dark"] .wireframe-interactive.is-active h2,
html[data-theme="dark"] .wireframe-interactive.is-active .label-meta { color: rgba(255, 255, 255, 0.85); }

html[data-theme="dark"] .tip-bar button.border-ui-line,
html[data-theme="dark"] .tip-bar .border-ui-line {
    border-color: var(--jn-border) !important;
    color: var(--jn-text);
}
html[data-theme="dark"] .tip-bar button.border-ui-line svg { stroke: currentColor; }

/* 工具页 SEO 内容区 */
.tool-faq-item summary { list-style: none; }
.tool-faq-item summary::-webkit-details-marker { display: none; }
.tool-faq-item summary::after {
    content: '+';
    float: right;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--jn-text-dim);
    transition: transform 0.15s ease;
}
.tool-faq-item[open] summary::after { content: '−'; }
.tool-faq-item[open] summary { color: var(--jn-text); }

.tool-compare-table { background: var(--jn-surface); }
.tool-compare-head { background: var(--jn-surface-muted); }

.tool-step-num { color: var(--jn-text); background: var(--jn-surface); }

html[data-theme="dark"] .tool-seo-about details,
html[data-theme="dark"] .tool-seo-faq details { color: var(--jn-text); }
html[data-theme="dark"] .tool-faq-item summary { color: var(--jn-text); }

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .text-ui-textMuted { color: var(--jn-text-muted) !important; }
    html[data-theme="system"] .text-ui-textMain,
    html[data-theme="system"] .text-ui-text { color: var(--jn-text) !important; }
    html[data-theme="system"] .ide-textarea::placeholder { color: #525252; }
    html[data-theme="system"] .border-ui-line { border-color: var(--jn-border) !important; }
    html[data-theme="system"] .bg-ui-bg { background-color: var(--jn-surface) !important; }
    html[data-theme="system"] .bg-gray-50\/50 { background-color: var(--jn-surface-section) !important; }
    html[data-theme="system"] #toolOptions,
    html[data-theme="system"] .bg-gray-50\/80 { background-color: var(--jn-surface-subtle) !important; }
    html[data-theme="system"] .hover\:bg-gray-100:hover { background-color: var(--jn-surface-hover) !important; }
    html[data-theme="system"] .tok-key,
    html[data-theme="system"] .tree-key { color: #60a5fa; }
    html[data-theme="system"] .tok-str { color: #34d399; }
    html[data-theme="system"] .tok-num { color: #c084fc; }
    html[data-theme="system"] .tok-kw { color: #fb923c; }
    html[data-theme="system"] .tok-cmt { color: #737373; }
    html[data-theme="system"] .tree-val { color: var(--jn-code-text); }
    html[data-theme="system"] .diff-line.diff-add { background: #0f1f18; }
    html[data-theme="system"] .diff-line.diff-del { background: #241010; }
    html[data-theme="system"] .diff-line.diff-chg { background: #241f0d; }
    html[data-theme="system"] .hero-tool-card h2 { color: var(--jn-text); }
    html[data-theme="system"] .wireframe-interactive.is-active h2,
    html[data-theme="system"] .wireframe-interactive.is-active .label-meta { color: var(--jn-active-text); }
    html[data-theme="system"] .wireframe-interactive.is-active .label-meta { color: rgba(255, 255, 255, 0.75); }
    html[data-theme="system"] .tip-bar button.border-ui-line { border-color: var(--jn-border) !important; color: var(--jn-text); }
}
