:root {
  color-scheme: light;
  --paper: #f5f2e9;
  --surface: #fbf9f3;
  --ink: #24271f;
  --muted: #62645a;
  --green: #304637;
  --green-dark: #23392d;
  --green-soft: #e6ebdf;
  --rule: #d7d4c8;
  --gold: #a88a58;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --latin: "Iowan Old Style", "Baskerville", Georgia, serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #7a6940; outline-offset: 4px; }
img { display: block; max-width: 100%; }
.wrap { width: min(100% - 104px, 1216px); margin-inline: auto; }
.sprites, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 4; background: var(--surface); padding: .75rem; transform: translateY(-150%); }
.skip:focus { transform: none; }
.icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .52rem; width: fit-content; }
.brand-mark { width: 48px; height: 48px; flex: 0 0 auto; }
.brand:hover .brand-mark { filter: brightness(1.1); }
.brand strong { display: block; font: 800 1.12rem/1.2 var(--serif); letter-spacing: .13em; white-space: nowrap; }
.brand small { display: block; margin-top: .28rem; font: 700 .62rem/1 var(--latin); letter-spacing: .16em; color: var(--muted); white-space: nowrap; }
nav { height: 100%; display: flex; gap: clamp(1.3rem, 4vw, 3.5rem); align-items: stretch; }
nav a { position: relative; display: grid; place-items: center; white-space: nowrap; font-size: .91rem; color: var(--muted); }
nav a:hover, nav a[aria-current] { color: var(--green-dark); }
nav a[aria-current]::after { content: ""; height: 2px; position: absolute; inset: auto 0 0; background: var(--green); }
.header-search { justify-self: end; display: inline-flex; align-items: center; gap: .55rem; background: transparent; border: 1px solid var(--rule); border-radius: 4px; padding: .59rem .85rem; font-size: .875rem; }
.header-search:hover, .button-secondary:hover { background: var(--green-soft); border-color: #b8c3b0; }

.hero { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.92fr); gap: clamp(2rem, 7vw, 6.5rem); align-items: center; padding-block: clamp(2.25rem, 5vw, 4.5rem); }
.hero-copy { padding-block: 1rem 1.6rem; }
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; margin: 0; color: var(--green); font-size: .81rem; font-weight: 600; letter-spacing: .15em; }
.eyebrow > span { display: inline-block; width: 30px; height: 1px; background: var(--gold); flex: 0 0 auto; }
.eyebrow b { margin-left: .25rem; font: 600 .9rem var(--latin); letter-spacing: .14em; }
h1, h2, h3, p { overflow-wrap: break-word; }
.hero h1 { margin: 1.25rem 0 0; font: 800 clamp(3.45rem, 6.25vw, 6.3rem)/1.14 var(--serif); letter-spacing: -.055em; }
.english-name { margin: .35rem 0 1.65rem; font: italic 400 clamp(2.45rem, 5vw, 5.05rem)/1.09 var(--latin); color: var(--green); letter-spacing: -.045em; }
.hero-intro { max-width: 28rem; color: var(--muted); margin: 0; font-size: clamp(1rem, 1.35vw, 1.12rem); line-height: 1.95; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: 1.9rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 47px; border-radius: 4px; padding: .65rem 1.2rem; font-size: .9rem; font-weight: 600; border: 1px solid transparent; transition: background .16s, border-color .16s; white-space: nowrap; }
.button-primary { background: var(--green); color: #fffdf3; }
.button-primary:hover { background: #425d49; }
.button-secondary { background: transparent; border-color: #c7c7b8; color: var(--green-dark); }
.portrait { margin: 0; padding: .65rem .65rem 0; border: 1px solid #d0ccbd; background: #ebe7db; box-shadow: 6px 7px 0 #e4e0d4; position: relative; }
.portrait-image { background: #2e2d27; position: relative; overflow: hidden; aspect-ratio: 1.12; }
.portrait-image img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; filter: sepia(.23) contrast(1.04); }
.portrait figcaption { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .75rem .25rem; font-size: .81rem; color: #57584b; }
.portrait figcaption span { display: inline-flex; align-items: center; gap: .55rem; }
.portrait figcaption i { width: 14px; height: 1px; background: #98866a; }
.portrait figcaption a:hover { text-decoration: underline; }
.portrait figcaption .icon { width: .85rem; height: .85rem; }

.library { background: #ecefe5; border-block: 1px solid #d9dfd1; padding-block: clamp(2.5rem, 5.3vw, 4.7rem); scroll-margin-top: 1rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.65rem; }
.section-label { font: 700 .81rem/1.25 var(--latin); letter-spacing: .19em; }
.section-head h2 { margin: .55rem 0 .3rem; font: 800 clamp(2.05rem, 3.65vw, 3.55rem)/1.18 var(--serif); letter-spacing: -.025em; }
.section-head p:last-child { color: var(--muted); margin: .62rem 0 0; line-height: 1.65; }
.source-link { display: inline-flex; align-items: center; gap: .4rem; width: fit-content; flex: 0 0 auto; color: var(--green-dark); font-size: .88rem; padding-bottom: .22rem; border-bottom: 1px solid #9ba793; }
.source-link:hover { border-color: currentColor; }
.source-link .icon { width: .9rem; height: .9rem; }
.categories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.75rem; }
.category { display: flex; flex-direction: column; align-items: start; gap: .55rem; text-align: left; min-width: 0; padding: clamp(.8rem, 1.9vw, 1.32rem); background: var(--surface); border: 1px solid #d4d9cb; border-radius: 5px; transition: border-color .16s, background .16s; }
.category:hover, .category[aria-pressed="true"] { border-color: #7a8d76; background: #f1f4ec; }
.category .icon-tile { display: grid; place-items: center; background: var(--green-soft); border-radius: 4px; color: var(--green); width: 35px; height: 35px; margin-bottom: .3rem; }
.category strong { font: 800 1.2rem/1.35 var(--serif); }
.category small { color: var(--muted); font-size: .81rem; line-height: 1.5; }

.catalog { border-top: 1px solid #cfd7c8; padding-top: 1.4rem; scroll-margin-top: 1.25rem; }
.search-box { display: flex; align-items: center; gap: .65rem; min-height: 52px; padding-inline: 1rem; background: var(--surface); border: 1px solid #c2cdbd; border-radius: 4px; color: var(--green); }
.search-box:focus-within { outline: 2px solid #72876e; outline-offset: 2px; }
.search-box input { width: 100%; min-width: 0; height: 50px; border: 0; background: transparent; outline: 0; color: var(--ink); padding: .2rem 0; }
.search-box input::placeholder { color: #676b60; font-size: .94rem; }
.catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-top: 1rem; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter { display: inline-flex; align-items: center; gap: .25rem; padding: .49rem .7rem; border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: .875rem; white-space: nowrap; }
.filter .icon { width: .94rem; height: .94rem; }
.filter:hover { background: #dce5d8; }
.filter[aria-pressed="true"] { background: var(--green); color: #fffdf5; }
#sort { appearance: none; padding: .45rem 1.85rem .45rem .6rem; border: 1px solid #c6cebd; border-radius: 4px; background: linear-gradient(45deg, transparent 50%, var(--green) 50%) right 11px center / 4px 4px no-repeat, linear-gradient(135deg, var(--green) 50%, transparent 50%) right 7px center / 4px 4px no-repeat, var(--surface); color: var(--green-dark); font-size: .875rem; }
.results-count { margin: .95rem 0 .55rem; font-size: .81rem; color: var(--muted); }
.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.entry { background: var(--surface); border: 1px solid #d4d9cb; border-radius: 5px; min-width: 0; display: flex; flex-direction: column; position: relative; transition: border-color .16s; }
.entry:hover { border-color: #899a84; }
.entry-link { padding: 1.12rem 2.65rem 1.1rem 1.05rem; min-height: 100%; display: block; }
.entry-meta { color: #46614d; font-size: .8rem; letter-spacing: .035em; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.entry h3 { margin: .55rem 0 .4rem; font: 800 1.27rem/1.4 var(--serif); }
.entry p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.entry-save { position: absolute; top: .65rem; right: .6rem; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 4px; background: transparent; color: var(--green); }
.icon-button:hover { background: var(--green-soft); }
.icon-button[aria-pressed="true"] .icon, .save-button[aria-pressed="true"] .icon { fill: currentColor; }
.load-more { margin: 1.2rem auto 0; display: flex; width: fit-content; }
.load-more[hidden] { display: none; }
.empty { grid-column: 1/-1; text-align: center; min-height: 115px; display: grid; place-items: center; color: var(--muted); }

.quote-band { background: var(--green-dark); color: #fbf7e9; }
.quote-inner { position: relative; min-height: 230px; display: grid; place-items: center; text-align: center; padding: 2.35rem 0 2.8rem; }
.quote-mark { font: italic 7rem/.8 var(--latin); color: #b5a275; position: absolute; top: 2rem; pointer-events: none; }
.quote-inner blockquote { margin: 3.2rem 0 0; }
.quote-inner blockquote p { margin: 0 0 .85rem; font: 600 clamp(2rem, 3.9vw, 3.35rem)/1.23 var(--serif); }
.quote-inner blockquote footer { font-size: .85rem; color: #e0dbca; }
.quote-inner blockquote a:hover { text-decoration: underline; }
.quote-inner blockquote .icon { width: .86rem; height: .86rem; }

.life { max-width: 1020px; padding-block: clamp(2.7rem, 6vw, 5rem); scroll-margin-top: 1rem; }
.timeline { border-top: 1px solid var(--rule); list-style: none; margin: 0; padding: 0; }
.milestone { display: grid; grid-template-columns: minmax(95px, .35fr) 1fr auto; align-items: start; column-gap: 1.2rem; padding: 1.18rem .2rem; border-bottom: 1px solid var(--rule); }
.milestone time { color: var(--green); font: 600 1.48rem/1.35 var(--latin); }
.milestone h3 { margin: 0 0 .32rem; font: 800 1.2rem/1.4 var(--serif); }
.milestone p { color: var(--muted); margin: 0; line-height: 1.7; }
.milestone a { margin-top: .25rem; }
.site-footer { background: #eeeadf; border-top: 1px solid var(--rule); color: var(--muted); }
.footer-inner { min-height: 110px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-block: 1.2rem; }
.footer-inner p { margin: 0; font-size: .87rem; }
.footer-inner .brand { color: var(--ink); }

#reader { inset: 0; margin: auto; max-height: min(calc(100% - 2rem), 820px); width: min(690px, calc(100% - 2rem)); padding: 0; border: 1px solid #bcc4b3; border-radius: 7px; background: var(--surface); color: var(--ink); }
#reader::backdrop { background: #17231c9c; }
body:has(#reader[open]) { overflow: hidden; }
.reader-top { display: flex; align-items: center; justify-content: space-between; padding: .5rem 1rem .5rem 1.35rem; border-bottom: 1px solid var(--rule); background: var(--surface); position: sticky; top: 0; z-index: 1; }
.reader-brand { font-size: .81rem; font-weight: 600; color: var(--green); letter-spacing: .06em; }
#reader-content { padding: 1.65rem clamp(1.1rem, 5vw, 2.75rem) 2rem; }
#reader-content h2 { font: 800 clamp(1.75rem, 5vw, 2.6rem)/1.26 var(--serif); margin: .55rem 0 .8rem; }
.reader-summary { color: var(--muted); font-weight: 500; margin-top: 0; }
#reader-content p, #reader-content li { line-height: 1.85; }
.reader-details h3, .related h3 { font: 800 1.14rem/1.4 var(--serif); margin: 1.1rem 0 .4rem; }
.reader-details p { margin-block: .6rem; }
.reader-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.3rem; }
.reader-actions .button { padding-inline: .8rem; min-height: 42px; }
.related { margin-top: 1.4rem; padding-top: .15rem; border-top: 1px solid var(--rule); }
.related-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.related-links a { padding: .4rem .55rem; border-radius: 4px; font-size: .87rem; background: var(--green-soft); color: var(--green-dark); }
.related-links a:hover { text-decoration: underline; }

@media (max-width: 930px) {
  .wrap { width: calc(100% - 64px); }
  .hero { gap: 2.3rem; }
  .hero h1 { font-size: clamp(3rem, 7.25vw, 5rem); }
  .english-name { font-size: clamp(2.15rem, 5.7vw, 4.15rem); }
  .entry-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { grid-template-columns: 1fr auto; height: auto; min-height: 61px; column-gap: .5rem; row-gap: 0; }
  .brand-mark { width: 40px; height: 40px; }
  .brand strong { font-size: 1rem; }
  .brand small { font-size: .57rem; }
  .header-search { grid-column: 2; grid-row: 1; margin-block: .7rem; padding: .48rem .6rem; }
  nav { grid-row: 2; grid-column: 1/-1; justify-content: center; height: 43px; gap: 2.15rem; }
  .hero { grid-template-columns: 1fr; gap: 1.25rem; padding-block: 2.2rem 2.55rem; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(2.7rem, 11vw, 4.35rem); margin-top: .9rem; }
  .english-name { font-size: clamp(2.3rem, 8.8vw, 3.75rem); margin: .2rem 0 .95rem; }
  .hero-intro { line-height: 1.75; }
  .hero-actions { margin-top: 1.25rem; }
  .portrait-image { aspect-ratio: 1.3; }
  .section-head { flex-direction: column; align-items: start; gap: .75rem; }
  .categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category { gap: .25rem; }
  .entry-grid { grid-template-columns: 1fr; }
  .milestone { grid-template-columns: 4.5rem 1fr; column-gap: .6rem; }
  .milestone a { grid-column: 2; margin-top: .5rem; }
  .footer-inner { column-gap: 1.5rem; }
  .footer-inner p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.share-url { min-width: 0; width: min(100%, 19rem); padding: .55rem; border: 1px solid var(--rule); border-radius: 4px; }

.archive-links { display: flex; flex-wrap: wrap; gap: .55rem 1rem; justify-content: end; }
.letter-types { display: flex; flex-wrap: wrap; gap: .22rem; margin-top: .6rem; }
.letter-types[hidden], .graph-results[hidden] { display: none; }
.letter-types .filter { border-color: #c6cebd; }
.reader-sources { margin-top: 1.4rem; }
.reader-sources h3 { margin: 0 0 .45rem; font: 800 1.14rem/1.4 var(--serif); }
.reader-source-links { display: flex; flex-wrap: wrap; gap: .45rem 1rem; }
.more-related { margin-top: .65rem; }
.more-related summary { cursor: pointer; color: var(--green-dark); font-size: .9rem; }
.more-related .related-links { margin-top: .6rem; }

.graph-section { padding-block: clamp(2.6rem, 5.3vw, 4.5rem); scroll-margin-top: 1rem; }
.graph-shell { background: var(--surface); border: 1px solid var(--rule); border-radius: 5px; }
.graph-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: .75rem; border-bottom: 1px solid var(--rule); }
.graph-search { flex: 1 1 14rem; position: relative; }
.graph-search .search-box { min-height: 42px; }
.graph-search .search-box input { height: 40px; }
.graph-results { position: absolute; z-index: 2; inset: calc(100% + .2rem) 0 auto; padding: .3rem; margin: 0; list-style: none; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); box-shadow: 0 8px 22px #23392d22; }
.graph-results li { display: flex; justify-content: space-between; gap: .5rem; padding: .48rem .55rem; font-size: .89rem; cursor: pointer; border-radius: 3px; }
.graph-results li:hover, .graph-results li[aria-selected="true"] { background: var(--green-soft); }
.graph-results small { color: var(--muted); white-space: nowrap; }
#graph-type { min-height: 42px; min-width: 8.5rem; border: 1px solid #bfc8b9; border-radius: 4px; padding: .45rem .55rem; background: var(--surface); color: var(--green-dark); font-size: .87rem; }
.zoom-buttons { display: flex; gap: .28rem; }
.zoom-buttons button { min-width: 40px; min-height: 42px; padding: .3rem .62rem; border: 1px solid #bfc8b9; border-radius: 4px; background: var(--surface); font-size: .875rem; color: var(--green-dark); }
.zoom-buttons button:not(:disabled):hover { background: var(--green-soft); }
.zoom-buttons button:disabled { opacity: .45; cursor: default; }

.graph-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(225px, 26%); }
.graph-view { min-width: 0; background: #eef0e6; border-bottom-left-radius: 5px; display: flex; flex-direction: column; }
#graph-canvas { display: block; width: 100%; height: clamp(350px, 43vw, 510px); aspect-ratio: auto; touch-action: pan-y; cursor: pointer; background-image: radial-gradient(#a7ad976e .75px, transparent .75px); background-size: 16px 16px; }
#graph-canvas.zoomed { cursor: grab; }
#graph-canvas.zoomed:active { cursor: grabbing; }
.graph-legend { display: flex; flex-wrap: wrap; gap: .42rem .9rem; padding: .65rem .9rem; margin: auto 0 0; border-top: 1px solid #d7dccd; list-style: none; font-size: .81rem; color: var(--muted); }
.graph-legend li { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.graph-legend li > span { width: .65rem; height: .65rem; flex-shrink: 0; border-radius: 50%; background: var(--node-color); }
.graph-legend b { color: var(--green-dark); font-weight: 600; }

.graph-panel { min-width: 0; border-left: 1px solid var(--rule); display: flex; flex-direction: column; }
.graph-panel-head { padding: 1rem; }
.graph-meta { margin: 0 0 .35rem; color: var(--green); font-size: .81rem; font-weight: 600; }
.graph-panel h3 { margin: 0 0 .45rem; font: 800 1.35rem/1.35 var(--serif); }
.graph-panel p:not(.graph-meta) { color: var(--muted); margin: 0; font-size: .9rem; line-height: 1.7; }
.graph-panel .button { min-height: 38px; font-size: .83rem; padding: .45rem .75rem; }
.graph-starters { display: flex; flex-wrap: wrap; gap: .42rem; padding: 0 1rem 1rem; }
.graph-neighbors { margin: 0; padding: 0; border-top: 1px solid var(--rule); max-height: clamp(250px, 32vw, 402px); overflow-y: auto; list-style: none; }
.graph-neighbors li + li { border-top: 1px solid #e5e2d7; }
.graph-neighbors button { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: .55rem 1rem; }
.graph-neighbors button:hover, .graph-neighbors button:focus-visible { background: var(--green-soft); }
.graph-neighbors button strong { display: block; font-size: .88rem; }
.graph-neighbors button small { display: block; margin-top: .18rem; font-size: .76rem; color: var(--muted); }
.graph-empty { padding: .9rem 1rem; color: var(--muted); font-size: .87rem; }

@media (max-width: 930px) {
  nav { gap: clamp(1rem, 3vw, 2.5rem); }
}
@media (max-width: 640px) {
  nav { gap: clamp(.88rem, 4vw, 1.6rem); }
  .archive-links { justify-content: start; }
  .graph-layout { grid-template-columns: 1fr; }
  #graph-canvas { height: clamp(245px, 70vw, 390px); }
  .graph-panel { border-left: 0; border-top: 1px solid var(--rule); }
  .graph-controls { gap: .45rem; padding: .6rem; }
  .graph-search { flex-basis: 100%; }
  #graph-type { flex: 1; }
  .graph-neighbors { max-height: 230px; }
}

.letter-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; padding-block: .55rem; }
.letter-page #reader-content { padding: clamp(1.75rem, 5vw, 3.4rem) 0 3rem; }
.letter-page #entry-title { margin: .5rem 0 .95rem; font: 800 clamp(2rem, 5vw, 3.65rem)/1.2 var(--serif); }
.letter-page .reader-actions { margin-top: .8rem; }
.letter-back { flex-shrink: 0; padding-inline: .7rem; min-height: 40px; }
.reading-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .4fr); align-items: start; column-gap: clamp(1.2rem, 3vw, 2.7rem); margin-top: 1.35rem; }
.reading-body { min-width: 0; }
.reading-modes { display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: .85rem; border-bottom: 1px solid var(--rule); }
.reading-modes .button { min-height: 40px; padding-inline: .9rem; }
.reading-modes [aria-pressed="true"] { background: var(--green-soft); border-color: #879b83; color: var(--green-dark); }
.reading-guide { max-width: 720px; }
.reading-guide h3 { font: 800 clamp(1.25rem, 2.6vw, 1.65rem)/1.5 var(--serif); margin: 1.25rem 0 .65rem; }
#reader-content .reading-guide p { font-size: 1.04rem; line-height: 1.92; margin: 0 0 1rem; }
.concept-reference { display: inline; padding: 0; margin: 0; background: transparent; border: 0; color: #315d49; text-decoration: underline; text-underline-offset: .2em; text-decoration-color: #668474; text-decoration-thickness: .09em; line-height: inherit; }
.concept-reference:hover, .concept-reference.selected { background: #e1eadb; }
.reading-rail { position: sticky; top: 4.5rem; border: 1px solid #d6dccf; background: #edf0e7; padding: .95rem; border-radius: 5px; }
.reading-rail h3 { font: 800 1.14rem/1.5 var(--serif); margin: 0 0 .65rem; }
.reading-concepts { display: flex; flex-wrap: wrap; gap: .38rem; max-height: 21vh; overflow: auto; padding: .1rem .1rem .35rem; }
.reading-concepts button { border: 1px solid #c0ccbb; border-radius: 4px; min-height: 35px; padding: .3rem .55rem; font-size: .84rem; background: var(--surface); color: var(--green-dark); }
.reading-concepts button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fffdf3; }
.concept-detail { margin-top: .6rem; padding-top: .75rem; border-top: 1px solid #cdd8ca; }
.concept-detail h4 { font: 800 1.13rem/1.5 var(--serif); margin: 0; }
#reader-content .concept-detail p, #reader-content .reading-hint { color: var(--muted); font-size: .9rem; margin: .35rem 0 .65rem; }
.reading-document { padding-top: .65rem; }
.reading-document-links { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: .65rem; color: var(--muted); font-size: .86rem; }
.reading-document-links > div { display: flex; flex-wrap: wrap; gap: .25rem .85rem; }
.reading-frame { position: relative; overflow: clip; min-height: 440px; }
.reading-frame iframe { display: block; position: absolute; inset: 0 auto auto 0; width: var(--source-width, 100%); height: var(--source-height, 440px); border: 0; transform-origin: top left; transform: scale(var(--source-scale, 1)); }
@media (max-width: 740px) {
  .reading-workspace { grid-template-columns: minmax(0, 1fr); row-gap: .95rem; }
  .reading-rail { position: static; }
  .reading-concepts { max-height: none; }
  .concept-detail { scroll-margin-top: 4rem; }
}
