:root {
  --paper: #fff;
  --ground: #f7fafc;
  --ink: #1c252c;
  --sea: #17445b;
  --muted: #5b6b76;
  --line: #dce5eb;
  --teal: #237b71;
  --blue: #326c9b;
  --purple: #765590;
  --danger: #a03535;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --reading: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.65; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: var(--sea); text-underline-offset: 4px; overflow-wrap: anywhere; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #397ea7; outline-offset: 4px; }
svg { flex-shrink: 0; width: 20px; height: 20px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.4; font-weight: 650; letter-spacing: -.025em; }
h2 { font-size: 22px; line-height: 1.5; }
h3 { font-size: 18px; line-height: 1.6; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 20; padding: 10px 18px; background: var(--sea); color: white; }
.skip-link:focus { top: 12px; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1240px; min-height: 88px; margin: auto; padding: 16px 40px; display: flex; align-items: center; gap: 40px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--sea); text-decoration: none; font-size: 20px; font-weight: 650; line-height: 1.35; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .12em; }
.section-nav { display: flex; gap: 28px; align-self: stretch; align-items: center; }
.section-nav a { color: var(--muted); text-decoration: none; position: relative; padding: 10px 0; font-size: 15px; white-space: nowrap; }
.section-nav a::after { content: ""; position: absolute; bottom: 2px; left: 0; right: 0; height: 3px; background: transparent; }
.section-nav a[aria-current="page"] { color: var(--sea); font-weight: 600; }
.section-nav a[data-section="chinese"][aria-current]::after { background: var(--teal); }
.section-nav a[data-section="english"][aria-current]::after { background: var(--blue); }
.section-nav a[data-section="selected"][aria-current]::after { background: var(--purple); }
.account { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.account-name { max-width: 130px; overflow-wrap: anywhere; }
.main { max-width: 1240px; min-height: calc(100vh - 174px); margin: auto; padding: 38px 40px 70px; }
.site-footer { max-width: 1160px; margin: auto; padding: 22px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading p { color: var(--muted); margin-top: 10px; max-width: 70ch; }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; font-size: 14px; color: var(--muted); }
.breadcrumb a { text-decoration: none; }
.breadcrumb svg { width: 14px; height: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--sea); text-decoration: none; font-size: 14px; line-height: 1.5; min-height: 42px; }
.button:hover { background: #edf3f7; text-decoration: none; }
.button.primary { background: var(--sea); border-color: var(--sea); color: #fff; }
.button.primary:hover { background: #10374b; }
.button.quiet { padding: 6px 10px; min-height: 34px; background: transparent; }
.button.link-button { border: 0; padding-left: 0; padding-right: 0; background: transparent; text-decoration: underline; }
.icon-button { width: 42px; height: 42px; display: inline-flex; justify-content: center; align-items: center; background: transparent; border: 1px solid var(--line); border-radius: 6px; color: var(--sea); }
.icon-button:hover { background: #edf3f7; }
.section-entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 36px; }
.section-entry { --accent: var(--sea); position: relative; display: flex; flex-direction: column; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 32px 28px 26px; min-height: 296px; text-decoration: none; color: var(--ink); }
.section-entry::before { content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 3px; background: var(--accent); }
.section-entry:hover { border-color: var(--accent); text-decoration: none; }
.section-entry.chinese { --accent: var(--teal); }
.section-entry.english { --accent: var(--blue); }
.section-entry.selected { --accent: var(--purple); }
.section-entry h2 { font-size: 26px; color: var(--sea); margin: 12px 0 8px; }
.section-entry .entry-icon { width: 28px; height: 28px; color: var(--accent); }
.section-entry p { color: var(--muted); font-size: 14px; }
.entry-stats { display: flex; gap: 22px; margin: 25px 0 16px; }
.entry-stats strong { color: var(--sea); display: block; font-size: 25px; line-height: 1.3; font-weight: 550; font-variant-numeric: tabular-nums; }
.entry-stats span { color: var(--muted); font-size: 12px; }
.entry-bottom { margin-top: auto; width: 100%; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.home-note { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); max-width: 78ch; margin-top: 28px; font-size: 14px; }
.home-note svg { margin-top: 2px; }
.filters { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; margin-bottom: 26px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.search-field { flex: 1 1 240px; }
input[type="text"], input[type="search"], input[type="password"], select { width: 100%; min-height: 44px; border: 1px solid #b9cbd6; border-radius: 5px; padding: 9px 12px; color: var(--ink); background: var(--paper); font-size: 16px; }
input::placeholder { color: #74848e; }
input[type="search"] { min-width: 0; }
select { max-width: 230px; }
.archive-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; cursor: pointer; font-size: 14px; color: var(--sea); white-space: nowrap; }
.archive-toggle input { accent-color: var(--sea); width: 18px; height: 18px; margin: 0; }
.results-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.day-list { border-top: 1px solid var(--line); }
.day-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 23px 8px; border-bottom: 1px solid var(--line); }
.day-main { display: flex; align-items: center; gap: 17px; text-decoration: none; flex: 1 1 240px; color: var(--ink); }
.date-block { flex-shrink: 0; width: 58px; padding: 7px 0; border-left: 3px solid var(--accent, var(--sea)); padding-left: 13px; line-height: 1.25; }
.date-block strong { font-size: 26px; font-weight: 500; color: var(--sea); display: block; }
.date-block span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.day-date { font-size: 19px; font-weight: 550; }
.day-meta { font-size: 13px; color: var(--muted); margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.day-counts { color: var(--muted); font-size: 14px; min-width: 156px; }
.day-counts strong { color: var(--sea); font-weight: 550; }
.day-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.badge { display: inline-flex; padding: 3px 8px; border-radius: 3px; background: #edf3f7; color: #415b6a; font-size: 12px; line-height: 1.5; font-weight: 400; }
.badge.archive { background: #edf0f2; color: #5b6770; }
.badge.warning { background: #f7eee2; color: #805b2c; }
.badge.success { background: #eaf4f0; color: #296654; }
.section-chinese { --accent: var(--teal); }
.section-english { --accent: var(--blue); }
.section-selected { --accent: var(--purple); }
.section-title { border-left: 3px solid var(--accent); padding-left: 15px; }
.paper-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.paper-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 28px; padding: 28px 8px; border-bottom: 1px solid var(--line); }
.paper-row.is-archived { background: #f1f5f7; }
.paper-heading { border: 0; padding: 0; background: transparent; text-align: left; color: var(--ink); width: 100%; font-family: var(--reading); font-size: 22px; font-weight: 600; line-height: 1.65; overflow-wrap: anywhere; }
.paper-heading:hover { color: var(--sea); text-decoration: underline; text-underline-offset: 5px; }
.original-title { color: var(--muted); font-size: 15px; line-height: 1.65; margin-top: 7px; overflow-wrap: anywhere; }
.paper-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 13px; margin-top: 13px; }
.paper-journal { font-weight: 600; color: #415965; }
.paper-summary { margin-top: 14px; color: #3c4c57; line-height: 1.85; max-width: 74ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.paper-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.paper-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; align-self: start; padding-top: 4px; }
.page-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 60px 24px; max-width: 680px; margin: 0 auto; }
.page-state > svg { width: 32px; height: 32px; color: var(--sea); margin-bottom: 4px; }
.page-state h2 { font-size: 21px; }
.page-state p { color: var(--muted); max-width: 58ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.page-state .button { margin-top: 8px; }
.loading-mark { height: 24px; width: 24px; border: 2px solid var(--line); border-top-color: var(--sea); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inline-error { color: var(--danger); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.info-box { margin: 20px 0; padding: 14px 18px; background: #edf3f7; border-left: 3px solid #7597ad; color: #3b5667; font-size: 14px; overflow-wrap: anywhere; }
.info-box.warning { background: #f8f1e7; border-color: #af854c; color: #75572c; }
.login-layout { max-width: 940px; margin: 60px auto 40px; display: grid; grid-template-columns: 1fr 380px; gap: 80px; align-items: center; }
.login-intro h1 { font-family: var(--reading); font-size: 36px; color: var(--sea); }
.login-intro > p { color: var(--muted); margin-top: 20px; max-width: 33ch; }
.login-sections { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 32px; font-size: 14px; color: var(--sea); }
.login-sections span { border-left: 3px solid var(--accent); padding-left: 10px; }
.login-form { background: var(--paper); padding: 32px; border: 1px solid var(--line); border-radius: 8px; }
.login-form h2 { color: var(--sea); font-size: 21px; margin-bottom: 24px; }
.login-form .field { margin-bottom: 18px; }
.login-form .field label { color: var(--ink); font-size: 14px; }
.login-form .primary { width: 100%; margin-top: 10px; }
.login-note { font-size: 12px; color: var(--muted); margin-top: 16px; }
.reader { position: fixed; inset: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(800px, 78vw); max-width: 100vw; margin: 0; border: 0; border-left: 1px solid var(--line); padding: 0; background: var(--paper); color: var(--ink); box-shadow: -12px 0 50px rgb(23 68 91 / .12); overflow-y: auto; overscroll-behavior: contain; }
.reader::backdrop { background: rgb(22 42 56 / .3); }
body.reader-open { overflow: hidden; }
.reader-toolbar { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 14px; }
.reader-content { padding: 30px 40px 64px; }
.reader-title { font-family: var(--reading); font-size: 26px; font-weight: 600; line-height: 1.65; overflow-wrap: anywhere; }
.reader .original-title { margin-top: 12px; }
.reader .paper-meta { margin-top: 18px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 22px 0; margin-bottom: 5px; border-bottom: 1px solid var(--line); }
.detail-section { padding-top: 28px; }
.detail-section h3 { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; color: var(--sea); font-size: 18px; font-weight: 600; }
.detail-section h3::before { content: ""; width: 3px; height: 16px; background: #7597ad; flex-shrink: 0; }
.prose { line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; }
.prose p + p { margin-top: 14px; }
.prose ul, .prose ol { margin: 0; padding-left: 24px; }
.prose li + li { margin-top: 10px; }
.structured-value { margin: 0; }
.structured-value dt { color: var(--muted); font-size: 14px; margin-top: 14px; }
.structured-value dd { margin: 4px 0 0; }
.detail-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; row-gap: 8px; font-size: 14px; line-height: 1.8; margin: 0; overflow-wrap: anywhere; }
.detail-meta dt { color: var(--muted); }
.detail-meta dd { margin: 0; }
.source-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.status-list h3 { font-size: 16px; }
.status-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 7px; color: var(--muted); font-size: 14px; }
.notice { position: fixed; z-index: 5; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--sea); color: #fff; padding: 13px 16px 13px 20px; border-radius: 8px; box-shadow: 0 6px 24px rgb(23 68 91 / .2); display: flex; align-items: center; gap: 16px; width: max-content; max-width: calc(100vw - 32px); font-size: 14px; }
.notice button { color: #fff; background: transparent; border: 0; padding: 5px 6px; text-decoration: underline; min-height: 34px; flex-shrink: 0; font-size: 14px; }
.notice .notice-close { text-decoration: none; display: flex; align-items: center; }
.no-script { max-width: 700px; margin: 30px auto; padding: 20px; border: 1px solid var(--line); }
@media (min-width: 1500px) { .main { max-width: 1300px; } .header-inner { max-width: 1300px; } .site-footer { max-width: 1220px; } }
@media (max-width: 1000px) {
  .header-inner { gap: 24px; padding: 16px 28px; }
  .section-nav { gap: 20px; }
  .main { padding: 30px 28px 60px; }
  .site-footer { margin: 0 28px; }
  .section-entries { gap: 16px; }
  .section-entry { padding: 26px 22px 22px; }
  .section-entry::before { left: 22px; right: 22px; }
  .login-layout { gap: 45px; }
  .account-name { display: none; }
}
@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 8px 18px; padding: 16px 20px 0; }
  .brand { font-size: 18px; }
  .brand-mark { width: 30px; height: 30px; }
  .account { padding-bottom: 12px; }
  .section-nav { order: 3; width: 100%; gap: 28px; min-height: 50px; }
  .section-nav a { font-size: 14px; }
  .header-inner:has(.section-nav[hidden]) { padding-bottom: 16px; }
  .main { padding: 27px 20px 48px; }
  .page-heading { flex-direction: column; gap: 14px; margin-bottom: 22px; }
  .page-heading p { font-size: 14px; }
  .heading-actions { padding: 0; }
  .section-entries { grid-template-columns: 1fr; gap: 18px; margin-top: 26px; }
  .section-entry { min-height: 0; padding: 24px; }
  .section-entry h2 { font-size: 23px; margin-top: 0; }
  .section-entry .entry-icon { position: absolute; right: 24px; top: 28px; }
  .entry-stats { margin-top: 20px; }
  .entry-bottom { padding-top: 14px; }
  .filters { padding: 15px; gap: 14px 10px; }
  .search-field { flex-basis: calc(100% - 78px); }
  .filter-select { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .filter-select select { max-width: none; }
  .archive-toggle { min-height: 34px; }
  .day-row { gap: 12px; padding: 20px 0; }
  .day-main { flex-basis: 100%; }
  .day-counts { margin-left: 75px; min-width: 0; flex: 1; }
  .day-actions { width: 100%; padding-left: 75px; justify-content: flex-start; }
  .day-actions .button { padding: 7px 12px; }
  .paper-row { grid-template-columns: 1fr; padding: 23px 0; gap: 17px; }
  .paper-heading { font-size: 21px; }
  .paper-actions { flex-direction: row; padding: 0; flex-wrap: wrap; }
  .paper-actions .button { min-height: 40px; }
  .site-footer { margin: 0 20px; flex-direction: column; gap: 4px; }
  .login-layout { grid-template-columns: 1fr; gap: 30px; margin: 22px auto; max-width: 440px; }
  .login-intro h1 { font-size: 30px; }
  .login-intro > p { margin-top: 14px; max-width: none; }
  .login-sections { margin-top: 20px; gap: 18px; }
  .login-form { padding: 25px; }
  .reader { width: 100%; border: 0; }
  .reader-toolbar { padding: 12px 20px; }
  .reader-content { padding: 24px 22px 48px; }
  .reader-title { font-size: 24px; }
  .detail-meta { column-gap: 14px; }
  .notice { bottom: 16px; gap: 10px; padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { .loading-mark { animation: none; } }
