/* ============================================================
 * Timeline CSS v202606221430
 * Layout: FULL-WIDTH ruler on top, continuous dynasty color bar
 * Style: clean warm background (no grid)
 * English comments only for FTP GBK safety!
 * ============================================================ */

/* Timeline page needs NO main-content padding */
body.tl-no-footer .main-content,
body.tl-no-footer > .main-content,
body.tl-no-footer main.main-content {
    padding: 0;
}

/* ---- Reset ---- */
.tl-wrapper * { box-sizing: border-box; margin: 0; padding: 0; }
.tl-wrapper {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 60px);
    overflow: hidden;
    font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--hx-f8f5f0);
}

/* ===== TOP RULER (full width, transparent over grid) ===== */
.tl-ruler {
    flex-shrink: 0;
    position: relative;
    /* Semi-transparent warm overlay — lets grid show through */
    background: rgba(250, 247, 242, 0.88);
    border-bottom: 1px solid var(--hx-ddd5c8);
    z-index: 20;
    cursor: grab;
}
.tl-ruler:active {
    cursor: grabbing;
}
.tl-r-row {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Row 1: Western years */
.tl-r-west {
    height: 26px;
    border-bottom: 1px dashed var(--hx-ddd5c8);
    padding: 0 16px;
    line-height: 26px;
}

/* Row 2: Colored era bar — continuous dynasty timeline */
.tl-r-era {
    height: 28px;
    margin: 4px 0 2px;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    position: relative;
}

/* Row 3: Chinese dynasty labels — under the continuous color line */
.tl-r-cn {
    height: 20px;
    padding: 0 4px;
    line-height: 20px;
}

/* ===== RIGHT AREA (ruler + content, flex column) ===== */
.tl-right-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    position: relative;
}

/* ===== BELOW-RULER AREA (legacy alias) ===== */

/* ===== LEFT SIDEBAR (kg-style 240px, full height) ===== */
.tl-sidebar {
    width: 240px !important;
    height: 100%;
    flex-shrink: 0;
    background: var(--hx-ffffff);
    border-right: 1px solid var(--hx-e8ecf4);
    display: flex;
    flex-direction: column;
    z-index: 90;
    overflow-y: auto;
}

.tl-sidebar::-webkit-scrollbar { width: 4px; }
.tl-sidebar::-webkit-scrollbar-thumb { background: var(--hx-dddddd); border-radius: 2px; }

/* Sidebar header */
.tl-sb-header { padding: 18px 16px 12px; }
.tl-sb-title { margin: 0; font-size: 17px; color: var(--hx-1a1a2e); font-weight: 700; }

/* Section block */
.tl-sb-section { padding: 0 14px 10px; }
.tl-sb-label { font-size: 11px; color: var(--hx-bbbbbb); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }

/* Filter tabs (pill buttons, like kg.php) */
.tl-sb-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.tl-sb-tab {
    display: inline-flex; align-items: center; padding: 3px 11px;
    border: 1px solid var(--hx-dddddd); border-radius: 14px; background: var(--hx-ffffff);
    cursor: pointer; font-size: 12px; color: var(--hx-666666);
    text-decoration: none; transition: all 0.15s; white-space: nowrap;
}
.tl-sb-tab::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%;
    background: var(--dot-color, transparent); flex-shrink: 0; margin-right: 5px;
}
.tl-sb-tab:hover { border-color: var(--dot-color, var(--hx-1677ff)); color: var(--hx-333333); }
.tl-sb-tab.active { background: var(--dot-color, var(--hx-1677ff)); color: var(--hx-ffffff); border-color: var(--dot-color, var(--hx-1677ff)); }
.tl-sb-tab.active::before { background: rgba(255,255,255,0.8); }

/* Search input */
.tl-sb-search {
    width: 100%; padding: 7px 10px; border: 1px solid var(--hx-dddddd); border-radius: 8px;
    font-size: 13px; color: var(--hx-333333); transition: border-color 0.2s; box-sizing: border-box;
}
.tl-sb-search:focus { outline: none; border-color: var(--hx-1677ff); box-shadow: 0 0 0 2px rgba(22,119,255,0.08); }
.tl-sb-search::placeholder { color: var(--hx-bbbbbb); }
.tl-sb-period-list { display: flex; flex-direction: column; gap: 3px; max-height: 200px; overflow-y: auto; }
.tl-sb-period-list::-webkit-scrollbar { width: 3px; }
.tl-sb-period-list::-webkit-scrollbar-thumb { background: var(--hx-cccccc); border-radius: 2px; }
.tl-sb-period {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 8px; border-radius: 5px;
    font-size: 12px; color: var(--hx-555555); cursor: pointer;
    transition: background 0.12s;
}
.tl-sb-period:hover { background: var(--hx-eef2ff); color: var(--hx-333333); }
.tl-sb-period i {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    flex-shrink: 0; vertical-align: middle;
}

