/* ═══════════════════════════════════════════════════════════════
   Timeline Overlay Styles
   Extracted from main-mode.js renderTimelineOverlay()
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Outfit:wght@200;300;400;500;600&display=swap');

/* ── Root Layout ── */
.tl-panel-root {
    font-family: 'Outfit', sans-serif;
    background: #060606;
    color: #fff;
    min-height: 100%;
    padding: 80px 48px 120px;
    box-sizing: border-box;
}

.tl-panel-header-section {
    text-align: center;
    margin-bottom: 48px;
}

.tl-panel-badge {
    display: inline-block;
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #C8A97E;
    background: rgba(200, 169, 126, 0.1);
    border: 1px solid rgba(200, 169, 126, 0.2);
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.tl-panel-header-section h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 600;
    color: #EDEAE4;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}

.tl-panel-header-section p {
    font-size: 13px;
    color: #555;
    margin: 0;
}

/* ── Tab toggle (요약/상세) ── */
.tl-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 0 auto 40px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 3px;
    width: fit-content;
}

.tl-tab {
    padding: 8px 20px;
    font-size: 12px;
    letter-spacing: 1px;
    color: #555;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.25s;
    font-family: 'Outfit', sans-serif;
}

.tl-tab.active {
    background: rgba(200, 169, 126, 0.15);
    color: #C8A97E;
}

.tl-tab:hover:not(.active) {
    color: #888;
}

/* ── Summary panel cards ── */
.tl-panel-card {
    position: relative;
    padding: 24px 24px 24px 28px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(.16, 1, .3, 1);
    overflow: hidden;
    animation: tlPanelIn 0.4s ease forwards;
    opacity: 0;
}

/* Compact card — title only, reduced padding */
.tl-panel-card--compact {
    padding: 16px 20px 16px 24px;
}

.tl-panel-card--compact .tl-panel-title {
    margin-bottom: 0;
    font-size: 16px;
}

.tl-panel-card--compact .tl-panel-header {
    margin-bottom: 8px;
}

.tl-panel-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

@keyframes tlPanelIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tl-panel-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
}

.tl-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tl-panel-type {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.tl-panel-date {
    font-size: 10px;
    color: #444;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

.tl-panel-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 500;
    color: #EDEAE4;
    margin: 0 0 10px;
    line-height: 1.4;
}

.tl-panel-desc {
    font-size: 13px;
    line-height: 1.7;
    color: #666;
    margin: 0;
}

.tl-panel-src-count {
    margin-top: 12px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #444;
}

.tl-panel-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 0;
}

.tl-panel-connector-line {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.08);
}

/* ── Tree view (branching) ── */
.tl-tree-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 12px;
    position: relative;
}

.tl-tree-row {
    position: relative;
    display: flex;
    justify-content: center;
}

/* Summary view trunk card — same look as tree trunk but clickable */
.tl-summary-trunk {
    position: relative;
    width: 350px;
    padding: 10px 14px;
    border: 1px solid rgba(200, 169, 126, 0.2);
    border-radius: 8px;
    background: rgba(200, 169, 126, 0.04);
    z-index: 2;
    cursor: pointer;
    animation: tlPanelIn 0.4s ease forwards;
    opacity: 0;
    transition: all 0.3s cubic-bezier(.16, 1, .3, 1);
}

.tl-summary-trunk:hover {
    background: rgba(200, 169, 126, 0.08);
    border-color: rgba(200, 169, 126, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ── Vertical Line Timeline ── */
.tl-vline-wrapper {
    position: relative;
    padding-left: 8px;
}

/* Continuous vertical line behind everything */
.tl-vline-wrapper::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 22px;
    bottom: 22px;
    width: 2px;
    background: rgba(200, 169, 126, 0.2);
    z-index: 0;
}

.tl-vline-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    animation: tlPanelIn 0.4s ease forwards;
    opacity: 0;
}

.tl-vline-dot-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 16px;
    padding-top: 16px;
    position: relative;
    z-index: 1;
}

.tl-vline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2.5px solid #C8A97E;
    background: #060606;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow 0.3s ease,
        background 0.3s ease;
}

