@font-face {
  font-family: 'Huiwen-mincho';
  src: url('assets/fonts/Huiwen-mincho.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #17231f;
  --ink2: #34443e;
  --paper: #f3efe4;
  --paper2: #e9e1cf;
  --red: #ad4433;
  --moss: #5b6d5c;
  --line: rgba(23, 35, 31, 0.14);
  --white: #fffdf7;
  --shadow: 0 20px 60px rgba(29, 38, 32, 0.1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
body:before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: radial-gradient(rgba(40, 48, 40, 0.22) 0.6px, transparent 0.7px);
  background-size: 7px 7px;
  mix-blend-mode: multiply;
}
button,
textarea,
input {
  font: inherit;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px 1fr;
  position: relative;
}
.sidebar {
  background: var(--ink);
  color: #e9e3d4;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 42px;
}
.seal {
  width: 43px;
  height: 43px;
  border: 1px solid #c46a58;
  color: #e27762;
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-family: serif;
  font-size: 20px;
  transform: rotate(-2deg);
}
.brand b {
  display: block;
  font-family: serif;
  font-size: 19px;
  letter-spacing: 0.12em;
}
.brand span {
  font-size: 12px;
  color: #9eaaa4;
  letter-spacing: 0.08em;
}
.nav-label {
  font-size: 12px;
  color: #82918a;
  margin: 20px 10px 8px;
  letter-spacing: 0.14em;
}
.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #b9c2bd;
  text-align: left;
  padding: 11px 12px;
  border-radius: 7px;
  margin: 2px 0;
  cursor: pointer;
  display: flex;
  gap: 11px;
  align-items: center;
}
.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.nav-item.active:before {
  content: '';
  width: 3px;
  height: 18px;
  border-radius: 3px;
  background: #c95a45;
}
.nav-item:not(.active):before {
  content: '';
  width: 3px;
}
.side-note {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 10px 0;
  font-family: serif;
  color: #9daa9f;
  font-size: 13px;
}
.side-note em {
  color: #e4d8bd;
  font-style: normal;
}
main {
  padding: 34px clamp(24px, 4vw, 66px) 70px;
  max-width: 1500px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}
.crumb {
  font-size: 14px;
  color: #68746e;
}
.crumb strong {
  color: var(--red);
  font-weight: 600;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.script-toggle {
  border: 1px solid #c8bead;
  background: #fffdf8;
  color: #5d665f;
  border-radius: 99px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 13px;
}
.script-toggle:hover {
  border-color: var(--red);
  color: var(--red);
}
.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #65726c;
}
.status i {
  width: 8px;
  height: 8px;
  background: #6e8a72;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(110, 138, 114, 0.12);
}
.intro {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 26px;
}
.eyebrow {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.intro h1 {
  font-family: 'Songti SC', 'STSong', serif;
  font-weight: 600;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  margin: 8px 0 10px;
  letter-spacing: 0.05em;
}
.intro p {
  margin: 0;
  color: #4d5a55;
  max-width: 650px;
}
.moon {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: #e3d7bb;
  box-shadow: inset -18px -12px 0 #d6c49e;
  position: relative;
}
.moon:after {
  content: '壬戌之秋';
  position: absolute;
  right: -9px;
  top: 15px;
  writing-mode: vertical-rl;
  font: 12px serif;
  letter-spacing: 0.22em;
  color: #755d45;
}
.prompt-card {
  margin-top: 28px;
  background: rgba(255, 253, 247, 0.84);
  border: 1px solid rgba(80, 73, 55, 0.14);
  box-shadow: var(--shadow);
  padding: 26px;
  border-radius: 12px;
}
.random-verse {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 0 0 18px;
  padding: 20px 24px;
  border: 1px solid rgba(113, 98, 76, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.92), rgba(242, 237, 224, 0.72)),
    radial-gradient(circle at 88% 22%, rgba(152, 81, 58, 0.08), transparent 26%);
  box-shadow: 0 10px 30px rgba(63, 54, 43, 0.06);
}
.random-verse-mark {
  width: 54px;
  height: 54px;
  opacity: 0.86;
}
.random-verse-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}
.verse-moon {
  fill: rgba(166, 151, 119, 0.12);
  stroke: rgba(83, 101, 91, 0.52);
  stroke-width: 1.2;
}
.verse-branch {
  stroke: #4c5c54;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.verse-seal {
  fill: #9a4938;
}
.random-verse-label {
  color: #75675a;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.random-verse blockquote {
  margin: 5px 0 3px;
  color: #26332d;
  font-size: clamp(19px, 2.2vw, 27px);
  line-height: 1.65;
}
.random-verse cite {
  color: #6b756e;
  font-size: 13px;
  font-style: normal;
}
.random-verse button {
  padding: 8px 15px;
  border: 1px solid #9b8b76;
  border-radius: 999px;
  color: #4e5d56;
  background: rgba(255, 253, 247, 0.78);
  cursor: pointer;
}
.random-verse button:hover {
  color: #8f3f2e;
  border-color: #8f3f2e;
}
@media (max-width: 680px) {
  .random-verse {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 18px;
  }
  .random-verse button {
    grid-column: 2;
    justify-self: start;
  }
}
.prompt-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.prompt-head h2 {
  font: 600 22px serif;
  margin: 0 0 5px;
}
.prompt-head p {
  margin: 0;
  color: #6a746f;
  font-size: 14px;
}
.step {
  font-size: 12px;
  color: #8b7468;
}
.textarea-wrap {
  position: relative;
  margin-top: 20px;
}
textarea {
  width: 100%;
  min-height: 126px;
  resize: vertical;
  border: 1px solid #c9c2b2;
  background: #fbf9f2;
  border-radius: 8px;
  padding: 17px 18px 48px;
  color: var(--ink);
  outline: none;
}
textarea:focus {
  border-color: #8b9a8c;
  box-shadow: 0 0 0 3px rgba(86, 108, 91, 0.11);
}
.examples {
  position: absolute;
  left: 14px;
  bottom: 12px;
  display: flex;
  gap: 7px;
}
.chip {
  border: 1px solid #d7d0c1;
  background: transparent;
  border-radius: 99px;
  padding: 4px 9px;
  font-size: 12px;
  color: #756f64;
  cursor: pointer;
}
.chip:hover {
  background: #eee8dc;
}
.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 16px;
}
.options {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: #5f6a65;
  font-size: 14px;
}
.options label {
  cursor: pointer;
}
.options input {
  accent-color: var(--red);
  margin-right: 6px;
}
.primary {
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 11px 20px;
  border-radius: 7px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(23, 35, 31, 0.18);
}
.primary:hover {
  background: #263832;
}
.primary:disabled {
  opacity: 0.6;
  cursor: wait;
}
.recommend {
  display: none;
  margin-top: 16px;
  padding: 17px 18px;
  border-left: 3px solid var(--red);
  background: #f1eadc;
  animation: rise 0.35s ease;
}
.recommend.show {
  display: block;
}
.recommend b {
  font-family: serif;
}
.recommend button {
  float: right;
  border: 0;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  font-weight: 600;
}
.section-head {
  margin: 38px 0 17px;
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.section-head h2 {
  font: 600 24px serif;
  margin: 0;
}
.section-head p {
  margin: 3px 0 0;
  color: #53615a;
  font-size: 14px;
}
.section-head span {
  font: italic 13px serif;
  color: #8d7f6f;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.module {
  background: rgba(255, 253, 247, 0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  min-height: 244px;
  cursor: pointer;
  transition: 0.2s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.module:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(92, 108, 94, 0.45);
}
.module:after {
  content: attr(data-num);
  position: absolute;
  right: 12px;
  bottom: -24px;
  font: 72px serif;
  color: rgba(23, 35, 31, 0.045);
}
.module .icon {
  color: var(--red);
  width: 32px;
  height: 32px;
}
.module .icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.module h3 {
  font: 600 20px serif;
  margin: 22px 0 5px;
}
.module .modern {
  font-size: 13px;
  color: #7b665b;
  margin-bottom: 12px;
}
.module p {
  font-size: 14px;
  color: #596761;
  margin: 0;
}
.module .enter {
  position: static;
  margin-top: auto;
  padding-top: 20px;
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  z-index: 1;
}
.corpus {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.source-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 19px 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
}
.source-card .mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e9e1cf;
  color: var(--red);
  display: grid;
  place-items: center;
  font: 600 17px serif;
}
.source-card h3 {
  font: 600 18px serif;
  margin: 0;
}
.source-card p {
  font-size: 14px;
  color: #5f6b65;
  margin: 5px 0;
}
.source-card small {
  color: #665c53;
}
.source-card a {
  display: inline-block;
  margin-top: 9px;
  color: var(--red);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.source-card a:hover {
  text-decoration: underline;
}
.source-card.digital {
  border-style: dashed;
  background: rgba(233, 225, 207, 0.35);
}
.source-note {
  margin-top: 14px;
  padding: 13px 16px;
  background: rgba(173, 68, 51, 0.07);
  border-radius: 7px;
  color: #655e56;
  font-size: 13px;
}
.badge {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 99px;
  background: #eee6d7;
  color: #766557;
  font: 12px sans-serif;
  vertical-align: 2px;
}
.library {
  background: rgba(255, 253, 247, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.library-bar {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}
.search {
  flex: 1;
  border: 1px solid #cbc3b3;
  background: #fffdf8;
  border-radius: 7px;
  padding: 10px 13px;
  min-width: 160px;
  outline: none;
}
.search:focus {
  border-color: #879889;
  box-shadow: 0 0 0 3px rgba(86, 108, 91, 0.1);
}
.select-filters {
  display: flex;
  gap: 8px;
}
.select-filters label {
  font-size: 12px;
  color: #756e64;
  display: flex;
  align-items: center;
  gap: 5px;
}
.select-filters select {
  border: 1px solid #cfc7b8;
  background: #fffdf8;
  border-radius: 7px;
  padding: 9px;
  color: #3e4b45;
}
.genre-select {
  display: none !important;
}
.genre-chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  margin: 0 0 16px;
  padding-bottom: 6px;
}
.genre-chip {
  border: 1px solid #d8d0c0;
  background: transparent;
  border-radius: 99px;
  padding: 5px 10px;
  color: #66716b;
  cursor: pointer;
  font-size: 13px;
  flex: 0 0 auto;
}
.genre-chip.active,
.genre-chip:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.works {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.work {
  border: 1px solid var(--line);
  background: #fffdf8;
  border-radius: 8px;
  padding: 15px 16px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  transition: 0.18s;
}
.work:hover {
  border-color: #809085;
  transform: translateY(-2px);
}
.work h3 {
  font: 600 17px serif;
  line-height: 1.45;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.work .meta {
  color: #8b5b4e;
  font-size: 12px;
}
.work p {
  font-family: serif;
  color: #606b65;
  font-size: 14px;
  margin: 9px 0 0;
}
.empty {
  display: none;
  text-align: center;
  padding: 30px;
  color: #7a837e;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 18px 0 4px;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  border: 1px solid #d0c7b8;
  background: #fffdf8;
  border-radius: 6px;
  color: #536159;
  cursor: pointer;
}
.page-btn:hover,
.page-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.page-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.page-gap {
  color: #8a8175;
  padding: 0 3px;
}
.licence {
  font-size: 12px;
  color: #7b807c;
  margin-top: 12px;
}
.reader-panel {
  width: min(760px, 96vw);
}
.reader-meta {
  color: #786f65;
  font-size: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.reader-navigation {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 4px;
}
.reader-navigation button {
  border: 1px solid #c8bead;
  border-radius: 6px;
  background: #fffdf8;
  padding: 7px 12px;
  color: #4e5c55;
  cursor: pointer;
}
.reader-navigation button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.reader-hit {
  scroll-margin-top: 22vh;
  border-radius: 2px;
  background: #f3d9a9;
  color: #643428;
  padding: 0 2px;
  animation: readerHit 1.8s ease;
}
@keyframes readerHit {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: 0 0 0 5px rgba(196, 106, 88, 0.2); }
}
.reader-background {
  margin: 16px 0;
  padding: 14px 16px;
  background: #ece5d6;
  border-left: 3px solid #a77d5e;
  color: #675f56;
  font:
    14px/1.75 'Noto Sans SC',
    'Microsoft YaHei',
    sans-serif;
}
.reader-background strong {
  color: #8b4435;
  margin-right: 8px;
}
.edition-meta {
  margin: 0 0 15px;
  padding: 10px 13px;
  border: 1px dashed #c9bca8;
  background: #f4eee2;
  color: #87786a;
  font:
    13px/1.65 'Noto Sans SC',
    'Microsoft YaHei',
    sans-serif;
}
.reader-text {
  font:
    18px/2.05 'Songti SC',
    'STSong',
    serif;
  color: #26332d;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin: 20px 0;
}
.reader-text p {
  margin: 0.65em 0;
}
.reader-text.prose p {
  margin: 0 0 1em;
  text-indent: 2em;
}
.reader-text.verse p {
  margin: 0.35em 0;
  text-indent: 0;
}
.reader-text.verse.ci p {
  margin: 0 0 1.15em;
  text-indent: 2em;
}
.reader-text.verse.ci p:empty {
  display: none;
}
.reader-text .work-heading {
  font-size: 1.18em;
  font-weight: 700;
  color: #243b32;
  margin: 1.5em 0 0.55em;
}
.reader-text .preface {
  font-size: 0.9em;
  line-height: 1.8;
  color: #7a5748;
  background: #f5eee1;
  border-left: 3px solid #b48a69;
  padding: 10px 13px;
  text-indent: 0;
}
.version-block {
  margin: 1.4rem 0;
  overflow: hidden;
  border: 1px solid #d8cbb7;
  border-radius: 8px;
  background: #fffdfa;
}
.version-block .version-title {
  margin: 0;
  border-bottom: 1px solid #d8cbb7;
  background: #eee6d7;
  padding: 10px 14px;
  color: #70493d;
  font: 600 15px/1.5 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}
.version-block > p,
.version-block > .poem {
  margin: 0;
  padding: 16px 18px;
}
.unpunctuated {
  display: block;
  margin: 8px 0 12px;
  color: #98705d;
  font:
    13px/1.5 'Noto Sans SC',
    'Microsoft YaHei',
    sans-serif;
}
.note-ref {
  display: inline-grid;
  place-items: center;
  min-width: 1.65em;
  height: 1.65em;
  margin: 0 0.18em;
  border: 1px solid #b87862;
  border-radius: 50%;
  background: #fff8ed;
  color: #9d3f2f;
  font: 600 12px sans-serif;
  cursor: pointer;
  vertical-align: 0.35em;
}
.note-ref:hover,
.note-ref:focus {
  background: var(--red);
  color: white;
  outline: none;
}
.reader-notes {
  margin: 18px 0;
  padding: 18px;
  background: #f4efe4;
  border-radius: 9px;
  border: 1px solid #dacdb9;
}
.reader-notes h3 {
  font: 600 20px serif;
  margin: 0 0 12px;
}
.note-item {
  scroll-margin-top: 20px;
  padding: 11px 10px;
  border-top: 1px solid rgba(62, 84, 70, 0.13);
  font:
    13px/1.75 'Noto Sans SC',
    'Microsoft YaHei',
    sans-serif;
}
.note-item:nth-child(4n + 1) {
  color: #6f493e;
}
.note-item:nth-child(4n + 2) {
  color: #426451;
}
.note-item:nth-child(4n + 3) {
  color: #4b577b;
}
.note-item:nth-child(4n) {
  color: #76556f;
}
.note-item:first-child {
  border-top: 0;
}
.note-item.flash {
  animation: noteFlash 1.4s ease;
}
.note-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: #6b7c6c;
  color: white;
  font-size: 12px;
}
.reader-note-jumps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.source-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
}
.source-link:hover {
  text-decoration: underline;
}
.concordance,
.journey {
  margin-bottom: 54px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.72);
  padding: 22px;
}
.concordance-form label {
  display: block;
  margin-bottom: 9px;
  color: #33443d;
  font-weight: 700;
}
.concordance-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.concordance-input input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #aeb8b1;
  border-radius: 7px;
  background: #fffef9;
  padding: 0 14px;
  color: #26352f;
  font-size: 16px;
}
.query-examples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  color: #58655f;
  font-size: 13px;
}
.query-examples button,
.journey-controls button {
  border: 1px solid #bdc5bf;
  border-radius: 999px;
  background: transparent;
  padding: 6px 11px;
  color: #3e5148;
  cursor: pointer;
}
.query-examples button:hover,
.journey-controls button:hover,
.journey-controls button.active {
  border-color: var(--red);
  background: #f6e9e2;
  color: #873f31;
}
.concordance-status {
  margin: 18px 0;
  padding: 12px 14px;
  border-left: 3px solid #738375;
  background: #f2f0e7;
  color: #44534c;
  line-height: 1.65;
}
.concordance-pagination {
  margin-top: 18px;
}
.concordance-genres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.concordance-genre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  border: 1px solid #c7cfc7;
  border-radius: 8px;
  background: #fffdf7;
  padding: 14px 16px;
  color: #30443a;
  cursor: pointer;
  text-align: left;
}
.concordance-genre:hover {
  border-color: var(--red);
  background: #faf1e9;
}
.concordance-genre b {
  font: 600 20px/1.3 serif;
}
.concordance-genre span {
  color: #7b493d;
  font-size: 13px;
  white-space: nowrap;
}
.concordance-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.concordance-result-head h3 {
  margin: 0;
  font: 600 22px/1.3 serif;
}
.concordance-back {
  border: 0;
  background: transparent;
  padding: 6px 0;
  color: #8a4032;
  cursor: pointer;
}
.concordance-back:hover {
  text-decoration: underline;
}
.concordance-group + .concordance-group {
  margin-top: 24px;
}
.concordance-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font: 600 21px/1.3 serif;
}
.concordance-group h3 span {
  border-radius: 99px;
  background: #e8ebe4;
  padding: 3px 8px;
  color: #536158;
  font: 12px/1.3 sans-serif;
}
.hit-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: 15px 4px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.hit-card:hover {
  background: rgba(241, 235, 220, 0.6);
}
.hit-card b {
  color: #293b33;
  font-family: serif;
}
.hit-context {
  color: #4b5953;
  line-height: 1.75;
}
.hit-context mark {
  border-radius: 2px;
  background: #f3d9a9;
  color: #643428;
  padding: 0 2px;
}
.hit-meta {
  color: #748078;
  font-size: 12px;
  white-space: nowrap;
}
.journey-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.journey-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 16px;
}
.journey-layout > * {
  min-width: 0;
}
.journey-map {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #c8cec5;
  border-radius: 9px;
  background:
    radial-gradient(circle at 76% 34%, rgba(98, 128, 113, 0.14), transparent 23%),
    linear-gradient(145deg, #edf0e8, #e1e8df 62%, #d7e1dc);
}
.journey-map:before {
  content: '';
  position: absolute;
  inset: 15% 9% 11% 8%;
  border-radius: 47% 53% 58% 42% / 49% 39% 61% 51%;
  background: rgba(250, 248, 238, 0.62);
  transform: rotate(-4deg);
}
.journey-map svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 420px;
}
.china-map-base {
  opacity: 0.28;
  filter: saturate(0.45) sepia(0.18);
}
.map-caption {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 16px;
}
.map-caption b,
.map-caption span {
  display: block;
}
.map-caption span {
  margin-top: 3px;
  color: #617068;
  font-size: 12px;
}
.route-line {
  fill: none;
  stroke: #8b6c5f;
  stroke-width: 2;
  stroke-dasharray: 5 6;
  opacity: 0.58;
}
.map-point {
  cursor: pointer;
}
.map-point circle {
  fill: #8b3f32;
  stroke: #fffaf0;
  stroke-width: 3;
}
.map-point.active circle {
  r: 8;
  fill: #1f5041;
}
.map-point text {
  fill: #33453d;
  font: 13px sans-serif;
  paint-order: stroke;
  stroke: #eef1e9;
  stroke-width: 4px;
}
.journey-detail {
  min-height: 360px;
  border-radius: 9px;
  background: #263a33;
  padding: 24px;
  color: #f3efe4;
}
.journey-detail .era {
  color: #dfbd92;
  font-size: 12px;
  letter-spacing: 0.12em;
}
.journey-detail h3 {
  margin: 8px 0 12px;
  font: 600 28px/1.25 serif;
}
.journey-detail p {
  color: #e0e5df;
  line-height: 1.8;
}
.journey-work {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(242, 235, 218, 0.3);
  border-radius: 6px;
  background: transparent;
  padding: 9px 10px;
  color: #f3e9d4;
  text-align: left;
  cursor: pointer;
}
.journey-work:hover {
  border-color: #dfbd92;
}
.journey-timeline {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  margin-top: 16px;
  padding: 4px 0 9px;
}
.journey-event {
  flex: 0 0 128px;
  border: 1px solid #c8cfc7;
  border-radius: 7px;
  background: #fffdf7;
  padding: 11px;
  color: #34463e;
  text-align: left;
  cursor: pointer;
}
.journey-event.active {
  border-color: var(--red);
  box-shadow: inset 0 -3px var(--red);
}
.journey-event b,
.journey-event span {
  display: block;
}
.journey-event b {
  color: #8a4032;
  font-family: serif;
  font-size: 17px;
}
.journey-event span {
  margin-top: 4px;
  font-size: 13px;
}
.journey-source {
  margin: 12px 0 0;
  color: #5a6861;
  font-size: 13px;
  line-height: 1.65;
}
@keyframes noteFlash {
  0%,
  100% {
    background: transparent;
  }
  30% {
    background: #fff2bd;
  }
}
.drawer {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(14, 22, 19, 0.45);
  z-index: 8;
}
.drawer.open {
  display: block;
}
.panel {
  margin-left: auto;
  width: min(620px, 92vw);
  height: 100%;
  background: #f7f3e9;
  padding: 34px;
  overflow: auto;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.18);
  animation: slide 0.3s ease;
}
.close {
  float: right;
  background: transparent;
  border: 0;
  font-size: 25px;
  cursor: pointer;
  color: #58645f;
}
.panel .kicker {
  color: var(--red);
  font-size: 13px;
  letter-spacing: 0.15em;
}
.panel h2 {
  font: 600 32px serif;
  margin: 10px 0;
}
.panel .judge {
  margin: 25px 0;
  background: #fffaf0;
  border-left: 4px solid var(--red);
  padding: 18px;
}
.judge strong {
  display: block;
  font-size: 18px;
}
.judge small {
  font: italic 13px serif;
  color: #6f574b;
}
.evidence {
  display: grid;
  gap: 10px;
}
.evidence article {
  background: #fffdf8;
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 7px;
}
.evidence b {
  font-family: serif;
}
.evidence span {
  display: block;
  font-size: 12px;
  color: #7c8781;
  margin-top: 4px;
}
.mobile-menu {
  display: none;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@keyframes slide {
  from {
    transform: translateX(100%);
  }
}
@media (max-width: 1050px) {
  .module-grid {
    grid-template-columns: 1fr 1fr;
  }
  .shell {
    grid-template-columns: 220px 1fr;
  }
  .moon {
    display: none;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 17px 18px;
    display: block;
  }
  .brand {
    margin: 0;
  }
  .sidebar nav,
  .side-note {
    display: none;
  }
  .sidebar nav.nav-open {
    display: block;
  }
  .mobile-menu {
    display: block;
    position: absolute;
    right: 18px;
    top: 20px;
    background: transparent;
    color: #fff;
    border: 1px solid #637069;
    border-radius: 5px;
    padding: 5px 9px;
  }
  main {
    padding: 24px 16px 50px;
  }
  .topbar {
    margin-bottom: 18px;
  }
  .status {
    display: none;
  }
  .intro {
    display: block;
  }
  .intro h1 {
    font-size: 38px;
  }
  .prompt-card {
    padding: 18px;
  }
  .prompt-head {
    display: block;
  }
  .step {
    display: block;
    margin-top: 4px;
  }
  .action-row {
    align-items: flex-end;
  }
  .module-grid,
  .corpus,
  .works {
    grid-template-columns: 1fr;
  }
  .library-bar {
    display: block;
  }
  .select-filters {
    margin-top: 10px;
    flex-wrap: wrap;
  }
  .genre-select {
    display: flex !important;
  }
  .genre-chips {
    display: none;
  }
  .module {
    min-height: 218px;
  }
  .examples {
    display: none;
  }
  .reader-panel {
    padding: 24px 18px;
  }
  .reader-text {
    padding: 18px;
    font-size: 17px;
  }
  .concordance,
  .journey {
    padding: 16px;
  }
  .concordance-input,
  .journey-layout,
  .hit-card {
    grid-template-columns: 1fr;
  }
  .concordance-result-head {
    align-items: flex-start;
    flex-direction: column-reverse;
  }
  .hit-meta {
    white-space: normal;
  }
  .journey-map,
  .journey-detail {
    min-height: 320px;
  }
  .journey-map svg {
    min-height: 350px;
  }
}

main [data-view]:not(.active-view) {
  display: none !important;
}
main [data-view].active-view {
  animation: viewReveal 0.32s ease both;
}
@keyframes viewReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
main {
  min-height: calc(100vh - 160px);
}
body,
button,
textarea,
input,
select {
  font-family: 'Huiwen-mincho', 'Songti SC', 'STSong', 'SimSun', serif;
}
.brand b,
.intro h1,
.prompt-head h2,
.section-head h2,
.module h3,
.source-card h3,
.journey-detail h3,
.panel h2 {
  font-family: 'LXGW WenKai', 'STKaiti', 'KaiTi', serif;
}
.brand b,
.intro h1 {
  font-weight: 500;
}
#concordance.section-head.active-view,
#journey.section-head.active-view,
#corpus.section-head.active-view {
  margin-top: 12px;
}
#library.section-head.active-view {
  margin-top: 94px;
}

