:root {
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-kai: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "楷体_GB2312", serif;
  --font-jp: "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", "Noto Serif JP", "Source Han Serif JP", Georgia, serif;
  --font-en: Georgia, "Times New Roman", "Source Serif 4", serif;

  --reader-font: var(--font-serif);
  --reader-size: 18px;
  --reader-line: 1.98;
  --reader-letter: 0.03em;
  --reader-width: 740px;
  --para-indent: 2em;
  --para-gap: 1.05em;

  --bg-page: #F6F1E7;
  --bg-sheet: #FCF9F2;
  --bg-elevated: #FFFDF8;
  --bg-muted: #EFE8D9;
  --bg-mat: #EAE2D0;
  --bg-note: rgba(74, 107, 93, 0.08);
  --text-main: #2C2824;
  --text-secondary: #7A7267;
  --text-muted: #9D9488;
  --accent: #4A6B5D;
  --accent-soft: rgba(74, 107, 93, 0.12);
  --border: #E7DEC8;
  --shadow-sheet: 0 10px 36px rgba(44, 40, 36, 0.05);
  --shadow-card: 0 6px 22px rgba(44, 40, 36, 0.05);
  --shadow-hover: 0 12px 30px rgba(44, 40, 36, 0.10);
  --shadow-float: 0 8px 24px rgba(44, 40, 36, 0.10);
  --header-bg: rgba(246, 241, 231, 0.90);
}

html[data-theme="forest"] {
  --bg-page: #E5EFEA;
  --bg-sheet: #F8FCFA;
  --bg-elevated: #FFFFFF;
  --bg-muted: #DAE8E1;
  --bg-mat: #D3E3DA;
  --bg-note: rgba(43, 98, 83, 0.08);
  --text-main: #1E302A;
  --text-secondary: #5C736B;
  --text-muted: #7F968E;
  --accent: #2B6253;
  --accent-soft: rgba(43, 98, 83, 0.12);
  --border: #CFE0D8;
  --shadow-sheet: 0 10px 34px rgba(30, 48, 42, 0.06);
  --shadow-card: 0 6px 22px rgba(30, 48, 42, 0.05);
  --shadow-hover: 0 12px 30px rgba(30, 48, 42, 0.11);
  --shadow-float: 0 8px 24px rgba(30, 48, 42, 0.11);
  --header-bg: rgba(229, 239, 234, 0.90);
}

html[data-theme="minimal"] {
  --bg-page: #F7F8FA;
  --bg-sheet: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-muted: #EFF1F5;
  --bg-mat: #EBEEF3;
  --bg-note: rgba(51, 78, 104, 0.07);
  --text-main: #1D2129;
  --text-secondary: #6E7785;
  --text-muted: #99A1AD;
  --accent: #334E68;
  --accent-soft: rgba(51, 78, 104, 0.10);
  --border: #EAECEF;
  --shadow-sheet: 0 6px 28px rgba(29, 33, 41, 0.04);
  --shadow-card: 0 4px 18px rgba(29, 33, 41, 0.04);
  --shadow-hover: 0 10px 26px rgba(29, 33, 41, 0.09);
  --shadow-float: 0 8px 24px rgba(29, 33, 41, 0.10);
  --header-bg: rgba(247, 248, 250, 0.92);
}

html[data-theme="night"] {
  --bg-page: #141618;
  --bg-sheet: #1B1E21;
  --bg-elevated: #23272B;
  --bg-muted: #262A2F;
  --bg-mat: #202429;
  --bg-note: rgba(200, 155, 110, 0.12);
  --text-main: #D4CEC3;
  --text-secondary: #928B80;
  --text-muted: #6E685F;
  --accent: #C89B6E;
  --accent-soft: rgba(200, 155, 110, 0.15);
  --border: #2A2F35;
  --shadow-sheet: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 8px 26px rgba(0, 0, 0, 0.30);
  --shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.45);
  --shadow-float: 0 10px 28px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(20, 22, 24, 0.92);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.65;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Progress Bar */