/* Hover: card hover makes dot glow and scale */
.tl-vline-row:hover .tl-vline-dot {
    transform: scale(1.5);
    background: var(--dot-color, #C8A97E);
    box-shadow: 0 0 12px var(--dot-color, rgba(200, 169, 126, 0.6)),
        0 0 24px rgba(200, 169, 126, 0.2);
}

.tl-vline-card {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(200, 169, 126, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.16, 1, .3, 1);
    max-width: 420px;
}

.tl-vline-card:hover {
    background: rgba(200, 169, 126, 0.06);
    border-color: rgba(200, 169, 126, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.tl-vline-card .tl-panel-header {
    margin-bottom: 6px;
}

.tl-vline-card .tl-tree-title {
    font-size: 14px;
    margin-bottom: 6px;
}

.tl-vline-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.tl-vline-entity {
    font-size: 11px;
    color: #555;
}

.tl-vline-card-footer .tl-panel-src-count {
    margin-top: 0;
}

.tl-vline-gap {
    display: flex;
    align-items: center;
    padding: 2px 0 2px 3px;
    position: relative;
    z-index: 1;
}

.tl-vline-gap-label {
    font-size: 10px;
    font-weight: 500;
    color: #555;
    letter-spacing: 0.5px;
    padding-left: 22px;
}

/* ── Inline Expand (description + sources) ── */
.tl-vline-expand {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s cubic-bezier(.16, 1, .3, 1),
        opacity 0.35s ease,
        margin 0.35s ease;
    margin-top: 0;
}

.tl-vline-expand.open {
    max-height: 2000px;
    opacity: 1;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tl-vline-expand-desc {
    font-size: 13px;
    line-height: 1.7;
    color: #888;
    margin-bottom: 10px;
}

.tl-vline-expand-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tl-vline-src-badge {
    display: inline-block;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 14px;
    background: rgba(200, 169, 126, 0.08);
    color: #C8A97E;
    border: 1px solid rgba(200, 169, 126, 0.2);
    letter-spacing: 0.3px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

a.tl-vline-src-badge:hover {
    background: rgba(200, 169, 126, 0.2);
    border-color: rgba(200, 169, 126, 0.5);
    color: #e0c9a0;
    transform: translateY(-1px);
}

.tl-vline-card--expanded {
    border-color: rgba(200, 169, 126, 0.35) !important;
    background: rgba(200, 169, 126, 0.04);
}

/* ── Tree view expand (evidence articles on trunk/branch nodes) ── */
.tl-tree-expand {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s cubic-bezier(.16, 1, .3, 1),
        opacity 0.35s ease,
        margin 0.35s ease;
    margin-top: 0;
}

.tl-tree-expand.open {
    max-height: 2000px;
    opacity: 1;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tl-tree-expand-desc {
    font-size: 12px;
    line-height: 1.6;
    color: #888;
    margin-bottom: 8px;
    word-break: keep-all;
    overflow-wrap: break-word;
    white-space: normal;
}

.tl-tree-expand-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.tl-tree-expand-articles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tl-tree-article {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.015);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.tl-tree-article:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.tl-tree-article-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tl-tree-article-title {
    flex: 1;
    font-size: 11px;
    color: #999;
    word-break: keep-all;
    overflow-wrap: break-word;
    white-space: normal;
    min-width: 0;
}

.tl-tree-article-src {
    font-size: 9px;
    color: #555;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

/* Hover/expanded state for trunk and branch clickable nodes */
.tl-trunk-node:hover,
.tl-branch-node:hover {
    background: rgba(200, 169, 126, 0.08);
    border-color: rgba(200, 169, 126, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(.16, 1, .3, 1);
}

.tl-tree-card--expanded {
    border-color: rgba(200, 169, 126, 0.35) !important;
    background: rgba(200, 169, 126, 0.06) !important;
}

/* ── Tree view nodes (branching) ── */
.tl-trunk-node {
    position: relative;
    width: 300px;
    padding: 10px 14px;
    border: 1px solid rgba(200, 169, 126, 0.2);
    border-radius: 8px;
    background: rgba(200, 169, 126, 0.04);
    z-index: 2;
    animation: tlPanelIn 0.4s ease forwards;
    opacity: 0;
}

.tl-tree-title {
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    font-weight: 500;
    color: #EDEAE4;
    line-height: 1.3;
    margin-bottom: 2px;
}

.tl-tree-actor {
    font-size: 10px;
    color: #666;
}

.tl-trunk-connector {
    display: flex;
    justify-content: center;
    padding: 2px 0;
}

.tl-trunk-line {
    width: 2px;
    height: 18px;
    background: rgba(200, 169, 126, 0.25);
}

.tl-branch-row {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 0 2px;
    flex-wrap: wrap;
}

.tl-branch-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 60px);
    max-width: 800px;
    height: 2px;
    background: rgba(200, 169, 126, 0.15);
}

.tl-branch-node {
    position: relative;
    min-width: 200px;
    max-width: 280px;
    flex: 1 1 200px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    animation: tlPanelIn 0.4s ease forwards;
    opacity: 0;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.tl-branch-node .tl-tree-title {
    font-size: 12px;
    line-height: 1.4;
}

.tl-branch-node::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: rgba(200, 169, 126, 0.15);
}

.tl-edge-badge {
    display: inline-block;
    font-size: 7px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    margin-bottom: 3px;
    background: rgba(255, 255, 255, 0.05);
    color: #666;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tl-view-hidden {
    display: none !important;
}

/* ── Zoom overlay ── */
.tl-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(6, 6, 6, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.tl-zoom-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.tl-zoom-content {
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(.16, 1, .3, 1);
    scrollbar-width: none;
}

.tl-zoom-content::-webkit-scrollbar {
    display: none;
}

.tl-zoom-overlay.active .tl-zoom-content {
    transform: scale(1) translateY(0);
}

.tl-zoom-nav {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 310;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    backdrop-filter: blur(8px);
}

.tl-zoom-nav button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.tl-zoom-nav button:hover {
    color: #C8A97E;
}

.tl-zoom-counter {
    font-size: 10px;
    letter-spacing: 2px;
    color: #555;
    font-variant-numeric: tabular-nums;
}

.tl-zoom-close {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 310;
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
    font-size: 18px;
}

.tl-zoom-close:hover {
    color: #C8A97E;
}

/* ── 2-column layout ── */
.tl-two-col {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

.tl-main-col {
    flex: 1;
    min-width: 0;
}

.tl-sidebar-col {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Sidebar cards ── */
.tl-sb-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px;
    animation: tlPanelIn 0.5s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.tl-sb-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.tl-sb-icon {
    font-size: 16px;
}

.tl-sb-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888;
}

.tl-sb-ai-badge {
    margin-left: auto;
    font-size: 8px;
    letter-spacing: 1px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(200, 169, 126, 0.1);
    color: #C8A97E;
    border: 1px solid rgba(200, 169, 126, 0.2);
    text-transform: uppercase;
}

.tl-sb-insight-summary {
    font-size: 13px;
    line-height: 1.7;
    color: #999;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 14px;
}

/* ── Collapsible AI Insight (sidebar) ── */
.tl-sb-insight-oneliner {
    font-size: 13px;
    line-height: 1.6;
    color: #bbb;
    padding: 0 0 8px;
    font-weight: 500;
}

.tl-sb-insight-toggle {
    display: block;
    width: 100%;
    padding: 8px 0 2px;
    background: none;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: #C8A97E;
    font-size: 11px;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.5px;
    transition: color 0.2s;
    font-family: inherit;
}

.tl-sb-insight-toggle:hover {
    color: #e0c9a0;
}

.tl-sb-insight-detail {
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(.16, 1, .3, 1),
        opacity 0.3s ease,
        margin 0.3s ease,
        padding 0.3s ease;
    font-size: 12.5px;
    line-height: 1.75;
    color: #999;
    white-space: pre-line;
}

.tl-sb-insight-detail.open {
    max-height: 2000px;
    opacity: 1;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── AI Analysis Card (timeline overlay) ── */
.tl-ai-analysis {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(200, 169, 126, 0.15);
    border-radius: 12px;
    padding: 18px 20px;
    margin: 0 auto 24px;
    max-width: 700px;
    animation: tlPanelIn 0.4s ease forwards;
    opacity: 0;
    animation-delay: 0.1s;
}

.tl-ai-analysis-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.tl-ai-analysis-icon {
    font-size: 16px;
}

.tl-ai-analysis-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #C8A97E;
}

.tl-ai-analysis-summary {
    font-size: 14px;
    line-height: 1.7;
    color: #bbb;
    font-weight: 400;
}

.tl-ai-analysis-detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(.16, 1, .3, 1),
        opacity 0.35s ease,
        margin 0.35s ease,
        padding 0.35s ease;
    margin-top: 0;
    padding-top: 0;
    font-size: 13px;
    line-height: 1.8;
    color: #999;
    border-top: 1px solid transparent;
}

.tl-ai-analysis-detail.open {
    max-height: 2000px;
    opacity: 1;
    margin-top: 14px;
    padding-top: 14px;
    border-top-color: rgba(255, 255, 255, 0.06);
}

.tl-ai-analysis-toggle {
    display: block;
    width: 100%;
    padding: 10px 0 2px;
    background: none;
    border: none;
    color: #C8A97E;
    font-size: 11px;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.5px;
    transition: color 0.2s;
    font-family: inherit;
    margin-top: 8px;
}

.tl-ai-analysis-toggle:hover {
    color: #e0c9a0;
}

/* ── AI Analysis loading spinner (sidebar) ── */
.tl-sb-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(200, 169, 126, 0.15);
    border-top-color: #C8A97E;
    border-radius: 50%;
    animation: tlSpinnerRotate 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes tlSpinnerRotate {
    to {
        transform: rotate(360deg);
    }
}

.tl-sb-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tl-sb-section {
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.015);
}

.tl-sb-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 6px;
}

.tl-sb-section-text {
    font-size: 12px;
    line-height: 1.6;
    color: #888;
}

.tl-sb-entity-group {
    margin-bottom: 16px;
}

.tl-sb-entity-group:last-child {
    margin-bottom: 0;
}

.tl-sb-entity-group-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Tab bar (인물/주요국가) ── */
.tl-sb-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}

.tl-sb-tab {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    letter-spacing: 0.5px;
    position: relative;
    transition: color 0.2s;
}

.tl-sb-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    width: 60%;
    height: 2px;
    background: transparent;
    border-radius: 1px;
    transition: background 0.3s, box-shadow 0.3s;
}

.tl-sb-tab:hover {
    color: #999;
}

.tl-sb-tab-active {
    color: #C8A97E;
}

.tl-sb-tab-active::after {
    background: linear-gradient(90deg, #C8A97E, #D4B896);
    box-shadow: 0 0 8px rgba(200, 169, 126, 0.3);
}

.tl-sb-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    background: rgba(200, 169, 126, 0.12);
    color: #C8A97E;
    padding: 0 4px;
    margin-left: 4px;
}

.tl-sb-tab-content {
    animation: fadeIn 0.2s ease;
}

.tl-sb-tab-empty {
    padding: 20px 0;
    text-align: center;
    color: #444;
    font-size: 12px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ── Entity items ── */
.tl-sb-entity {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.tl-sb-entity:last-child {
    border-bottom: none;
}

.tl-sb-entity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.tl-sb-entity-info {
    flex: 1;
    min-width: 0;
}

.tl-sb-entity-name {
    font-size: 13px;
    font-weight: 500;
    color: #ccc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tl-sb-entity-role {
    font-size: 10px;
    color: #555;
    margin-top: 2px;
}

.tl-sb-entity-badge {
    font-size: 8px;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ── Responsive ── */
@media(max-width:900px) {
    .tl-two-col {
        flex-direction: column;
    }

    .tl-sidebar-col {
        width: 100%;
        position: static;
        order: -1;
    }
}

@media(max-width:640px) {
    .tl-panel-root {
        padding: 60px 20px 100px;
    }

    .tl-panel-title {
        font-size: 17px;
    }

    .tl-panel-header-section h1 {
        font-size: 24px;
    }

    .tl-trunk-node {
        width: 100%;
    }

    .tl-branch-node {
        width: 100%;
    }

    .tl-branch-row {
        flex-direction: column;
        align-items: center;
    }

    .tl-branch-row::before {
        display: none;
    }

    .tl-branch-node::before {
        display: none;
    }
}

/* ── People filter (전체/핵심/주요) ── */
.tl-sb-people-filter {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.tl-sb-pf-btn {
    flex: 1;
    padding: 4px 6px;
    font-size: 10px;
    color: #555;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.tl-sb-pf-btn:hover {
    color: #888;
    background: rgba(255, 255, 255, 0.03);
}

.tl-sb-pf-active {
    color: #C8A97E;
    background: rgba(200, 169, 126, 0.08);
    border: 1px solid rgba(200, 169, 126, 0.15);
}