:root {
    --ink: #141414;
    --muted: #6e6a64;
    --paper: #fffaf2;
    --soft: #f5eadb;
    --line: rgba(74, 55, 38, .14);
    --accent: #9f4f2f;
    --accent-dark: #66311e;
    --gold: #d8a15f;
    --shadow: 0 24px 70px rgba(64, 42, 24, .14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 0%, rgba(216, 161, 95, .34), transparent 26rem),
        radial-gradient(circle at 92% 8%, rgba(159, 79, 47, .18), transparent 24rem),
        linear-gradient(180deg, #fff8ed 0%, #f4eadf 46%, #efe2d1 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

mark {
    padding: 0 .12em;
    border-radius: .25em;
    background: #ffe39a;
    color: #20150f;
}

.global-header,
.topbar,
.hero-content,
.page-shell,
.simple-header,
.archive-shell,
.about-card,
.reader-header,
.reader-shell {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

.global-header {
    position: sticky;
    top: 0;
    z-index: 20;
    max-width: none;
    border-bottom: 1px solid rgba(74, 55, 38, .1);
    background: rgba(255, 250, 242, .84);
    backdrop-filter: blur(16px);
}

.site-hero {
    min-height: 500px;
    padding: 0 min(6vw, 76px) 74px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    padding: 16px min(4vw, 32px);
}

.logo {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: .04em;
    color: var(--accent-dark);
}

.topbar-right {
    display: flex;
    gap: 12px;
}

.topbar-right a,
.simple-header a,
.reader-header nav a {
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 250, 242, .72);
    color: var(--accent-dark);
    font-weight: 700;
}

.topbar-right a.active {
    background: var(--accent-dark);
    color: white;
}

.hero-content {
    padding-top: 86px;
    text-align: center;
}

.kicker {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(159, 79, 47, .22);
    border-radius: 999px;
    background: rgba(255, 250, 242, .7);
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1,
.simple-header h1,
.reader-title h1 {
    margin: 0;
    letter-spacing: -.055em;
    line-height: 1.04;
}

.hero-content h1 {
    max-width: 920px;
    margin: 0 auto;
    font-size: clamp(42px, 7vw, 86px);
}

.hero-content p {
    max-width: 740px;
    margin: 24px auto 32px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.hero-search {
    display: flex;
    max-width: 760px;
    margin: 0 auto;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 250, 242, .9);
    box-shadow: var(--shadow);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    padding: 0 22px;
    background: transparent;
    color: var(--ink);
    font-size: 16px;
}

.hero-search button {
    border: 0;
    border-radius: 999px;
    padding: 15px 28px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    font-weight: 900;
    cursor: pointer;
}

.page-shell {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 28px;
    padding: 0 min(4vw, 32px) 60px;
}

.glass-card,
.article-card,
.empty,
.reader-card,
.about-card,
.archive-year {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 250, 242, .86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.filters {
    min-width: 0;
}

.glass-card {
    position: sticky;
    top: 22px;
    padding: 22px;
}

.glass-card h2 {
    margin: 0 0 18px;
    font-size: 20px;
}

.year-pill {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 11px 13px;
    border-radius: 16px;
    color: var(--muted);
}

.year-pill.active,
.year-pill:hover {
    background: #ead8c2;
    color: var(--accent-dark);
}

.year-pill em {
    font-style: normal;
    opacity: .72;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-head span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.section-head h2 {
    margin: 4px 0 0;
    font-size: 30px;
    letter-spacing: -.035em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.article-card {
    transition: transform .2s ease, box-shadow .2s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 90px rgba(64, 42, 24, .2);
}

.article-card a {
    display: flex;
    min-height: 238px;
    flex-direction: column;
    padding: 26px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.card-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f0dfc9;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 800;
}

.article-card h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.35;
    letter-spacing: -.025em;
}

.article-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.8;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.empty {
    padding: 54px;
    color: var(--muted);
    text-align: center;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.pagination a {
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--paper);
    color: var(--accent-dark);
    font-weight: 800;
}

.simple-header {
    padding: 48px min(5vw, 42px) 28px;
}

.simple-header h1 {
    margin-top: 26px;
    font-size: clamp(42px, 7vw, 76px);
}

.simple-header p {
    max-width: 720px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.archive-shell,
.about-card {
    padding: 0 min(5vw, 42px) 70px;
}

.archive-year {
    margin-bottom: 24px;
    padding: 26px;
}

.archive-year h2 {
    margin: 0 0 18px;
    color: var(--accent-dark);
    font-size: 28px;
}

.archive-year h2 span {
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
}

.archive-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}

.archive-list a {
    display: grid;
    grid-template-columns: 1fr 70px;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.archive-list time,
.archive-list em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.side-title {
    margin-top: 24px !important;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f0dfc9;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 800;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    font-weight: 900;
}

.button-link.ghost {
    background: #f0dfc9;
    color: var(--accent-dark);
}

.admin-panel {
    max-width: 820px;
    margin: 48px auto;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 250, 242, .9);
    box-shadow: var(--shadow);
}

.admin-panel.wide {
    max-width: 1120px;
}

.admin-panel h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 56px);
    letter-spacing: -.045em;
}

.source-form {
    display: grid;
    grid-template-columns: 1fr 2fr 140px;
    gap: 12px;
    margin: 24px 0;
}

.source-form input,
.source-form select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 14px;
    background: #fffaf2;
    color: var(--ink);
}

.source-form input[name="note"] {
    grid-column: span 2;
}

.source-form button,
.source-item button {
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    background: var(--accent-dark);
    color: white;
    font-weight: 800;
    cursor: pointer;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 30px;
}

.source-list {
    display: grid;
    gap: 12px;
}

.source-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.45);
}

