:root {
  color-scheme: light;
  --ink: #27231f;
  --muted: #756d65;
  --paper: #f6f0e8;
  --panel: rgba(255, 252, 247, 0.94);
  --line: #e3d8cb;
  --brand: #356f77;
  --brand-dark: #24525a;
  --accent: #d89045;
  --accent-bg: #fff0d8;
  --green-bg: #e9f5eb;
  --shadow: 0 18px 45px rgba(81, 53, 31, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-width: 0; width: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at top right, rgba(117, 178, 183, 0.2), transparent 34rem), var(--paper); }
a { color: inherit; }
.reading-site { width: min(100%, 1180px); margin: 0 auto; padding: 28px 24px 64px; }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.hero h1 { max-width: 780px; margin: 0; font-family: Georgia, "Times New Roman", "Noto Serif SC", serif; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.1; letter-spacing: -0.03em; }
.hero p:not(.eyebrow) { margin: 12px 0 0; color: var(--muted); line-height: 1.7; }
.badge { flex: 0 0 auto; padding: 9px 13px; border: 1px solid #a9c5c6; border-radius: 999px; color: var(--brand-dark); background: #f3fbfb; font-size: 0.84rem; font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.panel { min-width: 0; margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: var(--shadow); }
.panel h2 { margin: 0; font-family: Georgia, "Times New Roman", "Noto Serif SC", serif; }
.loading, .error { padding: 48px 28px; text-align: center; }
.error { border-color: rgba(179, 65, 60, 0.35); }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 0.88rem; }
.intro-panel { max-width: 860px; }
.intro-panel p:last-child, .set-description { color: var(--muted); line-height: 1.75; }
.set-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.set-card { display: flex; flex-direction: column; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.set-card h2 { margin: 0; font-family: Georgia, "Times New Roman", "Noto Serif SC", serif; font-size: 1.65rem; }
.set-description { min-height: 3.5em; margin: 10px 0 0; }
.set-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0; }
.set-stats div { padding: 10px; border-radius: 12px; background: #fffefa; text-align: center; }
.set-stats dt { color: var(--muted); font-size: 0.75rem; }
.set-stats dd { margin: 5px 0 0; color: var(--brand-dark); font-size: 1.3rem; font-weight: 800; }
.primary-link, .secondary-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; padding: 10px 14px; border-radius: 11px; font-size: 0.88rem; font-weight: 800; text-decoration: none; }
.primary-link { border: 1px solid var(--brand); color: #fff; background: var(--brand); }
.primary-link:hover { background: var(--brand-dark); }
.secondary-link { border: 1px solid #a9c5c6; color: var(--brand-dark); background: #f3fbfb; }
.secondary-link:hover { border-color: var(--brand); }
.nav-block + .nav-block { margin-top: 18px; }
.nav-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.84rem; font-weight: 700; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.set-link, .choice-link { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fffefa; font-size: 0.88rem; font-weight: 700; text-decoration: none; }
.set-link.selected, .choice-link.selected { border-color: var(--brand); color: #fff; background: var(--brand); }
.query-warning { margin: -4px 0 18px; padding: 11px 13px; border: 1px solid #e1b66c; border-radius: 12px; color: #79500c; background: var(--accent-bg); font-size: 0.9rem; font-weight: 700; }
.content-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.translation-status { color: #80540c; }
.passage-panel h2, .translation-panel h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
.highlight-note { margin: 12px 0 0; color: var(--muted); font-size: 0.86rem; }
.highlight-note mark { padding: 1px 4px; border-radius: 4px; background: #f8d98d; }
.passage { max-width: 790px; margin: 24px auto 0; font-size: 1.11rem; line-height: 2; }
.passage p { margin: 0 0 1.25em; }
.original-passage { font-family: Georgia, "Times New Roman", serif; letter-spacing: 0.01em; }
.original-passage mark { padding: 0 0.12em; border-radius: 3px; color: inherit; background: linear-gradient(transparent 40%, #f8d98d 40%, #f8d98d 94%, transparent 94%); font-weight: 700; }
.translation-panel { background: rgba(255, 250, 240, 0.96); }
.empty-note { padding: 16px; border-left: 4px solid #d2b39f; color: var(--muted); background: rgba(255, 254, 250, 0.8); }
.vocabulary-only-panel { border-left: 4px solid #3d8b5d; background: rgba(233, 245, 235, 0.72); }
.vocabulary-only-panel h2 { max-width: 760px; font-size: clamp(1.35rem, 2.6vw, 1.85rem); line-height: 1.4; }
.vocabulary-only-panel p:last-child { margin: 12px 0 0; color: var(--muted); line-height: 1.7; }
.source-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.source-details div { min-width: 0; padding: 10px; border-radius: 11px; background: rgba(246, 240, 232, 0.62); }
.source-details dt { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.source-details dd { margin: 5px 0 0; overflow-wrap: anywhere; color: var(--ink); font-size: 0.82rem; line-height: 1.45; }
.pagination { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: var(--panel); font-size: 0.86rem; }
.pagination a { min-width: 0; color: var(--brand-dark); font-weight: 800; text-decoration: none; }
.pagination a:last-child { text-align: right; }
.pagination span { text-align: center; }
.glossary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.glossary-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fffefa; }
.glossary-card strong { overflow-wrap: anywhere; font-size: 1.08rem; }
.glossary-zh { color: var(--brand-dark); font-weight: 800; text-align: right; }
.part-of-speech { color: var(--brand-dark); font-size: 0.82rem; font-weight: 800; }
.glossary-card p { grid-column: 1 / -1; margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

@media (max-width: 900px) { .set-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .reading-site { padding: 20px 14px 44px; }
  .hero, .section-head { display: block; }
  .hero .badge, .hero-actions { justify-content: flex-start; margin-top: 16px; }
  .set-stats { gap: 6px; }
  .glossary-grid { grid-template-columns: 1fr; }
  .passage { font-size: 1.03rem; line-height: 1.9; }
  .source-details { grid-template-columns: 1fr; }
  .pagination { grid-template-columns: 1fr; text-align: center; }
  .pagination a:last-child { text-align: center; }
}
@media (max-width: 420px) { .panel, .set-card { padding: 16px; border-radius: 16px; } .set-link, .choice-link { flex: 1 1 calc(50% - 8px); justify-content: center; } }