.progress-track {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 1200;
  pointer-events: none;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.08s linear;
}

/* Top Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.site-header.nav-hidden { transform: translateY(-100%); }
.site-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
body[data-page="article"] .site-header-inner { max-width: 1020px; }

.brand-area {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.brand-icon { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.header-themes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.theme-dot {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.theme-dot:hover { transform: scale(1.12); }
.theme-dot.active { box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 3.5px var(--accent); }

.header-pill {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
  font-family: inherit;
  text-decoration: none;
}
.header-pill:hover { border-color: var(--accent); color: var(--accent); }
.header-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

/* ================= CATALOG (reading.htm) ================= */
.catalog-hero {
  padding: 20px 0 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.hero-kicker {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}
.hero-title {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.6vw, 34px);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.hero-sub { margin: 0; color: var(--text-secondary); font-size: 14px; }
.hero-stats { display: flex; gap: 18px; font-size: 13px; color: var(--text-secondary); }
.hero-stats strong {
  display: block;
  font-size: 20px;
  font-family: var(--font-serif);
  color: var(--text-main);
}

.continue-card {
  display: none;
  margin-bottom: 22px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--bg-sheet);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.continue-card.visible { display: flex; }
.continue-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.continue-badge {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.continue-text {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.continue-btn {
  text-decoration: none;
  background: var(--accent);
  color: #FFFFFF;
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.continue-btn:hover { opacity: 0.92; }

.toolbar-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.cat-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.cat-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.16s ease;
}
.cat-tab:hover { border-color: var(--accent); color: var(--accent); }
.cat-tab.active { background: var(--accent); border-color: var(--accent); color: #FFFFFF; font-weight: 600; }
.cat-count { font-size: 11.5px; opacity: 0.78; margin-left: 3px; }

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
  min-width: 240px;
}
.search-box { position: relative; flex: 1; max-width: 260px; }
.search-box input, .ch-search input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-main);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.search-box input:focus, .ch-search input:focus { border-color: var(--accent); }
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.view-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.view-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  transition: all 0.15s ease;
}
.view-btn svg { width: 14px; height: 14px; }
.view-btn.active { background: var(--accent); color: #FFFFFF; font-weight: 600; }

.catalog-section { margin-bottom: 38px; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.section-title { margin: 0; font-family: var(--font-serif); font-size: 19px; font-weight: 700; }
.section-sub { font-size: 12.5px; color: var(--text-secondary); }

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 16px;
}
.book-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-sheet);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.cover-stage {
  height: 158px;
  border-radius: 8px;
  background: var(--bg-mat);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.cover-stage img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
}
.book-meta-pill {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 7px;
  font-weight: 500;
  align-self: flex-start;
}
.book-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--text-main);
}
.book-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.books-list { display: flex; flex-direction: column; gap: 10px; }
.book-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-sheet);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.16s ease;
}
.book-row:hover { border-color: var(--accent); transform: translateX(2px); }
.row-thumb {
  width: 52px;
  height: 70px;
  border-radius: 6px;
  background: var(--bg-mat);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}