/* v23 final cascade overrides */
body,
button,
textarea,
input,
select {
  font-family: 'Huiwen-mincho', 'Songti SC', 'STSong', 'SimSun', serif;
}
.site-header {
  border-bottom-color: rgba(212, 190, 145, 0.32);
  background:
    radial-gradient(circle at 50% -90%, rgba(221, 202, 159, 0.13), transparent 58%),
    rgba(27, 40, 35, 0.97);
  box-shadow: 0 10px 36px rgba(17, 26, 22, 0.2);
}
.site-header .brand b {
  color: #f3ecdc;
}
.site-header .brand span,
.site-header .library-total {
  color: #aeb9b1;
}
.site-header .brand .seal {
  border-color: rgba(211, 117, 92, 0.92);
  color: #e28a73;
}
.site-header .primary-nav .nav-item {
  color: #bcc8c0;
}
.site-header .primary-nav .nav-item small {
  color: #ad9b7d;
}
.site-header .primary-nav .nav-item:hover,
.site-header .primary-nav .nav-item.active {
  color: #fff9e9;
}
.site-header .script-toggle,
.site-header .evidence-toggle {
  border-color: rgba(231, 220, 192, 0.35);
  background: rgba(255, 253, 246, 0.07);
  color: #eee6d3;
}

