.tool-workbench {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.workbench-toolbar {
    background-color: var(--bg-surface-alt);
    border-bottom: 1px solid var(--border-color);
    padding: 0.65rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.toolbar-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.toolbar-select-group {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0.25rem;
}

.toolbar-select-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-bottom: 0;
    user-select: none;
}

.workbench-toolbar .form-select-sm,
.workbench-toolbar select,
.toolbar-select {
    height: 33px;
    padding: 0.35rem 2rem 0.35rem 0.75rem !important;
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.4;
    min-width: 115px;
    width: auto;
    transition: all 0.15s ease-in-out;
    background-position: right 0.6rem center;
    background-size: 14px 10px;
}

.workbench-toolbar .form-select-sm:hover,
.workbench-toolbar select:hover,
.toolbar-select:hover {
    border-color: var(--accent-primary);
}

.workbench-toolbar .form-select-sm:focus,
.workbench-toolbar select:focus,
.toolbar-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
    outline: none;
}

.tool-btn {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.825rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.tool-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background-color: var(--accent-light);
}

.tool-btn.primary {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.tool-btn.primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.tool-btn.btn-danger-soft {
    color: #ef4444;
}

.tool-btn.btn-danger-soft:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.workbench-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 520px;
    background-color: var(--editor-bg);
    overflow-x: hidden !important;
    max-width: 100% !important;
}

.workbench-grid:has(.workbench-center-action),
.workbench-grid.has-center-action {
    grid-template-columns: 1fr auto 1fr !important;
}

/* ==========================================================================
   WORKBENCH CENTER ACTION BUTTON (Compact & Consistent Across All JSON Tools)
   ========================================================================== */
.workbench-center-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-alt, #f8fafc);
    border-left: 1px solid var(--border-color, #e2e8f0);
    border-right: 1px solid var(--border-color, #e2e8f0);
    padding: 0.35rem 0.3rem;
    z-index: 15;
    flex-shrink: 0;
    width: auto;
    min-width: 0;
    gap: 0.25rem;
    box-sizing: border-box;
    align-self: stretch;
}

[data-theme="dark"] .workbench-center-action {
    background: #0f172a;
    border-color: #334155;
}

.btn-workbench-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.15;
    color: #ffffff !important;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
    text-decoration: none !important;
    outline: none !important;
}

.btn-workbench-center:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
    background: linear-gradient(135deg, #4338ca 0%, #2563eb 100%);
    color: #ffffff !important;
}

.btn-workbench-center:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(79, 70, 229, 0.2);
}