.row-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}
.row-body { flex: 1; min-width: 0; }
.row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.row-title { font-family: var(--font-serif); font-size: 16px; font-weight: 700; }
.row-desc {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-arrow { font-size: 13px; color: var(--accent); font-weight: 600; white-space: nowrap; flex-shrink: 0; }

/* Anthology Banner (Scheme A) & Subtabs (Scheme B) */
.anthology-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-sheet);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 13px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.anthology-cover {
  width: 82px;
  height: 116px;
  border-radius: 8px;
  background: var(--bg-mat);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
}
.anthology-cover img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}
.anthology-body { flex: 1; min-width: 0; }
.anthology-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 6px;
}
.anthology-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 17.5px;
  font-weight: 700;
  color: var(--text-main);
}
.anthology-desc {
  margin: 0 0 11px;
  font-size: 13px;
  color: var(--text-secondary);
}
.anthology-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.story-chip {
  text-decoration: none;
  font-size: 12.5px;
  color: var(--text-main);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.story-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.anthology-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.anthology-actions .btn-primary,
.anthology-actions .btn-ghost {
  padding: 8px 14px;
  font-size: 12.5px;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
}
.duanpian-subtabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

/* ================= INFO / ARCHIVE PAGES (jieshao, song, alvin, about) ================= */
.info-card {
  background: var(--bg-sheet);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 30px;
  box-shadow: var(--shadow-card);
  margin-bottom: 22px;
}
.info-card-title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  margin: 18px 0;
}
.timeline-entry {
  position: relative;
  padding-left: 14px;
}
.timeline-entry::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-sheet);
}
.timeline-year {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.timeline-entry p {
  margin: 0 0 0.75em;
  text-indent: var(--para-indent);
}
.timeline-entry p:last-child { margin-bottom: 0; }
.timeline-meta-line {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0;
  text-indent: 0 !important;
}
.timeline-meta-line a { color: var(--accent); text-decoration: none; }
.timeline-meta-line a:hover { text-decoration: underline; }
.source-note {
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
}
.source-note a { color: var(--accent); }

/* Songs */
.song-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.song-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.song-card {
  background: var(--bg-sheet);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.song-head {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.song-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}
.song-artist {
  font-size: 12.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.lyrics-body {
  font-family: var(--font-serif);
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--text-main);
  flex: 1;
}
.lyrics-body p {
  margin: 0 0 1em;
}
.legacy-links {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--text-secondary);
}
.legacy-links summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
}
.legacy-links ul {
  margin: 8px 0 0;
  padding-left: 18px;
  word-break: break-all;
}
.legacy-links a { color: var(--accent); }

/* Alvin profile & friend logos */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}
.profile-item {
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 13.5px;
}
.profile-item.full { grid-column: 1 / -1; }
.profile-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 3px;
}
.profile-val { font-weight: 600; color: var(--text-main); word-break: break-word; }
.profile-val a { color: var(--accent); text-decoration: none; }
.profile-val a:hover { text-decoration: underline; }
.friend-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}
.friend-logo-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 12px;
}
.friend-logo-card img { max-height: 54px; width: auto; border-radius: 4px; }
.friend-logo-card:hover { border-color: var(--accent); color: var(--accent); }

/* About / Copyright */
.notice-callout {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
}
.disclaimer-box {
  margin: 18px 0;
  padding: 16px 20px;
  border-radius: 10px;
  background: rgba(185, 28, 28, 0.06);
  border: 1px solid rgba(185, 28, 28, 0.22);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}
html[data-theme="night"] .disclaimer-box {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.28);
}
.seal-box {
  margin: 26px 0 12px;
  text-align: center;
}
.seal-box img {
  max-width: 108px;
  height: auto;
  border-radius: 8px;
  background: #FFFFFF;
  padding: 4px;
  box-shadow: var(--shadow-card);
}

/* ================= GALLERY & LIGHTBOX ================= */
.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}
.gallery-card {
  background: var(--bg-sheet);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.gallery-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: var(--bg-mat);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.gallery-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}