/* v23 — clearer masthead and research reading tools */
.site-header {
  border-bottom-color: rgba(212, 190, 145, 0.32);
  background:
    radial-gradient(circle at 50% -90%, rgba(221, 202, 159, 0.13), transparent 58%),
    rgba(27, 40, 35, 0.97);
  box-shadow: 0 10px 36px rgba(17, 26, 22, 0.2);
}
.brand b {
  color: #f3ecdc;
}
.brand span,
.library-total {
  color: #aeb9b1;
}
.brand .seal {
  border-color: rgba(211, 117, 92, 0.92);
  color: #e28a73;
}
.primary-nav .nav-item {
  color: #bcc8c0;
}
.primary-nav .nav-item small {
  color: #ad9b7d;
}
.primary-nav .nav-item:hover,
.primary-nav .nav-item.active {
  color: #fff9e9;
}
.primary-nav .nav-item.active:after {
  background: linear-gradient(90deg, transparent, #d27b65 18%, #d8b477 80%, transparent);
}
.site-header .script-toggle,
.evidence-toggle {
  border: 1px solid rgba(231, 220, 192, 0.35);
  background: rgba(255, 253, 246, 0.07);
  color: #eee6d3;
  border-radius: 99px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
}
.site-header .script-toggle:hover,
.evidence-toggle:hover {
  border-color: #d8b477;
  color: #fff9e9;
}
.evidence-toggle b {
  display: inline-grid;
  min-width: 1.55em;
  height: 1.55em;
  margin-left: 4px;
  place-items: center;
  border-radius: 50%;
  background: #9e4939;
  color: #fff9e9;
  font: 600 11px/1 sans-serif;
}
.reader-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}
.reader-tools button,
.evidence-actions button,
.evidence-card-actions button {
  border: 1px solid #b8aa94;
  border-radius: 5px;
  background: #faf5e9;
  padding: 8px 12px;
  color: #344b40;
  cursor: pointer;
}
.reader-tools button:hover,
.evidence-actions button:hover,
.evidence-card-actions button:hover {
  border-color: var(--red);
  color: var(--red);
}
.reader-tools button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#readerToolStatus {
  flex: 1 1 230px;
  color: #756c61;
  font-size: 13px;
}
.variant-compare {
  margin: 18px 0 24px;
  scroll-margin-top: 20px;
  border: 1px solid #cdbda5;
  background: #f6f0e4;
  padding: 18px;
}
.variant-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
  border-bottom: 1px solid #d7c9b4;
  padding-bottom: 13px;
}
.variant-head b,
.variant-head span {
  display: block;
}
.variant-head b {
  color: #8e3d31;
  font-size: 21px;
}
.variant-head span,
.variant-head small {
  color: #766d61;
}
.variant-grid {
  display: grid;
  grid-auto-columns: minmax(280px, 1fr);
  grid-auto-flow: column;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.variant-grid > article {
  border: 1px solid #d9cdb9;
  background: #fffdf8;
  padding: 17px;
}
.variant-grid h3 {
  margin: 0 0 14px;
  color: #294238;
  font-size: 17px;
}
.variant-grid article > div {
  font-size: 17px;
  line-height: 2;
}
.evidence-panel {
  width: min(860px, 96vw);
}
.evidence-intro {
  max-width: 680px;
  color: #665f56;
}
.evidence-actions {
  display: flex;
  gap: 9px;
  margin: 16px 0;
}
.evidence-list {
  display: grid;
  gap: 14px;
}
.evidence-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 15px;
  padding: 12px 0 14px;
  border-bottom: 1px solid #d8cbb7;
}
.evidence-tag-filters[hidden] {
  display: none;
}
.evidence-filter-chip {
  cursor: pointer;
}
.evidence-filter-chip.active {
  border-color: #8f4939;
  color: #fffaf0;
  background: #8f4939;
}
.evidence-empty {
  border: 1px dashed #c8baa3;
  padding: 28px;
  color: #7b7164;
  text-align: center;
}
.evidence-card {
  border: 1px solid #d2c4ae;
  background: #fffdf8;
  padding: 18px;
}
.evidence-card blockquote {
  margin: 0 0 14px;
  border-left: 3px solid var(--red);
  padding: 5px 0 5px 15px;
  color: #263930;
  font-size: 18px;
  line-height: 1.9;
}
.evidence-source {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #74695b;
  font-size: 13px;
}
.evidence-source b {
  color: #784238;
  font-size: 15px;
}
.evidence-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.evidence-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #c9bca8;
  border-radius: 999px;
  background: #f4eee2;
  padding: 2px 9px;
  color: #5b665f;
  font-size: 12px;
}
.evidence-card details {
  margin: 12px 0;
  color: #6c6257;
  font-size: 13px;
}
.evidence-card details p {
  padding: 8px 12px;
  background: #f3ede1;
}
.evidence-card label {
  display: block;
  margin-top: 12px;
  color: #584f46;
  font-size: 13px;
}
.evidence-card textarea,
.evidence-card input[type='text'] {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d2c4ae;
  background: #fbf7ee;
  padding: 10px;
  color: #26332d;
}
.evidence-card textarea {
  min-height: 74px;
  resize: vertical;
}
.evidence-card-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
}
.evidence-card-actions a {
  color: var(--red);
  font-size: 13px;
}
.selection-note-trigger {
  position: fixed;
  z-index: 12;
  border: 1px solid #c78b70;
  border-radius: 99px;
  background: #263b32;
  box-shadow: 0 8px 24px rgba(18, 30, 25, 0.24);
  padding: 7px 11px;
  color: #fff8e9;
  cursor: pointer;
  font-size: 13px;
}
.selection-composer {
  position: fixed;
  z-index: 13;
  width: min(330px, calc(100vw - 20px));
  border: 1px solid #bba88d;
  background: #fffaf0;
  box-shadow: 0 18px 52px rgba(18, 30, 25, 0.25);
  padding: 16px;
  color: #26352e;
}
.selection-composer > b {
  color: #8f4033;
  font-size: 17px;
}
.selection-composer blockquote {
  max-height: 92px;
  margin: 10px 0;
  overflow: auto;
  border-left: 3px solid #b95c48;
  padding-left: 10px;
  color: #5d554b;
  font-size: 13px;
}
.selection-composer label {
  display: block;
  color: #62594f;
  font-size: 13px;
}
.selection-composer textarea {
  width: 100%;
  min-height: 88px;
  margin: 6px 0 10px;
  border: 1px solid #cdbfa9;
  background: #fffdf8;
  padding: 9px;
  resize: vertical;
}
.selection-composer > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.selection-composer button {
  border: 1px solid #bbaa92;
  background: #f6efe1;
  padding: 6px 10px;
  color: #35493f;
  cursor: pointer;
}
#selectionSave {
  border-color: #7f3f34;
  background: #8f4033;
  color: #fff8ec;
}
.evidence-highlight {
  border-bottom: 1px solid rgba(154, 69, 54, 0.72);
  background: transparent;
  color: inherit;
}
.evidence-count {
  display: inline-grid;
  min-width: 1.65em;
  height: 1.65em;
  margin: 0 0.2em;
  place-items: center;
  border: 1px solid #a94d3d;
  border-radius: 50%;
  background: #fff8e9;
  color: #953d30;
  font: 700 11px/1 sans-serif;
  vertical-align: 0.4em;
  cursor: pointer;
}
.evidence-count:hover,
.evidence-count:focus {
  background: #953d30;
  color: #fff;
}
.evidence-card.flash {
  animation: noteFlash 1.4s ease;
}
@media (max-width: 700px) {
  .evidence-toggle {
    padding: 5px 9px;
  }
  .library-total {
    display: none;
  }
  .variant-head,
  .evidence-source {
    display: block;
  }
  .variant-grid {
    grid-auto-columns: minmax(250px, 88vw);
  }
  .reader-tools button {
    flex: 1 1 100%;
  }
}

