:root{--bg: #f7f5f0;--panel: #ffffff;--ink: #1f2328;--muted: #6b7280;--line: #e5e1d8;--grid: #ece8df;--accent: #1f3a93;--font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, Helvetica, Arial, sans-serif}*{box-sizing:border-box}html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);font-family:var(--font);font-size:14px;line-height:1.5}button{font:inherit;color:inherit;cursor:pointer}a{color:var(--accent)}#app{display:flex;flex-direction:column;min-height:100vh}.top{padding:16px 20px 10px;display:flex;flex-wrap:wrap;gap:12px 28px;align-items:flex-end;border-bottom:1px solid var(--line);background:var(--panel)}.brand h1{margin:0;font-size:20px;letter-spacing:.02em}.brand .sub{margin:2px 0 0;color:var(--muted);font-size:12.5px;max-width:560px}.controls{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center}.ctl-group{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.ctl-label{color:var(--muted);font-size:12px;margin-right:4px}.controls button,.presets button{background:#fff;border:1px solid var(--line);border-radius:6px;padding:3px 9px;font-size:12.5px;line-height:1.4}.controls button:hover{border-color:#bbb;background:#fafafa}.controls select{font:inherit;font-size:12.5px;padding:3px 6px;border:1px solid var(--line);border-radius:6px;background:#fff}.sep{width:1px;height:18px;background:var(--line);margin:0 4px}.presets{display:flex;flex-wrap:wrap;gap:4px}.picker{padding:10px 20px;background:var(--panel);border-bottom:1px solid var(--line);display:flex;flex-wrap:wrap;gap:6px 18px;align-items:center}.picker-groups{display:flex;flex-wrap:wrap;gap:6px 18px;flex:1}.pg{display:flex;align-items:center;flex-wrap:wrap;gap:4px}.pg-name{font-size:11.5px;color:var(--muted);margin-right:2px}.chip{display:inline-flex;align-items:center;gap:5px;padding:3px 10px 3px 7px;border-radius:999px;border:1px solid var(--line);background:#fff;font-size:12.5px;transition:all .12s}.chip i{width:9px;height:9px;border-radius:50%;background:var(--c);opacity:.45}.chip:hover{border-color:var(--c)}.chip.on{background:var(--c);border-color:var(--c);color:#fff}.chip.on i{background:#fff;opacity:.9}.picker-summary{font-size:12px;color:var(--muted);white-space:nowrap}.tl-root{flex:1}.tl{position:relative;user-select:none;-webkit-user-select:none}.tl-head{position:sticky;top:0;z-index:5;display:flex;background:var(--panel);border-bottom:1px solid var(--line);box-shadow:0 1px #00000008}.tl-head-gutter{width:148px;flex:none;display:flex;align-items:flex-end;padding:0 10px 6px;font-size:12px;color:var(--muted);border-right:1px solid var(--line)}.tl-head-main{flex:1;min-width:0;display:flex;flex-direction:column}.tl-axis{display:block;width:100%;cursor:ns-resize}.tl-overview{display:block;width:100%;cursor:grab;border-top:1px solid var(--line);touch-action:none}.tl-overview:active{cursor:grabbing}.tl-axis .tick{stroke:#999}.tl-axis .tick-minor{stroke:#ccc}.tl-axis .tick-ad{stroke:#c0392b;stroke-dasharray:2 3}.tl-axis .tick-label{font-size:11.5px;fill:#444;font-variant-numeric:tabular-nums}.tl-cursor-label rect{fill:var(--ink)}.tl-cursor-label text{fill:#fff;font-size:12px;font-variant-numeric:tabular-nums}.ov-bg{fill:#f3f1ec}.ov-tick{stroke:#fff}.ov-window{fill:#1f3a931f;stroke:var(--accent);stroke-width:1.2}.tl-body{display:flex}.tl-gutter{width:148px;flex:none;border-right:1px solid var(--line);background:var(--panel)}.tl-plot{flex:1;min-width:0;cursor:grab;position:relative;touch-action:pan-y}.tl-plot.dragging{cursor:grabbing}.tl-svg{display:block}.lane-bg{fill:#fbfaf7}.lane-bg.odd{fill:#f4f2ec}.grid{stroke:var(--grid)}.grid-ad{stroke:#c0392b;stroke-opacity:.35;stroke-dasharray:2 3}.tl-cursor{stroke:var(--ink);stroke-opacity:.5;pointer-events:none}.period rect{stroke:#0000001f;stroke-width:.5;transition:opacity .1s}.period:hover rect{stroke:var(--ink);stroke-width:1.2}.period text{pointer-events:none;font-weight:500}.period.k-era rect{stroke-dasharray:3 2}.event circle{stroke:#fff;stroke-width:1.2}.event:hover circle{stroke:var(--ink)}.event .ev-label{fill:#333;pointer-events:all}.event.imp-3 .ev-label{font-weight:600;fill:#111}.event.imp-1 .ev-label{fill:#666}.event,.period{cursor:pointer}.lane-label{position:relative;padding:8px 10px 8px 12px;border-left:4px solid;border-bottom:1px solid var(--line);display:flex;flex-direction:column;justify-content:center}.lane-label.odd{background:#faf9f6}.lane-name{font-weight:600;font-size:14px;display:flex;align-items:center;gap:6px}.lane-dot{width:8px;height:8px;border-radius:50%;display:inline-block}.lane-en{font-size:11px;color:var(--muted)}.lane-actions{position:absolute;right:6px;top:6px;display:none;gap:2px}.lane-label:hover .lane-actions{display:flex}.lane-actions button{border:1px solid var(--line);background:#fff;border-radius:4px;font-size:11px;width:20px;height:20px;line-height:1;padding:0}.lane-actions button:disabled{opacity:.3;cursor:default}.lane-actions button:hover:not(:disabled){background:#f0f0f0}.lane-empty{padding:40px 10px;color:var(--muted);font-size:12.5px;white-space:nowrap}.tl-tooltip{position:fixed;z-index:20;max-width:320px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 24px #0000001f;padding:10px 12px;pointer-events:none;font-size:13px}.tl-tooltip.pinned{pointer-events:auto;border-color:var(--accent)}.tt-region{font-size:11.5px;font-weight:600;margin-bottom:2px}.tt-title{font-size:15px;font-weight:600}.tt-en{font-weight:400;color:var(--muted);font-size:12px;margin-left:6px}.tt-years{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}.tt-note{margin-top:6px;line-height:1.55}.tt-hint{margin-top:6px;font-size:11px;color:var(--muted)}.foot{padding:12px 20px 24px;border-top:1px solid var(--line);background:var(--panel);color:var(--muted);font-size:12px}.legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin-bottom:6px;color:var(--ink)}.legend span{display:inline-flex;align-items:center;gap:6px}.sw{width:22px;height:12px;border-radius:3px;display:inline-block;background:#1f3a93}.sw.k-state{background:#6f86c9}.sw.k-republic{background:#172c73}.sw.k-foreign{background:repeating-linear-gradient(45deg,#d9dff1 0,#d9dff1 3px,#6f86c9 3px,#6f86c9 5px)}.sw.k-era{background:#dfe4f3;border:1px dashed #6f86c9}.legend .dot{width:10px;height:10px;border-radius:50%;background:#1f3a93;display:inline-block}.tips{margin:0;line-height:1.7}.tl-overlay{display:none;position:absolute;left:0;top:0;width:0;height:0;pointer-events:none}.ov-label{position:absolute;left:0;display:inline-flex;align-items:center;gap:6px;padding:2px 8px 2px 6px;border-left:3px solid;background:#ffffffe0;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border-radius:0 6px 6px 0;font-size:12px;font-weight:600;white-space:nowrap;pointer-events:auto;box-shadow:0 1px 3px #00000014}.ov-label .lane-actions{position:static;display:none}.ov-label.open .lane-actions{display:flex}.ov-label .lane-actions button{width:24px;height:24px;font-size:13px}.tl-overlay .lane-empty{position:absolute;left:0;top:0;padding:20px 12px;pointer-events:none}.range-sel{display:none}.tl-tooltip.sheet{left:0!important;right:0;top:auto!important;bottom:0;max-width:none;border-radius:14px 14px 0 0;padding:14px 16px calc(14px + env(safe-area-inset-bottom));box-shadow:0 -6px 24px #00000026;pointer-events:auto}.tt-close{margin-top:10px;width:100%;padding:8px;border:1px solid var(--line);border-radius:8px;background:#f6f6f6;font-size:14px}@media(max-width:720px){html,body{font-size:13px}.top{padding:10px 12px 8px;gap:8px;align-items:stretch;flex-direction:column}.brand h1{font-size:17px}.brand .sub{display:none}.controls{gap:6px 10px}.ctl-group{flex-wrap:nowrap}.ctl-label{flex:none}.presets{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px}.presets::-webkit-scrollbar{display:none}.presets button{white-space:nowrap}.controls button[data-range],.controls .sep{display:none}.range-sel{display:inline-block;font:inherit;font-size:12.5px;padding:3px 6px;border:1px solid var(--line);border-radius:6px;background:#fff}.controls button{min-height:30px;padding:3px 10px}.picker{padding:8px 12px;display:block}.picker-groups{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;gap:12px;padding-bottom:2px}.picker-groups::-webkit-scrollbar{display:none}.pg{flex:none;flex-wrap:nowrap}.chip{min-height:30px}.picker-summary,.tl-head-gutter,.tl-gutter{display:none}.tl-overlay{display:block}.tl-axis{cursor:default}.foot{padding:10px 12px 20px}.legend{gap:4px 12px;font-size:11.5px}.tips{display:none}}
