.book-main { padding-top: 32px; padding-bottom: 88px; }
.back-link { display: inline-block; margin-bottom: 30px; color: #69574b; font-size: 14px; text-decoration: none; }
.back-link:hover { color: #bf5835; }
.book-intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 76px); align-items: center; }
.book-cover { border-radius: 24px; overflow: hidden; background: #efe5d4; box-shadow: 0 14px 40px #482f1812; }
.book-cover img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.book-summary h1 { font-family: Georgia, 'Times New Roman', serif; color: #342b22; font-size: clamp(38px, 4.2vw, 62px); font-weight: 500; letter-spacing: -.035em; line-height: 1.06; margin: 18px 0; }
.book-hanzi { color: #917158; font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; font-size: 23px; letter-spacing: .12em; margin: 0 0 24px; }
.book-description { color: #6e6258; line-height: 1.8; max-width: 50ch; font-size: 16px; }
.book-level { margin: 26px 0; color: #75624e; font-size: 13px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.book-level span { color: #426c52; }
.book-reader-note { color: #8a7867; font-size: 12px; margin-top: 16px; line-height: 1.7; }
.parent-note { margin-top: 50px; padding: 24px 30px; background: #f1eadc; border-radius: 16px; display: grid; grid-template-columns: 180px 1fr; gap: 28px; }
.parent-note .eyebrow { margin: 4px 0 0; }
.parent-note > p:last-child { margin: 0; color: #6f6255; line-height: 1.8; font-size: 14px; }
.chapter-library { margin-top: 58px; }
.chapter-library-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 26px; }
.chapter-library-heading h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 32px; font-weight: 500; margin: 0; color: #342b22; }
.chapter-library-heading p { color: #897665; font-size: 14px; }
.chapter-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.chapter-cards li { border: 1px solid #e8ddcb; border-radius: 17px; background: #fffdf8; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.chapter-cards li:hover { transform: translateY(-3px); box-shadow: 0 8px 22px #5b3c1810; }
.chapter-cards a { text-decoration: none; color: inherit; display: block; height: 100%; }
.chapter-cards img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.chapter-cards a > div { padding: 20px; }
.chapter-number { font-size: 10px; color: #b87547; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.chapter-cards h3 { font-family: Georgia, 'Times New Roman', serif; font-size: 23px; line-height: 1.2; font-weight: 500; color: #443326; margin: 10px 0; }
.chapter-cards p { font-size: 13px; color: #96826f; margin: 0 0 22px; }
.chapter-open { display: flex; justify-content: space-between; color: #a75b38; font-size: 12px; font-weight: 600; }
.missing-page { text-align: center; padding: 80px 0; }
.missing-page h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; font-size: clamp(38px, 5vw, 64px); }
.missing-page p:not(.eyebrow) { color: #897665; margin: 20px 0 32px; }

.reader-page { background: #fbf7ee; }
.reader-main { width: min(1440px, calc(100% - 64px)); margin: 0 auto; padding: 20px 0 24px; }
.reader-topbar { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 0 0 20px; }
.reader-breadcrumb { min-width: 0; }
.reader-breadcrumb > a { color: #897665; font-size: 12px; text-decoration: none; display: inline-block; margin-bottom: 8px; }
.reader-breadcrumb h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(23px, 2.25vw, 34px); font-weight: 500; color: #443326; margin: 0; line-height: 1.2; }
.reader-breadcrumb h1 > span { display: inline-block; font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; color: #9b806c; font-size: .5em; font-weight: 400; margin-left: 12px; vertical-align: middle; }
.chapter-menu { position: relative; flex-shrink: 0; color: #75624e; font-size: 12px; }
.chapter-menu summary { cursor: pointer; list-style: none; padding: 12px 16px; border: 1px solid #e4d7c6; border-radius: 30px; display: flex; align-items: center; gap: 22px; }
.chapter-menu summary::-webkit-details-marker { display: none; }
.chapter-menu ol { position: absolute; z-index: 10; right: 0; top: 38px; width: min(340px, 85vw); max-height: 50vh; overflow: auto; list-style: none; padding: 12px; margin: 10px 0 0; border: 1px solid #e4d7c6; border-radius: 16px; background: #fffdf8; box-shadow: 0 10px 30px #4b36181a; }
.chapter-menu a { display: block; padding: 12px; color: #75624e; text-decoration: none; border-radius: 8px; line-height: 1.5; }
.chapter-menu a:hover, .chapter-menu a[aria-current] { background: #f4e8d1; color: #a65c37; }
.reader-stage { display: grid; grid-template-columns: 46% 1fr; gap: 28px; align-items: start; }
.reader-illustration { margin: 0; border-radius: 22px; overflow: hidden; background: #ede1cd; position: sticky; top: 110px; }
.reader-illustration > img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.reader-illustration figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 15px 22px; color: #8e735a; font-size: 11px; letter-spacing: .035em; }
.reader-illustration figcaption span { color: #b48963; }
.reader-panel { background: #fffdf8; border: 1px solid #e8ddcb; border-radius: 22px; padding: 26px 32px; min-width: 0; }
.reader-options { align-items: center; gap: 8px; border-bottom: 1px solid #ece4d7; padding-bottom: 20px; flex-shrink: 0; }
.reader-options > span { margin-right: auto; color: #9b806c; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.reader-options button { font: inherit; font-size: 11px; color: #9b806c; border: 1px solid #e4d7c6; border-radius: 20px; background: transparent; cursor: pointer; padding: 8px 13px; }
.reader-options button[aria-pressed="true"] { color: #a25b37; background: #f7e9d3; border-color: #edd1a6; }
.reading-line { padding: 28px 0; border-bottom: 1px solid #ece4d7; }
.line-speaker { color: #b68754; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 18px; }
.line-chinese { font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; font-weight: 500; font-size: clamp(25px, 2.4vw, 36px); line-height: 1.9; letter-spacing: .04em; color: #43362a; margin: 0 0 22px; }
.line-pinyin { color: #ad774b; font-size: 15px; line-height: 1.9; margin: 0 0 18px; }
.line-english { color: #93806d; font-family: Georgia, 'Times New Roman', serif; font-size: 18px; line-height: 1.7; margin: 0; }
.hide-pinyin .line-pinyin, .hide-english .line-english { display: none; }
.reader-js-only { display: none; }
.reader-navigation { align-items: center; gap: 16px; padding-top: 18px; border-top: 1px solid #ece4d7; flex-shrink: 0; }
.reader-navigation button { cursor: pointer; font: inherit; font-size: 12px; color: #a25b37; background: #f7e9d3; border: 1px solid #edd1a6; border-radius: 25px; min-height: 42px; padding: 0 19px; white-space: nowrap; }
.reader-navigation button:disabled { cursor: default; opacity: .35; }
.reader-navigation .reader-previous { min-width: 44px; padding: 0; background: transparent; color: #9b806c; border-color: #e4d7c6; }
.reader-navigation > div { flex: 1; text-align: center; min-width: 40px; }
.reader-part-count { color: #a18a73; font-size: 10px; letter-spacing: .08em; }
.reader-progress { width: min(140px, 100%); height: 3px; background: #f0e6d6; margin: 8px auto 0; border-radius: 3px; overflow: hidden; }
.reader-progress > span { display: block; background: #ce9055; height: 100%; transition: width .2s ease; }
.chapter-audio { margin-top: 18px; flex-shrink: 0; }
.chapter-audio label { display: block; color: #a18a73; font-size: 10px; margin-bottom: 8px; }
.chapter-audio audio { display: block; width: 100%; height: 38px; }
.chapter-links { display: flex; justify-content: space-between; gap: 20px; padding-top: 20px; font-size: 12px; }
.chapter-links a { text-decoration: none; color: #9b806c; }
.reader-enhanced { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.reader-enhanced > .site-header { flex-shrink: 0; }
.reader-enhanced .reader-main { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.reader-enhanced .reader-topbar { flex-shrink: 0; }
.reader-enhanced .reader-stage { flex: 1; min-height: 0; align-items: stretch; }
.reader-enhanced .reader-illustration { display: flex; flex-direction: column; position: static; min-height: 0; }
.reader-enhanced .reader-illustration > img { flex: 1; min-height: 0; height: 0; aspect-ratio: auto; }
.reader-enhanced .reader-panel { display: flex; flex-direction: column; min-height: 0; }
.reader-enhanced .reader-js-only { display: flex; }
.reader-enhanced .reading-text { overflow: auto; flex: 1; min-height: 0; padding-right: 5px; scrollbar-width: thin; scrollbar-color: #e4d7c6 transparent; }
.reader-enhanced .reading-line { min-height: 100%; display: flex; flex-direction: column; justify-content: center; border: 0; padding: 24px 0; }
.reader-enhanced .reading-line[hidden] { display: none; }
.reader-enhanced .chapter-links { flex-shrink: 0; padding-top: 14px; font-size: 10px; }
.reader-page a:focus-visible, .reader-page button:focus-visible, .reader-page summary:focus-visible, .reader-page .reading-text:focus-visible, .book-page a:focus-visible { outline: 2px solid #c57b45; outline-offset: 4px; }

@media (min-width: 1500px) {
  .reader-enhanced .reader-main { padding-top: 28px; padding-bottom: 28px; }
  .reader-panel { padding: 30px 46px; }
}
@media (max-width: 980px) {
  .book-intro { gap: 30px; }
  .chapter-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reader-main { width: calc(100% - 40px); }
  .reader-stage { grid-template-columns: 40% 1fr; gap: 20px; }
  .reader-panel { padding: 20px 24px; }
  .line-chinese { font-size: 27px; }
}
@media (max-width: 700px) {
  .book-main { padding-top: 20px; padding-bottom: 56px; }
  .back-link { margin-bottom: 24px; }
  .book-intro { grid-template-columns: 1fr; gap: 28px; }
  .book-summary h1 { font-size: 40px; }
  .book-cover { border-radius: 18px; }
  .parent-note { margin-top: 30px; padding: 22px; grid-template-columns: 1fr; gap: 12px; }
  .chapter-library { margin-top: 38px; }
  .chapter-library-heading { display: block; margin-bottom: 22px; }
  .chapter-library-heading h2 { font-size: 28px; }
  .chapter-library-heading p { margin: 10px 0 0; }
  .chapter-cards { gap: 16px; }
  .chapter-cards a > div { padding: 15px; }
  .chapter-cards h3 { font-size: 19px; }
  .chapter-cards p { margin-bottom: 16px; }
  .reader-main { width: calc(100% - 24px); padding: 12px 0; }
  .reader-topbar { gap: 10px; padding-bottom: 12px; align-items: center; }
  .reader-breadcrumb > a { font-size: 10px; max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 5px; }
  .reader-breadcrumb h1 { font-size: 19px; line-height: 1.1; }
  .reader-breadcrumb h1 > span { display: none; }
  .chapter-menu { font-size: 10px; }
  .chapter-menu summary { padding: 9px 11px; gap: 9px; }
  .reader-stage { grid-template-columns: 1fr; gap: 12px; }
  .reader-illustration { border-radius: 14px; position: static; }
  .reader-illustration > img { aspect-ratio: 16 / 9; }
  .reader-illustration figcaption { display: none; }
  .reader-panel { border-radius: 14px; padding: 15px 20px; }
  .reader-options { padding-bottom: 12px; }
  .reader-options > span { font-size: 9px; letter-spacing: .05em; }
  .reader-options button { padding: 6px 10px; font-size: 10px; }
  .line-speaker { font-size: 9px; margin-bottom: 12px; }
  .line-chinese { font-size: 24px; line-height: 1.7; margin-bottom: 16px; }
  .line-pinyin { font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
  .line-english { font-size: 15px; line-height: 1.6; }
  .reader-navigation { padding-top: 12px; gap: 12px; }
  .reader-navigation button { min-height: 38px; font-size: 11px; padding: 0 16px; }
  .reader-navigation .reader-previous { min-width: 38px; }
  .chapter-audio { margin-top: 12px; }
  .chapter-audio label { margin-bottom: 5px; font-size: 9px; }
  .chapter-audio audio { height: 34px; }
  .reader-enhanced .reader-stage { display: flex; flex-direction: column; }
  .reader-enhanced .reader-illustration { height: min(23vh, 200px); height: min(23dvh, 200px); flex-shrink: 0; }
  .reader-enhanced .reader-panel { flex: 1; min-height: 0; }
  .reader-enhanced .reading-line { padding: 16px 0; }
  .reader-enhanced .chapter-links { padding-top: 10px; font-size: 9px; }
}
@media (max-width: 370px) {
  .reader-breadcrumb h1 { font-size: 17px; }
  .reader-panel { padding: 12px 16px; }
  .reader-options > span { display: none; }
  .reader-options { justify-content: flex-end; }
  .line-chinese { font-size: 22px; }
  .chapter-cards { grid-template-columns: 1fr; }
}
@media (max-height: 650px) and (max-width: 700px) {
  .reader-enhanced .reader-illustration { height: 17dvh; }
  .reader-page .site-header .shell { min-height: 58px; }
  .reader-enhanced .reader-topbar { padding-bottom: 8px; }
  .chapter-links { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .chapter-cards li, .reader-progress > span { transition: none; }
}