.source-item p {
    margin: 6px 0 0;
    color: var(--muted);
    word-break: break-all;
}

.about-card {
    max-width: 820px;
    margin-bottom: 70px;
    padding: 34px;
    line-height: 1.9;
}

.reader-page {
    background:
        linear-gradient(180deg, rgba(255, 248, 237, .96), rgba(244, 234, 223, .96)),
        radial-gradient(circle at 10% 0%, rgba(216, 161, 95, .22), transparent 26rem);
}

.reader-header {
    padding: 26px min(5vw, 46px) 22px;
}

.reader-header nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.reader-title {
    max-width: 980px;
    margin: 42px auto 0;
    text-align: left;
}

.reader-title span {
    color: var(--accent);
    font-weight: 900;
}

.reader-title h1 {
    max-width: 860px;
    margin-top: 14px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.12;
}

.reader-title p {
    color: var(--muted);
    line-height: 1.7;
}

.reader-shell {
    padding: 0 min(5vw, 46px) 70px;
}

.reader-shell-pro {
    max-width: 1180px;
    margin: 0 auto;
}

.reader-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) 320px;
    gap: 30px;
    align-items: start;
}

.reader-main {
    min-width: 0;
}

.reader-sidebar {
    position: sticky;
    top: 22px;
    display: grid;
    gap: 14px;
}

.side-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    background: rgba(255, 250, 242, .84);
    box-shadow: 0 14px 44px rgba(64, 42, 24, .08);
}

.side-card h2 {
    margin: 0 0 14px;
    color: var(--accent-dark);
    font-size: 18px;
    letter-spacing: -.02em;
}

.meta-card dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.meta-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.meta-card dl div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.meta-card dt {
    color: var(--muted);
    font-size: 13px;
}

.meta-card dd {
    margin: 0;
    color: var(--accent-dark);
    font-weight: 800;
    text-align: right;
}

.sidebar-tags {
    margin: 0;
}

.side-category-list {
    display: grid;
    gap: 8px;
}

.side-category-list a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    color: var(--muted);
}