/* Dynasty list items */
.tl-sb-dynasty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--hx-444444);
    cursor: pointer;
    transition: background 0.12s;
}
.tl-sb-dynasty:hover { background: var(--hx-f5f0e8); }
.tl-sb-dynasty i {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    flex-shrink: 0;
}

/* Event list items in sidebar */
.tl-sb-event-list { display: flex; flex-direction: column; gap: 2px; }
.tl-sb-event {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 12px;
    color: var(--hx-555555);
    cursor: pointer;
    transition: background 0.12s;
    text-decoration: none;
    line-height: 1.4;
}
.tl-sb-event:hover { background: var(--hx-f8f4ec); color: var(--hx-333333); }
.tl-sb-dot {
    width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.tl-sb-text {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    flex: 1; min-width: 0;
}

/* Empty state */
.tl-sb-empty {
    padding: 14px 10px;
    font-size: 12px;
    color: var(--hx-bbbbbb);
    text-align: center;
    line-height: 1.6;
}

/* Label hint (count badge) */
.tl-sb-label-hint {
    font-size: 10px;
    color: var(--hx-cccccc);
    margin-left: auto;
}

/* ===== RIGHT CONTENT / GRID AREA ===== */
.tl-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    /* Coordinate-paper grid background — warm tone */
    background-color: var(--hx-faf6ee);
    background-image:
        linear-gradient(rgba(180,165,140,0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(180,165,140,0.35) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(245,238,225,0.3) 100%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    background-position: -1px -1px, -1px -1px, 0 0;
    /* Room for bottom dimension legend bar */
    padding-bottom: 36px;
}

/* Canvas area — relative positioning for detail panel */
.tl-canvas-area {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Grid background is on .tl-content (parent) — transparent here */
    background: transparent;
}

/* ===== TOP BAR (breadcrumb + view buttons + toolbar) ===== */
.tl-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0px 14px;
    background: var(--hx-ffffff);
    border-bottom: 1px solid var(--hx-e8e2d8);
    flex-shrink: 0;
    z-index: 15;
    min-height: 44px;
}
.tl-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--hx-666666);
    white-space: nowrap;
}
.tl-breadcrumb a {
    color: var(--hx-913300);
    text-decoration: none;
    font-weight: 500;
}
.tl-breadcrumb a:hover { text-decoration: underline; }
.tl-bc-sep {
    color: var(--hx-bbbbbb);
    font-size: 12px;
    margin: 0 2px;
}

/* View toggle buttons */
.tl-view-btns {
    display: flex;
    gap: 2px;
    margin-left: auto;
}
.tl-vb {
    padding: 4px 12px;
    border: 1px solid var(--hx-dddddd);
    background: var(--hx-ffffff);
    color: var(--hx-666666);
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
}
.tl-vb:hover {
    border-color: var(--hx-913300);
    color: var(--hx-913300);
}
.tl-vb.active {
    background: var(--hx-913300);
    color: var(--hx-ffffff);
    border-color: var(--hx-913300);
}

/* ===== 详情面板（右侧浮动滑入） ===== */
.tl-detail-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 340px;
    height: 100%;
    background: var(--hx-ffffff);
    border-left: 2px solid var(--hx-c4956a);
    box-shadow: -4px 0 20px rgba(0,0,0,0.08);
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
}
.tl-detail-panel.open {
    transform: translateX(0);
}

/* ===== Detail Panel Header — 标题独占一行，年份+按钮第二行 ===== */
.tl-dp-header {
    display: flex;
    flex-direction: column;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--hx-f0ebe4);
    flex-shrink: 0;
    gap: 6px;
}
/* 第一行：标题（独立一行） */
.tl-dp-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--hx-333333);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin: 0;
}

/* Detail panel body — pure wrapper, NO padding (tab-content handles it) */
.tl-dp-body {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Event dots layer (detail view when zoomed in) */
.tl-dots-layer {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    height: 50px;
    z-index: 10;
}
.tl-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 0 0 2px var(--hx-fcfbfa), 0 0 0 3px rgba(0,0,0,0.05);
    top: 0;
}
.tl-dot:hover {
    transform: scale(1.6);
    box-shadow: 0 0 0 2px var(--hx-fcfbfa), 0 0 0 5px currentColor, 0 3px 10px rgba(0,0,0,0.15);
    z-index: 20;
}
.tl-dot.active {
    transform: scale(1.5);
    box-shadow: 0 0 0 2px var(--hx-fcfbfa), 0 0 0 5px currentColor, 0 3px 14px rgba(0,0,0,0.18);
    z-index: 25;
}

