/* A reading edition of the shared paper palette. No shared app layout overrides. */
@font-face {
  font-family: 'Chu Hand';
  src: url('./assets/longcang-theme-v2.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  --theme-paper: #f8f4eb;
  --theme-surface: #fffcf5;
  --theme-ink: #30392e;
  --theme-muted: #756e5e;
  --theme-sage: #58725f;
  --theme-ochre: #b38c45;
  --theme-line: #b7ac8d55;
  --theme-wash: #e9ebdf70;
  --theme-body: 'Noto Serif SC', 'Songti SC', SimSun, serif;
  --theme-hand: 'Chu Hand', 'Kaiti SC', KaiTi, var(--theme-body);
  --theme-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-family: var(--theme-body);
  color: var(--theme-ink);
  background: var(--theme-paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { position: relative; isolation: isolate; min-height: 100vh; margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex='-1']:focus-visible {
  outline: 2px solid var(--theme-sage); outline-offset: 5px; border-radius: 2px;
}
[hidden] { display: none !important; }
.theme-botanical-paper {
  position: absolute; z-index: -1; inset: 0 0 auto; height: 600px;
  background: url('./assets/discover-botanical-paper-v1.webp') center top / max(100%, 1000px) auto no-repeat;
  opacity: .63; pointer-events: none;
  mask-image: linear-gradient(#000 0%, #000 42%, transparent 100%);
}
.skip-link { position: fixed; z-index: 5; top: 8px; left: 12px; padding: 12px; background: var(--theme-surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.page-header-inner { position: relative; width: min(100%, 1040px); margin: auto; padding: 24px 28px 22px; min-height: 112px; }
.brand { display: flex; width: 124px; min-height: 58px; margin: 0 auto; flex-direction: column; align-items: center; text-decoration: none; }
.brand img { width: 124px; height: 44px; object-fit: contain; }
.brand-fallback { font: 400 23px/44px var(--theme-hand); }
.brand-latin { margin-top: 2px; color: #666b57; font: 500 9px/1.3 Arial, sans-serif; letter-spacing: .28em; text-indent: .28em; }
.header-link { position: absolute; top: 28px; left: 28px; display: inline-flex; align-items: center; min-height: 44px; font: 12px/1.5 var(--theme-ui); text-decoration: none; }
.header-link:hover, .back-link:hover { color: var(--theme-sage); text-decoration: underline; }
main { max-width: 1040px; margin: auto; padding: 0 36px 64px; }
#theme-content { overflow-wrap: anywhere; }
.status { max-width: 760px; margin: 24px auto; color: var(--theme-muted); font: 14px/1.9 var(--theme-ui); }
.status:empty { display: none; }
.status[data-state='error'] { padding-left: 14px; border-left: 2px solid var(--theme-ochre); }
.eyebrow, .chapter-number { color: var(--theme-sage); font: 500 11px/1.8 var(--theme-ui); letter-spacing: .1em; }
.eyebrow { margin: 0 0 14px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font: 400 clamp(38px, 5.8vw, 58px)/1.35 var(--theme-hand); letter-spacing: .015em; margin-bottom: 18px; text-wrap: balance; }
h2 { font: 400 32px/1.4 var(--theme-hand); margin-bottom: 18px; }
h3 { font: 500 17px/1.7 var(--theme-body); }
p { line-height: 1.95; }
.intro { max-width: 38em; margin: 0 auto; color: var(--theme-muted); font-size: 15px; line-height: 2; white-space: pre-wrap; }
.theme-list-heading { text-align: center; padding: 26px 20px 46px; }
.theme-list-heading h1 { margin-bottom: 12px; }
.theme-list-heading .intro { max-width: 28em; font-size: 14px; }
.theme-list { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--theme-line); }
.theme-card { border-bottom: 1px solid var(--theme-line); }
.theme-card > a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 32px 8px; text-decoration: none; }
.theme-card h2 { margin-bottom: 12px; font-size: 32px; }
.theme-card p { margin-bottom: 12px; }
.theme-card .theme-card-intro { max-width: 42em; font-size: 14px; color: var(--theme-muted); }
.theme-card .eyebrow { margin-bottom: 10px; }
.theme-card .theme-card-meta { margin: 0; font: 12px/1.8 var(--theme-ui); color: var(--theme-muted); }
.theme-card-read { display: flex; align-items: center; min-height: 44px; color: var(--theme-sage); font: 12px/1.8 var(--theme-ui); white-space: nowrap; }
.theme-card > a:hover h2 { color: var(--theme-sage); }
.theme-card > a:hover .theme-card-read { text-decoration: underline; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; margin: 0 0 8px; color: var(--theme-muted); font: 12px/1.8 var(--theme-ui); text-decoration: none; }
.theme-hero { max-width: 800px; margin: 0 auto; padding: 12px 20px 34px; text-align: center; border-bottom: 1px solid var(--theme-line); }
.theme-hero h1 { max-width: 15em; margin-inline: auto; }
.theme-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 24px; color: var(--theme-muted); font: 12px/1.8 var(--theme-ui); }
.theme-questions { max-width: 44em; margin: 22px auto 0; color: var(--theme-sage); font: 13px/1.9 var(--theme-body); }
.chapter-directory { max-width: 760px; margin: 30px auto 44px; }
.chapter-directory h2 { margin: 0 0 8px; color: var(--theme-muted); font: 500 12px/1.8 var(--theme-ui); letter-spacing: .1em; }
.chapter-directory ol { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; margin: 0; padding: 0; }
.chapter-directory a { display: flex; gap: 14px; align-items: baseline; min-height: 44px; padding: 10px 0; font-size: 13px; line-height: 1.85; text-decoration: none; }
.chapter-directory a span { flex: 0 0 2em; color: var(--theme-ochre); font: 12px/1.9 var(--theme-ui); }
.chapter-directory a:hover { color: var(--theme-sage); text-decoration: underline; }
.story { max-width: 760px; margin: 0 auto; }
.chapter { position: relative; padding: 28px 0 38px; border-top: 1px solid var(--theme-line); scroll-margin-top: 28px; }
.chapter-number { margin: 0 0 12px; }
.chapter-region:not(:empty)::before { content: ' · '; }
.chapter-body { margin: 0 0 28px; white-space: pre-wrap; font-size: 17px; line-height: 2.1; letter-spacing: .025em; }
.claim-list { border-top: 1px solid var(--theme-line); background: var(--theme-wash); }
details > summary { cursor: pointer; }
.claim-item { border-bottom: 1px solid var(--theme-line); }
.claim-item > summary { min-height: 48px; padding: 13px 16px; font: 13px/1.8 var(--theme-ui); color: var(--theme-sage); }
.claim-sources { padding: 0 16px 10px; }
.chapter-source { margin-top: 14px; }
.chapter-source > summary { min-height: 44px; padding: 10px 0; color: var(--theme-sage); font: 13px/1.8 var(--theme-ui); }
.source-row { padding: 14px 0; border-top: 1px solid var(--theme-line); }
.source-row strong { display: block; font: 500 13px/1.8 var(--theme-ui); }
.source-row p { margin: 5px 0 0; color: var(--theme-muted); font: 13px/1.9 var(--theme-ui); }
.source-row .adopted-mark { color: var(--theme-sage); font-weight: 600; }
.story-link { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; color: var(--theme-sage); font: 13px/1.8 var(--theme-ui); }
.chapter-contribute { margin: 10px 0 0; }
.closing { max-width: 760px; margin: 4px auto 44px; padding: 20px 24px; border-left: 2px solid var(--theme-ochre); font-size: 16px; white-space: pre-wrap; }
.expand { max-width: 760px; margin: 4px auto 0; border-top: 1px solid var(--theme-line); }
.expand > details { border-bottom: 1px solid var(--theme-line); }
.expand > details > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; padding: 16px 0; font: 500 16px/1.8 var(--theme-body); }
.expand > details > summary::-webkit-details-marker { display: none; }
.expand > details > summary::after { content: '展开 ＋'; color: var(--theme-sage); font: 12px/1.8 var(--theme-ui); white-space: nowrap; }
.expand > details[open] > summary::after { content: '收起 −'; }
.expand-body { padding: 0 0 24px; }
.expand-help { margin: 12px 0; color: var(--theme-muted); font: 12px/1.9 var(--theme-ui); }
.timeline { display: grid; gap: 22px; margin: 26px 0 8px 8px; padding-left: 24px; border-left: 1px solid var(--theme-ochre); }
.timeline-item { position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -29px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--theme-sage); }
.timeline-item strong { font-size: 14px; font-weight: 500; }
.timeline-item p { margin: 4px 0 0; font: 13px/1.9 var(--theme-ui); color: var(--theme-muted); }
.map-box { position: relative; aspect-ratio: 2.2 / 1; min-height: 260px; margin-top: 20px; border: 1px solid var(--theme-line); background-color: var(--theme-wash); background-image: linear-gradient(90deg, var(--theme-line) 1px, transparent 1px), linear-gradient(var(--theme-line) 1px, transparent 1px); background-size: 25% 25%; }
.map-point { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; min-width: 34px; min-height: 34px; border-radius: 50%; background: var(--theme-sage); color: var(--theme-surface); border: 2px solid var(--theme-surface); font: 600 12px/1.5 var(--theme-ui); }
.map-label { position: absolute; transform: translate(-50%, 20px); max-width: 145px; padding: 3px 6px; background: var(--theme-surface); color: var(--theme-ink); font: 11px/1.6 var(--theme-ui); text-align: center; }
.chain-list { list-style: none; display: grid; gap: 12px; margin: 20px 0; padding: 0; }
.chain-list li { border-left: 2px solid var(--theme-ochre); padding: 6px 14px; }
.chain-list strong { font-size: 14px; font-weight: 500; }
.chain-list small { display: block; margin-top: 5px; color: var(--theme-muted); font: 12px/1.8 var(--theme-ui); }
.relation-heading { margin-top: 28px; }
.relation-row { padding: 18px 0; border-top: 1px solid var(--theme-line); font: 13px/1.9 var(--theme-ui); }
.relation-row p { margin: 8px 0; }
.relation-row > small { color: var(--theme-muted); }
.theme-empty { max-width: 640px; margin: 12px auto 60px; padding: 28px 20px; border-top: 1px solid var(--theme-line); text-align: center; }
.theme-empty-art { display: block; width: 112px; height: 112px; object-fit: contain; margin: 0 auto 16px; }
.theme-empty h1, .theme-empty h2 { font-size: 32px; margin-bottom: 14px; }
.theme-empty p { max-width: 30em; margin: 0 auto 18px; color: var(--theme-muted); font-size: 14px; }
.theme-empty-actions { display: flex; flex-wrap: wrap; gap: 12px 22px; justify-content: center; }
.theme-empty-actions a, .theme-empty-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; color: var(--theme-sage); font: 13px/1.8 var(--theme-ui); }
.theme-empty-actions button { border: 1px solid var(--theme-sage); border-radius: 3px; background: transparent; }
.page-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; max-width: 760px; margin: 0 auto; padding: 20px 24px 36px; color: var(--theme-muted); font: 11px/1.8 var(--theme-ui); }
body > footer:has(#content-effects-choice) { text-align: center; padding: 0 20px 24px; }
#content-effects-choice { margin: 0 !important; padding: 10px 12px !important; border: 0 !important; border-radius: 2px !important; background: transparent !important; color: var(--theme-muted) !important; font: 12px/1.8 var(--theme-ui); text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 1100px) {
  .chapter-number { position: absolute; left: -92px; top: 31px; width: 72px; }
  .chapter-region { display: block; margin-top: 3px; }
  .chapter-region::before { content: none !important; }
}
@media (max-width: 600px) {
  .theme-botanical-paper { height: 480px; background-size: 870px auto; opacity: .48; }
  .page-header-inner { padding: 62px 20px 18px; min-height: 132px; }
  .header-link { top: 12px; left: 20px; }
  .brand, .brand img { width: 116px; }
  .brand img { height: 42px; }
  main { padding: 0 24px 38px; }
  .theme-list-heading { padding: 16px 0 30px; }
  .theme-list-heading .intro { font-size: 13px; }
  .theme-card > a { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 26px 0 16px; }
  .theme-card h2 { font-size: 30px; }
  .theme-card-read { justify-self: end; }
  .theme-hero { padding: 12px 0 28px; }
  .theme-hero .intro { font-size: 14px; }
  .theme-meta { gap: 6px 16px; margin-top: 20px; }
  .chapter-directory { margin: 26px 0 28px; }
  .chapter-directory ol { grid-template-columns: minmax(0, 1fr); }
  .chapter { padding: 24px 0 30px; }
  .chapter h2 { font-size: 30px; }
  .chapter-body { font-size: 16px; line-height: 2.1; letter-spacing: .015em; }
  .claim-item > summary { padding: 12px; }
  .claim-sources { padding-inline: 12px; }
  .map-box { aspect-ratio: 1.25 / 1; }
  .map-label { font-size: 10px; max-width: 90px; }
  .closing { padding: 16px 18px; font-size: 15px; }
  .theme-empty { padding-inline: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