.side-category-list a.active,
.side-category-list a:hover {
    background: #f0dfc9;
    color: var(--accent-dark);
}

.side-category-list span {
    line-height: 1.35;
}

.side-category-list em {
    font-style: normal;
    font-size: 12px;
    opacity: .75;
}

.quote-side blockquote {
    margin: 0 0 12px;
    padding: 14px 14px 14px 16px;
    border-left: 3px solid var(--gold);
    border-radius: 14px;
    background: rgba(244, 223, 194, .52);
    color: #4b2b1b;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.75;
}

.quote-side blockquote:last-child {
    margin-bottom: 0;
}

.related-side {
    display: grid;
    gap: 10px;
}

.related-side a {
    display: block;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.related-side h2 + a {
    border-top: 0;
    padding-top: 0;
}

.related-side strong {
    display: block;
    color: var(--accent-dark);
    font-size: 15px;
    line-height: 1.55;
}

.related-side em {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.site-footer {
    margin-top: 56px;
    border-top: 1px solid rgba(255, 250, 242, .12);
    background:
        radial-gradient(circle at 12% 0%, rgba(216, 161, 95, .18), transparent 22rem),
        linear-gradient(135deg, #321d13, #5c2e1d 58%, #7a3f25);
    color: rgba(255, 250, 242, .78);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(140px, .4fr) minmax(140px, .4fr) minmax(170px, .48fr) minmax(220px, .58fr);
    gap: 34px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 46px min(4vw, 32px) 34px;
}

.footer-logo {
    display: block;
    margin-bottom: 12px;
    color: #fff7e8;
    font-size: 24px;
    font-weight: 950;
    letter-spacing: .02em;
}

.footer-inner p {
    margin: 0;
    line-height: 1.8;
}

.footer-brand p {
    max-width: 560px;
}

.footer-meta {
    margin-top: 14px !important;
    color: rgba(255, 220, 172, .92);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
}

.footer-nav h2,
.footer-contact h2,
.footer-keywords h2 {
    margin: 0 0 14px;
    color: #fff7e8;
    font-size: 15px;
}

.footer-nav a,
.footer-contact a,
.footer-keywords a {
    display: block;
    width: fit-content;
    margin-bottom: 10px;
    color: rgba(255, 250, 242, .78);
    font-size: 14px;
}

.footer-nav a:hover,
.footer-contact a:hover,
.footer-keywords a:hover {
    color: #fff7e8;
}

.footer-contact p {
    margin-bottom: 10px;
    color: rgba(255, 250, 242, .78);
    font-size: 14px;
}

.footer-keywords {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
}

.footer-keywords h2 {
    flex-basis: 100%;
}

.footer-keywords a {
    margin-bottom: 0;
    padding: 7px 10px;
    border: 1px solid rgba(255, 250, 242, .14);
    border-radius: 999px;
    background: rgba(255, 250, 242, .08);
    font-size: 13px;
}

.footer-bottom {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 8px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 250, 242, .14);
    font-size: 14px;
}

.footer-bottom a {
    color: #fff7e8;
    font-weight: 900;
}

.reader-discovery,
.quote-panel,
.related-panel {
    max-width: 980px;
    margin: 0 auto 22px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 250, 242, .78);
    box-shadow: 0 18px 60px rgba(64, 42, 24, .1);
}

.discovery-head,
.quote-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.discovery-head span,
.quote-head span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.discovery-head h2,
.quote-head h2 {
    margin: 4px 0 0;
    color: var(--accent-dark);
    font-size: 24px;
    letter-spacing: -.03em;
}

.discovery-head a {
    padding: 10px 14px;
    border-radius: 999px;
    background: #f0dfc9;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.category-strip a {
    display: flex;
    min-height: 82px;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .42);
    color: var(--accent-dark);
}