/* ===== TOOLBAR (right-side vertical) ===== */
.tl-toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.tl-tb-btn {
    font-size: 14px;
    font-weight: 400;
    min-width: 28px;
    min-height: 28px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 0.5px solid var(--hx-d8d4c8);
    background: var(--hx-ffffff);
    color: var(--hx-555555);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.tl-tb-btn:hover { background: var(--hx-f8f5ef); border-color: var(--hx-c4a882); color: var(--hx-333333); }
.tl-tb-btn.active { background: var(--hx-913300); color: var(--hx-ffffff); border-color: var(--hx-913300); }
.tl-tb-zoom { font-size: 11px; color: var(--hx-888888); min-width: 36px; text-align: center; font-weight: 500; padding: 2px 0; }
.tl-tb-sep {
    width: 1px;
    height: 18px;
    background: var(--hx-e8e2d8);
    margin: 0 3px;
}

/* Sidebar active states for period/dynasty/event */
.tl-sb-dynasty.active {
    background: rgba(145, 51, 0, 0.08);
    color: var(--hx-913300);
    font-weight: 700;
    border-left: 3px solid var(--hx-913300);
    padding-left: 9px;
}
.tl-sb-period.active {
    background: rgba(145, 51, 0, 0.06);
    color: var(--hx-913300);
    font-weight: 600;
    border-left: 3px solid var(--hx-c47a3d);
}
.tl-sb-event.active {
    background: rgba(145, 51, 0, 0.05);
    color: var(--hx-913300);
    font-weight: 600;
    border-left: 3px solid var(--hx-913300);
}
/* Close button */
.tl-dp-close {
    background: none;
    border: 1px solid var(--hx-dddddd);
    border-radius: 4px;
    font-size: 16px;
    color: var(--hx-999999);
    cursor: pointer;
    padding: 2px 7px;
    line-height: 1.3;
}
.tl-dp-close:hover { color: var(--hx-cc3333); border-color: var(--hx-cc9999); }
.tl-dp-ev-tag.year {
    color: var(--hx-913300);
    background: var(--hx-fff8f0);
}

/* ============================================================
   竖向树时间轴（对齐设计稿 timeline-preview.html）
   作用域于 .tl-tree，覆盖 list.css 全局同名类（.tl-era/.tl-card/.tl-dot）。
   全 Token、零裸 hex、零内联。
   ============================================================ */
.tl-page { position: relative; }

.tl-tree .tl-wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- 页面头部 ---- */
.tl-tree .page-head {
    margin: 28px auto 22px;
}
.tl-tree .crumb {
    font-size: 13px;
    color: var(--faint);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.tl-tree .crumb a { transition: var(--transition); }
.tl-tree .crumb a:hover { color: var(--gold); }
.tl-tree .crumb .sep { color: var(--line-2); }
.tl-tree .head-title {
    display: flex;
    align-items: baseline;
    gap: 20px;
    flex-wrap: wrap;
}
.tl-tree .head-title h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(28px, 3.4vw, 40px);
    letter-spacing: .01em;
    margin: 0;
    color: var(--ink);
}
.tl-tree .sub {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14.5px;
    max-width: 44em;
    line-height: 1.8;
}

/* ---- 地区切换 ---- */
.tl-tree .tl-region-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.tl-tree .tl-region-pill {
    font-size: 13px;
    color: var(--muted);
    padding: 7px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.tl-tree .tl-region-pill:hover {
    color: var(--ink);
    border-color: var(--line-2);
}
.tl-tree .tl-region-pill.active {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}

/* ---- 模式切换条 ---- */
.tl-tree .tl-modebar {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
}
.tl-tree .tl-modes {
    display: flex;
    gap: 0;
}
.tl-tree .tl-mode {
    flex: none;
    border: 0;
    background: none;
    cursor: pointer;
    padding: 12px 18px;
    font-size: 13.5px;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: var(--transition-fast);
    font-family: var(--sans);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tl-tree .tl-mode:hover { color: var(--gold); }
.tl-tree .tl-mode.active {
    color: var(--gold);
    font-weight: 600;
    border-bottom-color: var(--gold);
    background: rgba(var(--gold-rgb), .04);
}

/* ---- 朝代筛选 pills ---- */
.tl-tree .tab-bar {
    display: flex;
    gap: 8px;
    padding: 14px 0 26px;
    flex-wrap: wrap;
}
.tl-tree .tab-pill {
    font-size: 13px;
    color: var(--muted);
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    cursor: pointer;
    transition: var(--transition);
}
.tl-tree .tab-pill:hover {
    color: var(--ink);
    border-color: var(--line-2);
}
.tl-tree .tab-pill.active {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}
.tl-tree .tab-pill .pill-cnt {
    margin-left: 4px;
    font-size: 11px;
    opacity: .7;
}
.tl-tree .tab-pill.active .pill-cnt { opacity: .8; }

/* ---- 时期子筛选 ---- */
.tl-tree .sub-era-bar {
    display: flex;
    gap: 6px;
    padding: 0 0 18px 4px;
    flex-wrap: wrap;
    align-items: center;
    border-top: 1px solid var(--line);
    margin-top: -8px;
    padding-top: 14px;
}
.tl-tree .sub-era-bar .sep {
    font-size: 11px;
    color: var(--faint);
    margin-right: 4px;
}
.tl-tree .sub-pill {
    font-size: 12px;
    color: var(--muted);
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    cursor: pointer;
    transition: var(--transition);
}
.tl-tree .sub-pill:hover {
    color: var(--ink);
    border-color: var(--line-2);
}
.tl-tree .sub-pill.active {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}
.tl-tree .sub-pill.empty { opacity: .5; }
.tl-tree .sub-pill.empty:hover { color: var(--muted); border-color: var(--line); }

/* ---- 选中朝代提示条 ---- */
.tl-tree .detail-hero {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 0 0 18px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
}
.tl-tree .detail-hero.show { display: flex; }
.tl-tree .detail-hero .period {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--muted);
    font-weight: 400;
    margin-left: auto;
}

/* ---- 竖向时间线 ---- */
.tl-tree .timeline {
    position: relative;
    padding: 0 0 50px;
}
.tl-tree .timeline::before {
    content: "";
    position: absolute;
    left: 221px;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: var(--line);
}

/* 时期层 */
.tl-tree .tl-era {
    position: relative;
    padding-left: 248px;
    margin-bottom: 12px;
}
.tl-tree .tl-era-label {
    position: absolute;
    left: 0;
    top: 0;
    width: 200px;
    text-align: right;
    padding-right: 28px;
    cursor: pointer;
    user-select: none;
}
.tl-tree .tl-era-label .dynasty {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
}
.tl-tree .tl-era-label .period {
    font-size: 13px;
    color: var(--faint);
    margin-top: 2px;
}
.tl-tree .tl-dot {
    position: absolute;
    left: 214px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--bg);
    z-index: 2;
    cursor: pointer;
    transition: transform .3s;
}
.tl-tree .tl-era.open .tl-dot {
    transform: scale(1.4);
    background: var(--bg);
    border-color: var(--gold);
}
.tl-tree .tl-era.open .tl-era-label .dynasty { color: var(--gold); }
.tl-tree .tl-arrow {
    position: absolute;
    left: 192px;
    top: 10px;
    width: 14px;
    height: 14px;
    cursor: pointer;
    color: var(--faint);
    transition: transform .3s;
    z-index: 3;
}
.tl-tree .tl-era.open .tl-arrow { transform: rotate(90deg); }

/* 子层 */
.tl-tree .tl-sub-row { display: none; margin-bottom: 16px; }
.tl-tree .tl-era.open .tl-sub-row { display: block; }
.tl-tree .tl-sub-era {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 12px;
}
.tl-tree .tl-se-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
    border-bottom: 1px solid transparent;
}
.tl-tree .tl-se-header:hover { background: var(--bg-soft); }
.tl-tree .tl-se-header .se-name {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.tl-tree .tl-se-header .se-period { font-size: 12px; color: var(--faint); }
.tl-tree .tl-se-header .se-arrow {
    color: var(--faint);
    transition: transform .3s;
    margin-left: auto;
}
.tl-tree .tl-sub-era.open .tl-se-header { border-bottom-color: var(--line); }
.tl-tree .tl-sub-era.open .se-arrow { transform: rotate(90deg); }

/* 内容类型 Tab */
.tl-tree .se-tabs {
    display: none;
    padding: 8px 18px 4px;
    gap: 4px;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
    flex-wrap: wrap;
}
.tl-tree .tl-sub-era.open .se-tabs { display: flex; }
.tl-tree .se-tab {
    font-size: 12.5px;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    color: var(--muted);
    transition: var(--transition);
    border: none;
    background: none;
    font-family: var(--sans);
}
.tl-tree .se-tab:hover { color: var(--ink); background: var(--bg); }
.tl-tree .se-tab.active { background: var(--ink); color: var(--bg); }
.tl-tree .se-tab .se-count { margin-left: 4px; font-size: 11px; opacity: .7; }

/* 内容条目 */
.tl-tree .se-items {
    display: none;
    padding: 12px 18px 16px;
}
.tl-tree .tl-sub-era.open .se-items { display: block; }
.tl-tree .se-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: var(--transition-fast);
}
.tl-tree .se-item:last-child { border-bottom: none; }
.tl-tree .se-item:hover { opacity: .85; }
.tl-tree .se-item-cover {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: var(--bg-soft);
    overflow: hidden;
    flex-shrink: 0;
}
.tl-tree .se-item-cover img { width: 100%; height: 100%; object-fit: cover; }
.tl-tree .se-item-body { flex: 1; min-width: 0; }
.tl-tree .se-item-body h5 {
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
    color: var(--ink);
}
.tl-tree .se-item-body .se-meta {
    font-size: 12px;
    color: var(--faint);
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.tl-tree .se-item-body p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tl-tree .se-item .card-acts { margin-top: 6px; gap: 10px; }

/* 子轴直接卡片 */
.tl-tree .tl-sub-direct { display: none; margin-top: 12px; }
.tl-tree .tl-era.open .tl-sub-direct { display: block; }
.tl-tree .tl-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.tl-tree .tl-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.tl-tree .tl-card-cover {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    background: var(--bg-soft);
    overflow: hidden;
    flex-shrink: 0;
}
.tl-tree .tl-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.tl-tree .tl-card-body { flex: 1; min-width: 0; }
.tl-tree .tl-card-body h4 {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
    color: var(--ink);
}
.tl-tree .tl-card-body .tl-meta {
    font-size: 12px;
    color: var(--faint);
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
}
.tl-tree .tl-card-body p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tl-tree .tl-card .card-acts {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    justify-content: flex-start;
    gap: 14px;
}

/* ---- 空状态 ---- */
.tl-tree .empty-state {
    text-align: center;
    padding: 48px 20px 40px;
}
.tl-tree .empty-state .es-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--bg-soft);
    display: grid;
    place-items: center;
    color: var(--faint);
}
.tl-tree .empty-state .es-icon svg { width: 26px; height: 26px; }
.tl-tree .empty-state .es-title {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
}
.tl-tree .empty-state .es-desc {
    font-size: 13px;
    color: var(--faint);
    margin-top: 8px;
    line-height: 1.6;
}
.tl-tree .empty-state .es-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    color: var(--gold);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.tl-tree .empty-state .es-link:hover { color: var(--gold-hover); }

