:root {
  color-scheme: light;
  --paper: #f5f3ed;
  --paper-light: #fcfbf7;
  --ink: #24372f;
  --green: #203b32;
  --green-hover: #315448;
  --muted: #778077;
  --brick: #ae6044;
  --line: #dedfd4;
  --soft: #eaece2;
  --display-font: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --body-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.7 var(--body-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button, input, textarea { border-radius: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
a { color: inherit; text-decoration: none; }
button, a, input, textarea, select, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--brick); }
::selection { color: #203b32; background: #dce3cc; }
img { max-width: 100%; display: block; }
svg { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
button { border: 0; background: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus-visible { position: fixed; width: auto; height: auto; margin: 0; top: 12px; left: 12px; clip: auto; overflow: visible; padding: 10px 16px; background: var(--green); color: #fff9e9; border-radius: 4px; z-index: 150; }

/* A quiet reading room. */
.site-header {
  position: relative;
  z-index: 10;
  background: rgba(245, 243, 237, .96);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1240px;
  min-height: 88px;
  padding: 0 30px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-icon {
  width: 42px;
  height: 42px;
  background: var(--green);
  color: #fff9e9;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 9px 9px;
}
.brand-icon svg { width: 23px; height: 23px; }
.brand-copy { display: flex; flex-direction: column; gap: 0; }
.brand-name { font: 700 25px/1.35 var(--display-font); letter-spacing: 2px; }
.brand-sub { color: var(--muted); font-size: 10px; letter-spacing: 2.3px; line-height: 1.5; }
.main-nav { display: flex; align-items: center; gap: 32px; align-self: stretch; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  white-space: nowrap;
  color: #69736a;
  transition: color .18s ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--green); }
.nav-link.is-active { font-weight: 600; }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 17px;
  width: 16px;
  height: 2px;
  background: var(--brick);
  transform: translateX(-50%);
}
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 17px; }
.reading-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7b8475;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .3px;
  white-space: nowrap;
}
.reading-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #79916f; }
.reading-badge > [aria-hidden] { display: none; }
.site-main { width: min(1180px, calc(100% - 60px)); margin: 0 auto; padding-bottom: 64px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, color .18s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fffdf5; border-color: var(--green); }
.btn-primary:hover:not(:disabled) { background: var(--green-hover); border-color: var(--green-hover); }
.btn-secondary { border-color: #c7cfc0; background: transparent; color: var(--green); }
.btn-secondary:hover:not(:disabled) { border-color: #a6b7a1; background: #e9ede1; }
.btn-ghost { color: var(--green); padding-right: 8px; padding-left: 8px; }
.btn-ghost:hover:not(:disabled) { background: #e9ede1; }
.btn-small { min-height: 36px; padding: 8px 14px; font-size: 12px; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #5d6b5f;
  background: transparent;
  transition: background .18s ease, border-color .18s ease;
}
.icon-button:hover:not(:disabled), .icon-button.is-active { background: var(--soft); border-color: #b7c3ae; color: var(--green); }
.icon-button svg { width: 18px; height: 18px; }

/* Editorial hero: type, paper, and actual cover artwork. */
.hero {
  min-height: 493px;
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  align-items: center;
  column-gap: 44px;
  padding: 45px 0 30px;
  position: relative;
}
.hero-copy { position: relative; z-index: 1; padding-bottom: 14px; }
.eyebrow, .section-label, .page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brick);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.4px;
  line-height: 1.5;
}
.eyebrow::before { content: ""; width: 23px; height: 1px; background: var(--brick); }
.hero-heading {
  margin-top: 23px;
  color: var(--green);
  font: 600 clamp(36px, 4.1vw, 53px)/1.38 var(--display-font);
  letter-spacing: -1.4px;
  text-wrap: balance;
}
.hero-heading em { color: var(--brick); font-style: normal; }
.hero-book-title {
  margin-top: 16px;
  color: var(--green);
  font: 600 clamp(21px, 2.3vw, 27px)/1.55 var(--display-font);
  letter-spacing: -.5px;
  text-wrap: balance;
}
.hero-description { max-width: 455px; margin-top: 18px; color: #788075; font-size: 14px; line-height: 1.95; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.hero-actions { display: flex; gap: 12px; align-items: center; margin-top: 29px; flex-wrap: wrap; }
.hero-art {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  height: 418px;
  isolation: isolate;
}
.hero-art::before {
  content: "";
  position: absolute;
  width: 345px;
  height: 345px;
  border-radius: 50%;
  background: #e5e7dc;
  top: 26px;
  right: 11px;
  z-index: -1;
}
.hero-art::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 1px;
  background: #ccd2c2;
  bottom: 26px;
  right: 0;
  transform: rotate(-7deg);
  z-index: -1;
}
.book-stack { width: 440px; height: 400px; position: relative; }
.hero-cover {
  position: absolute;
  display: block;
  width: 220px;
  height: 330px;
  object-fit: cover;
  border-radius: 3px 6px 6px 3px;
  box-shadow: 4px 7px 0 rgba(234, 229, 212, .9), 8px 12px 0 #cfcec0, 14px 25px 34px rgba(48, 49, 32, .17);
}
.hero-cover-back { right: 23px; top: 9px; transform: rotate(12deg); width: 211px; height: 316px; filter: saturate(.82); }
.hero-cover-main { left: 56px; bottom: 18px; transform: rotate(-8deg); z-index: 1; }
.hero-art-caption { position: absolute; bottom: 3px; right: 16px; color: #838a7d; font-size: 10px; letter-spacing: 2px; }
.stats-row { display: flex; flex-wrap: wrap; gap: 0; margin-top: 28px; color: #87907f; }
.stat-item { display: flex; align-items: baseline; gap: 7px; padding: 0 22px; border-right: 1px solid #d5dacc; font-size: 12px; line-height: 1.3; }
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: 0; }
.stat-item strong { color: var(--green); font: 500 23px/1 var(--display-font); }

.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding-top: 20px; margin-bottom: 23px; }
.section-title { font: 600 29px/1.4 var(--display-font); letter-spacing: .2px; color: var(--green); }
.section-label { margin-bottom: 8px; font-size: 10px; letter-spacing: 1.9px; }
.section-heading > p, .section-heading > span { color: var(--muted); font-size: 12px; }
.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 17px;
  padding: 17px 0 20px;
  border-top: 1px solid var(--line);
  margin-bottom: 4px;
}
.filter-list { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-chip { min-height: 32px; padding: 6px 13px; border: 1px solid transparent; border-radius: 4px; color: #7b8476; font-size: 12px; line-height: 1.5; transition: background .18s ease, color .18s ease; }
.filter-chip:hover { background: #e9ece1; color: var(--green); }
.filter-chip.is-active { color: #f9f7ef; background: var(--green); }
.search-box { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid #d5d9ce; border-radius: 4px; background: #f9f8f3; min-width: 230px; color: #909687; }
.search-box:focus-within { border-color: #879b83; box-shadow: 0 0 0 3px #dfe5d5; }
.search-box svg { width: 16px; height: 16px; }
.search-box input { outline: 0; border: 0; background: none; width: 100%; color: var(--green); font-size: 12px; }
.search-box input::placeholder { color: #969c8f; }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.book-card {
  position: relative;
  background: var(--paper-light);
  border: 1px solid #e2e3d8;
  border-radius: 7px;
  overflow: hidden;
  min-width: 0;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.book-card:hover { transform: translateY(-3px); border-color: #cad2be; box-shadow: 0 12px 26px rgba(34, 46, 30, .06); }
.book-card-main { display: flex; gap: 18px; padding: 21px 20px; text-align: left; width: 100%; align-items: flex-start; }
.book-cover-wrap { flex-shrink: 0; width: 106px; position: relative; }
.book-cover { width: 106px; aspect-ratio: 2/3; object-fit: cover; border-radius: 2px 4px 4px 2px; box-shadow: 3px 4px 9px rgba(30, 35, 22, .12); background: #e2e5d7; }
.cover-fallback { aspect-ratio: 2/3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; background: var(--green); color: #faf3d9; font: 600 19px/1.7 var(--display-font); border-radius: 3px; text-align: center; }
.cover-fallback > span { font: 9px/1.6 var(--body-font); color: #c5cdb7; letter-spacing: 2px; }
.cover-fallback > strong { font-size: 15px; line-height: 1.6; }
.cover-fallback > small { font: 8px/1.6 var(--body-font); color: #b2bea0; }
.book-card-info { flex: 1; min-width: 0; padding-top: 1px; }
.book-category { display: inline-flex; color: var(--brick); font-size: 10px; letter-spacing: .5px; line-height: 1.6; margin-bottom: 9px; }
.book-title { font: 600 17px/1.65 var(--display-font); color: var(--green); min-height: 56px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.book-blurb { margin-top: 9px; color: #869080; font-size: 11px; line-height: 1.9; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.book-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 13px; color: #8b9384; font-size: 10px; line-height: 1.7; padding-right: 15px; }
.book-meta span + span::before { content: "·"; padding-right: 7px; color: #b5bbae; }
.book-save { position: absolute; right: 10px; bottom: 11px; width: 30px; height: 30px; color: #87907e; background: #fcfbf7; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.book-save:hover, .book-save.is-active { background: #e8eddf; color: #3c654c; }
.book-save svg { width: 15px; height: 15px; }
.continue-card {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 21px 25px;
  background: #e9eddf;
  border: 1px solid #d4ddca;
  border-radius: 7px;
  margin-bottom: 14px;
}
.continue-cover { width: 55px; height: 82px; object-fit: cover; border-radius: 3px; box-shadow: 2px 3px 7px #cdd2c2; flex-shrink: 0; }
.continue-cover.cover-fallback { padding: 5px; gap: 3px; }
.continue-cover.cover-fallback > span { font-size: 5px; letter-spacing: 0; }
.continue-cover.cover-fallback > strong { font-size: 7px; }
.continue-cover.cover-fallback > small { display: none; }
.continue-content { flex: 1; min-width: 0; }
.continue-content h3 { font: 600 18px/1.5 var(--display-font); margin: 3px 0 6px; }
.continue-content p { color: #79856f; font-size: 12px; }
.continue-content .eyebrow { font-size: 9px; letter-spacing: 1.4px; }
.continue-content .eyebrow::before { display: none; }
.progress-track { max-width: 260px; height: 3px; background: #d3dbc9; margin-top: 11px; overflow: hidden; border-radius: 2px; }
.progress-fill { display: block; height: 100%; background: #69865d; transition: width .2s ease; }
.empty-state { grid-column: 1/-1; display: flex; align-items: center; flex-direction: column; gap: 16px; color: #8b9485; padding: 72px 24px; text-align: center; border: 1px dashed #cdd4c3; border-radius: 7px; }
.empty-state svg { width: 34px; height: 34px; color: #96a389; }
.empty-state h2, .empty-state h3 { color: var(--green); font: 500 23px/1.5 var(--display-font); }
.empty-state p { max-width: 420px; font-size: 13px; }
.site-footer { width: min(1180px, calc(100% - 60px)); margin: 0 auto; padding: 22px 0 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: #949b8c; font-size: 10px; letter-spacing: .3px; }
.site-footer a:hover { color: var(--green); }
.site-footer > div { display: flex; align-items: center; gap: 15px; }
.site-footer strong { font: 600 15px/1.6 var(--display-font); color: #849079; letter-spacing: 1px; }

/* Bookshelf, detail, and chapter index. */
.page-heading { margin: 46px 0 32px; }
.page-title { font: 600 36px/1.5 var(--display-font); margin-top: 9px; color: var(--green); }
.page-description { margin-top: 11px; color: var(--muted); font-size: 13px; }
.results-count { color: #87907d; font-size: 11px; margin: 0 0 15px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: #8b9483; font-size: 12px; padding: 27px 0 23px; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb svg { width: 13px; height: 13px; }
.book-detail { display: grid; grid-template-columns: 203px 1fr; gap: 44px; padding: 16px 0 42px; align-items: start; }
.detail-cover { width: 203px; aspect-ratio: 2/3; object-fit: cover; border-radius: 3px 7px 7px 3px; box-shadow: 6px 8px 0 #e2dece, 10px 16px 28px rgba(34, 45, 26, .12); }
.detail-info { padding-top: 4px; }
.detail-title { font: 600 35px/1.55 var(--display-font); text-wrap: balance; color: var(--green); max-width: 760px; }
.detail-author { color: #7b8973; font-size: 13px; margin-top: 11px; }
.detail-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 19px; color: #7d8a72; font-size: 11px; }
.detail-meta span { padding: 3px 9px; border: 1px solid #d7decf; border-radius: 3px; background: #eef0e6; }
.detail-description { color: #7c8773; font-size: 13px; line-height: 2; max-width: 740px; margin-top: 23px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.reading-note { color: #95a087; font-size: 11px; margin-top: 16px; }
.directory-count { color: #8b9482; font-size: 11px; }
.chapter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-bottom: 24px; }
.chapter-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 66px;
  background: var(--paper-light);
  border: 1px solid #e0e2d6;
  padding: 15px 17px;
  border-radius: 5px;
  text-align: left;
  transition: background .18s ease, border-color .18s ease;
}
.chapter-link:hover, .chapter-link.is-active { border-color: #b9c9af; background: #eaf0e1; }
.chapter-number { flex-shrink: 0; color: #96a289; font: 500 18px/1 var(--display-font); min-width: 20px; }
.chapter-name { color: #5e7055; font-size: 12px; line-height: 1.8; }
.chapter-link > svg { margin-left: auto; width: 14px; height: 14px; color: #95a48a; }

/* Reader: the prose has the space, controls stay quiet. */
.reader-shell {
  --reader-bg: #f5f1e7;
  --reader-ink: #353d32;
  --reader-muted: #8a8f80;
  --reader-line: #dddccd;
  --reader-bar: rgba(245, 241, 231, .95);
  --reader-control: #eaeadd;
  background: var(--reader-bg);
  color: var(--reader-ink);
  min-height: 100vh;
  padding-bottom: 95px;
  transition: background .2s ease, color .2s ease;
}
.reader-shell[data-theme="light"] {
  --reader-bg: #fcfcf9;
  --reader-ink: #30392f;
  --reader-muted: #8b9488;
  --reader-line: #e5e8df;
  --reader-bar: rgba(252, 252, 249, .96);
  --reader-control: #f0f3eb;
}
.reader-shell[data-theme="night"] {
  color-scheme: dark;
  --reader-bg: #1e2925;
  --reader-ink: #cbd0c2;
  --reader-muted: #8b9a8b;
  --reader-line: #37473c;
  --reader-bar: rgba(30, 41, 37, .97);
  --reader-control: #304236;
}
.reader-header { position: sticky; top: 0; z-index: 20; background: var(--reader-bar); border-bottom: 1px solid var(--reader-line); backdrop-filter: blur(12px); }
.reader-header-inner { width: min(1180px, calc(100% - 60px)); min-height: 69px; margin: 0 auto; display: flex; align-items: center; gap: 22px; }
.reader-book-label { color: var(--reader-muted); font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-top-actions { display: flex; gap: 10px; align-items: center; }
.reader-top-actions .book-save { position: static; background: transparent; }
.reader-shell .icon-button { color: var(--reader-muted); border-color: var(--reader-line); }
.reader-shell .icon-button:hover, .reader-shell .icon-button.is-active { background: var(--reader-control); color: var(--reader-ink); }
.reader-shell .btn-ghost { color: var(--reader-ink); }
.reader-shell .btn-ghost:hover { background: var(--reader-control); }
.reader-main { width: min(740px, calc(100% - 48px)); margin: 0 auto; padding-top: 57px; }
.reader-chapter-kicker { color: var(--reader-muted); font-size: 10px; letter-spacing: 2px; text-align: center; margin-bottom: 16px; }
.reader-title { font: 600 30px/1.7 var(--display-font); text-align: center; text-wrap: balance; color: var(--reader-ink); }
.reader-byline { text-align: center; color: var(--reader-muted); font-size: 11px; margin-top: 17px; padding-bottom: 32px; border-bottom: 1px solid var(--reader-line); }
.reader-content { margin-top: 38px; font-size: var(--reading-size, 22px); line-height: var(--reading-leading, 1.95); letter-spacing: .3px; overflow-wrap: break-word; }
.reader-content p { margin: 0 0 1.1em; white-space: pre-line; }
.reader-content p:last-child { margin-bottom: 0; }
.reader-content em { font-style: normal; }
.reader-end { text-align: center; color: var(--reader-muted); font-size: 11px; letter-spacing: 3px; margin: 52px 0 32px; }
.reader-end::before, .reader-end::after { content: ""; display: inline-block; width: 26px; height: 1px; background: var(--reader-line); margin: 0 13px; vertical-align: middle; }
.chapter-nav { display: flex; justify-content: space-between; gap: 20px; padding: 26px 0 18px; border-top: 1px solid var(--reader-line); }
.chapter-nav .btn { color: var(--reader-ink); border-color: var(--reader-line); font-size: 13px; padding: 12px 21px; }
.chapter-nav .btn:hover:not(:disabled) { background: var(--reader-control); }
.chapter-nav .btn-primary { background: var(--green); color: #f9f8ed; }
.chapter-nav .btn-primary:hover:not(:disabled) { background: var(--green-hover); }
.reader-shell[data-theme="night"] .chapter-nav .btn-primary { background: #829b72; border-color: #829b72; color: #18241c; }
.reader-shell[data-theme="night"] .chapter-nav .btn-primary:hover:not(:disabled) { background: #91aa82; }
.reader-toolbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--reader-bar); border-top: 1px solid var(--reader-line); backdrop-filter: blur(12px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.reader-toolbar-inner { width: min(740px, calc(100% - 48px)); min-height: 63px; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 auto; }
.reader-status { color: var(--reader-muted); font-size: 11px; letter-spacing: .5px; }
.reader-progressbar { position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: var(--reader-line); }
.reader-header .reader-progressbar { top: auto; bottom: -1px; }
.reader-progressfill { display: block; height: 100%; background: #81936b; }
.reader-shell[data-theme="night"] .reader-progressfill { background: #a4b28c; }
.reader-toolbar .icon-button { width: 33px; height: 33px; }

/* Native dialogs work offline and remain keyboard accessible. */
.sheet-dialog {
  padding: 0;
  border: 1px solid #d7ddcd;
  border-radius: 12px;
  width: min(530px, calc(100% - 32px));
  max-height: calc(100dvh - 64px);
  color: var(--ink);
  background: #faf9f2;
  box-shadow: 0 24px 100px rgba(20, 35, 22, .2);
  overflow: auto;
}
.sheet-dialog::backdrop { background: rgba(26, 38, 26, .4); backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 23px 26px 18px; border-bottom: 1px solid #e1e5d7; position: sticky; top: 0; background: #faf9f2; z-index: 1; }
.dialog-header h2 { font: 600 23px/1.5 var(--display-font); }
.dialog-close { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #85917c; }
.dialog-close:hover { background: #e9edde; }
.dialog-close svg { width: 17px; height: 17px; }
.dialog-body { padding: 22px 26px 27px; }
.dialog-body > p { font-size: 13px; color: #7d8973; line-height: 1.9; }
.settings-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 0; border-bottom: 1px solid #e2e6d9; }
.settings-row:first-child { padding-top: 2px; }
.settings-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-label { font-size: 13px; color: #6b7c60; }
.setting-actions { display: flex; gap: 13px; align-items: center; }
.setting-actions .icon-button { width: 32px; height: 32px; }
.font-value { color: #57704a; font-size: 13px; min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.theme-options { display: flex; gap: 12px; margin: 15px 0 23px; }
.theme-option { flex: 1; min-height: 80px; padding: 13px; border: 1px solid #d4dbca; border-radius: 5px; font-size: 11px; background: #f2efe5; color: #778569; }
.theme-option > span { display: block; margin-bottom: 7px; font: 600 24px/1.3 var(--display-font); }
.theme-option[data-theme="light"] { background: #fff; }
.theme-option[data-theme="night"] { background: #25382d; color: #c5cdb9; border-color: #3f5445; }
.theme-option.is-active { outline: 2px solid #749265; outline-offset: 2px; }
.dialog-chapters { display: flex; flex-direction: column; gap: 8px; }
.dialog-body > .field-note { margin-bottom: 14px; }
.dialog-chapters .chapter-link { min-height: 51px; padding: 10px 14px; }
.dialog-chapters .chapter-number { font-size: 16px; }
.field-note { color: #89977d; font-size: 11px; line-height: 1.8; }
.toast-container { position: fixed; z-index: 100; bottom: 90px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(460px, calc(100% - 36px)); pointer-events: none; }
.toast { background: #263d2b; color: #f4f5e9; padding: 11px 18px; border: 1px solid #56684d; border-radius: 6px; box-shadow: 0 5px 20px #26322322; font-size: 12px; line-height: 1.65; text-align: center; animation: toast-in .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1500px) {
  .hero { min-height: 533px; padding-top: 56px; padding-bottom: 44px; }
}
@media (max-width: 1080px) {
  .header-inner { gap: 29px; }
  .main-nav { gap: 22px; }
  .reading-badge { display: none; }
  .hero { grid-template-columns: 1fr 1fr; gap: 14px; min-height: 470px; }
  .hero-art { height: 385px; }
  .book-stack { width: 382px; height: 367px; }
  .hero-cover { width: 202px; height: 303px; }
  .hero-cover-back { width: 191px; height: 286px; right: 10px; top: 16px; }
  .hero-cover-main { left: 41px; bottom: 16px; }
  .hero-art::before { width: 300px; height: 300px; top: 31px; right: 0; }
  .hero-heading { font-size: 43px; }
  .hero-book-title { font-size: 25px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-card-main { gap: 22px; padding: 23px; }
  .book-cover-wrap, .book-cover { width: 116px; }
  .book-title { font-size: 18px; }
  .book-blurb { font-size: 12px; }
  .chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .header-inner { min-height: 79px; padding: 0 22px; gap: 25px; }
  .brand-name { font-size: 22px; }
  .brand-sub { font-size: 9px; }
  .brand-icon { width: 37px; height: 37px; }
  .main-nav { gap: 19px; }
  .nav-link { font-size: 12px; }
  .header-actions { gap: 8px; }
  .header-actions .btn { font-size: 11px; padding: 9px 11px; min-height: 35px; }
  .site-main { width: calc(100% - 44px); }
  .hero { gap: 13px; padding-top: 42px; min-height: 432px; }
  .hero-heading { font-size: 35px; letter-spacing: -.7px; }
  .hero-book-title { font-size: 22px; }
  .hero-description { font-size: 12px; margin-top: 18px; }
  .hero-art { height: 333px; }
  .book-stack { width: 313px; height: 321px; }
  .hero-cover { width: 162px; height: 243px; }
  .hero-cover-back { width: 161px; height: 241px; right: 11px; top: 19px; }
  .hero-cover-main { left: 27px; bottom: 20px; }
  .hero-art::before { width: 245px; height: 245px; top: 28px; }
  .hero-art::after { width: 255px; bottom: 33px; }
  .hero-art-caption { font-size: 9px; right: 6px; }
  .hero-actions .btn { font-size: 12px; min-height: 40px; padding: 10px 14px; }
  .stats-row { margin-top: 26px; }
  .stat-item { padding: 0 13px; font-size: 10px; gap: 4px; }
  .stat-item strong { font-size: 20px; }
  .section-title { font-size: 25px; }
  .book-grid { gap: 14px; }
  .book-card-main { gap: 14px; padding: 19px 16px; }
  .book-cover-wrap, .book-cover { width: 92px; }
  .book-title { font-size: 16px; min-height: 52px; }
  .book-blurb { font-size: 11px; -webkit-line-clamp: 2; }
  .book-meta { font-size: 9px; }
  .search-box { min-width: 195px; }
  .site-footer { width: calc(100% - 44px); }
  .book-detail { grid-template-columns: 165px 1fr; gap: 30px; }
  .detail-cover { width: 165px; }
  .detail-title { font-size: 29px; }
  .reader-header-inner { width: calc(100% - 44px); }
}
@media (max-width: 600px) {
  html { scrollbar-gutter: auto; }
  .header-inner { min-height: 74px; padding: 0 20px; gap: 0; justify-content: space-between; flex-wrap: wrap; }
  .brand { gap: 8px; }
  .brand-icon { width: 34px; height: 34px; border-radius: 50% 50% 7px 7px; }
  .brand-icon svg { width: 20px; height: 20px; }
  .brand-name { font-size: 22px; letter-spacing: 1.5px; }
  .brand-sub { letter-spacing: 1.5px; font-size: 8px; }
  .main-nav { order: 3; width: 100%; height: 43px; border-top: 1px solid #e4e5da; margin-top: 2px; gap: 0; justify-content: space-around; }
  .nav-link { padding: 0 15px; font-size: 12px; }
  .nav-link.is-active::after { bottom: 5px; height: 2px; width: 12px; }
  .header-actions { margin-left: 0; }
  .header-actions .btn { min-height: 32px; padding: 7px 10px; font-size: 10px; gap: 5px; }
  .header-actions .btn svg { width: 13px; height: 13px; }
  .site-main { width: calc(100% - 40px); padding-bottom: 39px; }
  .hero { grid-template-columns: 1fr; padding: 36px 0 19px; gap: 10px; min-height: 0; }
  .hero-copy { padding-bottom: 0; }
  .eyebrow { font-size: 10px; letter-spacing: 1.6px; }
  .hero-heading { font-size: 39px; margin-top: 16px; line-height: 1.38; letter-spacing: -1.1px; }
  .hero-book-title { font-size: 24px; margin-top: 15px; }
  .hero-description { font-size: 12px; margin-top: 17px; max-width: 400px; line-height: 1.95; }
  .hero-actions { margin-top: 22px; gap: 10px; }
  .hero-actions .btn { padding: 11px 18px; font-size: 12px; min-height: 42px; }
  .hero-art { height: 324px; justify-content: center; width: 100%; margin-top: 10px; }
  .book-stack { width: 341px; height: 316px; }
  .hero-cover { width: 174px; height: 261px; }
  .hero-cover-back { width: 165px; height: 247px; right: 19px; top: 9px; }
  .hero-cover-main { left: 42px; bottom: 15px; }
  .hero-art::before { width: 270px; height: 270px; top: 11px; right: calc(50% - 150px); }
  .hero-art::after { width: 258px; bottom: 24px; right: calc(50% - 162px); }
  .hero-art-caption { right: calc(50% - 149px); bottom: 0; font-size: 8px; }
  .stats-row { margin-top: 22px; }
  .stat-item { font-size: 11px; padding: 0 21px; gap: 6px; }
  .stat-item strong { font-size: 21px; }
  .section-heading { padding-top: 13px; margin-bottom: 18px; gap: 8px; }
  .section-title { font-size: 25px; }
  .section-heading > p, .section-heading > span { font-size: 10px; }
  .section-heading .btn { padding: 7px 9px; min-height: 32px; font-size: 10px; }
  .catalog-toolbar { padding-top: 15px; padding-bottom: 17px; gap: 12px; flex-direction: column; align-items: stretch; }
  .filter-list { gap: 5px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .filter-chip { flex-shrink: 0; font-size: 11px; min-height: 30px; padding: 6px 11px; }
  .search-box { min-width: 0; padding: 10px 12px; }
  .book-grid { grid-template-columns: 1fr; gap: 14px; }
  .book-card-main { padding: 22px 21px; gap: 22px; }
  .book-cover-wrap, .book-cover { width: 107px; }
  .book-category { font-size: 10px; margin-bottom: 8px; }
  .book-title { font-size: 18px; min-height: auto; line-height: 1.6; }
  .book-blurb { font-size: 11px; -webkit-line-clamp: 3; margin-top: 8px; }
  .book-meta { margin-top: 11px; font-size: 10px; }
  .book-save { right: 11px; bottom: 11px; }
  .continue-card { padding: 18px 16px; gap: 15px; flex-wrap: wrap; }
  .continue-cover { width: 45px; height: 67px; }
  .continue-content h3 { font-size: 16px; }
  .continue-content p { font-size: 10px; }
  .continue-card > .btn { margin-left: 60px; margin-top: -1px; min-height: 33px; font-size: 11px; padding: 8px 13px; }
  .progress-track { max-width: 200px; margin-top: 8px; }
  .empty-state { padding: 51px 18px; }
  .empty-state h2, .empty-state h3 { font-size: 21px; }
  .empty-state p { font-size: 12px; }
  .site-footer { width: calc(100% - 40px); display: block; font-size: 9px; line-height: 1.9; padding: 19px 0 24px; }
  .site-footer > * + * { margin-top: 5px; }
  .page-heading { margin: 30px 0 25px; }
  .page-title { font-size: 30px; }
  .page-description { font-size: 12px; }
  .breadcrumb { font-size: 10px; padding-top: 21px; padding-bottom: 19px; }
  .book-detail { grid-template-columns: 99px 1fr; gap: 21px; padding: 9px 0 28px; }
  .detail-cover { grid-column: 1; grid-row: 1/span 3; width: 99px; box-shadow: 4px 6px 0 #e2dece, 8px 10px 18px rgba(34, 45, 26, .1); }
  .detail-info { padding-top: 0; display: contents; }
  .detail-info > .book-category { grid-column: 2; grid-row: 1; margin-bottom: -10px; }
  .detail-title { grid-column: 2; grid-row: 2; font-size: 24px; line-height: 1.6; align-self: start; }
  .detail-meta, .detail-description, .detail-actions, .reading-note { grid-column: 1/-1; }
  .detail-author { grid-column: 2; grid-row: 3; margin-top: -8px; font-size: 12px; }
  .detail-meta { margin-top: -7px; font-size: 10px; gap: 7px; }
  .detail-meta span { padding: 3px 7px; }
  .detail-description { margin-top: -3px; font-size: 12px; }
  .detail-actions { margin-top: -2px; gap: 10px; }
  .detail-actions .btn { font-size: 12px; padding: 10px 16px; min-height: 41px; }
  .chapter-grid { grid-template-columns: 1fr; gap: 9px; }
  .chapter-link { min-height: 57px; padding: 12px 16px; gap: 12px; }
  .chapter-number { font-size: 17px; }
  .chapter-name { font-size: 12px; }
  .reader-shell { padding-bottom: 93px; }
  .reader-header-inner { width: calc(100% - 28px); min-height: 58px; gap: 9px; }
  .reader-book-label { font-size: 10px; }
  .reader-header .btn { font-size: 11px; gap: 4px; padding: 7px 4px; min-height: 31px; }
  .reader-header .btn svg { width: 15px; height: 15px; }
  .reader-top-actions { gap: 7px; }
  .reader-top-actions .icon-button { width: 31px; height: 31px; border-radius: 4px; }
  .reader-top-actions .icon-button svg { width: 15px; height: 15px; }
  .reader-main { width: calc(100% - 40px); padding-top: 36px; }
  .reader-chapter-kicker { font-size: 9px; margin-bottom: 12px; }
  .reader-title { font-size: 25px; line-height: 1.7; }
  .reader-byline { font-size: 10px; margin-top: 13px; padding-bottom: 25px; }
  .reader-content { margin-top: 28px; letter-spacing: .1px; }
  .reader-content p { margin-bottom: 1em; }
  .reader-end { margin-top: 37px; font-size: 10px; letter-spacing: 2px; }
  .chapter-nav { gap: 12px; padding-top: 20px; }
  .chapter-nav .btn { font-size: 12px; padding: 11px 14px; min-height: 42px; flex: 1; }
  .reader-toolbar-inner { width: calc(100% - 36px); min-height: 64px; gap: 9px; }
  .reader-status { display: none; }
  .reader-toolbar .btn { font-size: 11px; padding: 7px 8px; min-height: 42px; }
  .reader-toolbar .btn svg { width: 15px; height: 15px; }
  .sheet-dialog { max-height: calc(100dvh - 38px); border-radius: 10px; }
  .dialog-header { padding: 18px 20px 15px; }
  .dialog-header h2 { font-size: 21px; }
  .dialog-body { padding: 20px; }
  .settings-row { gap: 10px; padding: 14px 0; }
  .setting-label { font-size: 12px; }
  .setting-actions { gap: 8px; }
  .theme-options { gap: 7px; }
  .theme-option { min-height: 71px; }
  .toast-container { bottom: 78px; }
  .toast { font-size: 11px; padding: 10px 15px; }
}
@media (max-width: 360px) {
  .header-inner { padding-right: 16px; padding-left: 16px; }
  .brand-name { font-size: 20px; }
  .site-main, .site-footer { width: calc(100% - 32px); }
  .hero-heading { font-size: 35px; }
  .hero-book-title { font-size: 22px; }
  .hero-art { height: 302px; }
  .book-stack { width: 309px; height: 292px; }
  .hero-cover { width: 161px; height: 241px; }
  .hero-cover-back { width: 153px; height: 229px; right: 13px; }
  .hero-cover-main { left: 33px; bottom: 14px; }
  .hero-art::before { width: 248px; height: 248px; right: calc(50% - 138px); }
  .hero-art-caption { right: calc(50% - 130px); }
  .stat-item { padding: 0 15px; }
  .book-card-main { gap: 16px; padding: 18px 16px; }
  .book-cover-wrap, .book-cover { width: 92px; }
  .book-title { font-size: 17px; }
  .book-blurb { -webkit-line-clamp: 2; }
  .reader-main { width: calc(100% - 32px); }
  .reader-title { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