.category-strip a.active,
.category-strip a:hover {
    background: linear-gradient(135deg, #f0dfc9, #fff5e6);
    border-color: rgba(159, 79, 47, .28);
}

.category-strip strong {
    line-height: 1.35;
}

.category-strip em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.reader-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 840px;
    margin: 0 auto 18px;
}

.reader-tools div {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 250, 242, .72);
}

.reader-tools strong {
    display: block;
    margin-bottom: 6px;
    color: var(--accent-dark);
    font-size: 13px;
}

.reader-tools span {
    color: var(--muted);
    line-height: 1.6;
}

.reader-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 840px;
    margin: 0 auto 18px;
}

.reader-tags a {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f0dfc9;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 800;
}

.reader-summary,
.copyright-note {
    max-width: 840px;
    margin: 0 auto 22px;
    padding: 20px 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 250, 242, .72);
    color: var(--muted);
    line-height: 1.8;
}

.quote-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.quote-grid blockquote {
    position: relative;
    margin: 0;
    padding: 22px 22px 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, #fff7e9, #f4dfc2);
    color: #4b2b1b;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.9;
}

.quote-grid blockquote::before {
    content: "“";
    position: absolute;
    top: -10px;
    left: 12px;
    color: rgba(159, 79, 47, .22);
    font-family: Georgia, serif;
    font-size: 58px;
    line-height: 1;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.related-grid a {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, .44);
}

.related-grid strong {
    color: var(--accent-dark);
    font-size: 18px;
    line-height: 1.45;
}

.related-grid p {
    flex: 1;
    margin: 12px 0;
    color: var(--muted);
    line-height: 1.7;
}

.related-grid em {
    color: var(--accent);
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
}

.reader-summary.compact,
.copyright-note.compact {
    max-width: none;
    margin: 0 0 18px;
    padding: 18px 20px;
    box-shadow: none;
}

.reader-summary strong,
.copyright-note h2 {
    display: block;
    margin: 0 0 8px;
    color: var(--accent-dark);
}

.reader-summary p,
.copyright-note p {
    margin: 0 0 8px;
}

.copyright-note a,
.legal-content a,
.about-card a,
.reader-title a {
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.reader-card {
    max-width: none;
    margin: 0;
    padding: clamp(34px, 5vw, 64px);
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 250, 242, .94);
    box-shadow: 0 24px 70px rgba(64, 42, 24, .12);
}

.reader-card p {
    margin: 0 0 1.25em;
    font-size: 20px;
    line-height: 2.08;
    letter-spacing: .01em;
    text-align: justify;
    overflow-wrap: anywhere;
}

.legal-content h2 {
    margin-top: 26px;
    color: var(--accent-dark);
}

.notice {
    margin-bottom: 24px;
    padding: 14px 16px;
    border-left: 4px solid var(--gold);
    border-radius: 12px;
    background: #fff2d8;
    color: var(--accent-dark);
}

.reader-nav {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    max-width: none;
    margin: 22px 0 0;
}

.reader-nav a {
    max-width: 48%;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 250, 242, .75);
    color: var(--accent-dark);
}

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

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

    .reader-sidebar {
        position: static;
        order: 2;
    }

    .glass-card {
        position: static;
    }

    .cards,
    .archive-list {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .reader-tools {
        grid-template-columns: 1fr;
    }

    .category-strip,
    .quote-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .source-form {
        grid-template-columns: 1fr;
    }

    .source-form input[name="note"] {
        grid-column: auto;
    }

    .source-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .site-hero {
        min-height: auto;
        padding-left: 18px;
        padding-right: 18px;
    }

    .topbar,
    .section-head,
    .reader-nav,
    .footer-bottom,
    .discovery-head,
    .quote-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-content {
        padding-top: 58px;
    }

    .hero-search {
        border-radius: 26px;
        flex-direction: column;
    }

    .hero-search input {
        padding: 16px;
    }

    .archive-list a {
        grid-template-columns: 1fr;
    }

    .reader-nav a {
        max-width: 100%;
    }
}