.gallery-meta {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 13px;
  line-height: 1.5;
}
.gallery-num {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.gallery-cap {
  color: var(--text-main);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.single-photo-stage {
  background: var(--bg-sheet);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 26px 32px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.single-photo-imgs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.single-photo-imgs img {
  max-width: 100%;
  max-height: 76vh;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.14);
}
.single-photo-caption {
  margin: 0 auto 8px;
  max-width: 680px;
  font-family: var(--font-serif);
  font-size: 17.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.7;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(12, 14, 16, 0.92);
  backdrop-filter: blur(6px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 64px 28px;
  color: #F3F4F6;
}
.lightbox.open { display: flex; }
.lightbox-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #D1D5DB;
}
.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lightbox-link {
  color: #E5E7EB;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
}
.lightbox-link:hover { background: rgba(255, 255, 255, 0.14); }
.lightbox-close {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-img {
  max-width: 90vw;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
}
.lightbox-caption {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: 16px;
  text-align: center;
  color: #F9FAFB;
  max-width: 720px;
}
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.10);
  color: #FFFFFF;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.archive-box {
  margin-top: 44px;
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--bg-sheet);
  border: 1px solid var(--border);
}
.archive-title { margin: 0 0 6px; font-family: var(--font-serif); font-size: 17px; font-weight: 700; }
.archive-sub { margin: 0 0 14px; font-size: 13px; color: var(--text-secondary); }
.archive-links { display: flex; flex-wrap: wrap; gap: 9px; }
.archive-pill {
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-main);
  font-size: 13px;
  transition: all 0.16s ease;
}
.archive-pill:hover { border-color: var(--accent); color: var(--accent); }