.parse-warning {
  display: block;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #c77966;
  border-radius: 6px;
  background: #fff4ea;
  color: #873f31;
  font:
    600 14px/1.55 'Noto Sans SC',
    'Microsoft YaHei',
    sans-serif;
}

/* v20 — horizontal research portal, inspired by ink, paper and movable type */
:root {
  --ink: #1d211d;
  --ink2: #414840;
  --paper: #f5f1e7;
  --paper2: #e7dfcf;
  --red: #9e3f30;
  --moss: #536458;
  --line: rgba(38, 40, 34, 0.16);
  --white: #fcfaf3;
  --shadow: 0 22px 70px rgba(42, 39, 30, 0.08);
}
body {
  background:
    radial-gradient(ellipse at 8% 6%, rgba(45, 56, 48, 0.08), transparent 28%),
    radial-gradient(ellipse at 93% 30%, rgba(86, 93, 74, 0.07), transparent 26%),
    var(--paper);
  font-family: 'Songti SC', 'STSong', 'SimSun', serif;
  letter-spacing: 0.015em;
}
body:before {
  opacity: 0.12;
  background-size: 9px 9px;
}
.shell {
  display: block;
  min-height: 100vh;
}
.site-header {
  position: sticky;
  z-index: 7;
  top: 0;
  border-bottom: 1px solid rgba(32, 38, 32, 0.18);
  background: rgba(245, 241, 231, 0.94);
  box-shadow: 0 8px 30px rgba(33, 35, 29, 0.05);
  backdrop-filter: blur(14px);
}
.masthead {
  position: relative;
  display: flex;
  min-height: 102px;
  align-items: center;
  justify-content: center;
  padding: 16px clamp(22px, 5vw, 72px) 10px;
}
.brand {
  margin: 0;
  gap: 16px;
  text-align: center;
}
.brand .seal {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(158, 63, 48, 0.8);
  color: var(--red);
  font-family: 'STKaiti', 'KaiTi', serif;
  font-size: 22px;
}
.brand b {
  color: #20251f;
  font-family: 'FZKai-Z03', 'STKaiti', 'KaiTi', serif;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: 0.24em;
  line-height: 1.1;
}
.brand span {
  margin-top: 7px;
  color: #6f746b;
  font-family: 'Songti SC', 'STSong', serif;
  font-size: 11px;
  letter-spacing: 0.32em;
}
.header-actions {
  position: absolute;
  right: clamp(22px, 5vw, 72px);
  display: flex;
  align-items: center;
  gap: 14px;
}
.library-total {
  color: #737970;
  font-size: 12px;
  white-space: nowrap;
}
.library-total b {
  color: var(--red);
  font-weight: 600;
}
.primary-nav {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 6vw, 86px);
  min-height: 58px;
  padding: 0 22px;
}
.primary-nav .nav-item {
  position: relative;
  width: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 8px 6px 13px;
  color: #505950;
  flex-direction: column;
  gap: 0;
  text-align: center;
}
.primary-nav .nav-item:before {
  display: none;
}
.primary-nav .nav-item small {
  color: #a08368;
  font-family: 'STKaiti', 'KaiTi', serif;
  font-size: 11px;
  letter-spacing: 0.14em;
}
.primary-nav .nav-item span {
  font-size: 15px;
  letter-spacing: 0.16em;
}
.primary-nav .nav-item:hover,
.primary-nav .nav-item.active {
  background: transparent;
  color: #151b17;
}
.primary-nav .nav-item.active:after {
  content: '';
  position: absolute;
  right: 8%;
  bottom: -1px;
  left: 8%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--red) 18%, #742f27 80%, transparent);
  transform: rotate(-1deg);
}
main {
  max-width: 1240px;
  padding: 68px clamp(24px, 5vw, 76px) 110px;
}
#researchDesk,
#concordance,
#journey,
#corpus {
  scroll-margin-top: 190px;
}
.intro {
  position: relative;
  min-height: 260px;
  align-items: center;
  border: 0;
  padding: 34px 5% 44px;
}
.intro:before {
  content: '江海寄余生';
  position: absolute;
  top: -18px;
  right: 16%;
  color: rgba(30, 39, 32, 0.055);
  font-family: 'STKaiti', 'KaiTi', serif;
  font-size: clamp(58px, 9vw, 122px);
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
  pointer-events: none;
}
.eyebrow,
.section-overline {
  color: var(--red);
  font-family: 'Songti SC', serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.26em;
}
.intro h1 {
  max-width: 760px;
  font-family: 'FZKai-Z03', 'STKaiti', 'KaiTi', serif;
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 400;
  letter-spacing: 0.08em;
}
.intro p {
  max-width: 620px;
  font-size: 17px;
  line-height: 2;
}
.moon {
  width: 126px;
  height: 126px;
  background: radial-gradient(circle at 35% 32%, #eee7d6 0 30%, #d7c7a5 75%);
  box-shadow: inset -22px -15px 0 rgba(175, 153, 112, 0.17), 18px 24px 60px rgba(85, 72, 47, 0.08);
  filter: blur(0.15px);
}
.prompt-card,
.library,
.concordance,
.journey {
  border-color: rgba(52, 53, 45, 0.14);
  border-radius: 2px;
  background: rgba(252, 250, 243, 0.72);
  box-shadow: var(--shadow);
}
.prompt-card {
  margin-top: 14px;
  padding: clamp(24px, 4vw, 44px);
}
.prompt-head h2,
.section-head h2,
.module h3,
.source-card h3 {
  font-family: 'FZKai-Z03', 'STKaiti', 'KaiTi', serif;
  font-weight: 500;
}
.section-head {
  margin-top: 94px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-size: 31px;
  letter-spacing: 0.1em;
}
.module-grid {
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.module {
  min-height: 270px;
  border: 0;
  border-radius: 0;
  background: rgba(252, 250, 243, 0.9);
  padding: 28px 25px;
}
.module:hover {
  z-index: 1;
  border: 0;
  background: #fffdf7;
  box-shadow: 0 18px 40px rgba(35, 38, 31, 0.09);
}
.module .icon {
  opacity: 0.78;
}
.module h3 {
  font-size: 24px;
  letter-spacing: 0.08em;
}
.source-card,
.work {
  border-radius: 2px;
  background: rgba(252, 250, 243, 0.86);
}
.source-card .mark {
  border: 1px solid rgba(158, 63, 48, 0.25);
  border-radius: 2px;
  background: transparent;
  font-family: 'STKaiti', 'KaiTi', serif;
}
.reader-text {
  font-family: 'Songti SC', 'STSong', 'SimSun', serif;
}

@media (max-width: 760px) {
  .site-header {
    position: sticky;
  }
  .masthead {
    min-height: 82px;
    justify-content: flex-start;
    padding: 14px 16px 9px;
  }
  .brand {
    text-align: left;
  }
  .brand .seal {
    width: 38px;
    height: 38px;
  }
  .brand b {
    font-size: 24px;
  }
  .brand span,
  .library-total {
    display: none;
  }
  .header-actions {
    right: 16px;
  }
  .primary-nav {
    justify-content: flex-start;
    gap: 28px;
    min-height: 54px;
    overflow-x: auto;
    padding: 0 16px;
    scrollbar-width: none;
  }
  .primary-nav::-webkit-scrollbar {
    display: none;
  }
  .primary-nav .nav-item {
    flex: 0 0 auto;
    display: flex;
  }
  main {
    padding: 34px 16px 70px;
  }
  #researchDesk,
  #concordance,
  #journey,
  #corpus {
    scroll-margin-top: 150px;
  }
  .intro {
    min-height: 260px;
    padding: 26px 4px 38px;
  }
  .intro:before {
    right: 0;
    font-size: 62px;
  }
  .intro h1 {
    font-size: 46px;
  }
  .section-head {
    margin-top: 68px;
  }
}

/* Final typography and view-state overrides */
main [data-view]:not(.active-view) {
  display: none !important;
}
body,
button,
textarea,
input,
select {
  font-family: 'Huiwen-mincho', 'Songti SC', 'STSong', 'SimSun', serif;
}
body .brand b,
body .intro h1,
body .prompt-head h2,
body .section-head h2,
body .module h3,
body .source-card h3,
body .journey-detail h3,
body .panel h2 {
  font-family: 'Huiwen-mincho', 'Songti SC', 'STSong', 'SimSun', serif;
}
#concordance.section-head.active-view,
#journey.section-head.active-view,
#corpus.section-head.active-view {
  margin-top: 12px;
}
#library.section-head.active-view {
  margin-top: 94px;
}

