.ancient-page-bg {
    background: #f5f5f5;
    padding: 2rem 0 4rem;
}

.ancient-search {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ancient-search-row {
    display: flex;
    gap: 0.8rem;
}

.ancient-search-row input {
    flex: 1;
    padding: 0.85rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fafafa;
}

.ancient-search-row input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
    background: #fff;
}

.dynasty-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.dynasty-chip {
    padding: 0.45rem 0.9rem;
    border: 1px solid #dbe2f0;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.86rem;
}

.dynasty-chip.active,
.dynasty-chip:hover {
    border-color: #2563eb;
    color: #2563eb;
    text-decoration: none;
}

.ancient-list-section {
    padding-top: 2rem;
}

.ancient-section-head {
    margin-bottom: 1.5rem;
}

.ancient-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.ancient-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.2rem;
}

.ancient-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.ancient-card-title {
    font-size: 1.05rem;
    margin-bottom: 0.65rem;
}

.ancient-card-title a {
    color: #111827;
    text-decoration: none;
}

.ancient-card-desc {
    color: #4b5563;
    line-height: 1.8;
    min-height: 3.6em;
}

.ancient-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

.ancient-tag {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.78rem;
}

.ancient-card-link {
    display: inline-block;
    margin-top: 1rem;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.person-card-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.person-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    gap: 1rem;
}

.person-avatar,
.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
}

.person-avatar.large {
    width: 84px;
    height: 84px;
    font-size: 1.8rem;
}

.person-main,
.person-hero-main {
    flex: 1;
}

.works-row {
    margin-top: 0.85rem;
    color: #4b5563;
    line-height: 1.8;
}

.works-row a {
    margin-right: 0.7rem;
    color: #2563eb;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pager-item {
    min-width: 40px;
    padding: 0.55rem 0.85rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    text-align: center;
    text-decoration: none;
}

.pager-item.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.pager-item.disabled {
    color: #9ca3af;
    background: #f9fafb;
}

.empty-state {
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

.ancient-detail-top,
.person-hero-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
}

.poetry-lines {
    margin-top: 1rem;
}

.poetry-lines p {
    text-align: center;
    font-size: 1.05rem;
    line-height: 2;
    margin: 0;
    color: #1f2937;
}

.ancient-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.2rem;
    padding-top: 2rem;
}

.ancient-main,
.ancient-side {
    min-width: 0;
}

.ancient-detail-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.ancient-detail-section .section-title {
    text-align: left;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.ancient-detail-text,
.ancient-detail-text p {
    color: #374151;
    line-height: 1.9;
}

.ancient-side-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.ancient-side-card h3 {
    margin-bottom: 0.9rem;
}

.author-name {
    margin-top: 0.8rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.author-dynasty {
    color: #6b7280;
    margin: 0.25rem 0 0.8rem;
}

.related-list {
    padding-left: 1.1rem;
    margin: 0;
}

.related-list li {
    margin-bottom: 0.6rem;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.timeline-item {
    border-left: 3px solid #2563eb;
    padding-left: 1rem;
}

.timeline-period {
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.35rem;
}

.timeline-desc {
    color: #4b5563;
    line-height: 1.8;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.detail-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    background: #fafafa;
}

.detail-card h3 {
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.detail-card p {
    color: #4b5563;
    line-height: 1.8;
    margin: 0;
}

@media (max-width: 900px) {
    .ancient-card-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ancient-detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ancient-search-row {
        flex-direction: column;
    }

    .ancient-card-grid {
        grid-template-columns: 1fr;
    }

    .person-card,
    .person-hero-card {
        flex-direction: column;
    }
}