.empty-state {
  text-align: center;
  padding: 52px 20px;
  color: var(--text-secondary);
  background: var(--bg-sheet);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

/* ================= BOOK TOC (contents.htm & norwood.htm) ================= */
.book-hero {
  display: flex;
  gap: 28px;
  align-items: center;
  background: var(--bg-sheet);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}
.book-cover-frame {
  width: 132px;
  height: 186px;
  border-radius: 9px;
  background: var(--bg-mat);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  flex-shrink: 0;
}
.book-cover-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.20);
}
.book-info { flex: 1; min-width: 0; }
.book-tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.book-h1 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 700;
}
.book-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.book-intro { margin: 0 0 14px; font-size: 14px; color: var(--text-secondary); line-height: 1.75; }
.book-notice { margin: 0 0 14px; font-size: 12.5px; color: var(--text-muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-primary {
  text-decoration: none;
  background: var(--accent);
  color: #FFFFFF;
  padding: 9px 20px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary:hover { opacity: 0.92; }
.btn-ghost {
  text-decoration: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 13.5px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.vol-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.vol-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.vol-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.16s ease;
}
.vol-tab:hover { border-color: var(--accent); color: var(--accent); }
.vol-tab.active { background: var(--accent); border-color: var(--accent); color: #FFFFFF; font-weight: 600; }
.ch-search { position: relative; min-width: 240px; }

.toc-panel, .vol-panel {
  background: var(--bg-sheet);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px 26px;
  box-shadow: var(--shadow-card);
  margin-bottom: 22px;
}
.toc-head, .vol-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--border);
}
.toc-head h2, .vol-title { margin: 0; font-family: var(--font-serif); font-size: 18px; font-weight: 700; }
.toc-count, .vol-meta { font-size: 13px; color: var(--text-secondary); }

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.ch-card, .chapter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.15s ease;
}
.ch-card:hover, .chapter-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.ch-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ch-num {
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  min-width: 26px;
  flex-shrink: 0;
}
.ch-title, .ch-name {
  font-size: 14.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ch-pov {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}
.ch-pov.pov-ten { background: rgba(180, 130, 70, 0.14); color: #9A6B32; }
html[data-theme="night"] .ch-pov.pov-ten { color: #D8A96D; }
.ch-pov.pov-ush { background: rgba(100, 116, 139, 0.14); color: #52637A; }
html[data-theme="night"] .ch-pov.pov-ush { color: #9EB0C7; }

/* Editions grid (norwood.htm) */
.edition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.edition-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.16s ease;
}
.edition-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.edition-badge {
  align-self: flex-start;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.edition-title { margin: 0 0 6px; font-family: var(--font-serif); font-size: 17px; font-weight: 700; }
.edition-desc { margin: 0 0 12px; font-size: 13px; color: var(--text-secondary); }
.edition-go { font-size: 13px; color: var(--accent); font-weight: 600; }

/* ================= ARTICLE READER ================= */
.reader-shell { padding: 28px 18px 72px; }
.reading-sheet {
  max-width: calc(var(--reader-width) + 120px);
  margin: 0 auto;
  background: var(--bg-sheet);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sheet);
  padding: 52px 60px 56px;
  transition: max-width 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.article-header {
  margin-bottom: 36px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.book-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  font-weight: 500;
}
.article-title {
  margin: 0 0 14px;
  font-family: var(--reader-font);
  font-size: clamp(24px, 3.2vw, 31px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: var(--text-main);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  font-size: 13px;
  color: var(--text-secondary);
}
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); display: inline-block; }

.article-body {
  max-width: var(--reader-width);
  margin: 0 auto;
  font-family: var(--reader-font);
  font-size: var(--reader-size);
  line-height: var(--reader-line);
  letter-spacing: var(--reader-letter);
  color: var(--text-main);
  text-align: justify;
  text-justify: inter-ideograph;
  word-break: break-word;
  user-select: text;
}
.article-body p { margin: 0 0 var(--para-gap); text-indent: var(--para-indent); }
.article-body p:last-child { margin-bottom: 0; }
.article-body h2, .article-body h3, .article-body .section-marker {
  font-family: var(--reader-font);
  font-size: 1.12em;
  font-weight: 700;
  text-align: center;
  text-indent: 0;
  margin: 1.8em 0 1em;
  color: var(--text-main);
}
.article-figure {
  margin: 1.8em auto;
  text-align: center;
  text-indent: 0;
}
.article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.article-figure figcaption {
  margin-top: 8px;
  font-size: 0.8em;
  color: var(--text-secondary);
}
.translator-note {
  font-size: 0.86em;
  color: var(--text-secondary);
  background: var(--bg-note);
  padding: 1px 6px;
  border-radius: 4px;
  margin: 0 2px;
}

/* Language Overrides */
html[data-lang="en"] .article-title { font-family: var(--font-en); letter-spacing: 0.01em; }
html[data-lang="en"] .article-body {
  font-family: var(--font-en);
  text-align: left;
  letter-spacing: 0.005em;
  line-height: 1.85;
  hyphens: auto;
}
html[data-lang="en"] .article-body p {
  text-indent: 0 !important;
  margin-bottom: 1.25em !important;
}
html[data-lang="jp"] .article-title,
html[data-lang="jp"] .article-body {
  font-family: var(--font-jp);
}

/* Chapter Nav Footer */
.chapter-nav {
  max-width: var(--reader-width);
  margin: 48px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}
.nav-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.18s ease;
  min-width: 0;
}
.nav-card:hover:not(.disabled) { border-color: var(--accent); transform: translateY(-1px); }
.nav-card.disabled { opacity: 0.48; cursor: default; }
.nav-card.next { text-align: right; }
.nav-card.center { text-align: center; padding: 12px 22px; font-weight: 500; color: var(--accent); }
.nav-sub { font-size: 11.5px; color: var(--text-secondary); margin-bottom: 3px; }
.nav-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.colophon {
  max-width: var(--reader-width);
  margin: 26px auto 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* Floating Toolbar */
.floating-tools {
  position: fixed;
  right: 22px;
  bottom: 34px;
  z-index: 950;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tool-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-main);
  box-shadow: var(--shadow-float);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  font-family: inherit;
  transition: all 0.18s ease;
}
.tool-btn:hover, .tool-btn.active { border-color: var(--accent); color: var(--accent); }
.tool-btn svg { width: 17px; height: 17px; }
.script-glyph {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tool-btn.hidden { opacity: 0; pointer-events: none; transform: translateY(8px); }

/* Settings Popover */
.settings-popover {
  position: fixed;
  right: 78px;
  bottom: 34px;
  width: 318px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-float);
  padding: 18px;
  z-index: 960;
  display: none;
}
.settings-popover.open { display: block; }
.popover-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.setting-row { margin-bottom: 14px; }
.setting-row:last-child { margin-bottom: 0; }
.setting-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.theme-swatch {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-page);
  color: var(--text-main);
  padding: 7px 4px;
  border-radius: 8px;
  font-size: 11.5px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.theme-swatch:hover { border-color: var(--accent); }
.theme-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
  color: var(--accent);
}
.swatch-dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.18); display: block; }

.seg-group { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-page);
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.seg-btn:hover { border-color: var(--accent); }
.seg-btn.active { background: var(--accent); border-color: var(--accent); color: #FFFFFF; font-weight: 600; }
.size-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
}
.stepper-btn {
  appearance: none;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border);
  width: 34px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.stepper-btn:hover { border-color: var(--accent); color: var(--accent); }
.stepper-val { font-size: 13px; font-weight: 600; }

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.chapter-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(350px, 88vw);
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  z-index: 1160;
  transform: translateX(100%);
  transition: transform 0.24s ease;
  display: flex;
  flex-direction: column;
}
.chapter-drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-title { font-size: 16px; font-weight: 700; }
.drawer-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.drawer-close {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-page);
  color: var(--text-main);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}