.btn-workbench-center:focus-visible {
    outline: 2px solid var(--accent-primary, #6366f1) !important;
    outline-offset: 2px;
}

.btn-workbench-center:disabled,
.btn-workbench-center.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-workbench-center .btn-center-icon {
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
}

.btn-workbench-center .btn-center-text {
    letter-spacing: 0.01em;
}

.btn-workbench-center .btn-center-arrow-mobile {
    display: none;
}

.btn-workbench-center .btn-center-arrow-desktop {
    display: inline-block;
    transition: transform 0.15s ease;
    font-size: 0.75rem;
}

.btn-workbench-center:hover .btn-center-arrow-desktop {
    transform: translateX(2px);
}

@media (max-width: 991px) {
    .workbench-grid:has(.workbench-center-action),
    .workbench-grid.has-center-action {
        grid-template-columns: 1fr !important;
    }

    .workbench-center-action {
        width: 100% !important;
        min-width: 0 !important;
        flex-direction: row !important;
        padding: 0.4rem 0.75rem !important;
        border-left: none !important;
        border-right: none !important;
        border-top: 1px solid var(--border-color, #e2e8f0) !important;
        border-bottom: 1px solid var(--border-color, #e2e8f0) !important;
        justify-content: center !important;
    }

    .btn-workbench-center {
        width: 100% !important;
        max-width: 220px !important;
        padding: 0.42rem 0.85rem !important;
        font-size: 0.8rem;
    }

    .btn-workbench-center .btn-center-arrow-desktop {
        display: none !important;
    }

    .btn-workbench-center .btn-center-arrow-mobile {
        display: inline-block !important;
        font-size: 0.75rem;
    }

    .btn-workbench-center:hover .btn-center-arrow-mobile {
        transform: translateY(3px);
    }
}

.workbench-grid.stacked-layout,
.workbench-grid.stacked-layout:has(.workbench-center-action),
.workbench-grid.stacked-layout.has-center-action {
    grid-template-columns: 1fr !important;
}

.workbench-grid.stacked-layout .workbench-panel {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.workbench-grid.stacked-layout .workbench-center-action {
    width: 100% !important;
    min-width: 0 !important;
    flex-direction: row !important;
    padding: 0.4rem 0.75rem !important;
    border-left: none !important;
    border-right: none !important;
    border-top: 1px solid var(--border-color, #e2e8f0) !important;
    border-bottom: 1px solid var(--border-color, #e2e8f0) !important;
    justify-content: center !important;
}

.workbench-grid.stacked-layout .btn-workbench-center {
    width: 100% !important;
    max-width: 220px !important;
    padding: 0.42rem 0.85rem !important;
    font-size: 0.8rem;
}

.workbench-grid.stacked-layout .btn-workbench-center .btn-center-arrow-desktop {
    display: none !important;
}

.workbench-grid.stacked-layout .btn-workbench-center .btn-center-arrow-mobile {
    display: inline-block !important;
    font-size: 0.75rem;
}

@media (max-width: 991px) {
    .workbench-grid {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
        height: auto !important;
    }
    .workbench-panel {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color) !important;
        height: auto !important;
        min-height: 250px !important;
    }
    .workbench-panel:last-child {
        border-bottom: none !important;
    }
    .workbench-grid .editor-textarea {
        min-height: 220px !important;
        height: 260px !important;
        max-height: 340px !important;
        padding: 0.75rem !important;
        font-size: 0.82rem !important;
    }
    .workbench-grid .editor-container,
    .workbench-grid .editor-container.has-large-editor {
        min-height: 250px !important;
        height: 270px !important;
        max-height: 340px !important;
    }
    .workbench-grid .large-editor-root {
        height: 270px !important;
        min-height: 250px !important;
        max-height: 340px !important;
    }
    .workbench-grid #matchesContainer,
    .workbench-grid #tablePreviewContainer {
        min-height: 250px !important;
        max-height: 340px !important;
    }
    .compare-container {
        grid-template-columns: 1fr !important;
    }
    .tool-kbd {
        display: none !important;
    }
}

.workbench-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border-right: 1px solid var(--border-color);
    overflow-x: hidden !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.workbench-panel:last-child {
    border-right: none;
}

.panel-header {
    background-color: var(--bg-surface-alt);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1rem;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    gap: 0.5rem;
    overflow: hidden;
}

@media (max-width: 768px) {
    .panel-header {
        height: auto;
        min-height: 44px;
        max-height: none;
        padding: 0.45rem 1rem;
    }
}

.panel-header .title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.panel-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    line-height: 1;
    white-space: nowrap;
}

.editor-container {
    position: relative;
    flex-grow: 1;
    display: flex;
    background-color: var(--editor-bg);
}

.editor-textarea {
    width: 100%;
    height: 100%;
    min-height: 480px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    background-color: transparent;
    color: var(--editor-text);
    border: none;
    outline: none;
    resize: none;
    tab-size: 2;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
}

.editor-textarea.no-wrap,
textarea.editor-textarea.no-wrap {
    white-space: pre !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    overflow-x: auto !important;
}

.editor-textarea:focus,
.editor-textarea:focus-visible,
textarea.editor-textarea:focus,
textarea.editor-textarea:focus-visible {
    outline: none !important;
    outline-width: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.drop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(99, 102, 241, 0.9);
    color: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    z-index: 50;
    border-radius: 4px;
    backdrop-filter: blur(2px);
}

.editor-container.drag-over .drop-overlay {
    display: flex;
}

.error-banner {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    padding: 0.75rem 1rem;
    margin: 0.5rem 1rem;
    border-radius: 4px;
    display: none;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #ef4444;
}

[data-theme="dark"] .error-banner {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.error-banner.visible {
    display: flex;
}

.error-meta {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.tree-container {
    padding: 1rem;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex-grow: 1;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    background-color: var(--editor-bg);
    color: var(--editor-text);
    min-height: 480px;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.tree-node {
    margin-left: 1.25rem;
    position: relative;
    user-select: text;
    max-width: 100% !important;
}

.tree-node.root {
    margin-left: 0;
}

.tree-line {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap !important;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.1s ease;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.tree-line:hover {
    background-color: var(--tree-hover);
}

.tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    cursor: pointer;
    color: var(--text-muted);
    transition: transform 0.15s ease;
    margin-right: 2px;
}

.tree-toggle:hover {
    color: var(--accent-primary);
}

.tree-toggle.collapsed i {
    transform: rotate(-90deg);
}

.tree-toggle.leaf-spacer {
    cursor: default;
    visibility: hidden;
}

.tree-key {
    color: var(--syn-key, #0284c7);
    font-weight: 600;
    cursor: pointer;
    margin-right: 4px;
}

[data-theme="dark"] .tree-key {
    color: var(--syn-key, #38bdf8);
}

.tree-colon {
    color: var(--syn-punct, var(--text-muted));
    margin-right: 6px;
}

.tree-string {
    color: var(--syn-string, #059669);
    word-break: break-all;
}
[data-theme="dark"] .tree-string {
    color: var(--syn-string, #34d399);
}

.tree-number {
    color: var(--syn-number, #d97706);
}
[data-theme="dark"] .tree-number {
    color: var(--syn-number, #fb923c);
}

.tree-boolean {
    color: var(--syn-boolean, #7c3aed);
    font-weight: 600;
}
[data-theme="dark"] .tree-boolean {
    color: var(--syn-boolean, #c084fc);
}

.tree-null {
    color: var(--syn-null, #dc2626);
    font-style: italic;
    font-weight: 600;
}
[data-theme="dark"] .tree-null {
    color: var(--syn-null, #f87171);
}

.tree-badge {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    background-color: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    margin-left: 6px;
    font-weight: 500;
}

.tree-actions-popover {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.tree-line:hover .tree-actions-popover {
    display: inline-flex;
}

.tree-action-icon {
    font-size: 0.72rem;
    padding: 2px 5px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
}

.tree-action-icon:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.tree-highlight {
    background-color: rgba(245, 158, 11, 0.35);
    border-radius: 2px;
    padding: 0 2px;
}

.compare-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background-color: var(--border-color);
}

.compare-diff-list {
    max-height: 480px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 1rem;
    background-color: var(--editor-bg);
}

.diff-metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.18s ease;
    cursor: pointer;
    user-select: none;
    height: 100%;
}

.diff-metric-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.diff-metric-card.active {
    border-color: var(--accent-primary);
    background-color: var(--accent-light);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.diff-metric-card .metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.diff-metric-card .metric-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
}

.diff-metric-card .metric-val {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    font-family: var(--font-mono);
}

.diff-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.65rem;
    border: 1px solid var(--border-color);
    border-left-width: 4px;
    background-color: var(--bg-surface);
    transition: all 0.15s ease;
}

.diff-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.diff-item.added {
    background-color: rgba(16, 185, 129, 0.07);
    border-left-color: #10b981;
}

.diff-item.removed {
    background-color: rgba(239, 68, 68, 0.07);
    border-left-color: #ef4444;
}

.diff-item.modified {
    background-color: rgba(14, 165, 233, 0.07);
    border-left-color: #0ea5e9;
}

.diff-path {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.diff-val-box {
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
}

.diff-val-old {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

[data-theme="dark"] .diff-val-old {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.diff-val-new {
    background-color: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .diff-val-new {
    background-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.btn-copy-path {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.65;
    transition: opacity 0.15s ease;
}

.btn-copy-path:hover {
    opacity: 1;
    color: var(--accent-primary);
}

.editor-line.diff-line-added {
    background-color: rgba(16, 185, 129, 0.14) !important;
    border-left: 3px solid #10b981;
}

[data-theme="dark"] .editor-line.diff-line-added {
    background-color: rgba(16, 185, 129, 0.22) !important;
}

.editor-line.diff-line-removed {
    background-color: rgba(239, 68, 68, 0.14) !important;
    border-left: 3px solid #ef4444;
}

[data-theme="dark"] .editor-line.diff-line-removed {
    background-color: rgba(239, 68, 68, 0.22) !important;
}

.editor-line.diff-line-modified {
    background-color: rgba(14, 165, 233, 0.14) !important;
    border-left: 3px solid #0ea5e9;
}

[data-theme="dark"] .editor-line.diff-line-modified {
    background-color: rgba(14, 165, 233, 0.22) !important;
}

.editor-line.diff-focus-pulse,
.large-editor-gutter .gutter-line.diff-focus-pulse {
    animation: diffPulse 1.2s ease-in-out;
}

@keyframes diffPulse {
    0% { outline: 2px solid var(--accent-primary); outline-offset: -1px; background-color: rgba(99, 102, 241, 0.28); }
    50% { outline: 2px solid var(--accent-primary); outline-offset: -1px; background-color: rgba(99, 102, 241, 0.28); }
    100% { outline: 2px solid transparent; }
}

.large-editor-gutter .gutter-line.diff-gutter-added {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981 !important;
    font-weight: 700;
}

.large-editor-gutter .gutter-line.diff-gutter-removed {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444 !important;
    font-weight: 700;
}

.large-editor-gutter .gutter-line.diff-gutter-modified {
    background-color: rgba(14, 165, 233, 0.2);
    color: #0ea5e9 !important;
    font-weight: 700;
}

.gutter-diff-badge {
    display: inline-block;
    width: 14px;
    font-weight: 800;
    font-size: 11px;
    text-align: center;
    margin-right: 2px;
    font-family: var(--font-mono);
}

.gutter-diff-badge.diff-badge-added {
    color: #10b981;
}

.gutter-diff-badge.diff-badge-removed {
    color: #ef4444;
}

.gutter-diff-badge.diff-badge-modified {
    color: #0ea5e9;
}

.diff-char-added {
    background-color: rgba(16, 185, 129, 0.32);
    color: inherit;
    border-radius: 3px;
    padding: 1px 3px;
    border: 1px solid rgba(16, 185, 129, 0.45);
    font-weight: 600;
}

[data-theme="dark"] .diff-char-added {
    background-color: rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.6);
}

.diff-char-removed {
    background-color: rgba(239, 68, 68, 0.32);
    color: inherit;
    border-radius: 3px;
    padding: 1px 3px;
    border: 1px solid rgba(239, 68, 68, 0.45);
    font-weight: 600;
    text-decoration: line-through;
}

[data-theme="dark"] .diff-char-removed {
    background-color: rgba(239, 68, 68, 0.4);
    border-color: rgba(239, 68, 68, 0.6);
}

.diff-char-modified {
    background-color: rgba(14, 165, 233, 0.32);
    color: inherit;
    border-radius: 3px;
    padding: 1px 3px;
    border: 1px solid rgba(14, 165, 233, 0.45);
    font-weight: 600;
}

[data-theme="dark"] .diff-char-modified {
    background-color: rgba(14, 165, 233, 0.4);
    border-color: rgba(14, 165, 233, 0.6);
}

.diff-legend-strip {
    font-size: 0.8rem;
    background: var(--bg-surface-alt);
    border-bottom: 1px solid var(--border-color);
}

.diff-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.diff-legend-dot.legend-added {
    background: #10b981;
}

.diff-legend-dot.legend-removed {
    background: #ef4444;
}

.diff-legend-dot.legend-modified {
    background: #0ea5e9;
}

.copy-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--text-primary);
    color: var(--bg-surface);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.mobile-tab-nav {
    display: none !important;
}

.tool-workbench.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.tool-workbench.is-fullscreen .workbench-toolbar {
    flex-shrink: 0 !important;
    border-radius: 0 !important;
    padding: 0.55rem 1.25rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.tool-workbench.is-fullscreen .workbench-grid {
    flex-grow: 1 !important;
    flex: 1 1 0% !important;
    height: auto !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.tool-workbench.is-fullscreen .workbench-panel {
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

.tool-workbench.is-fullscreen .editor-container,
.tool-workbench.is-fullscreen .editor-with-gutter,
.tool-workbench.is-fullscreen .tree-container {
    flex-grow: 1 !important;
    flex: 1 1 0% !important;
    height: calc(100% - 44px) !important;
    max-height: calc(100% - 44px) !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.tool-workbench.is-fullscreen .editor-container.has-large-editor > div:not(.d-none):not(.output-loading-overlay),
.tool-workbench.is-fullscreen .editor-container.has-large-editor > [id$="Mount"]:not(.d-none),
.tool-workbench.is-fullscreen .editor-container.has-large-editor > #jsonInputEditorMount:not(.d-none),
.tool-workbench.is-fullscreen .editor-container.has-large-editor > #jsonOutputEditorMount:not(.d-none),
.tool-workbench.is-fullscreen .editor-container:has(.large-editor-root) > .large-editor-root:not(.d-none),
.tool-workbench.is-fullscreen .jec-editor-wrap:not(.d-none),
.tool-workbench.is-fullscreen .jec-editor-wrap > div:not(.d-none),
.tool-workbench.is-fullscreen .home-tree-view-wrapper:not(.d-none),
.tool-workbench.is-fullscreen .large-editor-root:not(.d-none) {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.tool-workbench.is-fullscreen .large-editor-body {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    overflow: hidden !important;
}

.tool-workbench.is-fullscreen .large-editor-gutter {
    flex: 0 0 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.tool-workbench.is-fullscreen .large-editor-viewport {
    flex: 1 1 0% !important;
    height: 100% !important;
    min-height: 0 !important;
}

html.workbench-fullscreen-active,
html.output-fullscreen-active,
body.workbench-fullscreen-active,
body.output-fullscreen-active {
    overflow: hidden !important;
    height: 100% !important;
    max-height: 100vh !important;
    width: 100% !important;
}

.workbench-panel.is-fullscreen,
.workbench-panel.output-panel.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    z-index: 100000 !important;
    background-color: var(--editor-bg) !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.4) !important;
}

.workbench-panel.is-fullscreen .panel-header,
.workbench-panel.output-panel.is-fullscreen .panel-header {
    flex-shrink: 0;
    min-height: 48px;
    padding: 0.5rem 1.25rem !important;
    background-color: var(--bg-surface-alt) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    z-index: 20;
}

.workbench-panel.is-fullscreen .editor-container,
.workbench-panel.is-fullscreen .editor-with-gutter,
.workbench-panel.is-fullscreen .tree-container,
.workbench-panel.is-fullscreen #tablePreviewContainer,
.workbench-panel.is-fullscreen #rawCodeContainer,
.workbench-panel.is-fullscreen .diff-container,
.workbench-panel.is-fullscreen .table-responsive {
    flex: 1 1 0% !important;
    height: calc(100vh - 48px) !important;
    max-height: calc(100vh - 48px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

.workbench-panel.is-fullscreen .editor-container.has-large-editor,
.workbench-panel.is-fullscreen .editor-container:has(.large-editor-root),
.workbench-panel.is-fullscreen #homeInputContainer,
.workbench-panel.is-fullscreen #homeOutputContainer,
.workbench-panel.is-fullscreen #inputContainer,
.workbench-panel.is-fullscreen #outputContainer {
    height: calc(100vh - 76px) !important;
    max-height: calc(100vh - 76px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    position: relative !important;
}

.workbench-panel.is-fullscreen:not(:has(.output-panel-second-row)):not(:has(.panel-stats-bar)) .editor-container.has-large-editor,
.workbench-panel.is-fullscreen:not(:has(.output-panel-second-row)):not(:has(.panel-stats-bar)) .editor-container:has(.large-editor-root) {
    height: calc(100vh - 48px) !important;
    max-height: calc(100vh - 48px) !important;
}

.workbench-panel.is-fullscreen .editor-container.has-large-editor > div:not(.d-none):not(.output-loading-overlay),
.workbench-panel.is-fullscreen .editor-container.has-large-editor > [id$="Mount"]:not(.d-none),
.workbench-panel.is-fullscreen .editor-container.has-large-editor > #homeInputEditorMount:not(.d-none),
.workbench-panel.is-fullscreen .editor-container.has-large-editor > #homeOutputEditorMount:not(.d-none),
.workbench-panel.is-fullscreen .editor-container.has-large-editor > #jsonInputEditorMount:not(.d-none),
.workbench-panel.is-fullscreen .editor-container.has-large-editor > #jsonOutputEditorMount:not(.d-none),
.workbench-panel.is-fullscreen .editor-container:has(.large-editor-root) > .large-editor-root:not(.d-none),
.workbench-panel.is-fullscreen .jec-editor-wrap:not(.d-none),
.workbench-panel.is-fullscreen .jec-editor-wrap > div:not(.d-none),
.workbench-panel.is-fullscreen .home-tree-view-wrapper:not(.d-none),
.workbench-panel.is-fullscreen .large-editor-root:not(.d-none) {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.workbench-panel.is-fullscreen .home-tree-view-wrapper .tree-container {
    flex: 1 1 0% !important;
    height: calc(100% - 40px) !important;
    min-height: 0 !important;
    max-height: calc(100% - 40px) !important;
    overflow: auto !important;
    padding-bottom: 3.5rem !important;
}

.workbench-panel.is-fullscreen .editor-container.has-large-editor > .output-loading-overlay {
    position: absolute !important;
    inset: 0 !important;
    flex: none !important;
    width: 100% !important;
    height: 100% !important;
}

.d-none,
*.d-none,
div.d-none,
[hidden],
.workbench-panel .d-none,
.workbench-panel.is-fullscreen .d-none,
.workbench-panel.is-fullscreen *.d-none,
.workbench-panel.is-fullscreen div.d-none,
.tool-workbench .d-none,
.tool-workbench.is-fullscreen .d-none,
.tool-workbench.is-fullscreen *.d-none,
.tool-workbench.is-fullscreen div.d-none,
.home-converter-card.is-fullscreen .d-none,
.home-converter-card.is-fullscreen *.d-none,
.editor-container.has-large-editor > .d-none,
.editor-container.has-large-editor > div.d-none,
.editor-container .d-none,
.editor-container div.d-none,
.home-tree-view-wrapper.d-none,
#treeModeWrapper.d-none,
#homeTreeModeWrapper.d-none,
#jsonOutputEditorMount.d-none,
#homeOutputEditorMount.d-none,
#tablePreviewContainer.d-none,
#rawCodeContainer.d-none {
    display: none !important;
}

.workbench-panel.is-fullscreen .large-editor-body {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    overflow: hidden !important;
}

.workbench-panel.is-fullscreen .large-editor-gutter {
    flex: 0 0 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.workbench-panel.is-fullscreen .large-editor-viewport {
    flex: 1 1 0% !important;
    height: 100% !important;
    min-height: 0 !important;
}

.workbench-panel.is-fullscreen .large-editor-viewport.has-textarea {
    overflow: hidden !important;
}

.workbench-panel.is-fullscreen .large-editor-viewport.read-only {
    overflow: auto !important;
}

.home-converter-card.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    background-color: var(--editor-bg) !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.home-converter-card.is-fullscreen #homeCardHeader,
.home-converter-card.is-fullscreen #homeUploadSection {
    display: none !important;
}

.home-converter-card.is-fullscreen .workbench-toolbar {
    flex-shrink: 0 !important;
    border-radius: 0 !important;
    padding: 0.55rem 1.25rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.home-converter-card.is-fullscreen .toolbar-cluster-right {
    padding-right: 0.5rem !important;
}

.home-converter-card.is-fullscreen .editor-progress-container {
    flex-shrink: 0 !important;
}

.home-converter-card.is-fullscreen .home-workbench-flex {
    flex: 1 1 0% !important;
    height: auto !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.home-converter-card.is-fullscreen .home-workbench-flex .workbench-panel {
    flex: 1 1 50% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.home-converter-card.is-fullscreen .panel-header {
    flex-shrink: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
}

.home-converter-card.is-fullscreen .panel-stats-bar {
    flex-shrink: 0 !important;
    height: 40px !important;
    min-height: 28px !important;
}

.home-converter-card.is-fullscreen .editor-container.has-large-editor,
.home-converter-card.is-fullscreen #homeInputContainer,
.home-converter-card.is-fullscreen #homeOutputContainer,
.home-converter-card.is-fullscreen #inputContainer,
.home-converter-card.is-fullscreen #outputContainer {
    flex: 1 1 0% !important;
    height: calc(100% - 70px) !important;
    max-height: calc(100% - 70px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.home-converter-card.is-fullscreen .editor-container.has-large-editor > #homeInputEditorMount:not(.d-none),
.home-converter-card.is-fullscreen .editor-container.has-large-editor > #homeOutputEditorMount:not(.d-none),
.home-converter-card.is-fullscreen .editor-container.has-large-editor > #jsonInputEditorMount:not(.d-none),
.home-converter-card.is-fullscreen .large-editor-root:not(.d-none) {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.home-converter-card.is-fullscreen .large-editor-body {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    overflow: hidden !important;
}

.home-converter-card.is-fullscreen .large-editor-viewport {
    flex: 1 1 0% !important;
    height: 100% !important;
    min-height: 0 !important;
}

.workbench-panel.is-fullscreen .editor-textarea {
    height: 100% !important;
    min-height: 100% !important;
    font-size: 0.95rem !important;
    padding: 1.25rem 1.5rem !important;
    line-height: 1.65 !important;
}

.workbench-panel.is-fullscreen .tree-container {
    padding: 1.5rem !important;
    height: calc(100vh - 48px) !important;
    max-height: calc(100vh - 48px) !important;
}

.panel-action-btn,
.btn-output-fullscreen {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.775rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm, 4px);
    color: var(--text-secondary);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    line-height: 1.2;
    text-decoration: none;
    user-select: none;
    height: 28px;
    box-sizing: border-box;
    white-space: nowrap;
    flex-shrink: 0;
}

.panel-action-btn:hover,
.btn-output-fullscreen:hover {
    color: var(--accent-primary);
    background-color: var(--bg-surface-alt);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.tool-btn.active,
#btnFullscreen.active,
.btn-output-fullscreen.active,
.workbench-panel.is-fullscreen .btn-output-fullscreen {
    background-color: var(--accent-primary, #6366f1) !important;
    border-color: var(--accent-primary, #6366f1) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.btn-output-fullscreen.active i,
.workbench-panel.is-fullscreen .btn-output-fullscreen i {
    color: #ffffff !important;
}

.editor-with-gutter {
    display: flex;
    flex-grow: 1;
    height: 100%;
    position: relative;
    overflow-x: hidden !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.editor-with-gutter .editor-textarea {
    flex-grow: 1;
    width: calc(100% - 44px) !important;
    max-width: calc(100% - 44px) !important;
    min-width: 0 !important;
}

.line-gutter {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-left: 0.2rem;
    padding-right: 0.4rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: right;
    user-select: none;
    background-color: var(--bg-surface-alt);
    border-right: 1px solid var(--border-color);
    overflow: hidden !important;
    box-sizing: border-box !important;
    opacity: 0.75;
}

.line-gutter .gutter-line {
    box-sizing: border-box !important;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    line-height: 1.6;
}

.line-gutter .gutter-line.error-line {
    background-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
    font-weight: bold;
    border-radius: 2px;
}

.history-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
    cursor: pointer;
}

.history-item:hover {
    background-color: var(--bg-surface-alt);
}

.history-item .history-preview {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.home-workbench-flex {
    display: flex;
    height: clamp(480px, calc(100vh - 250px), 720px);
    min-height: 440px;
    background-color: var(--editor-bg);
    overflow: hidden;
    position: relative;
}

@media (max-width: 991px) {
    .home-converter-card {
        border-radius: 12px;
        overflow: hidden;
    }

    .home-workbench-flex {
        flex-direction: column;
        height: auto !important;
        min-height: 0 !important;
    }

    .home-workbench-flex .workbench-panel {
        width: 100% !important;
        flex: none !important;
        height: clamp(380px, calc(100vh - 240px), 520px) !important;
        min-height: 340px !important;
        max-height: 540px !important;
        display: flex !important;
        flex-direction: column !important;
        border-right: none !important;
        border-bottom: 2px solid var(--border-color) !important;
    }

    .home-workbench-flex .workbench-panel:last-child {
        border-bottom: none !important;
    }

    .home-workbench-flex .editor-container.has-large-editor,
    .home-workbench-flex #homeInputContainer,
    .home-workbench-flex #homeOutputContainer {
        height: calc(100% - 75px) !important;
        min-height: 280px !important;
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .home-workbench-flex #homeInputEditorMount:not(.d-none),
    .home-workbench-flex #homeOutputEditorMount:not(.d-none),
    .home-workbench-flex .large-editor-root:not(.d-none),
    .home-workbench-flex .large-editor-body,
    .home-workbench-flex .large-editor-viewport {
        height: 100% !important;
        min-height: 280px !important;
        flex: 1 1 auto !important;
        display: flex !important;
    }

    .home-tree-view-wrapper:not(.d-none) {
        height: 100% !important;
        min-height: 280px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .home-tree-view-wrapper .tree-container {
        height: calc(100% - 42px) !important;
        min-height: 240px !important;
        flex: 1 1 auto !important;
        overflow: auto !important;
    }

    .panel-resize-handle {
        display: none !important;
    }
}

.home-workbench-flex .workbench-panel {
    flex: 1 1 50%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    height: 100%;
}

.home-workbench-flex .editor-container.has-large-editor,
.home-workbench-flex #homeInputContainer,
.home-workbench-flex #homeOutputContainer,
.home-workbench-flex #inputContainer,
.home-workbench-flex #outputContainer {
    flex: 1 1 0% !important;
    height: calc(100% - 70px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

.home-workbench-flex .editor-container.has-large-editor > #homeInputEditorMount:not(.d-none),
.home-workbench-flex .editor-container.has-large-editor > #homeOutputEditorMount:not(.d-none),
.home-workbench-flex .editor-container.has-large-editor > #jsonInputEditorMount:not(.d-none),
.home-workbench-flex .large-editor-root:not(.d-none) {
    flex: 1 1 0% !important;
    height: 100% !important;
    width: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.home-workbench-flex .large-editor-body {
    flex: 1 1 0% !important;
    height: 100% !important;
    width: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    overflow: hidden !important;
}

.home-workbench-flex .large-editor-viewport {
    flex: 1 1 0% !important;
    height: 100% !important;
    min-height: 0 !important;
}

.panel-resize-handle {
    width: 5px;
    min-width: 5px;
    max-width: 5px;
    background: var(--border-color);
    cursor: col-resize;
    transition: background 0.15s ease;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-resize-handle:hover,
.panel-resize-handle.resizing {
    background: var(--accent-primary);
}

.panel-resize-handle::after {
    content: '';
    width: 3px;
    height: 32px;
    background: var(--text-muted);
    border-radius: 2px;
    opacity: 0.5;
}

.panel-stats-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.28rem 0.85rem;
    min-height: 38px;
    background: var(--editor-gutter, var(--bg-surface-alt));
    border-bottom: 1px solid var(--border-color);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    flex-shrink: 0;
    user-select: none;
    box-sizing: border-box;
}

.panel-stats-bar.output-panel-second-row {
    justify-content: space-between;
    overflow: visible;
}

.output-stats-cluster {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.panel-stats-bar .pstat {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}

.panel-stats-bar .pstat strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.panel-stats-bar .pstat-sep {
    color: var(--border-color);
    opacity: 0.7;
    margin: 0 1px;
}

.large-editor-root {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    background-color: var(--editor-bg);
    overflow: hidden;
}

.large-editor-body {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.large-editor-gutter {
    flex: 0 0 auto;
    width: 52px;
    min-width: 52px;
    background-color: var(--editor-gutter);
    border-right: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    user-select: none;
    z-index: 4;
}

.large-gutter-spacer {
    width: 1px;
    pointer-events: none;
}

.large-gutter-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    will-change: transform;
    contain: layout style;
}

.large-editor-gutter .gutter-line {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 10px 0 4px !important;
    margin: 0 !important;
    font-family: var(--font-mono) !important;
    font-size: 12.5px !important;
    line-height: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    color: var(--editor-gutter-text);
    box-sizing: border-box !important;
    cursor: pointer;
    position: relative;
    overflow: hidden !important;
}

.large-editor-gutter .gutter-line:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.04);
}

.large-editor-gutter .gutter-line.active-line {
    color: var(--accent-primary);
    font-weight: 600;
}

.large-editor-gutter .gutter-line.error-line {
    background-color: rgba(239, 68, 68, 0.25);
    color: #ef4444 !important;
    font-weight: 700;
}

.gutter-err-dot {
    color: #ef4444;
    font-size: 11px;
    margin-right: 4px;
    animation: pulse-err 1.5s infinite;
}

@keyframes pulse-err {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.large-editor-viewport {
    position: relative;
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
    width: auto;
    height: 100%;
    overflow: auto; 
    background-color: var(--editor-bg);
    outline: none !important;
    border: none !important;
}

.large-editor-viewport:focus,
.large-editor-viewport:focus-visible,
.large-editor-viewport.read-only:focus,
.large-editor-viewport.read-only:focus-visible,
.large-editor-root:focus,
.large-editor-root:focus-visible,
.editor-container:focus,
.editor-container:focus-visible,
.editor-container.has-large-editor:focus,
.editor-container.has-large-editor:focus-visible,
.output-panel:focus,
.output-panel:focus-visible,
#homeOutputContainer:focus,
#homeOutputContainer:focus-visible,
#homeOutputEditorMount:focus,
#homeOutputEditorMount:focus-visible {
    outline: none !important;
    outline-width: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.large-editor-viewport.has-textarea {
    overflow: hidden !important;
}

.large-editor-viewport.has-textarea .large-editor-spacer {
    display: none !important;
}

.large-editor-spacer {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    visibility: hidden;
}

.large-line-highlight {
    position: absolute;
    left: 0;
    width: 100%;
    background-color: rgba(99, 102, 241, 0.08);
    border-left: 2px solid var(--accent-primary);
    pointer-events: none;
    z-index: 1;
}

[data-theme="dark"] .large-line-highlight {
    background-color: rgba(99, 102, 241, 0.12);
}

.large-editor-lines {
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
    contain: layout style;
    pointer-events: none;
    z-index: 2;
    padding: 0 0 0 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.large-editor-viewport.read-only .large-editor-lines {
    pointer-events: auto;
    user-select: text;
}

.editor-line {
    font-family: var(--font-mono) !important;
    font-size: 13.5px !important;
    line-height: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    white-space: pre !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    color: var(--editor-text);
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.editor-line.line-has-error {
    background-color: rgba(239, 68, 68, 0.15);
}

.large-editor-textarea {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0 0 0 12px !important;
    margin: 0 !important;
    font-family: var(--font-mono) !important;
    font-size: 13.5px !important;
    line-height: 22px !important;
    white-space: pre !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    overflow: auto !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    background: transparent;
    color: transparent;
    caret-color: var(--text-primary);
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    resize: none;
    tab-size: 2;
    z-index: 3;
    box-sizing: border-box !important;
}

.large-editor-textarea:focus,
.large-editor-textarea:focus-visible,
textarea.large-editor-textarea:focus,
textarea.large-editor-textarea:focus-visible {
    outline: none !important;
    outline-width: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.large-editor-viewport::-webkit-scrollbar,
.large-editor-textarea::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.large-editor-viewport::-webkit-scrollbar-track,
.large-editor-textarea::-webkit-scrollbar-track {
    background: transparent;
}

.large-editor-viewport::-webkit-scrollbar-thumb,
.large-editor-textarea::-webkit-scrollbar-thumb {
    background: rgba(140, 149, 159, 0.4);
    border-radius: 4px;
}

.large-editor-viewport::-webkit-scrollbar-thumb:hover,
.large-editor-textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(140, 149, 159, 0.7);
}

[data-theme="dark"] .large-editor-viewport::-webkit-scrollbar-thumb,
[data-theme="dark"] .large-editor-textarea::-webkit-scrollbar-thumb {
    background: rgba(110, 118, 129, 0.4);
}

[data-theme="dark"] .large-editor-viewport::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .large-editor-textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(110, 118, 129, 0.7);
}

.large-editor-root.plain-mode .large-editor-textarea {
    color: var(--editor-text) !important;
    white-space: pre !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
}
.large-editor-root.plain-mode .large-editor-lines {
    display: none !important;
}

/* Default Mode: No-Wrap (Horizontal scroll, fixed 22px lines for fast virtualization & perfect gutter alignment) */
.large-editor-root .editor-line,
.large-editor-root.no-wrap .editor-line {
    white-space: pre !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    height: 22px !important;
    line-height: 22px !important;
    max-height: 22px !important;
    overflow: hidden !important;
}

.large-editor-root .large-editor-textarea,
.large-editor-root.no-wrap .large-editor-textarea {
    white-space: pre !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    overflow-x: auto !important;
}

.large-editor-root .large-gutter-lines .gutter-line,
.large-editor-root.no-wrap .large-gutter-lines .gutter-line {
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    line-height: 22px !important;
}

/* Explicit Wrap Mode (Only active when wrap is explicitly enabled) */
.large-editor-root.wrap-mode .editor-line,
.editor-line.wrap-line {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    min-height: 22px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.large-editor-root.wrap-mode .large-editor-textarea {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.large-editor-root.wrap-mode .large-editor-lines {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.large-editor-root.wrap-mode .large-gutter-lines .gutter-line {
    min-height: 22px !important;
    height: auto;
    display: flex;
    align-items: flex-start;
    box-sizing: border-box !important;
}

.large-editor-root.wrap-mode .large-editor-viewport {
    overflow-x: hidden !important;
}

.large-editor-root.wrap-mode .large-editor-spacer {
    width: 100% !important;
    max-width: 100% !important;
}

.tok-key     { color: var(--syn-key, #0284c7); font-weight: 600; }
.tok-string  { color: var(--syn-string, #059669); }
.tok-number  { color: var(--syn-number, #d97706); }
.tok-boolean { color: var(--syn-boolean, #7c3aed); font-weight: 600; }
.tok-null    { color: var(--syn-null, #dc2626); font-style: italic; }
.tok-punct   { color: var(--syn-punct, #64748b); }
.tok-keyword { color: var(--syn-keyword, #d946ef); font-weight: 600; }
.tok-comment { color: var(--syn-comment, #94a3b8); font-style: italic; }
.tok-tag     { color: #0284c7; font-weight: 600; }
.tok-attr    { color: #7c3aed; }

[data-theme="dark"] .tok-key     { color: var(--syn-key, #38bdf8); font-weight: 600; }
[data-theme="dark"] .tok-string  { color: var(--syn-string, #34d399); }
[data-theme="dark"] .tok-number  { color: var(--syn-number, #fb923c); }
[data-theme="dark"] .tok-boolean { color: var(--syn-boolean, #c084fc); font-weight: 600; }
[data-theme="dark"] .tok-null    { color: var(--syn-null, #f87171); font-style: italic; }
[data-theme="dark"] .tok-punct   { color: var(--syn-punct, #94a3b8); }
[data-theme="dark"] .tok-keyword { color: var(--syn-keyword, #f472b6); font-weight: 600; }
[data-theme="dark"] .tok-comment { color: var(--syn-comment, #64748b); font-style: italic; }
[data-theme="dark"] .tok-tag     { color: #38bdf8; font-weight: 600; }
[data-theme="dark"] .tok-attr    { color: #c084fc; }

#homeInputContainer .editor-line,
#homeInputContainer .editor-line *,
.input-panel .large-editor-lines .editor-line,
.input-panel .large-editor-lines .editor-line * {
    color: var(--editor-text) !important;
    font-weight: normal !important;
    font-style: normal !important;
}

.editor-progress-container {
    height: 3px;
    background: rgba(99, 102, 241, 0.1);
    width: 100%;
    overflow: hidden;
    position: relative;
    display: none;
}

.editor-progress-container.active {
    display: block;
}

.editor-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #06b6d4, #10b981);
    width: 0%;
    transition: width 0.15s ease;
}

.file-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
}

.file-tier-badge.tier-instant {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.file-tier-badge.tier-worker {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
}

.file-tier-badge.tier-virtual {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.file-tier-badge.tier-huge {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.large-editor-find-bar {
    position: absolute;
    top: 8px;
    right: 18px;
    z-index: 20;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    border-radius: 6px;
    padding: 4px 8px;
}

.find-bar-inner {
    display: flex;
    align-items: center;
    gap: 6px;
}

.find-input {
    border: 1px solid var(--border-color);
    background: var(--bg-surface-alt);
    color: var(--text-primary);
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
    outline: none;
    width: 170px;
}

.find-count {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    min-width: 48px;
    text-align: center;
}

.find-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 2px 5px;
    cursor: pointer;
    font-size: 0.75rem;
    border-radius: 3px;
}

.find-btn:hover {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
}

.home-studio-fluid-container {
    width: 100%;
    max-width: 100%;
    padding-left: clamp(14px, 1.8vw, 32px);
    padding-right: clamp(14px, 1.8vw, 32px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.home-studio-section {
    padding-top: 0.35rem;
    padding-bottom: 1.5rem;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.08), transparent 75%);
}

.home-converter-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .home-converter-card {
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.09);
}

.home-studio-header {
    margin-bottom: 0.75rem;
}

.home-studio-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    line-height: 1.25;
}

.studio-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.725rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    letter-spacing: 0.01em;
}

.studio-badge.badge-gradient {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.studio-badge.badge-privacy {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.studio-badge.badge-speed {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.studio-quick-modes {
    background: var(--bg-surface-alt);
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.studio-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.studio-mode-pill:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

.studio-mode-pill.active {
    background: var(--bg-surface);
    color: var(--accent-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.home-view-toggle {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface);
    padding: 2.5px;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

[data-theme="dark"] .home-view-toggle {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.1);
}

.home-view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.65rem;
    font-size: 0.76rem;
    font-weight: 650;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.25;
    white-space: nowrap;
}

.home-view-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface-alt);
}

.home-view-toggle-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35) !important;
}

.home-view-toggle-btn.active i {
    color: #ffffff !important;
}

.home-tree-view-wrapper .tree-container,
#homeOutputTreeMount.tree-container,
#treeContainer.tree-container {
    background: var(--editor-bg);
    color: var(--editor-text);
    flex: 1 1 0% !important;
    height: calc(100% - 40px) !important;
    min-height: 0 !important;
    max-height: calc(100% - 40px) !important;
    padding: 0.85rem 1.25rem 3.5rem 1.25rem !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.6;
    box-sizing: border-box !important;
}

.tree-closing-line {
    margin-top: 2px;
}

.tree-node.root > .tree-closing-line {
    margin-top: 4px;
    margin-bottom: 2rem;
}

.editor-drop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(99, 102, 241, 0.12);
    backdrop-filter: blur(3px);
    border: 2px dashed var(--accent-primary);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border-radius: 4px;
}

.editor-drop-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.drop-overlay-box {
    text-align: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.25);
    max-width: 90%;
}

.drop-overlay-box .drop-icon {
    font-size: 2.2rem;
    color: var(--accent-primary);
    margin-bottom: 0.35rem;
}

.drop-overlay-box .drop-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.drop-overlay-box .drop-sub {
    font-size: 0.775rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.home-tree-view-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative;
    background: var(--editor-bg);
}

.home-tree-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0.85rem;
    background: var(--bg-surface-alt);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    min-height: 40px;
    box-sizing: border-box;
    z-index: 5;
}

.home-tree-search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 170px;
    max-width: 440px;
}

.home-tree-search-box .search-icon {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

.home-tree-search-input {
    width: 100%;
    height: 30px;
    padding: 0 6.5rem 0 2rem;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.home-tree-search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.home-tree-match-badge,
.tree-search-count {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1.2;
    white-space: nowrap !important;
    pointer-events: none;
    z-index: 2;
}

.home-tree-match-badge.has-match,
.tree-search-count.has-match {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.home-tree-match-badge.no-match,
.tree-search-count.no-match {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.home-tree-clear-btn {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    z-index: 3;
}

.home-tree-clear-btn:hover {
    color: var(--text-primary);
}

.home-tree-action-btns {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.tree-tool-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.3;
}

.tree-tool-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: var(--bg-surface-alt);
}

.tree-load-more {
    margin: 0.4rem 0 0.4rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-tree-load-more {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-tree-load-more:hover {
    background: rgba(99, 102, 241, 0.1);
}

.btn-tree-load-all {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2rem 0.45rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: underline;
}

.btn-tree-load-all:hover {
    color: var(--text-primary);
}

.tree-children {
    border-left: 1px dashed var(--border-color);
    margin-left: 0.65rem;
    padding-left: 0.4rem;
}

.toolbar-cluster {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.tool-btn.btn-primary-action {
    background: rgba(99, 102, 241, 0.09) !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    color: #4f46e5 !important;
    font-weight: 600;
    padding: 0.38rem 0.85rem;
    transition: all 0.15s ease;
}
[data-theme="dark"] .tool-btn.btn-primary-action {
    background: rgba(99, 102, 241, 0.16) !important;
    border-color: rgba(99, 102, 241, 0.45) !important;
    color: #818cf8 !important;
}
.tool-btn.btn-primary-action:hover,
.tool-btn.btn-primary-action.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    border-color: #4338ca !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.4) !important;
    transform: translateY(-1px);
}
.tool-btn.btn-primary-action:active {
    transform: translateY(0);
}
.tool-btn.btn-primary-action .tool-kbd {
    background: rgba(79, 70, 229, 0.12);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.28);
    transition: all 0.15s ease;
}
[data-theme="dark"] .tool-btn.btn-primary-action .tool-kbd {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.35);
}
.tool-btn.btn-primary-action:hover .tool-kbd,
.tool-btn.btn-primary-action.active .tool-kbd {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.tool-btn.btn-action-minify {
    background: rgba(245, 158, 11, 0.09) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #d97706 !important;
    font-weight: 600;
    transition: all 0.15s ease;
}
[data-theme="dark"] .tool-btn.btn-action-minify {
    background: rgba(245, 158, 11, 0.16) !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
    color: #fbbf24 !important;
}
.tool-btn.btn-action-minify:hover,
.tool-btn.btn-action-minify.active {
    background: #f59e0b !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4) !important;
    transform: translateY(-1px);
}
.tool-btn.btn-action-minify:active {
    transform: translateY(0);
}

.tool-btn.btn-action-validate {
    background: rgba(16, 185, 129, 0.09) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    color: #059669 !important;
    font-weight: 600;
}
[data-theme="dark"] .tool-btn.btn-action-validate {
    background: rgba(16, 185, 129, 0.16) !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    color: #34d399 !important;
}
.tool-btn.btn-action-validate:hover {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4) !important;
    transform: translateY(-1px);
}

.tool-btn.btn-action-convert {
    background: rgba(14, 165, 233, 0.09) !important;
    border: 1px solid rgba(14, 165, 233, 0.35) !important;
    color: #0284c7 !important;
    font-weight: 600;
}
[data-theme="dark"] .tool-btn.btn-action-convert {
    background: rgba(14, 165, 233, 0.16) !important;
    border-color: rgba(14, 165, 233, 0.45) !important;
    color: #38bdf8 !important;
}
.tool-btn.btn-action-convert:hover {
    background: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.4) !important;
    transform: translateY(-1px);
}

.settings-pill-box.settings-deck-3d {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    padding: 3px 6px;
    gap: 0.35rem;
    height: 35px;
    box-shadow: 
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 1.5px 3px rgba(0, 0, 0, 0.04),
        0 2px 6px rgba(0, 0, 0, 0.02);
    user-select: none;
    box-sizing: border-box;
}

[data-theme="dark"] .settings-pill-box.settings-deck-3d {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 2px 6px rgba(0, 0, 0, 0.35);
}

.setting-item {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.setting-indent-item {
    gap: 0.35rem;
}
.setting-indent-label {
    font-size: 0.735rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding-left: 2px;
    cursor: default;
}
.setting-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.setting-select-3d {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.745rem;
    font-weight: 650;
    color: var(--text-primary);
    padding: 0.18rem 1.45rem 0.18rem 0.55rem;
    height: 27px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
}
.setting-select-3d:hover {
    border-color: var(--accent-primary);
    background: var(--bg-surface);
}
.setting-select-3d:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.select-chevron {
    position: absolute;
    right: 7px;
    pointer-events: none;
    font-size: 0.55rem;
    color: var(--text-muted);
}

.setting-divider-3d {
    width: 1px;
    height: 18px;
    background: var(--border-color);
    opacity: 0.75;
    margin: 0 2px;
}

.setting-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    margin: 0;
}

.setting-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.745rem;
    font-weight: 650;
    color: var(--text-secondary);
    transition: all 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin: 0;
    user-select: none;
}
.setting-toggle-pill:hover {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
}

.toggle-switch-3d {
    width: 28px;
    height: 16px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
    position: relative;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}
[data-theme="dark"] .toggle-switch-3d {
    background: rgba(71, 85, 105, 0.5);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}

.toggle-switch-3d .switch-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 
        0 1.5px 3px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.setting-check-input:checked + .setting-toggle-pill.toggle-repair {
    background: rgba(16, 185, 129, 0.09);
    border-color: rgba(16, 185, 129, 0.35);
    color: #059669;
}
[data-theme="dark"] .setting-check-input:checked + .setting-toggle-pill.toggle-repair {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(52, 211, 153, 0.35);
    color: #6ee7b7;
}
.setting-check-input:checked + .setting-toggle-pill.toggle-repair .toggle-switch-3d.switch-repair {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.setting-check-input:checked + .setting-toggle-pill.toggle-repair .switch-thumb {
    transform: translateX(12px);
}

.setting-check-input:checked + .setting-toggle-pill.toggle-sort {
    background: rgba(14, 165, 233, 0.09);
    border-color: rgba(14, 165, 233, 0.35);
    color: #0284c7;
}
[data-theme="dark"] .setting-check-input:checked + .setting-toggle-pill.toggle-sort {
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(125, 211, 252, 0.35);
    color: #7dd3fc;
}
.setting-check-input:checked + .setting-toggle-pill.toggle-sort .toggle-switch-3d.switch-sort {
    background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.setting-check-input:checked + .setting-toggle-pill.toggle-sort .switch-thumb {
    transform: translateX(12px);
}

.tool-btn.btn-danger-action {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    color: #dc2626 !important;
    font-weight: 500;
}
[data-theme="dark"] .tool-btn.btn-danger-action {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}
.tool-btn.btn-danger-action:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35) !important;
}

.toolbar-cluster-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-right: 0.35rem;
}

.tool-btn.btn-workbench-fullscreen {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.85rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.tool-btn.btn-workbench-fullscreen:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--bg-surface-alt);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}
.tool-btn.btn-workbench-fullscreen .tool-kbd {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.28);
    font-size: 0.725rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-weight: 700;
    line-height: 1.2;
}

/* Exit Fullscreen Active State */
.tool-btn.btn-workbench-fullscreen.active {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
    border: 1px solid #3730a3 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35) !important;
    padding: 0.38rem 0.85rem !important;
    border-radius: 8px !important;
    gap: 0.45rem !important;
}
.tool-btn.btn-workbench-fullscreen.active:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%) !important;
    border-color: #312e81 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.45) !important;
}
.tool-btn.btn-workbench-fullscreen.active i {
    color: #ffffff !important;
}
.tool-btn.btn-workbench-fullscreen.active span {
    color: #ffffff !important;
}
.tool-btn.btn-workbench-fullscreen.active .tool-kbd {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    font-size: 0.725rem !important;
    font-weight: 700 !important;
    padding: 0.1rem 0.4rem !important;
    border-radius: 4px !important;
    line-height: 1.2 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tool-btn.btn-export-copy,
.tool-btn.btn-export-download {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
}
.tool-btn.btn-export-copy:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--accent-light);
}
.tool-btn.btn-export-download:hover {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.toolbar-v-divider {
    width: 1px;
    height: 22px;
    background: var(--border-color);
    margin: 0 2px;
}

.tool-kbd {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1.2;
    margin-left: 4px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.home-studio-header-3d {
    position: relative;
    border-radius: 18px;
    padding: 1.25rem 1.65rem;
    margin-bottom: 1.15rem;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 
        0 10px 28px -6px rgba(15, 23, 42, 0.06),
        0 1px 3px rgba(15, 23, 42, 0.03);
    transition: all 0.25s ease;
    overflow: hidden;
}

.home-studio-header-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1 0%, #06b6d4 50%, #10b981 100%);
    opacity: 0.9;
    z-index: 2;
}

[data-theme="dark"] .home-studio-header-3d {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 
        0 16px 36px -8px rgba(0, 0, 0, 0.5),
        0 1px 3px rgba(0, 0, 0, 0.3);
}

.header-3d-ambient-glow {
    position: absolute;
    inset: -20px;
    pointer-events: none;
    background: 
        radial-gradient(circle 320px at 4% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 70%),
        radial-gradient(circle 280px at 96% 85%, rgba(6, 182, 212, 0.07) 0%, transparent 70%);
    z-index: 0;
}

[data-theme="dark"] .header-3d-ambient-glow {
    background: 
        radial-gradient(circle 320px at 4% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 70%),
        radial-gradient(circle 280px at 96% 85%, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
}

.header-3d-inner {
    position: relative;
    z-index: 1;
}

.studio-3d-emblem-wrap {
    flex-shrink: 0;
}

.studio-3d-cube-card {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 18px -3px rgba(79, 70, 229, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.studio-3d-cube-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 24px -4px rgba(79, 70, 229, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

.cube-icon-layer {
    font-size: 1.4rem;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
    line-height: 1;
}

.cube-badge-live {
    position: absolute;
    bottom: -5px;
    right: -4px;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 999px;
    background: #0f172a;
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.5);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.04em;
}

.live-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 6px #4ade80;
    animation: blinkDot 1.4s infinite;
}

@keyframes blinkDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}

.chip-3d {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.22rem 0.65rem;
    border-radius: 9999px;
    letter-spacing: 0.01em;
    user-select: none;
    transition: all 0.15s ease;
    cursor: default;
    position: relative;
}
.chip-3d:hover {
    transform: translateY(-1px);
}

.chip-3d-studio {
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: #4338ca;
}
[data-theme="dark"] .chip-3d-studio {
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(129, 140, 248, 0.3);
    color: #c7d2fe;
}
.chip-3d-studio:hover {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.chip-3d-privacy {
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.22);
    color: #047857;
}
[data-theme="dark"] .chip-3d-privacy {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(52, 211, 153, 0.3);
    color: #a7f3d0;
}
.chip-3d-privacy:hover {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.pulse-beacon {
    position: relative;
    width: 8px;
    height: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.beacon-core {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}
.beacon-wave {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid #10b981;
    animation: beaconRipple 2s ease-out infinite;
}
@keyframes beaconRipple {
    0% { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(2.2); opacity: 0; }
}

.chip-3d-turbo {
    background: rgba(6, 182, 212, 0.07);
    border: 1px solid rgba(6, 182, 212, 0.22);
    color: #0e7490;
}
[data-theme="dark"] .chip-3d-turbo {
    background: rgba(6, 182, 212, 0.16);
    border-color: rgba(34, 211, 238, 0.3);
    color: #a5f3fc;
}
.chip-3d-turbo:hover {
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.15);
}

.home-studio-title-3d {
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.22;
    color: #0f172a;
}

.home-studio-title-3d .title-gradient-accent {
    background: linear-gradient(135deg, #1e293b 25%, #4f46e5 75%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .home-studio-title-3d {
    color: #f8fafc;
}

[data-theme="dark"] .home-studio-title-3d .title-gradient-accent {
    background: linear-gradient(135deg, #ffffff 30%, #818cf8 75%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version-chip-3d {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #ffffff;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.home-studio-subtitle {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.45;
}

.feature-capsules-3d {
    margin-top: 0.2rem;
}
.feat-capsule {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.22rem 0.6rem;
    border-radius: 7px;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: default;
}
[data-theme="dark"] .feat-capsule {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}
.feat-capsule:hover {
    transform: translateY(-1px);
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.studio-3d-deck-wrapper {
    flex-shrink: 0;
}

.studio-3d-deck {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.65rem 0.85rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

[data-theme="dark"] .studio-3d-deck {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.deck-top-bar {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.deck-badge-tools {
    font-size: 0.58rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    letter-spacing: 0.04em;
}

.btn-3d-deck {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.785rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    position: relative;
    transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
    white-space: nowrap;
}

.btn-3d-diff {
    background: rgba(244, 63, 94, 0.07);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: #e11d48;
}
[data-theme="dark"] .btn-3d-diff {
    background: rgba(244, 63, 94, 0.14);
    border-color: rgba(244, 63, 94, 0.35);
    color: #fda4af;
}
.btn-3d-diff:hover {
    color: #ffffff !important;
    background: #f43f5e;
    border-color: #f43f5e;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
    text-decoration: none;
}
.btn-3d-diff:active {
    transform: translateY(0);
}

.btn-3d-validator {
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #059669;
}
[data-theme="dark"] .btn-3d-validator {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}
.btn-3d-validator:hover {
    color: #ffffff !important;
    background: #10b981;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    text-decoration: none;
}
.btn-3d-validator:active {
    transform: translateY(0);
}

.btn-3d-jwt {
    background: rgba(245, 158, 11, 0.07);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #d97706;
}
[data-theme="dark"] .btn-3d-jwt {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fcd34d;
}
.btn-3d-jwt:hover {
    color: #ffffff !important;
    background: #f59e0b;
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    text-decoration: none;
}
.btn-3d-jwt:active {
    transform: translateY(0);
}

@media (max-width: 991px) {
    .home-studio-header-3d {
        padding: 1rem 1.2rem;
    }
    .studio-3d-deck-wrapper {
        width: 100%;
    }
    .studio-3d-deck {
        width: 100%;
    }
    .deck-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
@media (max-width: 768px) {
    .settings-pill-box.settings-deck-3d {
        flex-wrap: wrap;
        height: auto;
        padding: 4px 6px;
        width: 100%;
    }
    .setting-item-3d {
        flex: 1 1 auto;
    }
    .panel-stats-bar.output-panel-second-row {
        padding: 0.3rem 0.65rem;
    }
    .home-view-toggle-btn {
        padding: 0.2rem 0.52rem;
        font-size: 0.735rem;
    }
    .home-tree-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .home-tree-search-box {
        width: 100%;
    }
    .home-tree-action-btns {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 576px) {
    .home-studio-title-3d {
        font-size: 1.15rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .btn-3d-deck {
        flex: 1 1 auto;
        min-width: 100px;
        justify-content: center;
        padding: 0.32rem 0.45rem;
        font-size: 0.72rem;
    }
    .panel-header {
        padding: 0.3rem 0.5rem;
        gap: 0.25rem;
    }
    .panel-header .title {
        font-size: 0.72rem;
        min-width: 0;
        flex-shrink: 1;
    }
    .panel-header .title span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .panel-action-btn {
        padding: 0.22rem 0.42rem;
        font-size: 0.72rem;
    }
    .panel-action-btn i.me-1 {
        margin-right: 0 !important;
    }
    .toolbar-cluster {
        width: 100%;
        flex-wrap: wrap;
    }
    .workbench-toolbar .tool-btn {
        padding: 0.35rem 0.55rem;
        font-size: 0.75rem;
    }
    .tool-kbd {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .panel-stats-bar.output-panel-second-row {
        flex-wrap: wrap;
        min-height: auto;
        padding: 0.35rem 0.55rem;
        gap: 0.35rem;
    }
    .output-stats-cluster {
        font-size: 0.68rem;
    }
    .settings-pill-box.settings-deck-3d {
        flex-wrap: wrap;
        height: auto;
        padding: 4px 6px;
    }
    .home-studio-header-3d {
        padding: 0.75rem 0.85rem;
    }
    .chip-3d {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    .feat-capsule {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
}

.jec-stats-bar {
    display: none !important;
}

/* FormatKit Shared Component System */
.formatkit-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.formatkit-toast {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.formatkit-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.formatkit-toast.toast-success {
    border-left: 4px solid #10b981;
}

.formatkit-toast.toast-error {
    border-left: 4px solid #ef4444;
}

.formatkit-toast.toast-warning {
    border-left: 4px solid #f59e0b;
}

.formatkit-toast.toast-info {
    border-left: 4px solid #3b82f6;
}

.formatkit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.formatkit-modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 480px;
    padding: 1.25rem 1.5rem;
    color: var(--text-primary);
}

.formatkit-progress-box {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* ==========================================================================
   TIMESTAMP CONVERTER STUDIO STYLES (HOME-PAGE ALIGNED WITH DISTINCT COLORS)
   ========================================================================== */
.ts-studio-section {
    padding-top: 0.5rem;
    padding-bottom: 2rem;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.14), transparent 75%);
}

.ts-hero-dashboard {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(14, 165, 233, 0.04) 100%), var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .ts-hero-dashboard {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%), #121927;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.ts-converter-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .ts-converter-card {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

/* Matching Form Panel & Result Panel Background */
.ts-form-panel {
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .ts-form-panel {
    background: var(--bg-surface);
    border-right-color: var(--border-color);
}

.ts-form-card {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
}

[data-theme="dark"] .ts-form-card {
    background: var(--bg-surface-alt);
    border-color: var(--border-color);
}

/* Input Fields with Small Theme Highlight Border */
.ts-main-input,
.form-control.ts-main-input {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    padding: 0.6rem 0.85rem !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ts-main-input:hover,
.form-control.ts-main-input:hover {
    border-color: var(--accent-primary) !important;
}

.ts-main-input:focus,
.form-control.ts-main-input:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.22) !important;
    outline: none !important;
}

[data-theme="dark"] .ts-main-input,
[data-theme="dark"] .form-control.ts-main-input {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .ts-main-input:hover,
[data-theme="dark"] .form-control.ts-main-input:hover {
    border-color: #6366f1 !important;
}

[data-theme="dark"] .ts-main-input:focus,
[data-theme="dark"] .form-control.ts-main-input:focus {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3) !important;
}

.ts-result-panel {
    background: var(--bg-surface);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .ts-result-panel {
    background: var(--bg-surface);
}

/* Primary Highlight Result Box */
.ts-primary-hero-result {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    border-radius: 10px;
    padding: 1.15rem 1.25rem;
    margin-bottom: 1.25rem;
}

[data-theme="dark"] .ts-primary-hero-result {
    background: var(--bg-surface-alt);
    border-color: var(--border-color);
    border-left-color: #818cf8;
}

.ts-hero-result-title {
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-primary);
}

.ts-hero-result-value {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #10b981;
    word-break: break-all;
    line-height: 1.3;
}

[data-theme="dark"] .ts-hero-result-value {
    color: #34d399;
}

.ts-live-pulse {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.725rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
}

.ts-live-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    animation: ts-pulse 1.8s infinite;
}

@keyframes ts-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.ts-hero-ticker {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
    user-select: all;
}

@media (max-width: 768px) {
    .ts-hero-ticker {
        font-size: 1.5rem;
    }
    .ts-form-panel {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color) !important;
    }
}

.ts-chips-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.ts-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-secondary);
    font-size: 0.775rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

[data-theme="dark"] .ts-chip {
    background: var(--bg-surface-alt);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.ts-chip:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: var(--accent-light);
    transform: translateY(-1px);
}

.ts-result-row {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.15s ease;
}

[data-theme="dark"] .ts-result-row {
    background: var(--bg-surface-alt);
    border-color: var(--border-color);
}

.ts-result-row:hover {
    border-color: var(--accent-primary);
    transform: translateX(2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .ts-result-row:hover {
    border-color: #6366f1;
}

.ts-result-label {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ts-result-value {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
    flex: 1 1 auto;
}

.ts-result-copy-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.ts-result-copy-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Home Mode Toggle Switcher */
.ts-mode-switch {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface-alt);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .ts-mode-switch {
    background: #090e18;
    border-color: #202b3d;
}

.ts-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 650;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.3;
    white-space: nowrap;
}

.ts-mode-btn:hover {
    color: var(--text-primary);
}

.ts-mode-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35) !important;
}

.ts-mode-btn.active i {
    color: #ffffff !important;
}

/* Time Tools Module Navigation Pills */
.ts-nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.4rem;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

[data-theme="dark"] .ts-nav-pills {
    background: #0b111e;
    border-color: #243247;
}

.ts-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    font-size: 0.825rem;
    font-weight: 650;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.ts-nav-pill:hover {
    color: var(--text-primary);
    background: rgba(79, 70, 229, 0.08);
}

.ts-nav-pill.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.ts-nav-pill.active i {
    color: #ffffff !important;
}

/* Swap Button */
.ts-swap-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    color: var(--accent-primary);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.15s ease, border-color 0.15s ease;
}

.ts-swap-btn:hover {
    transform: rotate(180deg);
    border-color: var(--accent-primary);
    background: var(--accent-light);
}

/* Countdown Grid */
.ts-countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (max-width: 576px) {
    .ts-countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ts-countdown-box {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 0.75rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .ts-countdown-box {
    background: linear-gradient(180deg, #131c2d 0%, #0d1422 100%);
    border-color: #253349;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.ts-countdown-num {
    font-size: 2.25rem;
    font-weight: 800;
    font-family: var(--font-mono);
    line-height: 1;
    color: #4f46e5;
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .ts-countdown-num {
    color: #818cf8;
}

.ts-countdown-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Stat Metrics Card */
.ts-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.15s ease;
}

[data-theme="dark"] .ts-stat-card {
    background: #141c2c;
    border-color: #273449;
}

.ts-stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.ts-stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent-primary);
    line-height: 1.2;
}

.ts-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.25rem;
}