.site-header {
  border-bottom-color: rgba(212, 190, 145, 0.32);
  background:
    radial-gradient(circle at 50% -90%, rgba(221, 202, 159, 0.13), transparent 58%),
    rgba(27, 40, 35, 0.97);
  box-shadow: 0 10px 36px rgba(17, 26, 22, 0.2);
}
.site-header .brand b { color: #f3ecdc; }
.site-header .brand span,
.site-header .library-total { color: #aeb9b1; }
.site-header .brand .seal {
  border-color: rgba(211, 117, 92, 0.92);
  color: #e28a73;
}
.site-header .primary-nav .nav-item { color: #bcc8c0; }
.site-header .primary-nav .nav-item small { color: #ad9b7d; }
.site-header .primary-nav .nav-item:hover,
.site-header .primary-nav .nav-item.active { color: #fff9e9; }
.site-header .script-toggle,
.site-header .evidence-toggle {
  border-color: rgba(231, 220, 192, 0.35);
  background: rgba(255, 253, 246, 0.07);
  color: #eee6d3;
}

/* v25 — lighter ink and quieter annotation marks */
body {
  color: #3b4540;
  font-weight: 400;
}
.reader-text,
.work,
.source-card,
.concordance-status,
.journey-detail p {
  color: #3f4b45;
  font-weight: 400;
}
body .intro h1,
body .prompt-head h2,
body .section-head h2,
body .module h3,
body .source-card h3,
body .journey-detail h3,
body .panel h2 {
  color: #303a35;
  font-weight: 400;
}
.site-header {
  border-bottom-color: rgba(207, 194, 164, 0.48);
  background:
    radial-gradient(circle at 50% -90%, rgba(239, 226, 193, 0.2), transparent 60%),
    rgba(68, 86, 77, 0.97);
  box-shadow: 0 8px 28px rgba(37, 50, 43, 0.14);
}
.site-header .brand b {
  color: #fbf5e8;
  font-weight: 400;
}
.site-header .brand span,
.site-header .library-total {
  color: #d2d7d1;
}
.site-header .primary-nav .nav-item {
  color: #dde2dc;
  font-weight: 400;
}
.site-header .primary-nav .nav-item small {
  color: #d1c2a5;
}
.site-header .primary-nav .nav-item:hover,
.site-header .primary-nav .nav-item.active {
  color: #fffaf0;
}
.site-header .script-toggle,
.site-header .evidence-toggle {
  border-color: rgba(247, 239, 218, 0.48);
  background: rgba(255, 253, 246, 0.1);
  color: #fff8ea;
}
.evidence-highlight {
  border-bottom: 1px solid rgba(151, 67, 52, 0.72);
  background: none !important;
  box-shadow: none;
}

/* v27 — restore contrast inside the dark journey detail card */
body .journey-detail {
  color: #f7f2e6;
}
body .journey-detail h3 {
  color: #fff8e9;
  font-weight: 400;
}
body .journey-detail p {
  color: #e5ebe5;
  font-weight: 400;
}
body .journey-detail .era {
  color: #f0c99a;
}
body .journey-detail .journey-works > b {
  color: #f7f2e6;
  font-weight: 400;
}