.drawer-list { flex: 1; overflow-y: auto; padding: 12px; }
.drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 13.5px;
  margin-bottom: 4px;
  transition: background-color 0.15s ease;
}
.drawer-item:hover { background: var(--bg-muted); }
.drawer-item.current { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.drawer-item-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.drawer-num { font-size: 12px; color: var(--text-muted); min-width: 22px; flex-shrink: 0; }
.drawer-item.current .drawer-num { color: var(--accent); }
.drawer-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toast-msg {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(24, 27, 31, 0.92);
  color: #F9FAFB;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  z-index: 1300;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.site-footer {
  max-width: 1140px;
  margin: 12px auto 0;
  padding: 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .breadcrumb { display: none; }
  .site-header-inner { padding: 10px 14px; }
  .container { padding: 18px 14px 56px; }
  .header-themes { padding: 3px 6px; gap: 5px; }
  .theme-dot { width: 15px; height: 15px; }

  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .book-card { padding: 10px; }
  .cover-stage { height: 132px; margin-bottom: 9px; }
  .book-title { font-size: 14px; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .search-box { max-width: none; }
  .row-desc { white-space: normal; }
  .anthology-banner { flex-direction: column; align-items: stretch; gap: 14px; padding: 15px; }
  .anthology-cover { width: 68px; height: 96px; margin: 0 auto; }
  .anthology-head { justify-content: center; text-align: center; }
  .anthology-desc { text-align: center; }
  .anthology-chips { justify-content: center; }
  .anthology-actions { flex-direction: row; justify-content: center; }
  .info-card { padding: 18px 16px; }
  .song-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-card { padding: 8px; }
  .single-photo-stage { padding: 18px 14px 22px; }
  .lightbox { padding: 54px 14px 20px; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 16px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .book-hero { flex-direction: column; text-align: center; padding: 22px 18px; }
  .book-meta-row, .cta-row { justify-content: center; }
  .ch-search { width: 100%; }
  .toc-panel, .vol-panel { padding: 18px 14px 20px; }
  .chapter-grid { grid-template-columns: 1fr; }

  .reader-shell { padding: 0 0 88px; }
  .reading-sheet {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    box-shadow: none;
    padding: 28px 20px 36px;
  }
  .article-header { margin-bottom: 24px; padding-bottom: 18px; }
  .chapter-nav { grid-template-columns: 1fr; gap: 8px; }
  .nav-card.next { text-align: left; }
  .floating-tools {
    right: 12px; left: 12px; bottom: 12px;
    flex-direction: row;
    justify-content: space-around;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px 8px;
    box-shadow: var(--shadow-float);
  }
  .tool-btn {
    border: none;
    box-shadow: none;
    background: transparent;
    width: auto;
    height: 40px;
    padding: 0 7px;
    flex-direction: row;
    gap: 4px;
    font-size: 12px;
  }
  .settings-popover { right: 12px; left: 12px; bottom: 72px; width: auto; }
}