/* ---- 隐藏过滤 ---- */
.tl-tree .tl-era[data-hidden] { display: none; }

/* ---- 画布容器（切换显隐） ---- */
.tl-canvas-host[hidden] { display: none; }

/* ---- 移动端 ---- */
@media (max-width: 820px) {
    .tl-tree .tl-wrap { padding: 0 16px; }
    .tl-tree .timeline::before { left: 25px; }
    .tl-tree .tl-era { padding-left: 52px; }
    .tl-tree .tl-era-label {
        position: relative;
        left: auto;
        top: auto;
        width: auto;
        text-align: left;
        padding-right: 0;
        margin-bottom: 8px;
    }
    .tl-tree .tl-dot { left: 18px; }
    .tl-tree .tl-arrow { left: 0; top: 2px; }
}
@media (max-width: 600px) {
    .tl-tree .se-item { flex-direction: column; }
    .tl-tree .se-item-cover { width: 100%; height: 120px; }
    .tl-tree .tl-card { flex-direction: column; }
    .tl-tree .tl-card-cover { width: 100%; height: 120px; }
}

/* 创建时间轴按钮（对齐 album-list 的 .head-btn.create，作用域本页避免冲突） */
.tl-create-row{margin-top:14px;}
.tl-create-row .head-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:999px;font-size:13px;font-family:var(--sans);cursor:pointer;transition:var(--transition);white-space:nowrap;text-decoration:none;border:1px solid var(--gold);background:var(--gold);color:var(--bg);}
.tl-create-row .head-btn:hover{background:var(--gold-hover);}
.tl-create-row .head-btn svg{width:16px;height:16px;}
