/* ===== 时间轴区域 ===== */
.timeline-section {
    background: #fff;
    padding: 10px 20px 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    z-index: 999;
    border-bottom: 1px solid #e0e0e0;
}

.timeline-track {
    position: relative;
    margin: 0 0 10px 0;
}

/* 滑块 */
.year-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: linear-gradient(to right, #cfd8dc, #90a4ae);
    border-radius: 4px;
    outline: none;
    margin: 8px 0;
}
.year-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #1976d2;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.15s;
}
.year-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #1565c0;
}
.year-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #1976d2;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* 刻度线层 */
.timeline-marks {
    position: relative;
    height: 18px;
    margin-top: -2px;
    font-size: 10px;
    color: #888;
}
.timeline-marks .mark {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
}
.timeline-marks .mark::before {
    content: "";
    display: block;
    margin: 0 auto 2px;
    width: 1px;
    height: 6px;
    background: #aaa;
}
.timeline-marks .mark.boundary::before {
    background: #d81b60;
    height: 8px;
}
.timeline-marks .mark.boundary {
    color: #d81b60;
    font-weight: 600;
}

/* 朝代按钮 */
.dynasty-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    max-height: 60px;
    overflow-y: auto;
}
.dynasty-btn {
    padding: 4px 10px;
    font-size: 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #555;
    border-radius: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.dynasty-btn:hover {
    background: #e3f2fd;
    border-color: #90caf9;
    color: #1976d2;
}
.dynasty-btn.active {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
    font-weight: 600;
}
.dynasty-btn[data-has-data="false"] {
    opacity: 0.55;
    font-style: italic;
}

/* 响应式 */
@media (max-width: 768px) {
    .timeline-section { padding: 6px 8px; }
    .dynasty-buttons { max-height: 80px; }
    .dynasty-btn { font-size: 11px; padding: 3px 7px; }
}
