/* Chapter 1 textbook-specific styles */

body.chapter-book {
  --book-bg: #f7f0e4;
  --book-paper: #fffaf1;
  --book-line: rgba(68, 52, 28, 0.10);
  --book-text: #233040;
  --book-muted: #6c7582;
  --book-accent: #d87b2b;
  --book-accent-2: #2f7850;
  background:
    radial-gradient(circle at top left, rgba(216, 123, 43, 0.10), transparent 24%),
    radial-gradient(circle at top right, rgba(47, 120, 80, 0.10), transparent 22%),
    linear-gradient(180deg, #faf4e9 0%, #f6ebdc 48%, #efe1cf 100%);
  color: var(--book-text);
}

body.chapter-book .site-nav {
  width: min(980px, calc(100% - 20px));
  padding: 12px 16px;
}

body.chapter-book .page-shell {
  width: min(980px, calc(100% - 20px));
  padding: 92px 0 40px;
}

body.chapter-book .hero,
body.chapter-book .panel {
  background: var(--book-paper);
  border: 1px solid var(--book-line);
  box-shadow: 0 14px 42px rgba(35, 44, 60, 0.10);
}

body.chapter-book .hero {
  grid-template-columns: 1fr;
  padding: 18px 20px;
}

body.chapter-book .hero-card {
  display: none;
}

body.chapter-book .hero h1 {
  max-width: none;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

body.chapter-book .lead {
  max-width: none;
  line-height: 1.95;
}

body.chapter-book .hero-lead--mobile {
  display: none;
}

body.chapter-book .nav-label--short {
  display: none;
}

body.chapter-book .mini-notes {
  margin-top: 12px;
}

body.chapter-book .mini-notes span {
  background: rgba(47, 120, 80, 0.08);
  color: var(--book-accent-2);
}

body.chapter-book .chapter-page {
  margin-top: 16px;
  padding: 22px 22px 24px;
}

body.chapter-book .chapter-bonus,
body.chapter-book .chapter-patterns,
body.chapter-book .chapter-practice-card {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--book-line);
  border-radius: 20px;
  padding: 18px 18px 16px;
}

body.chapter-book .chapter-bonus-points {
  margin-top: 10px;
}

body.chapter-book .chapter-pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.chapter-book .chapter-pattern-card {
  background: #fff;
  border: 1px solid var(--book-line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(35, 44, 60, 0.05);
}

body.chapter-book .chapter-pattern-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  padding: 0.35em 0.7em;
  border-radius: 999px;
  background: rgba(47, 120, 80, 0.10);
  color: var(--book-accent-2);
  font-size: 0.82rem;
  font-weight: 700;
}

body.chapter-book .chapter-pattern-card h3 {
  margin: 12px 0 6px;
  line-height: 1.35;
}

body.chapter-book .chapter-pattern-subtitle {
  margin: 0 0 8px;
  color: var(--book-accent);
  font-weight: 700;
  font-size: 0.92rem;
}

body.chapter-book .chapter-pattern-hint {
  margin: 0;
  line-height: 1.8;
  color: var(--book-muted);
}

body.chapter-book .chapter-practice-card .hero-actions {
  margin-top: 12px;
}

body.chapter-book .roadmap-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

body.chapter-book .toc-grid {
  display: grid;
  gap: 12px;
}

body.chapter-book .toc-card {
  padding: 14px 16px;
}

@media (min-width: 960px) {
  body.chapter-book .roadmap-grid {
    grid-template-columns: 1fr;
  }
}

body.chapter-book .toc-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.8em;
  padding: 0.5em 0.9em;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
  font-size: 0.84rem;
}

body.chapter-book .toc-link {
  justify-self: start;
}

body.chapter-book.top-dashboard-app.grade5-book-app {
  min-height: 100vh;
  padding-bottom: 24px;
}

body.chapter-book.top-dashboard-app.grade5-book-app .site-nav {
  display: none;
}

body.chapter-book.top-dashboard-app.grade5-book-app .page-shell {
  width: 100%;
  margin: 0;
  padding: 0 0 40px;
}

body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-frame {
  width: min(1260px, calc(100% - 18px));
  margin: 0 auto;
  padding: 12px 0 24px;
  display: grid;
  grid-template-columns: minmax(210px, 238px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-sidebar {
  position: sticky;
  top: 14px;
}

body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-sidebar-copy {
  margin-top: 14px;
}

body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-sidebar-copy h1 {
  margin: 8px 0 6px;
  font-size: 1.05rem;
  line-height: 1.28;
}

body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-sidebar-lead {
  margin: 0;
  line-height: 1.55;
  color: var(--book-muted);
  font-size: 0.88rem;
}

body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-nav {
  margin-top: 12px;
}

body.chapter-book.top-dashboard-app.grade5-book-app .grade5-sidebar-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

body.chapter-book.top-dashboard-app.grade5-book-app .grade5-sidebar-action {
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

body.chapter-book.top-dashboard-app.grade5-book-app .grade5-sidebar-action--secondary {
  border-color: rgba(36, 106, 71, 0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.72)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(245, 238, 227, 0.95));
  color: var(--book-text);
}

body.chapter-book.top-dashboard-app.grade5-book-app .grade5-sidebar-action--primary {
  color: #fff;
  box-shadow: 0 12px 24px rgba(35, 44, 60, 0.12);
}

body.chapter-book.top-dashboard-app.grade5-book-app .brand-mark {
  background: transparent;
  object-fit: cover;
}

body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

body.chapter-book.top-dashboard-app.grade5-book-app .hero {
  grid-template-columns: 1fr;
  padding: 16px 18px;
}

body.chapter-book.top-dashboard-app.grade5-book-app .hero h1 {
  max-width: none;
  font-size: clamp(1.62rem, 3.2vw, 2.18rem);
}

body.chapter-book.top-dashboard-app.grade5-book-app .lead {
  max-width: none;
  line-height: 1.8;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-page {
  margin-top: 0;
  padding: 18px 18px 20px;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav {
  justify-content: flex-start;
  gap: 12px;
  margin-top: 16px;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .cta-button {
  min-width: 180px;
}

body.chapter-book .learning-progress-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 35;
  width: min(276px, calc(100vw - 40px));
  margin: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 18px;
  background: rgba(255, 250, 241, 0.74);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 26px rgba(35, 44, 60, 0.14);
}

body.chapter-book .learning-progress-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
}

body.chapter-book .learning-progress-box__copy {
  min-width: 0;
  flex: 1;
}

body.chapter-book .learning-progress-box__eyebrow {
  margin: 0 0 6px;
}

body.chapter-book .learning-progress-box__title {
  margin: 0;
  line-height: 1.35;
}

body.chapter-book .learning-progress-box__summary {
  margin: 6px 0 0;
  line-height: 1.55;
  word-break: break-word;
}

body.chapter-book .learning-progress-box__meta {
  margin: 4px 0 0;
  color: var(--book-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

body.chapter-book .learning-progress-box__button {
  flex-shrink: 0;
  align-self: center;
  justify-self: end;
  white-space: nowrap;
}

body.chapter-book .resume-strip {
  gap: 8px 10px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.chapter-book .resume-strip__main {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

body.chapter-book .resume-strip__label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  padding: 0.22em 0.64em;
  border-radius: 999px;
  background: rgba(33, 150, 83, 0.1);
  color: var(--book-accent);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

body.chapter-book .resume-strip__title {
  margin: 0;
  line-height: 1.28;
  font-size: 0.9rem;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

body.chapter-book .resume-strip__date {
  margin: 0;
  line-height: 1.45;
  word-break: break-word;
}

body.chapter-book .resume-strip__summary {
  display: none;
}

body.chapter-book .resume-strip__date {
  font-size: 0.76rem;
}

body.chapter-book .resume-strip__button {
  padding: 0.5em 0.88em;
  min-height: 2.35rem;
  font-size: 0.88rem;
}

body.chapter-book .book-section + .book-section {
  margin-top: 22px;
}

body.chapter-book .book-section h3 {
  margin: 18px 0 10px;
}

body.chapter-book .chapter-top,
body.chapter-book .chapter-grid,
body.chapter-book .chapter-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

body.chapter-book .chapter-rail {
  display: none;
}

body.chapter-book .chapter-banner,
body.chapter-book .chapter-card,
body.chapter-book .lesson-card {
  background: #fff;
  border: 1px solid var(--book-line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(35, 44, 60, 0.05);
}

body.chapter-book .chapter-banner,
body.chapter-book .lesson-card,
body.chapter-book .chapter-card {
  padding: 18px;
}

body.chapter-book .book-section {
  display: grid;
  gap: 12px;
}

body.chapter-book .chapter-banner h2,
body.chapter-book .chapter-card h3,
body.chapter-book .lesson-card h3 {
  margin: 0 0 10px;
  line-height: 1.35;
}

body.chapter-book .chapter-banner p,
body.chapter-book .chapter-card p,
body.chapter-book .lesson-card p {
  line-height: 1.9;
  color: var(--book-text);
}

body.chapter-book .checklist {
  gap: 10px;
}

body.chapter-book .checklist li {
  padding-left: 24px;
  line-height: 1.8;
}

body.chapter-book .chapter-pills {
  gap: 7px;
}

body.chapter-book .chapter-pill {
  background: rgba(47, 120, 80, 0.08);
  color: var(--book-accent-2);
  border-color: rgba(47, 120, 80, 0.12);
}

body.chapter-book .chapter-pills-nested {
  margin-top: 8px;
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 2px;
}

body.chapter-book .chapter-pills-nested .chapter-pill-link {
  white-space: nowrap;
}

body.chapter-book .chapter-pill-label {
  display: inline;
}

body.chapter-book .chapter-pill-label-short {
  display: none;
}

body.chapter-book .toc-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  justify-content: space-between;
}

body.chapter-book .toc-copy {
  flex: 1;
  min-width: 0;
}

body.chapter-book .toc-copy h3 {
  margin: 0;
  line-height: 1.35;
}

body.chapter-book .toc-card p,
body.chapter-book .toc-kicker {
  display: none;
}

body.chapter-book .reference-cover .panel-head {
  margin-bottom: 14px;
}

body.chapter-book .chapter-page-tight {
  padding-top: 18px;
}

body.chapter-book .toc-card-start .toc-number {
  background: linear-gradient(135deg, #2f7850, #d9892b);
  color: #fff;
}

body.chapter-book .dialogue {
  gap: 12px;
}

body.chapter-book .dialogue-line {
  background: #fff;
  border-color: var(--book-line);
  padding: 14px 16px;
}

body.chapter-book .dialogue-line strong {
  color: var(--book-accent-2);
  margin-bottom: 6px;
}

body.chapter-book .chapter-footer-nav {
  justify-content: flex-start;
  gap: 12px;
}

body.chapter-book .chapter-footer-nav .cta-button {
  min-width: 0;
}

body.chapter-book .reference-mobile-topbar {
  display: none;
}

body.chapter-book .reference-mobile-topbar__bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
}

body.chapter-book .reference-mobile-topbar__brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--book-text);
  text-decoration: none;
}

body.chapter-book .reference-mobile-topbar__brand-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 8px;
}

body.chapter-book .reference-mobile-topbar__brand-text {
  min-width: 0;
  max-width: 6.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--accent-deep);
}

body.chapter-book .reference-mobile-topbar__primary-links {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.chapter-book .reference-mobile-topbar__primary-links::-webkit-scrollbar {
  display: none;
}

body.chapter-book .reference-mobile-topbar__primary-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.55rem;
  padding: 0.15rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 106, 71, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: #263548;
  text-decoration: none;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

body.chapter-book .reference-mobile-topbar__primary-link:hover {
  border-color: rgba(36, 106, 71, 0.26);
  color: #1f2e41;
}

body.chapter-book .reference-mobile-topbar__context {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px 6px;
  min-width: 0;
}

body.chapter-book .reference-mobile-topbar__context .reference-mobile-topbar__chapter,
body.chapter-book .reference-mobile-topbar__context .reference-mobile-topbar__progress {
  flex-shrink: 0;
  min-height: 1.2rem;
  padding: 0.1rem 0.42rem;
  font-size: 0.62rem;
}

body.chapter-book .reference-mobile-topbar__context .reference-mobile-topbar__title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  line-height: 1.2;
}

body.chapter-book .reference-mobile-topbar__details {
  flex: 0 0 auto;
  margin-left: 2px;
}

body.chapter-book .reference-mobile-topbar__details > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.2rem;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 106, 71, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: #263548;
  list-style: none;
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

body.chapter-book .reference-mobile-topbar__details > summary::-webkit-details-marker {
  display: none;
}

body.chapter-book .reference-mobile-topbar__details[open] > summary {
  background: rgba(36, 106, 71, 0.1);
  border-color: rgba(36, 106, 71, 0.24);
}

body.chapter-book .reference-mobile-topbar__list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid rgba(36, 106, 71, 0.1);
}

body.chapter-book .reference-mobile-topbar__list-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(36, 106, 71, 0.12);
  background: rgba(255, 255, 255, 0.94);
  color: #243043;
  text-decoration: none;
}

body.chapter-book .reference-mobile-topbar__list-no {
  flex: 0 0 auto;
  min-width: 1.8rem;
  color: var(--book-accent-2);
  font-weight: 800;
  letter-spacing: 0.02em;
}

body.chapter-book .reference-mobile-topbar__list-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

body.chapter-book .reference-mobile-topbar__rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 4px;
  padding: 0 0 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.chapter-book .reference-mobile-topbar__rail::-webkit-scrollbar {
  display: none;
}

body.chapter-book .reference-mobile-topbar__chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  min-height: 1.7rem;
  padding: 0.16rem 0.32rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 106, 71, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: #263548;
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

body.chapter-book .reference-mobile-topbar__chip.is-active,
body.chapter-book .reference-mobile-topbar__chip[aria-current="page"] {
  background: linear-gradient(135deg, rgba(36, 106, 71, 0.14), rgba(217, 122, 47, 0.14));
  border-color: rgba(36, 106, 71, 0.28);
  color: #1f2e41;
}

body.chapter-book .reference-mobile-topbar__chip:focus-visible,
body.chapter-book .reference-mobile-topbar__details > summary:focus-visible,
body.chapter-book .reference-mobile-topbar__list-item:focus-visible,
body.chapter-book .reference-mobile-topbar__primary-link:focus-visible,
body.chapter-book .reference-mobile-topbar__brand:focus-visible {
  outline: 2px solid rgba(47, 111, 163, 0.45);
  outline-offset: 2px;
}

body.chapter-book .reference-mobile-topbar__chip-number {
  display: inline-block;
}

body.chapter-book .reference-mobile-topbar__chapter,
body.chapter-book .reference-mobile-topbar__progress {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.2rem;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  background: rgba(36, 106, 71, 0.1);
  color: #21422f;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

body.chapter-book .reference-mobile-topbar__progress.is-overview {
  background: rgba(217, 122, 47, 0.14);
  color: #6a3a13;
}

body.chapter-book .book-section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

body.chapter-book .book-section-title .section-no {
  color: var(--book-accent);
  font-weight: 700;
  letter-spacing: 0.08em;
}

body.chapter-book .book-section-title h2,
body.chapter-book .book-section-title h3 {
  margin: 0;
}

body.chapter-book .book-note {
  color: var(--book-muted);
  line-height: 1.85;
  margin: 0 0 12px;
}

body.chapter-book .alphabet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

body.chapter-book .alphabet-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 18px 16px;
  border: 1px solid var(--book-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff7eb 100%);
  box-shadow: 0 8px 24px rgba(35, 44, 60, 0.05);
}

body.chapter-book .alphabet-letter {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(47, 120, 80, 0.12), rgba(216, 123, 43, 0.14));
  color: var(--book-accent-2);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

body.chapter-book .alphabet-kana {
  font-size: 1rem;
  font-weight: 700;
  color: var(--book-text);
}

body.chapter-book .alphabet-hint {
  color: var(--book-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

body.chapter-book .alphabet-card .audio-play {
  appearance: none;
  border: 1px solid rgba(47, 120, 80, 0.18);
  background: linear-gradient(135deg, rgba(47, 120, 80, 0.12), rgba(216, 123, 43, 0.16));
  color: var(--book-accent-2);
  border-radius: 999px;
  width: fit-content;
  min-width: 74px;
  height: auto;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 6px 16px rgba(35, 44, 60, 0.06);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

body.chapter-book .alphabet-card .audio-play::before {
  content: '笙ｪ';
  font-size: 0.85rem;
  opacity: 0.9;
}

body.chapter-book .alphabet-card .audio-play:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 120, 80, 0.28);
  box-shadow: 0 10px 22px rgba(35, 44, 60, 0.08);
}

body.chapter-book .alphabet-card .audio-play:active {
  transform: translateY(0);
}

body.chapter-book .alphabet-card .audio-play:focus-visible {
  outline: 2px solid rgba(47, 120, 80, 0.35);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  body.chapter-book .site-nav {
    width: min(100%, calc(100% - 12px));
    padding: 7px 10px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  body.chapter-book .nav-brand {
    flex: 0 1 auto;
    gap: 8px;
  }

  body.chapter-book .brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  body.chapter-book .brand-text strong {
    font-size: 0.78rem;
    line-height: 1.1;
  }

  body.chapter-book .brand-text span {
    font-size: 0.62rem;
    line-height: 1.1;
  }

  body.chapter-book .nav-links {
    width: auto;
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 4px;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body.chapter-book .nav-links::-webkit-scrollbar {
    display: none;
  }

  body.chapter-book .nav-link {
    flex: 0 0 auto;
    padding: 6px 8px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  body.chapter-book .page-shell {
    width: min(100%, calc(100% - 12px));
    padding-top: 58px;
  }

  body.chapter-book .page-shell.textbook-shell {
    display: flex;
    flex-direction: column;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-frame {
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-main {
    min-width: 0;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .site-nav {
    display: none;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell {
    width: 100%;
    padding-top: 0;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell {
    gap: 0;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell > .hero {
    display: none;
    order: 0;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell > .reference-mobile-topbar {
    display: grid;
    order: 0;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgba(36, 106, 71, 0.12);
    border-radius: 0;
    background: #f7f4ec;
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 55;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .reference-mobile-topbar__bar {
    padding: 4px 10px 3px;
    border-bottom: 1px solid rgba(36, 106, 71, 0.08);
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .reference-mobile-topbar__context {
    padding: 4px 10px 4px;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .reference-mobile-topbar__rail {
    padding: 0 10px 5px;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell > .panel.chapter-page,
  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell > .book-section {
    order: 2;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell > .chapter-footer-nav {
    order: 3;
  }

  body.chapter-book .hero {
    padding: 10px 12px 12px;
  }

  body.chapter-book .hero h1 {
    font-size: clamp(1.28rem, 6vw, 1.55rem);
    line-height: 1.15;
  }

  body.chapter-book .lead {
    margin-top: 8px;
    font-size: 0.84rem;
    line-height: 1.55;
  }

  body.chapter-book .chapter-page {
    padding: 14px;
  }

  body.chapter-book .chapter-page-tight {
    padding-top: 12px;
  }

  body.chapter-book .alphabet-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.chapter-book .alphabet-card {
    padding: 10px 9px 9px;
    gap: 4px;
    border-radius: 14px;
  }

  body.chapter-book .alphabet-letter {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  body.chapter-book .alphabet-kana {
    font-size: 0.77rem;
    line-height: 1.3;
  }

  body.chapter-book .alphabet-hint {
    display: none;
  }

  body.chapter-book .alphabet-card .audio-play {
    width: auto;
    height: auto;
    min-width: 5.75rem;
    padding: 0.34rem 0.92rem 0.34rem 0.52rem;
    font-size: 0.75rem;
    gap: 0.4rem;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }

  body.chapter-book .alphabet-card .audio-play .audio-play-icon {
    width: 1.18rem;
    height: 1.18rem;
  }

  body.chapter-book .alphabet-card .audio-play .audio-play-icon::before {
    left: 0.45rem;
    border-width: 0.2rem 0 0.2rem 0.29rem;
  }

  body.chapter-book .alphabet-card .audio-play,
  body.chapter-book .expression-card .audio-play {
    width: auto;
    height: auto;
    min-width: 5.75rem;
    justify-content: center;
    align-items: center;
  }

  body.chapter-book .audio-play-text {
    display: inline-block;
    white-space: nowrap;
    line-height: 1;
  }

  body.chapter-book .card-detail-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 1.65rem;
    margin-top: 4px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(47, 120, 80, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 239, 227, 0.98));
    color: var(--book-accent-2);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
  }

  body.chapter-book .card-detail-trigger:active {
    transform: translateY(1px);
  }

  body.chapter-book .book-section {
    gap: 8px;
  }

  body.chapter-book .book-section + .book-section {
    margin-top: 16px;
  }

  body.chapter-book .book-note,
  body.chapter-book .book-list {
    font-size: 0.86rem;
    line-height: 1.55;
  }

  body.chapter-book .book-list {
    gap: 6px;
    padding-left: 1.15em;
  }

  body.chapter-book .book-list li {
    line-height: 1.55;
  }

  body.chapter-book .book-section-title {
    gap: 6px;
    margin-bottom: 8px;
  }

  body.chapter-book .book-section-title .section-no {
    min-width: 2.5em;
    padding: 0.34em 0.6em;
    font-size: 0.74rem;
  }

  body.chapter-book .book-section-title h2,
  body.chapter-book .book-section-title h3 {
    font-size: 1.02rem;
  }

  body.chapter-book .accent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.chapter-book .accent-card {
    padding: 10px 9px 9px;
    gap: 4px;
    border-radius: 14px;
  }

  body.chapter-book .accent-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  body.chapter-book .accent-name {
    font-size: 0.77rem;
    line-height: 1.3;
  }

  body.chapter-book .accent-hint {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 2.7em;
    font-size: 0.66rem;
    line-height: 1.35;
  }
}

body.chapter-book .audio-list {
  display: grid;
  gap: 10px;
}

body.chapter-book .expression-list {
  display: grid;
  gap: 12px;
}

body.chapter-book .expression-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--book-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffef9 0%, #fff8ef 100%);
  box-shadow: 0 8px 24px rgba(35, 44, 60, 0.05);
}

body.chapter-book .expression-card .audio-play {
  margin-top: 2px;
}

body.chapter-book .audio-play-icon {
  display: none !important;
}

body.chapter-book .audio-play-text {
  display: inline-block;
}

body.chapter-book .audio-play,
body.chapter-book .alphabet-card .audio-play,
body.chapter-book .expression-card .audio-play {
  appearance: none;
  width: fit-content;
  min-width: 74px;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(47, 120, 80, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(47, 120, 80, 0.12), rgba(216, 123, 43, 0.16));
  color: var(--book-accent-2);
  box-shadow: 0 6px 16px rgba(35, 44, 60, 0.06);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

body.chapter-book .audio-play:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 120, 80, 0.28);
  box-shadow: 0 10px 22px rgba(35, 44, 60, 0.08);
}

body.chapter-book .audio-play:active {
  transform: translateY(0);
}

body.chapter-book .audio-play:focus-visible {
  outline: 2px solid rgba(47, 120, 80, 0.35);
  outline-offset: 2px;
}

body.chapter-book.reference-chapter-trial,
body.chapter-book.reference-chapter-page,
body.chapter-book.grade4-reference-chapter,
body.chapter-book.grade3-reference-chapter {
  display: grid;
  grid-template-columns: minmax(210px, 238px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 100vh;
  padding: 14px;
}

body.chapter-book.reference-chapter-trial .site-nav,
body.chapter-book.reference-chapter-page .site-nav,
body.chapter-book.grade4-reference-chapter .site-nav,
body.chapter-book.grade3-reference-chapter .site-nav {
  position: sticky;
  top: 14px;
  left: auto;
  transform: none;
  width: auto;
  margin: 0;
  padding: 14px;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  border-radius: 22px;
}

body.chapter-book.reference-chapter-trial .nav-brand,
body.chapter-book.reference-chapter-page .nav-brand,
body.chapter-book.grade4-reference-chapter .nav-brand,
body.chapter-book.grade3-reference-chapter .nav-brand {
  align-self: stretch;
}

body.chapter-book.reference-chapter-trial .reference-chapter-brand-icon,
body.chapter-book.reference-chapter-page .reference-chapter-brand-icon,
body.chapter-book.grade4-reference-chapter .reference-chapter-brand-icon,
body.chapter-book.grade3-reference-chapter .reference-chapter-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: block;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  background: #fff;
}

body.chapter-book.reference-chapter-trial .brand-text strong,
body.chapter-book.reference-chapter-page .brand-text strong,
body.chapter-book.grade4-reference-chapter .brand-text strong,
body.chapter-book.grade3-reference-chapter .brand-text strong {
  font-size: 1rem;
}

body.chapter-book.reference-chapter-trial .brand-text span,
body.chapter-book.reference-chapter-page .brand-text span,
body.chapter-book.grade4-reference-chapter .brand-text span,
body.chapter-book.grade3-reference-chapter .brand-text span {
  font-size: 0.82rem;
}

body.chapter-book.reference-chapter-trial .nav-links,
body.chapter-book.reference-chapter-page .nav-links,
body.chapter-book.grade4-reference-chapter .nav-links,
body.chapter-book.grade3-reference-chapter .nav-links {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  overflow: visible;
}

body.chapter-book.reference-chapter-trial .nav-link,
body.chapter-book.reference-chapter-page .nav-link,
body.chapter-book.grade4-reference-chapter .nav-link,
body.chapter-book.grade3-reference-chapter .nav-link {
  width: 100%;
  justify-content: flex-start;
  white-space: normal;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-reference-sidebar-nav {
  margin-top: 0;
}

body.chapter-book.grade5-reference-app.reference-chapter-page {
  display: grid;
  grid-template-columns: minmax(210px, 238px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  width: min(1260px, calc(100% - 18px));
  margin: 0 auto;
  min-height: 100vh;
  padding: 12px 0 24px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .site-nav {
  grid-column: 1;
}

body.chapter-book.grade5-reference-app.reference-chapter-page > main.chapter-page {
  grid-column: 2;
  margin-top: 0;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-reference-sidebar-nav .nav-link {
  justify-content: center;
  min-height: 2.95rem;
  padding: 0.72rem 0.95rem;
  border-radius: 14px;
  border: 1px solid #ddd4c4;
  background: #f3efe6;
  color: #263548;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(35, 44, 60, 0.06);
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-reference-sidebar-nav .nav-link:hover {
  background: #ece6d8;
  border-color: #cfc3b0;
  color: #1f2e41;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-reference-sidebar-nav .nav-link:focus-visible,
body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-sidebar-action:focus-visible,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button:focus-visible {
  outline: 2px solid rgba(47, 111, 163, 0.45);
  outline-offset: 2px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-sidebar-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-sidebar-action {
  width: 100%;
  min-width: 0;
  justify-content: center;
  text-decoration: none;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(35, 44, 60, 0.08);
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-sidebar-action--prev {
  background: #2f6fa3;
  border-color: #2f6fa3;
  color: #ffffff;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-sidebar-action--next {
  background: #a85a14;
  border-color: #a85a14;
  color: #ffffff;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-sidebar-action--secondary {
  background: #f3efe6;
  border-color: #ddd4c4;
  color: #263548;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-sidebar-action:hover {
  transform: translateY(-1px);
}

body.chapter-book.reference-chapter-trial .reference-chapter-nav-actions,
body.chapter-book.reference-chapter-page .reference-chapter-nav-actions,
body.chapter-book.grade4-reference-chapter .reference-chapter-nav-actions,
body.chapter-book.grade3-reference-chapter .reference-chapter-nav-actions {
  display: grid;
  gap: 8px;
}

body.chapter-book.reference-chapter-trial .reference-chapter-nav-actions .cta-button,
body.chapter-book.reference-chapter-page .reference-chapter-nav-actions .cta-button,
body.chapter-book.grade4-reference-chapter .reference-chapter-nav-actions .cta-button,
body.chapter-book.grade3-reference-chapter .reference-chapter-nav-actions .cta-button,
body.chapter-book.reference-chapter-trial .chapter-footer-nav .cta-button,
body.chapter-book.reference-chapter-page .chapter-footer-nav .cta-button,
body.chapter-book.grade4-reference-chapter .chapter-footer-nav .cta-button,
body.chapter-book.grade3-reference-chapter .chapter-footer-nav .cta-button {
  text-decoration: none;
}

body.chapter-book.reference-chapter-trial .reference-chapter-nav-actions .cta-button,
body.chapter-book.reference-chapter-page .reference-chapter-nav-actions .cta-button,
body.chapter-book.grade4-reference-chapter .reference-chapter-nav-actions .cta-button,
body.chapter-book.grade3-reference-chapter .reference-chapter-nav-actions .cta-button {
  width: 100%;
  min-width: 0;
}

body.chapter-book.reference-chapter-trial .page-shell,
body.chapter-book.reference-chapter-page .page-shell,
body.chapter-book.grade4-reference-chapter .page-shell,
body.chapter-book.grade3-reference-chapter .page-shell {
  width: auto;
  margin: 0;
  padding: 0;
}

body.chapter-book.reference-chapter-trial .hero,
body.chapter-book.reference-chapter-page .hero,
body.chapter-book.grade4-reference-chapter .hero,
body.chapter-book.grade3-reference-chapter .hero {
  padding: 16px 18px 14px;
}

body.chapter-book.reference-chapter-trial .hero .lead,
body.chapter-book.reference-chapter-page .hero .lead,
body.chapter-book.grade4-reference-chapter .hero .lead,
body.chapter-book.grade3-reference-chapter .hero .lead {
  display: none;
}

body.chapter-book.reference-chapter-trial .reference-chapter-lead--short,
body.chapter-book.reference-chapter-page .reference-chapter-lead--short,
body.chapter-book.grade4-reference-chapter .reference-chapter-lead--short,
body.chapter-book.grade3-reference-chapter .reference-chapter-lead--short {
  margin: 0;
  color: var(--book-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

body.chapter-book.reference-chapter-trial .hero-actions,
body.chapter-book.reference-chapter-page .hero-actions,
body.chapter-book.grade4-reference-chapter .hero-actions,
body.chapter-book.grade3-reference-chapter .hero-actions {
  display: none;
}

@media (min-width: 960px) {
  body.chapter-book.reference-chapter-trial .hero-actions,
  body.chapter-book.reference-chapter-page .hero-actions,
  body.chapter-book.grade4-reference-chapter .hero-actions,
  body.chapter-book.grade3-reference-chapter .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
    width: min(280px, calc(100vw - 32px));
    margin: 18px 0 0;
    padding: 0;
    transform: translateX(-320px);
    position: relative;
    z-index: 2;
  }

  body.chapter-book.reference-chapter-trial .hero-actions .cta-button,
  body.chapter-book.reference-chapter-page .hero-actions .cta-button,
  body.chapter-book.grade4-reference-chapter .hero-actions .cta-button,
  body.chapter-book.grade3-reference-chapter .hero-actions .cta-button {
    width: 100%;
    justify-content: center;
  }

  body.chapter-book.reference-chapter-trial .reference-chapter-nav-actions,
  body.chapter-book.reference-chapter-page .reference-chapter-nav-actions,
  body.chapter-book.grade4-reference-chapter .reference-chapter-nav-actions,
  body.chapter-book.grade3-reference-chapter .reference-chapter-nav-actions {
    width: min(280px, calc(100vw - 32px));
    transform: translateX(-320px);
    position: relative;
    z-index: 2;
  }

  body.chapter-book.reference-chapter-trial .hero-actions .reference-link,
  body.chapter-book.reference-chapter-page .hero-actions .reference-link,
  body.chapter-book.grade4-reference-chapter .hero-actions .reference-link,
  body.chapter-book.grade3-reference-chapter .hero-actions .reference-link {
    display: none;
  }
}

body.chapter-book.reference-chapter-trial .chapter-page.reference-chapter-page,
body.chapter-book.reference-chapter-page .chapter-page.reference-chapter-page,
body.chapter-book.grade4-reference-chapter .chapter-page.reference-chapter-page,
body.chapter-book.grade3-reference-chapter .chapter-page.reference-chapter-page {
  padding: 18px 18px 20px;
}

body.chapter-book.reference-chapter-trial .book-section + .book-section,
body.chapter-book.reference-chapter-page .book-section + .book-section,
body.chapter-book.grade4-reference-chapter .book-section + .book-section,
body.chapter-book.grade3-reference-chapter .book-section + .book-section {
  margin-top: 16px;
}

body.chapter-book.reference-chapter-trial .book-section-title,
body.chapter-book.reference-chapter-page .book-section-title,
body.chapter-book.grade4-reference-chapter .book-section-title,
body.chapter-book.grade3-reference-chapter .book-section-title {
  margin-bottom: 8px;
}

body.chapter-book.reference-chapter-trial .book-section-title .section-no,
body.chapter-book.reference-chapter-page .book-section-title .section-no,
body.chapter-book.grade4-reference-chapter .book-section-title .section-no,
body.chapter-book.grade3-reference-chapter .book-section-title .section-no {
  min-width: 2.4em;
  padding: 0.34em 0.58em;
  font-size: 0.74rem;
}

body.chapter-book.reference-chapter-trial .book-note,
body.chapter-book.reference-chapter-page .book-note,
body.chapter-book.grade4-reference-chapter .book-note,
body.chapter-book.grade3-reference-chapter .book-note,
body.chapter-book.reference-chapter-trial .book-list,
body.chapter-book.reference-chapter-page .book-list,
body.chapter-book.grade4-reference-chapter .book-list,
body.chapter-book.grade3-reference-chapter .book-list {
  font-size: 0.9rem;
  line-height: 1.6;
}

body.chapter-book.reference-chapter-trial .book-list,
body.chapter-book.reference-chapter-page .book-list,
body.chapter-book.grade4-reference-chapter .book-list,
body.chapter-book.grade3-reference-chapter .book-list {
  gap: 6px;
}

body.chapter-book.reference-chapter-trial .alphabet-grid,
body.chapter-book.reference-chapter-page .alphabet-grid,
body.chapter-book.grade4-reference-chapter .alphabet-grid,
body.chapter-book.grade3-reference-chapter .alphabet-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

body.chapter-book.reference-chapter-trial .alphabet-card,
body.chapter-book.reference-chapter-page .alphabet-card,
body.chapter-book.grade4-reference-chapter .alphabet-card,
body.chapter-book.grade3-reference-chapter .alphabet-card {
  gap: 6px;
  padding: 12px 12px 10px;
  border-radius: 16px;
}

body.chapter-book.reference-chapter-trial .alphabet-letter,
body.chapter-book.reference-chapter-page .alphabet-letter,
body.chapter-book.grade4-reference-chapter .alphabet-letter,
body.chapter-book.grade3-reference-chapter .alphabet-letter {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 1.12rem;
}

body.chapter-book.reference-chapter-trial .alphabet-kana,
body.chapter-book.reference-chapter-page .alphabet-kana,
body.chapter-book.grade4-reference-chapter .alphabet-kana,
body.chapter-book.grade3-reference-chapter .alphabet-kana {
  font-size: 0.85rem;
  line-height: 1.25;
}

body.chapter-book.reference-chapter-trial .alphabet-hint,
body.chapter-book.reference-chapter-page .alphabet-hint,
body.chapter-book.grade4-reference-chapter .alphabet-hint,
body.chapter-book.grade3-reference-chapter .alphabet-hint {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: 2.8em;
  font-size: 0.78rem;
  line-height: 1.4;
}

body.chapter-book.reference-chapter-trial .alphabet-card .audio-play,
body.chapter-book.reference-chapter-page .alphabet-card .audio-play,
body.chapter-book.grade4-reference-chapter .alphabet-card .audio-play,
body.chapter-book.grade3-reference-chapter .alphabet-card .audio-play {
  min-width: 5rem;
  padding: 0.42rem 0.76rem;
  font-size: 0.74rem;
}

body.chapter-book.reference-chapter-trial .card-detail-trigger,
body.chapter-book.reference-chapter-page .card-detail-trigger,
body.chapter-book.grade4-reference-chapter .card-detail-trigger,
body.chapter-book.grade3-reference-chapter .card-detail-trigger {
  margin-top: 0;
  padding: 0.18rem 0.52rem;
  font-size: 0.68rem;
}

body.chapter-book.reference-chapter-trial .chapter-footer-nav,
body.chapter-book.reference-chapter-page .chapter-footer-nav,
body.chapter-book.grade4-reference-chapter .chapter-footer-nav,
body.chapter-book.grade3-reference-chapter .chapter-footer-nav {
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

body.chapter-book.reference-chapter-trial .chapter-footer-nav .cta-button,
body.chapter-book.reference-chapter-page .chapter-footer-nav .cta-button,
body.chapter-book.grade4-reference-chapter .chapter-footer-nav .cta-button,
body.chapter-book.grade3-reference-chapter .chapter-footer-nav .cta-button {
  min-width: 10rem;
}

@media (max-width: 960px) {
  body.chapter-book.reference-chapter-trial,
  body.chapter-book.reference-chapter-page,
  body.chapter-book.grade4-reference-chapter,
  body.chapter-book.grade3-reference-chapter {
    display: block;
    padding: 8px 0 18px;
    min-height: auto;
  }

  body.chapter-book.reference-chapter-trial .site-nav,
  body.chapter-book.reference-chapter-page .site-nav,
  body.chapter-book.grade4-reference-chapter .site-nav,
  body.chapter-book.grade3-reference-chapter .site-nav {
    position: sticky;
    top: 8px;
    left: auto;
    transform: none;
    width: min(100%, calc(100% - 12px));
    margin: 0 auto;
    padding: 8px 10px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  body.chapter-book.reference-chapter-trial .nav-brand,
  body.chapter-book.reference-chapter-page .nav-brand,
  body.chapter-book.grade4-reference-chapter .nav-brand,
  body.chapter-book.grade3-reference-chapter .nav-brand {
    flex: 0 0 auto;
    gap: 8px;
  }

  body.chapter-book.reference-chapter-trial .reference-chapter-brand-icon,
  body.chapter-book.reference-chapter-page .reference-chapter-brand-icon,
  body.chapter-book.grade4-reference-chapter .reference-chapter-brand-icon,
  body.chapter-book.grade3-reference-chapter .reference-chapter-brand-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  body.chapter-book.reference-chapter-trial .brand-text strong,
  body.chapter-book.reference-chapter-page .brand-text strong,
  body.chapter-book.grade4-reference-chapter .brand-text strong,
  body.chapter-book.grade3-reference-chapter .brand-text strong {
    font-size: 0.8rem;
    line-height: 1.1;
  }

  body.chapter-book.reference-chapter-trial .brand-text span,
  body.chapter-book.reference-chapter-page .brand-text span,
  body.chapter-book.grade4-reference-chapter .brand-text span,
  body.chapter-book.grade3-reference-chapter .brand-text span {
    font-size: 0.62rem;
    line-height: 1.1;
  }

  body.chapter-book.reference-chapter-trial .nav-links,
  body.chapter-book.reference-chapter-page .nav-links,
  body.chapter-book.grade4-reference-chapter .nav-links,
  body.chapter-book.grade3-reference-chapter .nav-links {
    flex: 1 1 auto;
    flex-direction: row;
    justify-content: flex-end;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body.chapter-book.reference-chapter-trial .nav-links::-webkit-scrollbar,
  body.chapter-book.reference-chapter-page .nav-links::-webkit-scrollbar,
  body.chapter-book.grade4-reference-chapter .nav-links::-webkit-scrollbar,
  body.chapter-book.grade3-reference-chapter .nav-links::-webkit-scrollbar {
    display: none;
  }

  body.chapter-book.reference-chapter-trial .nav-link,
  body.chapter-book.reference-chapter-page .nav-link,
  body.chapter-book.grade4-reference-chapter .nav-link,
  body.chapter-book.grade3-reference-chapter .nav-link {
    width: auto;
    flex: 0 0 auto;
    padding: 6px 8px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  body.chapter-book.reference-chapter-trial .reference-chapter-nav-actions,
  body.chapter-book.reference-chapter-page .reference-chapter-nav-actions,
  body.chapter-book.grade4-reference-chapter .reference-chapter-nav-actions,
  body.chapter-book.grade3-reference-chapter .reference-chapter-nav-actions {
    display: none;
  }

  body.chapter-book.reference-chapter-trial .page-shell,
  body.chapter-book.reference-chapter-page .page-shell,
  body.chapter-book.grade4-reference-chapter .page-shell,
  body.chapter-book.grade3-reference-chapter .page-shell {
    width: min(100% - 12px, 1180px);
    padding-top: 10px;
  }

  body.chapter-book.reference-chapter-trial .hero,
  body.chapter-book.reference-chapter-page .hero,
  body.chapter-book.grade4-reference-chapter .hero,
  body.chapter-book.grade3-reference-chapter .hero {
    padding: 12px 14px 12px;
  }

  body.chapter-book.reference-chapter-trial .hero h1,
  body.chapter-book.reference-chapter-page .hero h1,
  body.chapter-book.grade4-reference-chapter .hero h1,
  body.chapter-book.grade3-reference-chapter .hero h1 {
    font-size: clamp(1.34rem, 5.8vw, 1.72rem);
    line-height: 1.15;
  }

  body.chapter-book.reference-chapter-trial .reference-chapter-lead--short,
  body.chapter-book.reference-chapter-page .reference-chapter-lead--short,
  body.chapter-book.grade4-reference-chapter .reference-chapter-lead--short,
  body.chapter-book.grade3-reference-chapter .reference-chapter-lead--short {
    font-size: 0.85rem;
  }

  body.chapter-book.reference-chapter-trial .chapter-page.reference-chapter-page,
  body.chapter-book.reference-chapter-page .chapter-page.reference-chapter-page,
  body.chapter-book.grade4-reference-chapter .chapter-page.reference-chapter-page,
  body.chapter-book.grade3-reference-chapter .chapter-page.reference-chapter-page {
    padding: 14px;
  }

  body.chapter-book.reference-chapter-trial .chapter-page-tight,
  body.chapter-book.reference-chapter-page .chapter-page-tight,
  body.chapter-book.grade4-reference-chapter .chapter-page-tight,
  body.chapter-book.grade3-reference-chapter .chapter-page-tight {
    padding-top: 10px;
  }

  body.chapter-book.reference-chapter-trial .alphabet-grid,
  body.chapter-book.reference-chapter-page .alphabet-grid,
  body.chapter-book.grade4-reference-chapter .alphabet-grid,
  body.chapter-book.grade3-reference-chapter .alphabet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.chapter-book.reference-chapter-trial .alphabet-card,
  body.chapter-book.reference-chapter-page .alphabet-card,
  body.chapter-book.grade4-reference-chapter .alphabet-card,
  body.chapter-book.grade3-reference-chapter .alphabet-card {
    padding: 10px 9px 9px;
    gap: 4px;
    border-radius: 14px;
  }

  body.chapter-book.reference-chapter-trial .alphabet-letter,
  body.chapter-book.reference-chapter-page .alphabet-letter,
  body.chapter-book.grade4-reference-chapter .alphabet-letter,
  body.chapter-book.grade3-reference-chapter .alphabet-letter {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1.02rem;
  }

  body.chapter-book.reference-chapter-trial .alphabet-kana,
  body.chapter-book.reference-chapter-page .alphabet-kana,
  body.chapter-book.grade4-reference-chapter .alphabet-kana,
  body.chapter-book.grade3-reference-chapter .alphabet-kana {
    font-size: 0.76rem;
    line-height: 1.28;
  }

  body.chapter-book.reference-chapter-trial .alphabet-hint,
  body.chapter-book.reference-chapter-page .alphabet-hint,
  body.chapter-book.grade4-reference-chapter .alphabet-hint,
  body.chapter-book.grade3-reference-chapter .alphabet-hint {
    display: none;
  }

  body.chapter-book.reference-chapter-trial .alphabet-card .audio-play,
  body.chapter-book.reference-chapter-page .alphabet-card .audio-play,
  body.chapter-book.grade4-reference-chapter .alphabet-card .audio-play,
  body.chapter-book.grade3-reference-chapter .alphabet-card .audio-play {
    min-width: 5.55rem;
    padding: 0.34rem 0.82rem;
    font-size: 0.72rem;
  }

  body.chapter-book.reference-chapter-trial .card-detail-trigger,
  body.chapter-book.reference-chapter-page .card-detail-trigger,
  body.chapter-book.grade4-reference-chapter .card-detail-trigger,
  body.chapter-book.grade3-reference-chapter .card-detail-trigger {
    margin-top: 2px;
  }

  body.chapter-book.reference-chapter-trial .chapter-footer-nav,
  body.chapter-book.reference-chapter-page .chapter-footer-nav,
  body.chapter-book.grade4-reference-chapter .chapter-footer-nav,
  body.chapter-book.grade3-reference-chapter .chapter-footer-nav {
    flex-direction: column;
  }

  body.chapter-book.reference-chapter-trial .chapter-footer-nav .cta-button,
  body.chapter-book.reference-chapter-page .chapter-footer-nav .cta-button,
  body.chapter-book.grade4-reference-chapter .chapter-footer-nav .cta-button,
  body.chapter-book.grade3-reference-chapter .chapter-footer-nav .cta-button {
    width: 100%;
    min-width: 0;
  }
}

body.chapter-book .expression-body {
  display: grid;
  gap: 8px;
}

body.chapter-book .expression-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
}

body.chapter-book .expression-fr {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

body.chapter-book .expression-kana {
  color: var(--book-accent-2);
  font-size: 0.94rem;
}

body.chapter-book .expression-ja {
  color: var(--book-muted);
  font-size: 0.95rem;
}

body.chapter-book .expression-detail,
body.chapter-book .expression-example {
  margin: 0;
  line-height: 1.8;
  color: var(--book-text);
}

body.chapter-book .expression-example strong,
body.chapter-book .expression-detail strong {
  color: var(--book-accent-2);
}

body.chapter-book .audio-row {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--book-line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

body.chapter-book .audio-row:hover {
  transform: translateY(-1px);
}

body.chapter-book .audio-play {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--book-accent-2), var(--book-accent));
  color: #fff;
  font-size: 0.85rem;
  flex: 0 0 auto;
}

body.chapter-book .audio-copy {
  display: grid;
  gap: 4px;
}

body.chapter-book .audio-fr {
  font-weight: 800;
  font-size: 1.05rem;
}

body.chapter-book .audio-kana {
  color: var(--book-accent-2);
  font-size: 0.92rem;
}

body.chapter-book .audio-ja {
  color: var(--book-muted);
  font-size: 0.95rem;
}

body.chapter-book .book-answer,
body.chapter-book .book-example,
body.chapter-book .book-quiz {
  padding: 16px 0 0;
  border-top: 1px solid var(--book-line);
  margin-top: 14px;
}

body.chapter-book .book-quiz ol,
body.chapter-book .book-list,
body.chapter-book .book-answer ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

body.chapter-book .book-muted {
  color: var(--book-muted);
}

body.chapter-book .book-quote {
  padding: 12px 14px;
  border-left: 3px solid var(--book-accent);
  background: rgba(216, 123, 43, 0.06);
  border-radius: 0 14px 14px 0;
}

body.chapter-book .book-quote strong {
  display: block;
  margin-bottom: 6px;
}

body.chapter-book .expression-hub {
  display: grid;
  gap: 14px;
}

body.chapter-book .expression-group-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.chapter-book .expression-group-tabs::-webkit-scrollbar {
  display: none;
}

body.chapter-book .expression-group-tab {
  appearance: none;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid rgba(47, 120, 80, 0.14);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 242, 231, 0.98));
  color: var(--book-muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(35, 44, 60, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

body.chapter-book .expression-group-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 120, 80, 0.28);
  box-shadow: 0 10px 20px rgba(35, 44, 60, 0.08);
}

body.chapter-book .expression-group-tab.is-active {
  border-color: rgba(47, 120, 80, 0.30);
  background: linear-gradient(135deg, rgba(47, 120, 80, 0.12), rgba(216, 123, 43, 0.16));
  color: var(--book-accent-2);
}

body.chapter-book .expression-group-tab-icon {
  width: 2.05rem;
  height: 2.05rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(47, 120, 80, 0.09);
  font-size: 1rem;
}

body.chapter-book .expression-group-tab-text {
  display: grid;
  gap: 2px;
}

body.chapter-book .expression-group-tab-text strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

body.chapter-book .expression-group-tab-text span {
  font-size: 0.76rem;
  line-height: 1.25;
}

body.chapter-book .expression-group-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.05rem;
  height: 2.05rem;
  border-radius: 999px;
  background: rgba(47, 120, 80, 0.08);
  color: var(--book-accent-2);
  font-size: 0.78rem;
  font-weight: 800;
}

body.chapter-book .expression-group-panels {
  display: grid;
  gap: 14px;
}

body.chapter-book .expression-group-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--book-line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 244, 234, 0.95));
  box-shadow: 0 10px 28px rgba(35, 44, 60, 0.06);
}

body.chapter-book .expression-group-panel[hidden] {
  display: none !important;
}

body.chapter-book .expression-group-panel.is-active {
  display: grid;
}

body.chapter-book .expression-group-head {
  display: grid;
  gap: 8px;
}

body.chapter-book .expression-group-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.chapter-book .expression-group-kicker {
  margin: 0 0 2px;
  color: var(--book-accent-2);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.chapter-book .expression-group-title {
  margin: 0;
  line-height: 1.35;
  font-size: 1.18rem;
}

body.chapter-book .expression-group-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.4em;
  padding: 0.44rem 0.72rem;
  border-radius: 999px;
  background: rgba(47, 120, 80, 0.08);
  color: var(--book-accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

body.chapter-book .expression-group-summary {
  margin: 0;
  color: var(--book-muted);
  line-height: 1.8;
}

body.chapter-book .expression-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.chapter-book .expression-preview-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--book-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffef9 0%, #fff7ec 100%);
  box-shadow: 0 8px 20px rgba(35, 44, 60, 0.05);
}

body.chapter-book .expression-preview-card--dialogue {
  background: linear-gradient(180deg, #fffefb 0%, #fff6ea 100%);
}

body.chapter-book .expression-preview-card--profile {
  background: linear-gradient(180deg, #fffdf8 0%, #f7f3ff 100%);
}

body.chapter-book .expression-preview-card--family {
  background: linear-gradient(180deg, #fffef9 0%, #f5fbf4 100%);
}

body.chapter-book .expression-preview-card--tips {
  background: linear-gradient(180deg, #fffef9 0%, #eef7fb 100%);
}

body.chapter-book .expression-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--book-accent-2);
  font-weight: 800;
}

body.chapter-book .expression-preview-icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(47, 120, 80, 0.09);
  font-size: 1rem;
}

body.chapter-book .expression-preview-lines {
  display: grid;
  gap: 8px;
}

body.chapter-book .expression-preview-line {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(47, 120, 80, 0.06);
}

body.chapter-book .expression-preview-line-label {
  width: fit-content;
  padding: 0.28rem 0.56rem;
  border-radius: 999px;
  background: rgba(47, 120, 80, 0.09);
  color: var(--book-accent-2);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

body.chapter-book .expression-preview-line-fr {
  font-weight: 800;
  line-height: 1.4;
}

body.chapter-book .expression-preview-line-ja {
  color: var(--book-muted);
  line-height: 1.6;
}

body.chapter-book .expression-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.chapter-book .expression-strip::-webkit-scrollbar {
  display: none;
}

body.chapter-book .expression-chip {
  appearance: none;
  flex: 0 0 auto;
  min-width: 9rem;
  max-width: 12.5rem;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(47, 120, 80, 0.16);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(35, 44, 60, 0.05);
  color: var(--book-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

body.chapter-book .expression-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 120, 80, 0.28);
  box-shadow: 0 10px 20px rgba(35, 44, 60, 0.08);
}

body.chapter-book .expression-chip.is-active {
  border-color: rgba(47, 120, 80, 0.34);
  background: linear-gradient(135deg, rgba(47, 120, 80, 0.10), rgba(216, 123, 43, 0.14));
}

body.chapter-book .expression-chip-fr {
  font-weight: 800;
  line-height: 1.35;
}

body.chapter-book .expression-chip-ja {
  color: var(--book-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

body.chapter-book .expression-focus-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--book-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffef9 0%, #fff8ef 100%);
  box-shadow: 0 8px 24px rgba(35, 44, 60, 0.05);
}

body.chapter-book .expression-focus-card .audio-play {
  margin-top: 2px;
}

body.chapter-book .expression-focus-copy {
  display: grid;
  gap: 8px;
}

body.chapter-book .expression-focus-tag {
  margin: 0;
  width: fit-content;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  background: rgba(47, 120, 80, 0.10);
  color: var(--book-accent-2);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

body.chapter-book .expression-focus-meta {
  display: grid;
  gap: 6px;
}

body.chapter-book .expression-focus-fr {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

body.chapter-book .expression-focus-kana {
  color: var(--book-accent-2);
  font-size: 0.94rem;
}

body.chapter-book .expression-focus-ja {
  color: var(--book-muted);
  font-size: 0.95rem;
}

body.chapter-book .expression-focus-detail,
body.chapter-book .expression-focus-example {
  margin: 0;
  line-height: 1.8;
  color: var(--book-text);
}

body.chapter-book .expression-focus-detail strong,
body.chapter-book .expression-focus-example strong {
  color: var(--book-accent-2);
}

body.chapter-book .quiz-shell {
  display: grid;
  gap: 14px;
}

body.chapter-book .quiz-topline {
  display: grid;
  gap: 10px;
}

body.chapter-book .quiz-progress {
  display: grid;
  gap: 8px;
}

body.chapter-book .quiz-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(47, 120, 80, 0.10);
  overflow: hidden;
}

body.chapter-book .quiz-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--book-accent), var(--book-accent-2));
  transition: width 0.25s ease;
}

body.chapter-book .quiz-counter,
body.chapter-book .quiz-score {
  margin: 0;
  color: var(--book-muted);
  font-weight: 700;
}

body.chapter-book .quiz-card {
  padding: 18px;
  border: 1px solid var(--book-line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fffef9 0%, #fff7ed 100%);
  box-shadow: 0 10px 28px rgba(35, 44, 60, 0.06);
  display: grid;
  gap: 14px;
}

body.chapter-book .quiz-tag {
  margin: 0;
  color: var(--book-accent-2);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.chapter-book .quiz-question {
  margin: 0;
  font-size: clamp(1.2rem, 2.8vw, 1.55rem);
  line-height: 1.45;
}

body.chapter-book .quiz-options {
  display: grid;
  gap: 10px;
}

body.chapter-book .quiz-option {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(47, 120, 80, 0.16);
  border-radius: 16px;
  background: #fff;
  color: var(--book-text);
  padding: 14px 16px;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

body.chapter-book .quiz-option:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(35, 44, 60, 0.07);
  border-color: rgba(47, 120, 80, 0.28);
}

body.chapter-book .quiz-option:disabled {
  cursor: default;
  opacity: 0.98;
}

body.chapter-book .quiz-option.is-correct {
  border-color: rgba(47, 120, 80, 0.55);
  background: rgba(47, 120, 80, 0.10);
}

body.chapter-book .quiz-option.is-wrong {
  border-color: rgba(216, 123, 43, 0.55);
  background: rgba(216, 123, 43, 0.10);
}

body.chapter-book .quiz-feedback {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.8;
  background: rgba(35, 48, 64, 0.04);
  color: var(--book-text);
}

body.chapter-book .quiz-feedback span {
  display: block;
  color: var(--book-muted);
}

body.chapter-book .quiz-feedback.is-good {
  background: rgba(47, 120, 80, 0.10);
}

body.chapter-book .quiz-feedback.is-bad {
  background: rgba(216, 123, 43, 0.10);
}

body.chapter-book .quiz-feedback.is-neutral {
  background: rgba(35, 48, 64, 0.04);
}

body.chapter-book .quiz-actions {
  display: flex;
  justify-content: flex-end;
}

body.chapter-book .quiz-shell--compact {
  display: grid;
  gap: 12px;
}

body.chapter-book .quiz-shell--compact .quiz-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

body.chapter-book .quiz-shell--compact .quiz-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 14px;
  width: 100%;
  color: var(--book-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

body.chapter-book .quiz-shell--compact .quiz-status strong {
  color: var(--book-accent-2);
}

body.chapter-book .quiz-shell--compact .quiz-tag,
body.chapter-book .quiz-shell--compact .quiz-number {
  display: none;
}

body.chapter-book .quiz-shell--compact .quiz-card {
  padding: 16px 18px 14px;
  border: 1px solid var(--book-line);
  border-radius: 24px;
  background: linear-gradient(180deg, #fffef8 0%, #fff8ef 100%);
  box-shadow: 0 10px 28px rgba(35, 44, 60, 0.05);
  display: grid;
  gap: 12px;
}

body.chapter-book .quiz-shell--compact .quiz-question {
  margin: 0;
  display: grid;
  gap: 4px;
}

body.chapter-book .quiz-shell--compact .quiz-question-target {
  display: block;
  font-size: clamp(1.22rem, 3vw, 1.6rem);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--book-text);
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

body.chapter-book .quiz-shell--compact .quiz-question-instruction {
  display: block;
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 600;
  color: var(--book-muted);
}

body.chapter-book .quiz-shell--compact .quiz-prompt {
  margin: 0;
  color: var(--book-muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

body.chapter-book .quiz-shell--compact .quiz-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem 0.42rem;
  min-height: 3rem;
}

body.chapter-book .quiz-shell--compact .quiz-native-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid rgba(47, 120, 80, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--book-text);
  font: inherit;
  font-size: 1rem;
}

body.chapter-book .quiz-shell--compact .quiz-native-input:focus {
  border-color: rgba(47, 120, 80, 0.72);
  outline: 2px solid rgba(47, 120, 80, 0.16);
  outline-offset: 2px;
}

body.chapter-book .quiz-shell--compact .quiz-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.95rem;
  padding: 0 0.55rem;
  border-radius: 14px;
  border: 1px solid rgba(47, 120, 80, 0.16);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--book-text);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

body.chapter-book .quiz-shell--compact .quiz-word-separator {
  flex: 0 0 clamp(0.55rem, 1.8vw, 0.95rem);
  min-height: 1px;
}

body.chapter-book .quiz-shell--compact .quiz-slot.is-empty {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 239, 227, 0.9));
  color: rgba(47, 62, 80, 0.28);
}

body.chapter-book .quiz-shell--compact .quiz-feedback {
  min-height: 2.4em;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.65;
  background: rgba(35, 48, 64, 0.04);
  color: var(--book-text);
}

body.chapter-book .quiz-shell--compact .quiz-feedback span {
  display: block;
  color: var(--book-muted);
}

body.chapter-book .quiz-shell--compact .quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

body.chapter-book .quiz-keyboard-panel {
  display: grid;
  gap: 10px;
}

body.chapter-book .quiz-keyboard-phone {
  display: none;
}

@media (max-width: 980px) {
  body.chapter-book.top-dashboard-app.grade5-book-app .site-nav {
    display: flex;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-frame {
    width: min(100% - 12px, 1280px);
    padding-top: 8px;
    padding-bottom: 24px;
    grid-template-columns: 1fr;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-sidebar {
    display: none;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell {
    padding: 0 0 32px;
  }
}

@media (max-width: 720px) {
  body.chapter-book .page-shell {
    width: min(100% - 14px, 980px);
  }

  body.chapter-book .chapter-page {
    padding: 16px;
  }

  body.chapter-book .hero {
    padding: 12px 14px 14px;
  }

  body.chapter-book .hero h1 {
    font-size: clamp(1.38rem, 5.6vw, 1.7rem);
    line-height: 1.12;
  }

  body.chapter-book .lead {
    margin-top: 8px;
    font-size: 0.88rem;
    line-height: 1.58;
  }

  body.chapter-book .intro-block {
    margin-top: 8px;
  }

  body.chapter-book .intro-block p {
    margin-top: 0.4rem;
  }

  body.chapter-book .intro-block p:nth-of-type(n + 2),
  body.chapter-book .mini-notes {
    display: none;
  }

  body.chapter-book .expression-card {
    grid-template-columns: 1fr;
  }

  body.chapter-book .expression-card .audio-play {
    width: 42px;
    height: 42px;
  }

  body.chapter-book .quiz-actions {
    justify-content: stretch;
  }

  body.chapter-book .quiz-actions .cta-button {
    width: 100%;
  }

  body.chapter-book .expression-preview-grid {
    grid-template-columns: 1fr;
  }

  body.chapter-book .expression-focus-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  body.chapter-book .expression-focus-card .audio-play {
    width: fit-content;
    max-width: 100%;
    margin-top: 0;
    margin-bottom: 2px;
  }
}

@media (max-width: 640px) {
  body.chapter-book .quiz-shell--compact {
    gap: 10px;
  }

  body.chapter-book .quiz-shell--compact .quiz-topline {
    gap: 6px;
  }

  body.chapter-book .quiz-shell--compact .quiz-card {
    padding: 12px 12px 11px;
    border-radius: 18px;
    gap: 8px;
  }

  body.chapter-book .quiz-shell--compact .quiz-question {
    gap: 2px;
  }

  body.chapter-book .quiz-shell--compact .quiz-question-target {
    font-size: clamp(1.08rem, 5.2vw, 1.36rem);
    line-height: 1.28;
  }

  body.chapter-book .quiz-shell--compact .quiz-question-instruction {
    font-size: 0.76rem;
    line-height: 1.45;
  }

  body.chapter-book .quiz-shell--compact .quiz-status {
    gap: 6px 10px;
    font-size: 0.8rem;
  }

  body.chapter-book .quiz-shell--compact .quiz-prompt {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  body.chapter-book .quiz-shell--compact .quiz-entry {
    gap: 0.14rem 0.34rem;
    min-height: 1.9rem;
  }

  body.chapter-book .quiz-shell--compact .quiz-slot {
    min-width: 1.35rem;
    min-height: 1.8rem;
    padding: 0 0.18rem;
    border-radius: 9px;
    font-size: 0.74rem;
  }

  body.chapter-book .quiz-shell--compact .quiz-word-separator {
    flex-basis: clamp(0.42rem, 2vw, 0.7rem);
  }

  body.chapter-book .quiz-shell--compact .quiz-feedback {
    min-height: 1.8em;
    padding: 6px 8px;
    border-radius: 10px;
    line-height: 1.32;
    font-size: 0.7rem;
  }

  body.chapter-book .quiz-shell--compact .quiz-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  body.chapter-book .quiz-shell--compact .quiz-actions .cta-button {
    width: 100%;
    min-height: 1.95rem;
    padding: 0.3rem 0.35rem;
    border-radius: 9px;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  body.chapter-book .quiz-shell--compact .quiz-actions .cta-button.primary {
    grid-column: auto;
  }

  body.chapter-book .quiz-keyboard-panel {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  body.chapter-book .quiz-keyboard-desktop,
  body.chapter-book .study-keyboard.quiz-keyboard-desktop {
    display: none !important;
  }

  body.chapter-book .quiz-keyboard-phone {
    display: grid !important;
    gap: 6px;
    padding: 8px 8px 6px;
    border: 1px solid var(--book-line);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(247, 248, 250, 0.98), rgba(232, 236, 240, 0.98));
    box-shadow:
      0 10px 26px rgba(35, 44, 60, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.68);
    width: 100%;
    box-sizing: border-box;
  }

  body.chapter-book .phone-keyboard-handle {
    width: 36px;
    height: 3px;
    margin: 0 auto 2px;
    border-radius: 999px;
    background: rgba(35, 48, 64, 0.16);
  }

  body.chapter-book .phone-keyboard-row {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    align-items: center;
    gap: 2px;
    width: 100%;
    justify-items: center;
  }

  body.chapter-book .phone-keyboard-row--top {
    justify-content: stretch;
  }

  body.chapter-book .phone-keyboard-row--middle {
    justify-content: stretch;
  }

  body.chapter-book .phone-keyboard-row--bottom {
    justify-content: stretch;
  }

  body.chapter-book .phone-keyboard-row--accents {
    margin-top: 2px;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 2px;
  }

  body.chapter-book .phone-keyboard-row--accents::-webkit-scrollbar {
    display: none;
  }

  body.chapter-book .phone-keyboard-spacer {
    display: block;
    min-width: 0;
    height: 1px;
  }

  body.chapter-book .phone-keyboard-spacer--wide {
    grid-column: span 1;
  }

  body.chapter-book .phone-keyboard-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 1.9rem;
    padding: 0.16rem 0.04rem;
    border-radius: 9px;
    font-size: 0.58rem;
    letter-spacing: 0.01em;
    line-height: 1;
    color: var(--book-text);
    border-color: rgba(35, 48, 64, 0.09);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(234, 237, 241, 0.98));
    box-shadow:
      0 4px 10px rgba(35, 44, 60, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.88);
    font-weight: 700;
  }

  body.chapter-book .phone-keyboard-key--wide {
    grid-column: span 1;
    min-width: 0;
    width: 100%;
  }

  body.chapter-book .phone-keyboard-key--accent {
    min-width: 0;
    width: 100%;
    padding-inline: 0.04rem;
    font-size: 0.54rem;
  }

  body.chapter-book .phone-keyboard-key--clear {
    grid-column: span 1;
    min-width: 0;
    width: 100%;
    font-size: 0.58rem;
  }

  body.chapter-book .expression-group-panel {
    padding: 12px;
    gap: 10px;
    border-radius: 18px;
  }

  body.chapter-book .expression-group-tab {
    min-height: 46px;
    padding: 8px 10px;
    gap: 6px;
  }

  body.chapter-book .expression-group-tab-icon {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.9rem;
  }

  body.chapter-book .expression-group-tab-text strong {
    font-size: 0.8rem;
  }

  body.chapter-book .expression-group-tab-text span {
    font-size: 0.67rem;
  }

  body.chapter-book .expression-group-tab-count {
    min-width: 1.7rem;
    height: 1.7rem;
    font-size: 0.64rem;
  }

  body.chapter-book .expression-group-title {
    font-size: 1rem;
  }

  body.chapter-book .expression-group-count {
    padding: 0.3rem 0.55rem;
    font-size: 0.66rem;
  }

  body.chapter-book .expression-group-summary {
    font-size: 0.84rem;
    line-height: 1.55;
  }

  body.chapter-book .expression-preview-grid {
    gap: 8px;
  }

  body.chapter-book .expression-preview-card {
    padding: 10px;
    gap: 8px;
    border-radius: 14px;
  }

  body.chapter-book .expression-preview-head {
    gap: 6px;
    font-size: 0.76rem;
  }

  body.chapter-book .expression-preview-icon {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 10px;
    font-size: 0.86rem;
  }

  body.chapter-book .expression-preview-line {
    padding: 8px 10px;
    border-radius: 12px;
  }

  body.chapter-book .expression-preview-line-label {
    font-size: 0.64rem;
  }

  body.chapter-book .expression-preview-line-fr {
    font-size: 0.82rem;
  }

  body.chapter-book .expression-preview-line-ja {
    font-size: 0.72rem;
  }

  body.chapter-book .expression-strip {
    gap: 8px;
  }

  body.chapter-book .expression-chip {
    min-width: 7.2rem;
    max-width: 9.5rem;
    padding: 8px 10px;
    gap: 3px;
    border-radius: 12px;
  }

  body.chapter-book .expression-chip-fr {
    font-size: 0.82rem;
  }

  body.chapter-book .expression-chip-ja {
    font-size: 0.68rem;
    line-height: 1.35;
  }

  body.chapter-book .expression-focus-card {
    padding: 12px;
    gap: 10px;
    border-radius: 16px;
  }

  body.chapter-book .expression-focus-tag {
    padding: 0.26rem 0.56rem;
    font-size: 0.64rem;
  }

  body.chapter-book .expression-focus-fr {
    font-size: 0.98rem;
  }

  body.chapter-book .expression-focus-kana {
    font-size: 0.8rem;
  }

  body.chapter-book .expression-focus-ja {
    font-size: 0.78rem;
  }

  body.chapter-book .expression-focus-detail,
  body.chapter-book .expression-focus-example {
    font-size: 0.78rem;
    line-height: 1.55;
  }
}

/* Reference page overrides */
body.chapter-book .reference-hero {
  padding-bottom: 22px;
}

body.chapter-book .reference-cover {
  padding-top: 18px;
}

body.chapter-book .roadmap-grid {
  grid-template-columns: 1fr;
}

body.chapter-book .toc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
}

body.chapter-book .toc-number {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.8em;
  padding: 0.5em 0.9em;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
  font-size: 0.82rem;
}

body.chapter-book .toc-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

body.chapter-book .toc-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

body.chapter-book .toc-copy h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
}

body.chapter-book .toc-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

body.chapter-book .chapter-pills-nested {
  flex-wrap: wrap;
  margin-top: 2px;
  overflow-x: hidden;
  gap: 6px;
}

body.chapter-book .chapter-pills-nested .chapter-pill-link {
  font-size: 0.88rem;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
}

body.chapter-book .toc-card p,
body.chapter-book .toc-kicker {
  display: none;
}

body.chapter-book .toc-card-featured .toc-copy,
body.chapter-book .toc-card-start .toc-copy {
  gap: 6px;
}

body.chapter-book .alphabet-grid,
body.chapter-book .accent-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

body.chapter-book .alphabet-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.chapter-book .accent-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.chapter-book .accent-compare-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--book-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 18px rgba(35, 44, 60, 0.04);
}

body.chapter-book .accent-compare-table th,
body.chapter-book .accent-compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--book-line);
  vertical-align: top;
  text-align: left;
  line-height: 1.5;
}

body.chapter-book .accent-compare-table th {
  background: rgba(47, 120, 80, 0.08);
  color: var(--book-accent-2);
  font-size: 0.92rem;
  font-weight: 700;
}

body.chapter-book .accent-compare-table td {
  color: var(--book-text);
  font-size: 0.9rem;
}

body.chapter-book .accent-compare-table tr:last-child td {
  border-bottom: 0;
}

body.chapter-book .alphabet-card,
body.chapter-book .accent-card {
  border: 1px solid var(--book-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffef9 0%, #fff8ee 100%);
  box-shadow: 0 8px 18px rgba(35, 44, 60, 0.05);
  padding: 14px;
  display: grid;
  gap: 6px;
}

body.chapter-book .alphabet-letter,
body.chapter-book .accent-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(36, 106, 71, 0.12), rgba(217, 122, 47, 0.18));
  color: var(--book-accent-2);
  font-size: 1.55rem;
  font-weight: 800;
}

body.chapter-book .alphabet-kana,
body.chapter-book .accent-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--book-text);
}

body.chapter-book .alphabet-hint,
body.chapter-book .accent-hint {
  color: var(--book-muted);
  line-height: 1.7;
  font-size: 0.92rem;
}

body.chapter-book .accent-example {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid rgba(47, 120, 80, 0.12);
  border-radius: 14px;
  background: rgba(47, 120, 80, 0.05);
}

body.chapter-book .accent-example-word {
  color: var(--book-text);
  font-weight: 800;
}

body.chapter-book .accent-example-kana {
  color: var(--book-accent-2);
  font-size: 0.9rem;
  font-weight: 700;
}

body.chapter-book .accent-example-ja {
  color: var(--book-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

body.chapter-book.chapter-book-accent .accent-more-body {
  display: grid;
  gap: 6px;
}

body.chapter-book .card-detail-trigger {
  display: none;
}

body.chapter-book .card-detail-modal-open {
  overflow: hidden;
}

body.chapter-book .card-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 18px;
}

body.chapter-book .card-detail-modal[hidden] {
  display: none;
}

body.chapter-book .card-detail-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 36, 0.46);
  backdrop-filter: blur(8px);
}

body.chapter-book .card-detail-modal__sheet {
  position: relative;
  width: min(92vw, 420px);
  max-height: min(84vh, 720px);
  overflow: auto;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(247, 239, 227, 0.98));
  box-shadow: 0 28px 70px rgba(10, 18, 30, 0.28);
}

body.chapter-book .card-detail-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 24, 36, 0.9);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

body.chapter-book .card-detail-modal__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding-right: 2.5rem;
}

body.chapter-book .card-detail-modal__badge {
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(47, 120, 80, 0.12), rgba(216, 123, 43, 0.18));
  color: var(--book-accent-2);
  font-size: 1.6rem;
  font-weight: 800;
}

body.chapter-book .card-detail-modal__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--book-text);
}

body.chapter-book .card-detail-modal__subtitle {
  margin-top: 4px;
  color: var(--book-muted);
  font-size: 0.9rem;
}

body.chapter-book .card-detail-modal__play {
  margin-top: 14px;
}

body.chapter-book .card-detail-modal__audio {
  margin-top: 0;
}

body.chapter-book .card-detail-modal__body {
  margin-top: 14px;
}

body.chapter-book .card-detail-modal__text {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(47, 120, 80, 0.07);
  color: var(--book-text);
  line-height: 1.8;
  font-size: 0.98rem;
}

@media (max-width: 640px) {
  body.chapter-book .site-nav {
    width: min(100%, calc(100% - 12px));
    padding: 8px 10px;
  }

  body.chapter-book .page-shell {
    width: min(100%, calc(100% - 12px));
    padding-top: 72px;
    padding-bottom: 28px;
  }

  body.chapter-book .hero,
  body.chapter-book .panel {
    border-radius: 20px;
  }

  body.chapter-book .hero {
    padding: 16px;
  }

  body.chapter-book .chapter-page {
    padding: 16px;
  }

  body.chapter-book .hero-actions,
  body.chapter-book .chapter-footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 6px;
  }

  body.chapter-book .hero-actions .cta-button,
  body.chapter-book .chapter-footer-nav .cta-button {
    width: 100%;
    min-width: 0;
    min-height: 2.15rem;
    padding: 0.34rem 0.38rem;
    font-size: 0.72rem;
    line-height: 1.1;
    white-space: normal;
  }

  body.chapter-book.chapter-book-accent .hero-lead--desktop {
    display: none;
  }

  body.chapter-book.chapter-book-accent .hero-lead--mobile {
    display: block;
    margin-top: 10px;
    font-size: 0.92rem;
    line-height: 1.7;
  }

  body.chapter-book .nav-label--full {
    display: none;
  }

  body.chapter-book .nav-label--short {
    display: inline;
  }

  body.chapter-book .toc-card {
    align-items: flex-start;
    flex-direction: column;
  }

  body.chapter-book .toc-title-row {
    width: 100%;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
  }

  body.chapter-book .toc-copy h3 {
    flex: 1;
    min-width: 0;
  }

  body.chapter-book .toc-link {
    width: auto;
    min-height: 1.85rem;
    padding: 0.22rem 0.5rem;
    font-size: 0.66rem;
    line-height: 1;
    align-self: flex-start;
  }

  body.chapter-book .chapter-pills-nested {
    overflow-x: hidden;
    flex-wrap: wrap;
  }

  body.chapter-book .chapter-pill-link {
    width: auto;
    white-space: normal;
    word-break: break-word;
  }

  body.chapter-book .chapter-pill-label-full {
    display: none;
  }

  body.chapter-book .chapter-pill-label-short {
    display: inline;
  }

  body.chapter-book .learning-progress-box {
    grid-template-columns: auto;
    align-items: center;
  }

  body.chapter-book .resume-strip {
    align-items: center;
    padding: 0;
  }

  body.chapter-book .resume-strip__main {
    display: none;
  }

  body.chapter-book .learning-progress-box__copy {
    display: none;
  }

  body.chapter-book .learning-progress-box__button {
    width: auto;
    justify-self: end;
    grid-column: 1;
    min-height: 2.1rem;
    padding: 0.48em 0.84em;
    font-size: 0.8rem;
  }

  body.chapter-book .learning-progress-panel {
    right: 12px;
    bottom: 12px;
    left: auto;
    width: auto;
    max-width: calc(100vw - 24px);
    padding: 8px 9px;
    border-radius: 16px;
  }

  body.chapter-book .reference-cover {
    padding-bottom: 76px;
  }

  body.chapter-book .alphabet-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.chapter-book .accent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.chapter-book.chapter-book-accent .hero-actions,
  body.chapter-book.chapter-book-accent .chapter-footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  body.chapter-book.chapter-book-accent .hero-actions .cta-button,
  body.chapter-book.chapter-book-accent .chapter-footer-nav .cta-button {
    width: 100%;
    min-height: 2.15rem;
    padding: 0.34rem 0.38rem;
    font-size: 0.72rem;
    line-height: 1.1;
    white-space: normal;
  }

  body.chapter-book.chapter-book-accent .accent-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.chapter-book.chapter-book-accent .accent-compare-table {
    display: none;
  }

  body.chapter-book .book-section {
    gap: 8px;
  }

  body.chapter-book .book-section + .book-section {
    margin-top: 16px;
  }

  body.chapter-book .book-note,
  body.chapter-book .book-list {
    font-size: 0.86rem;
    line-height: 1.55;
  }

  body.chapter-book .book-list {
    gap: 6px;
    padding-left: 1.15em;
  }

  body.chapter-book .book-list li {
    line-height: 1.55;
  }

  body.chapter-book .book-section-title {
    gap: 6px;
    margin-bottom: 8px;
  }

  body.chapter-book .book-section-title .section-no {
    min-width: 2.5em;
    padding: 0.34em 0.6em;
    font-size: 0.74rem;
  }

  body.chapter-book .book-section-title h2,
  body.chapter-book .book-section-title h3 {
    font-size: 1.08rem;
  }

  body.chapter-book .alphabet-card,
  body.chapter-book .accent-card {
    padding: 10px 9px 9px;
    gap: 4px;
    border-radius: 14px;
  }

  body.chapter-book .alphabet-letter,
  body.chapter-book .accent-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  body.chapter-book .alphabet-kana,
  body.chapter-book .accent-name {
    font-size: 0.77rem;
    line-height: 1.3;
  }

  body.chapter-book .alphabet-hint,
  body.chapter-book .accent-hint {
    display: none;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)) .chapter-page > .book-section:nth-of-type(2) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)) .chapter-page > .book-section:nth-of-type(3) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    color: var(--book-accent-2);
    font-size: clamp(0.98rem, 4.5vw, 1.12rem);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: 0.02em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: left;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)) .chapter-page > .book-section:nth-of-type(2) .alphabet-hint,
  body.chapter-book:has(main > .book-section:nth-of-type(6)) .chapter-page > .book-section:nth-of-type(3) .alphabet-hint,
  body.chapter-book:has(main > .book-section:nth-of-type(6)) .chapter-page > .book-section:nth-of-type(4) .alphabet-hint,
  body.chapter-book:has(main > .book-section:nth-of-type(6)) .chapter-page > .book-section:nth-of-type(5) .alphabet-hint {
    display: block;
    font-size: 0.76rem;
    line-height: 1.45;
  }

  body.chapter-book.chapter-book-accent .accent-hint {
    display: block;
    min-height: 0;
    font-size: 0.8rem;
    line-height: 1.5;
  }

  body.chapter-book.chapter-book-accent .accent-compare-table {
    display: none;
  }

  body.chapter-book.chapter-book-accent .accent-example {
    gap: 3px;
    padding: 8px 9px;
  }

  body.chapter-book.chapter-book-accent .accent-example-word {
    font-size: 0.95rem;
  }

  body.chapter-book.chapter-book-accent .accent-example-kana,
  body.chapter-book.chapter-book-accent .accent-example-ja {
    font-size: 0.8rem;
  }

  body.chapter-book .alphabet-card .audio-play {
    min-width: 5.75rem;
    padding: 0.34rem 0.92rem 0.34rem 0.52rem;
    font-size: 0.75rem;
    gap: 0.4rem;
  }

  body.chapter-book .alphabet-card .audio-play .audio-play-icon {
    width: 1.18rem;
    height: 1.18rem;
  }

  body.chapter-book .alphabet-card .audio-play .audio-play-icon::before {
    left: 0.45rem;
    border-width: 0.2rem 0 0.2rem 0.29rem;
  }

  body.chapter-book.chapter-book-accent .audio-play {
    min-width: 5.75rem;
    padding: 0.34rem 0.92rem 0.34rem 0.52rem;
    font-size: 0.75rem;
    gap: 0.4rem;
  }

  body.chapter-book.chapter-book-accent .audio-play .audio-play-icon {
    width: 1.18rem;
    height: 1.18rem;
  }

  body.chapter-book.chapter-book-accent .audio-play .audio-play-icon::before {
    left: 0.45rem;
    border-width: 0.2rem 0 0.2rem 0.29rem;
  }
}

body.chapter-book .toc-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.8em;
  padding: 0.52em 0.92em;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.03em;
}

body.chapter-book .audio-play,
body.chapter-book .alphabet-card .audio-play,
body.chapter-book .expression-card .audio-play {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.48rem 1rem 0.48rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(47, 120, 80, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 239, 227, 0.95));
  color: var(--book-accent-2);
  box-shadow:
    0 6px 14px rgba(35, 44, 60, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

body.chapter-book .audio-play-icon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(47, 120, 80, 0.14), rgba(216, 123, 43, 0.18));
  box-shadow:
    inset 0 0 0 1px rgba(47, 120, 80, 0.12),
    0 3px 8px rgba(35, 44, 60, 0.08);
}

body.chapter-book .audio-play-icon::before {
  content: '';
  position: absolute;
  left: 0.67rem;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 0.34rem 0 0.34rem 0.5rem;
  border-color: transparent transparent transparent rgba(47, 120, 80, 0.92);
}

body.chapter-book .audio-play-text {
  display: inline-block;
  padding-right: 0.05rem;
}

body.chapter-book .audio-play:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 120, 80, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 236, 222, 0.98));
  box-shadow:
    0 10px 22px rgba(35, 44, 60, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.chapter-book .audio-play:active {
  transform: translateY(0);
}

body.chapter-book .audio-play:focus-visible {
  outline: 2px solid rgba(47, 120, 80, 0.34);
  outline-offset: 2px;
}

body.chapter-book .alphabet-card .audio-play {
  align-self: start;
}

body.chapter-book .expression-card .audio-play {
  margin-top: 2px;
}

body.chapter-book .alphabet-card .audio-play::before,
body.chapter-book .expression-card .audio-play::before {
  content: none !important;
}

body.chapter-book .audio-play-icon {
  display: grid !important;
}

body.chapter-book .study-keyboard,
body.chapter-book .quiz-keyboard {
  display: grid;
  gap: 10px;
}

body.chapter-book .study-keyboard-row,
body.chapter-book .quiz-keyboard-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.chapter-book .study-keyboard-key,
body.chapter-book .quiz-key {
  appearance: none;
  border: 1px solid rgba(47, 120, 80, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 236, 222, 0.98));
  color: var(--book-accent-2);
  box-shadow:
    0 5px 14px rgba(35, 44, 60, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  min-width: 3rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

body.chapter-book .study-keyboard-key:hover,
body.chapter-book .quiz-key:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 120, 80, 0.24);
  box-shadow:
    0 8px 18px rgba(35, 44, 60, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.chapter-book .study-keyboard-key:active,
body.chapter-book .quiz-key:active {
  transform: translateY(0);
}

body.chapter-book .study-keyboard-key:disabled,
body.chapter-book .quiz-key:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

body.chapter-book .study-keyboard-key.is-control,
body.chapter-book .quiz-key.is-control {
  min-width: 5.2rem;
}

@media (max-width: 640px) {
  body.chapter-book .study-keyboard-row,
  body.chapter-book .quiz-keyboard-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  body.chapter-book .study-keyboard-row::-webkit-scrollbar,
  body.chapter-book .quiz-keyboard-row::-webkit-scrollbar {
    display: none;
  }

  body.chapter-book .study-keyboard-key,
  body.chapter-book .quiz-key {
    flex: 0 0 auto;
    min-width: 2.5rem;
    padding: 0.72rem 0.82rem;
    font-size: 0.96rem;
    border-radius: 14px;
  }

  body.chapter-book .study-keyboard-key.is-control,
  body.chapter-book .quiz-key.is-control {
    min-width: 4.6rem;
  }
}

@media (min-width: 641px) {
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-card {
    gap: 8px;
    padding: 16px 16px 14px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 4.5rem;
    padding: 0.58rem 0.72rem;
    box-sizing: border-box;
    font-size: clamp(0.86rem, 1vw, 1.06rem);
    line-height: 1.22;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: center;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.28;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: left;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(2) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(3) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-card {
    gap: 8px;
    padding: 16px 16px 14px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(2) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(3) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    font-size: clamp(0.98rem, 1.15vw, 1.12rem);
    line-height: 1.24;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: left;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    font-size: clamp(0.92rem, 1vw, 1.06rem);
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: left;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-card {
    gap: 8px;
    padding: 16px 16px 14px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 4.5rem;
    padding: 0.58rem 0.72rem;
    box-sizing: border-box;
    font-size: clamp(0.86rem, 1vw, 1.06rem);
    line-height: 1.22;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: center;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-kana,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-kana,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-kana,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-kana,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-kana,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-kana {
    line-height: 1.3;
  }
}

@media (max-width: 640px) {
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(2) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(3) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(2) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(3) .alphabet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-card {
    padding: 10px 9px 9px;
    gap: 6px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(2) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(3) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-card {
    padding: 10px 9px 9px;
    gap: 6px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-card {
    padding: 10px 9px 9px;
    gap: 6px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 3.7rem;
    padding: 0.42rem 0.5rem;
    box-sizing: border-box;
    font-size: clamp(0.8rem, 3.3vw, 0.98rem);
    line-height: 1.18;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: center;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    font-size: clamp(0.9rem, 3.1vw, 1rem);
    line-height: 1.28;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: left;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(2) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(3) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 3.7rem;
    padding: 0.42rem 0.5rem;
    box-sizing: border-box;
    font-size: clamp(0.8rem, 3.3vw, 0.98rem);
    line-height: 1.18;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    text-align: center;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(2) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(3) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    font-size: clamp(0.9rem, 3.1vw, 1rem);
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: left;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-letter {
    width: 100%;
    min-width: 0;
    min-height: 4.9rem;
    padding: 0.55rem 0.62rem 0.52rem;
    box-sizing: border-box;
    font-size: clamp(0.76rem, 3vw, 0.9rem);
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    text-align: center;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    font-size: clamp(0.86rem, 2.9vw, 0.98rem);
    line-height: 1.28;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: left;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-kana,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-kana,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-kana,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-kana,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(2) .alphabet-kana,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(3) .alphabet-kana {
    line-height: 1.25;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-kana,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-kana {
    line-height: 1.28;
  }

  body.chapter-book .card-detail-modal {
    padding: 12px;
  }

  body.chapter-book .card-detail-modal__sheet {
    width: min(100%, 420px);
    max-height: min(88vh, 720px);
    padding: 14px 14px 16px;
    border-radius: 20px;
  }

  body.chapter-book .card-detail-modal__close {
    top: 10px;
    right: 10px;
    width: 1.9rem;
    height: 1.9rem;
  }

  body.chapter-book .card-detail-modal__head {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    padding-right: 0;
  }

  body.chapter-book .card-detail-modal__badge {
    display: none;
  }

  body.chapter-book .card-detail-modal__title {
    font-size: 1.08rem;
    line-height: 1.34;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  body.chapter-book .card-detail-modal__subtitle {
    margin-top: 2px;
    font-size: 0.84rem;
    line-height: 1.45;
  }

  body.chapter-book .card-detail-modal__play {
    margin-top: 10px;
  }

  body.chapter-book .card-detail-modal__body {
    margin-top: 10px;
  }

  body.chapter-book .card-detail-modal__text {
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.7;
  }
}

body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-card {
  gap: 6px;
}

body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-letter {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: block;
  align-self: start;
  justify-self: start;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: clamp(1.55rem, 2.15vw, 2rem);
  line-height: 1.08;
  text-align: left;
}

@media (max-width: 640px) {
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-card {
    gap: 4px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-letter {
    font-size: clamp(1.18rem, 5vw, 1.4rem);
  }
}

body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(3) > .book-muted,
body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) > .book-muted,
body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) > .book-muted {
  white-space: pre-line;
}

body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) > .book-muted {
  margin-top: 0.2rem;
  padding: 10px 12px;
  border: 1px solid rgba(216, 123, 43, 0.20);
  border-left: 4px solid var(--book-accent);
  border-radius: 0 14px 14px 0;
  background: rgba(216, 123, 43, 0.08);
  color: var(--book-text);
  font-weight: 700;
  line-height: 1.75;
}

body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-letter {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  align-self: start !important;
  justify-self: start !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--book-accent-2) !important;
  font-size: clamp(1.55rem, 2.15vw, 2rem) !important;
  line-height: 1.08 !important;
  letter-spacing: 0.01em !important;
  text-align: left !important;
}

@media (max-width: 640px) {
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) > .book-muted {
    padding: 9px 11px;
    font-size: 0.9rem;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-letter {
    font-size: clamp(1.18rem, 5vw, 1.45rem) !important;
  }
}

body.chapter-book .card-detail-modal__badge {
  display: none;
}

body.chapter-book .card-detail-modal__head {
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
  padding-right: 0;
}

body.chapter-book .card-detail-modal__meta {
  display: grid;
  gap: 2px;
}

body.chapter-book .card-detail-modal__title {
  line-height: 1.34;
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (min-width: 641px) {
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-card {
    gap: 6px;
    padding: 14px 14px 12px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-letter {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(47, 120, 80, 0.12), rgba(216, 123, 43, 0.14));
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-card {
    gap: 8px;
    padding: 16px 16px 14px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.28;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: left;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-card {
    gap: 6px;
    padding: 14px 14px 12px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    font-size: clamp(0.98rem, 1.1vw, 1.12rem);
    line-height: 1.28;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: left;
  }
}

@media (max-width: 640px) {
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-grid,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-card {
    padding: 10px 9px 9px;
    gap: 4px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(4) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(5) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(6) .alphabet-letter {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(47, 120, 80, 0.12), rgba(216, 123, 43, 0.14));
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-card {
    padding: 10px 9px 9px;
    gap: 6px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(8)) .chapter-page > .book-section:nth-of-type(7) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    font-size: clamp(0.9rem, 3.1vw, 1rem);
    line-height: 1.28;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: left;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(2) .alphabet-hint,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(3) .alphabet-hint,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-hint,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-hint {
    display: block;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(2) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(3) .alphabet-card {
    gap: 4px;
    padding: 10px 9px 9px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(2) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(3) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    font-size: clamp(1rem, 4.5vw, 1.12rem);
    line-height: 1.25;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-card,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-card {
    gap: 6px;
    padding: 10px 10px 9px;
  }

  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(4) .alphabet-letter,
  body.chapter-book:has(main > .book-section:nth-of-type(6)):not(:has(main > .book-section:nth-of-type(8))) .chapter-page > .book-section:nth-of-type(5) .alphabet-letter {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    display: block;
    font-size: clamp(0.88rem, 3.2vw, 1rem);
    line-height: 1.22;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    text-align: left;
  }

  body.chapter-book .card-detail-modal {
    padding: 12px;
  }

  body.chapter-book .card-detail-modal__sheet {
    width: min(100%, 420px);
    max-height: min(88vh, 720px);
    padding: 14px 14px 16px;
    border-radius: 20px;
  }

  body.chapter-book .card-detail-modal__close {
    top: 10px;
    right: 10px;
    width: 1.9rem;
    height: 1.9rem;
  }

  body.chapter-book .card-detail-modal__title {
    font-size: 1.08rem;
    line-height: 1.34;
  }

  body.chapter-book .card-detail-modal__subtitle {
    margin-top: 2px;
    font-size: 0.84rem;
    line-height: 1.45;
  }

  body.chapter-book .card-detail-modal__play {
    margin-top: 10px;
  }

  body.chapter-book .card-detail-modal__body {
    margin-top: 10px;
  }

  body.chapter-book .card-detail-modal__text {
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.7;
  }
}

body.chapter-book.reference-chapter-trial .chapter-footer-nav a[href$="/reference/"],
body.chapter-book.reference-chapter-trial .chapter-footer-nav button[onclick*="/reference/"],
body.chapter-book.reference-chapter-page .chapter-footer-nav a[href$="/reference/"],
body.chapter-book.reference-chapter-page .chapter-footer-nav button[onclick*="/reference/"],
body.chapter-book.grade4-reference-chapter .chapter-footer-nav a[href$="/reference/"],
body.chapter-book.grade4-reference-chapter .chapter-footer-nav button[onclick*="/reference/"],
body.chapter-book.grade3-reference-chapter .chapter-footer-nav a[href$="/reference/"],
body.chapter-book.grade3-reference-chapter .chapter-footer-nav button[onclick*="/reference/"] {
  display: none;
}

body.chapter-book.reference-chapter-trial .chapter-footer-nav,
body.chapter-book.reference-chapter-page .chapter-footer-nav,
body.chapter-book.grade4-reference-chapter .chapter-footer-nav,
body.chapter-book.grade3-reference-chapter .chapter-footer-nav {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  align-items: stretch;
}

body.chapter-book.reference-chapter-trial .chapter-footer-nav > *,
body.chapter-book.reference-chapter-page .chapter-footer-nav > *,
body.chapter-book.grade4-reference-chapter .chapter-footer-nav > *,
body.chapter-book.grade3-reference-chapter .chapter-footer-nav > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.82rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(36, 106, 71, 0.10);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(35, 44, 60, 0.06);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

body.chapter-book.reference-chapter-trial .chapter-footer-nav > *:first-child,
body.chapter-book.reference-chapter-page .chapter-footer-nav > *:first-child,
body.chapter-book.grade4-reference-chapter .chapter-footer-nav > *:first-child,
body.chapter-book.grade3-reference-chapter .chapter-footer-nav > *:first-child {
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.72)), linear-gradient(135deg, rgba(36, 106, 71, 0.08), rgba(217, 122, 47, 0.06));
  color: var(--accent-deep);
  border-color: rgba(36, 106, 71, 0.16);
  font-weight: 700;
}

body.chapter-book.reference-chapter-trial .chapter-footer-nav > *:last-child,
body.chapter-book.reference-chapter-page .chapter-footer-nav > *:last-child,
body.chapter-book.grade4-reference-chapter .chapter-footer-nav > *:last-child,
body.chapter-book.grade3-reference-chapter .chapter-footer-nav > *:last-child {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: #fff;
  border-color: rgba(36, 106, 71, 0.08);
  font-weight: 700;
}

body.chapter-book.reference-chapter-trial .chapter-footer-nav > *:hover,
body.chapter-book.reference-chapter-page .chapter-footer-nav > *:hover,
body.chapter-book.grade4-reference-chapter .chapter-footer-nav > *:hover,
body.chapter-book.grade3-reference-chapter .chapter-footer-nav > *:hover {
  transform: translateY(-1px);
}

body.chapter-book.reference-chapter-page .nav-brand .brand-mark,
body.chapter-book.grade4-reference-chapter .nav-brand .brand-mark,
body.chapter-book.grade3-reference-chapter .nav-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: block;
  background: url('/favicon.png') center / cover no-repeat #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24);
}

@media (max-width: 960px) {
  body.chapter-book.reference-chapter-trial .hero-actions,
  body.chapter-book.reference-chapter-page .hero-actions,
  body.chapter-book.grade4-reference-chapter .hero-actions,
  body.chapter-book.grade3-reference-chapter .hero-actions,
  body.chapter-book.reference-chapter-trial .reference-chapter-nav-actions,
  body.chapter-book.reference-chapter-page .reference-chapter-nav-actions,
  body.chapter-book.grade4-reference-chapter .reference-chapter-nav-actions,
  body.chapter-book.grade3-reference-chapter .reference-chapter-nav-actions {
    display: none !important;
  }
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav {
  margin-top: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: block;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav > *,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav > * {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .grade5-footer-nav-buttons,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .grade5-footer-nav-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.84rem 1rem;
  border-radius: 16px;
  border: 1px solid transparent;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  box-shadow: 0 6px 16px rgba(35, 44, 60, 0.06);
  width: 100%;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button:visited,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button:visited {
  text-decoration: none;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-prev,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-prev {
  background: linear-gradient(135deg, #2F6FA3 0%, #3E82B4 100%);
  border-color: #2f6fa3;
  color: #ffffff;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-next,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-next {
  background: linear-gradient(135deg, #A85A14 0%, #C97924 100%);
  border-color: #a85a14;
  color: #ffffff;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-index,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-index,
body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-top,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-top,
body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-secondary,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-secondary {
  background: #F3EFE6;
  border-color: #DDD4C4;
  color: #263548;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button:hover,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(35, 44, 60, 0.08);
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-prev:hover,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-prev:hover,
body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-next:hover,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-next:hover {
  filter: brightness(1.03);
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-index:hover,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-index:hover,
body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-top:hover,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-top:hover,
body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-secondary:hover,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-secondary:hover {
  background: #ece6d8;
  border-color: #cfc3b0;
  color: #1f2e41;
}

body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-prev:focus-visible,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-prev:focus-visible,
body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-next:focus-visible,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-next:focus-visible,
body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-index:focus-visible,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-index:focus-visible,
body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-top:focus-visible,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-top:focus-visible,
body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav .chapter-nav-button-secondary:focus-visible,
body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav .chapter-nav-button-secondary:focus-visible {
  outline: 2px solid rgba(47, 111, 163, 0.45);
  outline-offset: 2px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .dashboard-sidebar-copy {
  margin-top: 14px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .dashboard-sidebar-copy h1 {
  margin: 8px 0 6px;
  font-size: 1.05rem;
  line-height: 1.28;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .dashboard-sidebar-lead {
  margin: 0;
  line-height: 1.55;
  color: var(--book-muted);
  font-size: 0.88rem;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav {
  display: block;
  margin-top: 28px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav > * {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-footer-nav-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav > .grade5-footer-nav-buttons {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav > .grade5-footer-nav-buttons:not(.chapter-nav-button-prev):not(.chapter-nav-button-next):not([class*="chapter-nav-button"]) {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-footer-nav-buttons .chapter-nav-button,
body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-footer-nav-buttons .chapter-nav-button:visited {
  min-height: 54px;
  padding: 0.84rem 1rem;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.25;
  box-shadow: 0 6px 16px rgba(35, 44, 60, 0.06);
}

@media (max-width: 720px) {
  body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav,
  body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav {
    grid-template-columns: 1fr;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .chapter-footer-nav > *,
  body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-footer-nav > * {
    width: 100%;
    min-height: 3.3rem;
    padding: 0.78rem 0.95rem;
  }
}

@media (max-width: 960px) {
  body.chapter-book.grade5-reference-app.reference-chapter-page {
    display: block;
    padding: 8px 0 18px;
    min-height: auto;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .site-nav {
    position: sticky;
    top: 8px;
    left: auto;
    transform: none;
    width: min(100%, calc(100% - 12px));
    margin: 0 auto;
    padding: 10px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .nav-brand {
    flex: 0 0 auto;
    gap: 8px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .reference-chapter-brand-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .brand-text strong {
    font-size: 0.82rem;
    line-height: 1.1;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .brand-text span {
    font-size: 0.65rem;
    line-height: 1.1;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    overflow: visible;
    white-space: normal;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .nav-link {
    width: 100%;
    flex: 0 0 auto;
    justify-content: center;
    padding: 0.54rem 0.76rem;
    font-size: 0.74rem;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-sidebar-actions {
    gap: 6px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .grade5-sidebar-action {
    min-height: 3rem;
  }
}

body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card {
  display: grid;
  grid-template-columns: minmax(0, 3.2rem) minmax(0, 1fr) auto;
  grid-template-areas:
    "letter kana audio"
    "detail detail detail"
    "hint hint hint";
  align-items: start;
  column-gap: 10px;
  row-gap: 8px;
  padding: 14px 14px 12px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-letter {
  grid-area: letter;
}

body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-kana {
  grid-area: kana;
  align-self: center;
  line-height: 1.25;
}

body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card .audio-play {
  grid-area: audio;
  justify-self: end;
  align-self: start;
  min-width: 4.6rem;
  margin-top: 0;
}

body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .card-detail-trigger {
  grid-area: detail;
  justify-self: start;
  margin-top: 0;
}

body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-hint {
  grid-area: hint;
  line-height: 1.65;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .hero-copy {
  align-self: start;
  gap: 4px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .reference-chapter-lead--short {
  margin: 0;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .hero {
  display: block;
  align-items: start;
  padding: 16px 18px 14px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .hero h1 {
  line-height: 1.12;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .hero-actions {
  display: none !important;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-page {
  margin-top: 0;
  padding: 18px 18px 20px;
  gap: 12px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .book-section + .book-section {
  margin-top: 10px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-page > .book-section:first-of-type {
  margin-top: 0;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-page > .book-section:first-of-type .book-section-title {
  margin-bottom: 5px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-page > .book-section:first-of-type .book-list {
  gap: 4px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-page > .book-section:first-of-type .book-list li {
  line-height: 1.55;
}

body.chapter-book.grade5-reference-app.reference-chapter-page #alphabet-list {
  gap: 8px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page #alphabet-list .book-section-title {
  margin-bottom: 6px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page #alphabet-list .book-muted {
  margin: 0;
  line-height: 1.55;
}

body.chapter-book.grade5-reference-app.reference-chapter-page #alphabet-list .book-muted + .book-muted {
  margin-top: -2px;
}

body.chapter-book.grade5-reference-app.reference-chapter-page #alphabet-list .alphabet-grid {
  margin-top: 2px;
}

body.chapter-book.chapter-book-accent .hero {
  padding-bottom: 10px;
}

body.chapter-book.chapter-book-accent .hero-lead--desktop {
  max-width: 52ch;
}

body.chapter-book.chapter-book-accent .hero-lead--mobile {
  margin-top: 8px;
  max-width: 52ch;
}

body.chapter-book.chapter-book-accent .chapter-page {
  gap: 12px;
}

body.chapter-book.chapter-book-accent .book-section + .book-section {
  margin-top: 12px;
}

body.chapter-book.chapter-book-accent .book-section-title {
  margin-bottom: 6px;
}

body.chapter-book.chapter-book-accent .book-muted {
  margin: 0;
  line-height: 1.5;
}

body.chapter-book.chapter-book-accent .book-list {
  gap: 4px;
}

body.chapter-book.chapter-book-accent .book-list li {
  line-height: 1.45;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-card {
  padding: 10px 10px 8px;
  gap: 4px;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-mark {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  font-size: 1.1rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-name {
  font-size: 0.84rem;
  line-height: 1.2;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-hint {
  font-size: 0.73rem;
  line-height: 1.35;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-example {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  padding: 6px 8px;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-example-word {
  font-size: 0.84rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-example-kana,
body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-example-ja {
  font-size: 0.76rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .audio-play {
  min-width: 4.8rem;
  padding: 0.28rem 0.68rem 0.28rem 0.44rem;
  font-size: 0.7rem;
  gap: 0.32rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .audio-play .audio-play-icon {
  width: 1rem;
  height: 1rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .audio-play .audio-play-icon::before {
  left: 0.38rem;
  border-width: 0.17rem 0 0.17rem 0.24rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-card {
  padding: 10px 10px 9px;
  gap: 4px;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-mark {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  font-size: 1.15rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-name {
  font-size: 0.86rem;
  line-height: 1.2;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-hint {
  font-size: 0.74rem;
  line-height: 1.35;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-more-body {
  display: grid;
  gap: 4px;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-more-body p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.4;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-example {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  padding: 6px 8px;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-example-word {
  font-size: 0.84rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-example-kana,
body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-example-ja {
  font-size: 0.76rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .audio-play {
  min-width: 4.8rem;
  padding: 0.28rem 0.68rem 0.28rem 0.44rem;
  font-size: 0.7rem;
  gap: 0.32rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .audio-play .audio-play-icon {
  width: 1rem;
  height: 1rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .audio-play .audio-play-icon::before {
  left: 0.38rem;
  border-width: 0.17rem 0 0.17rem 0.24rem;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(3) .book-list {
  gap: 4px;
}

body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(3) .book-muted {
  font-size: 0.84rem;
}

@media (max-width: 640px) {
  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-grid {
    gap: 6px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.3fr) auto;
    grid-template-areas: "letter kana audio";
    column-gap: 4px;
    row-gap: 0;
    padding: 9px 7px 8px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-letter {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    border-radius: 0;
    background: none;
    font-size: 0.98rem;
    line-height: 1.12;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-kana {
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card .audio-play {
    width: 1.78rem;
    min-width: 1.78rem;
    height: 1.78rem;
    padding: 0;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card .audio-play-text {
    display: none;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card .audio-play-icon {
    display: inline-block !important;
    width: 1rem;
    height: 1rem;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card .audio-play-icon::before {
    left: 0.35rem;
    border-width: 0.18rem 0 0.18rem 0.26rem;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .card-detail-trigger {
    display: none;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-hint {
    display: none;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .hero {
    display: block;
    align-items: start;
    padding: 10px 14px 4px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .hero-copy {
    align-self: start;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .chapter-page {
    margin-top: 0;
    padding: 14px 14px 16px;
    gap: 6px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page .book-section + .book-section {
    margin-top: 8px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page #alphabet-list {
    gap: 4px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page #alphabet-list .book-section-title {
    margin-bottom: 3px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page #alphabet-list .book-muted {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page #alphabet-list .book-muted + .book-muted {
    margin-top: -4px;
  }
}

body.chapter-book.chapter-book-accent .dashboard-main {
  gap: 12px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section + .book-section {
  margin-top: 12px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section .book-section-title {
  margin-bottom: 6px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section .book-muted {
  margin: 0;
  line-height: 1.5;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section .book-list {
  gap: 4px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section .book-list li {
  line-height: 1.45;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-card {
  padding: 10px 10px 8px;
  gap: 4px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-mark {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  font-size: 1.1rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-name {
  font-size: 0.84rem;
  line-height: 1.2;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-hint {
  font-size: 0.73rem;
  line-height: 1.35;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-example {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  padding: 6px 8px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-example-word {
  font-size: 0.84rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-example-kana,
body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-example-ja {
  font-size: 0.76rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .audio-play {
  min-width: 4.8rem;
  padding: 0.28rem 0.68rem 0.28rem 0.44rem;
  font-size: 0.7rem;
  gap: 0.32rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .audio-play .audio-play-icon {
  width: 1rem;
  height: 1rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .audio-play .audio-play-icon::before {
  left: 0.38rem;
  border-width: 0.17rem 0 0.17rem 0.24rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-card {
  padding: 10px 10px 9px;
  gap: 4px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-mark {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  font-size: 1.15rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-name {
  font-size: 0.86rem;
  line-height: 1.2;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-hint {
  font-size: 0.74rem;
  line-height: 1.35;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-more-body {
  display: grid;
  gap: 4px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-more-body p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.4;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-example {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  padding: 6px 8px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-example-word {
  font-size: 0.84rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-example-kana,
body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-example-ja {
  font-size: 0.76rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .audio-play {
  min-width: 4.8rem;
  padding: 0.28rem 0.68rem 0.28rem 0.44rem;
  font-size: 0.7rem;
  gap: 0.32rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .audio-play .audio-play-icon {
  width: 1rem;
  height: 1rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .audio-play .audio-play-icon::before {
  left: 0.38rem;
  border-width: 0.17rem 0 0.17rem 0.24rem;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(3) .book-list {
  gap: 4px;
}

body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(3) .book-muted {
  font-size: 0.84rem;
}

@media (max-width: 640px) {
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-card,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-card {
    padding: 8px 8px 7px;
    gap: 3px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-mark,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-mark {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 0.98rem;
    border-radius: 12px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-name,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-name {
    font-size: 0.74rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-hint,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-hint {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-example,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-example {
    padding: 5px 7px;
    gap: 2px 4px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-example-word,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-example-word {
    font-size: 0.78rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-example-kana,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .accent-example-ja,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-example-kana,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-example-ja {
    font-size: 0.68rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .audio-play,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .audio-play {
    min-width: 4.1rem;
    padding: 0.22rem 0.52rem 0.22rem 0.38rem;
    font-size: 0.64rem;
    gap: 0.26rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .audio-play .audio-play-icon,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .audio-play .audio-play-icon {
    width: 0.88rem;
    height: 0.88rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(1) .audio-play .audio-play-icon::before,
  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .audio-play .audio-play-icon::before {
    left: 0.3rem;
    border-width: 0.14rem 0 0.14rem 0.2rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-more-body {
    gap: 3px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(2) .accent-more-body p {
    font-size: 0.68rem;
    line-height: 1.32;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(3) .book-list {
    gap: 3px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main > .book-section:nth-of-type(3) .book-muted {
    font-size: 0.74rem;
  }
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section + .book-section {
  margin-top: 12px;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section .book-section-title {
  margin-bottom: 6px;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section .book-muted {
  margin: 0;
  line-height: 1.5;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section .book-list {
  gap: 4px;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section .book-list li {
  line-height: 1.45;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-card {
  padding: 10px 10px 8px;
  gap: 4px;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-mark {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  font-size: 1.1rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-name {
  font-size: 0.84rem;
  line-height: 1.2;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-hint {
  font-size: 0.73rem;
  line-height: 1.35;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-example {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  padding: 6px 8px;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-example-word {
  font-size: 0.84rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-example-kana,
body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-example-ja {
  font-size: 0.76rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .audio-play {
  min-width: 4.8rem;
  padding: 0.28rem 0.68rem 0.28rem 0.44rem;
  font-size: 0.7rem;
  gap: 0.32rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .audio-play .audio-play-icon {
  width: 1rem;
  height: 1rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .audio-play .audio-play-icon::before {
  left: 0.38rem;
  border-width: 0.17rem 0 0.17rem 0.24rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-card {
  padding: 10px 10px 9px;
  gap: 4px;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-mark {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  font-size: 1.15rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-name {
  font-size: 0.86rem;
  line-height: 1.2;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-hint {
  font-size: 0.74rem;
  line-height: 1.35;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-more-body {
  display: grid;
  gap: 4px;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-more-body p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.4;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-example {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  padding: 6px 8px;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-example-word {
  font-size: 0.84rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-example-kana,
body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-example-ja {
  font-size: 0.76rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .audio-play {
  min-width: 4.8rem;
  padding: 0.28rem 0.68rem 0.28rem 0.44rem;
  font-size: 0.7rem;
  gap: 0.32rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .audio-play .audio-play-icon {
  width: 1rem;
  height: 1rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .audio-play .audio-play-icon::before {
  left: 0.38rem;
  border-width: 0.17rem 0 0.17rem 0.24rem;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(3) .book-list {
  gap: 4px;
}

body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(3) .book-muted {
  font-size: 0.84rem;
}

@media (max-width: 640px) {
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-card,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-card {
    padding: 8px 8px 7px;
    gap: 3px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-mark,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-mark {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 0.98rem;
    border-radius: 12px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-name,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-name {
    font-size: 0.74rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-hint,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-hint {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-example,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-example {
    padding: 5px 7px;
    gap: 2px 4px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-example-word,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-example-word {
    font-size: 0.78rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-example-kana,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .accent-example-ja,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-example-kana,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-example-ja {
    font-size: 0.68rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .audio-play,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .audio-play {
    min-width: 4.1rem;
    padding: 0.22rem 0.52rem 0.22rem 0.38rem;
    font-size: 0.64rem;
    gap: 0.26rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .audio-play .audio-play-icon,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .audio-play .audio-play-icon {
    width: 0.88rem;
    height: 0.88rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(1) .audio-play .audio-play-icon::before,
  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .audio-play .audio-play-icon::before {
    left: 0.3rem;
    border-width: 0.14rem 0 0.14rem 0.2rem;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-more-body {
    gap: 3px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(2) .accent-more-body p {
    font-size: 0.68rem;
    line-height: 1.32;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(3) .book-list {
    gap: 3px;
  }

  body.chapter-book.chapter-book-accent .dashboard-main .page-shell > .book-section:nth-of-type(3) .book-muted {
    font-size: 0.74rem;
  }
}

@media (min-width: 961px) {
  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card {
    grid-template-columns: minmax(0, 2.7rem) minmax(0, 1fr) auto;
    column-gap: 8px;
    row-gap: 6px;
    padding: 12px 12px 10px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-letter {
    width: 48px;
    height: 48px;
    font-size: 1.18rem;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-kana {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card .audio-play {
    min-width: 4.2rem;
    padding: 0.42rem 0.68rem;
    font-size: 0.72rem;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-hint {
    font-size: 0.86rem;
    line-height: 1.52;
  }
}

@media (max-width: 640px) {
  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-grid {
    gap: 5px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "letter audio"
      "kana kana";
    column-gap: 4px;
    row-gap: 2px;
    padding: 8px 7px 7px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-letter {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    font-size: 0.94rem;
    line-height: 1.08;
    white-space: nowrap;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-kana {
    line-height: 1.12;
    font-size: 0.7rem;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card .audio-play {
    grid-area: audio;
    justify-self: end;
    align-self: start;
    width: 1.55rem;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0;
    border-radius: 999px;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card .audio-play-text {
    display: none;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card .audio-play-icon {
    display: inline-block !important;
    width: 0.92rem;
    height: 0.92rem;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-card .audio-play-icon::before {
    left: 0.32rem;
    border-width: 0.16rem 0 0.16rem 0.24rem;
  }

  body.chapter-book.grade5-reference-app.reference-chapter-page:has(#alphabet-list) .alphabet-hint {
    display: none;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-card,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-card {
    padding: 8px 8px 7px;
    gap: 3px;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-mark,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-mark {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 0.98rem;
    border-radius: 12px;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-name,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-name {
    font-size: 0.74rem;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-hint,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-hint {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-example,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-example {
    padding: 5px 7px;
    gap: 2px 4px;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-example-word,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-example-word {
    font-size: 0.78rem;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-example-kana,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .accent-example-ja,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-example-kana,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-example-ja {
    font-size: 0.68rem;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .audio-play,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .audio-play {
    min-width: 4.1rem;
    padding: 0.22rem 0.52rem 0.22rem 0.38rem;
    font-size: 0.64rem;
    gap: 0.26rem;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .audio-play .audio-play-icon,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .audio-play .audio-play-icon {
    width: 0.88rem;
    height: 0.88rem;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(1) .audio-play .audio-play-icon::before,
  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .audio-play .audio-play-icon::before {
    left: 0.3rem;
    border-width: 0.14rem 0 0.14rem 0.2rem;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-more-body {
    gap: 3px;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(2) .accent-more-body p {
    font-size: 0.68rem;
    line-height: 1.32;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(3) .book-list {
    gap: 3px;
  }

  body.chapter-book.chapter-book-accent .chapter-page > .book-section:nth-of-type(3) .book-muted {
    font-size: 0.74rem;
  }
}

body.chapter-book .grade5-nav {
  gap: 1rem;
}

body.chapter-book .grade5-nav .grade5-sidebar-actions,
body.chapter-book .grade5-nav .grade5-sidebar-nav,
body.chapter-book .grade5-nav .grade5-footer-nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

body.chapter-book .grade5-nav .grade5-sidebar-actions--primary {
  margin-top: 0.2rem;
}

body.chapter-book .grade5-nav .grade5-sidebar-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  padding: 0.82rem 1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.35;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

body.chapter-book .grade5-nav .chapter-nav-button-prev {
  background: #2F6FA3;
  border-color: #24557d;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(47, 111, 163, 0.18);
}

body.chapter-book .grade5-nav .chapter-nav-button-next {
  background: #A85A14;
  border-color: #86480f;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(168, 90, 20, 0.18);
}

body.chapter-book .grade5-nav .chapter-nav-button-index,
body.chapter-book .grade5-nav .chapter-nav-button-top,
body.chapter-book .grade5-nav .chapter-nav-button-neutral {
  background: #F3EFE6;
  border-color: #DDD4C4;
  color: #263548;
  box-shadow: 0 8px 18px rgba(38, 53, 72, 0.08);
}

body.chapter-book .grade5-nav .grade5-sidebar-button:hover,
body.chapter-book .grade5-nav .chapter-nav-button:hover {
  transform: translateY(-1px);
}

body.chapter-book .grade5-nav .chapter-nav-button-prev:hover {
  background: #275f8d;
}

body.chapter-book .grade5-nav .chapter-nav-button-next:hover {
  background: #924e12;
}

body.chapter-book .grade5-nav .chapter-nav-button-index:hover,
body.chapter-book .grade5-nav .chapter-nav-button-top:hover,
body.chapter-book .grade5-nav .chapter-nav-button-neutral:hover {
  background: #ece5d8;
}

body.chapter-book .grade5-nav .grade5-sidebar-button:focus-visible,
body.chapter-book .grade5-nav .chapter-nav-button:focus-visible {
  outline: 3px solid rgba(38, 53, 72, 0.3);
  outline-offset: 3px;
}

body.chapter-book .grade5-nav .chapter-nav-button-prev:focus-visible {
  outline-color: rgba(47, 111, 163, 0.55);
}

body.chapter-book .grade5-nav .chapter-nav-button-next:focus-visible {
  outline-color: rgba(168, 90, 20, 0.55);
}

body.chapter-book .chapter-footer-nav {
  margin-top: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: block;
}

body.chapter-book .chapter-footer-nav > * {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.chapter-book .chapter-footer-nav .grade5-footer-nav-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.chapter-book .chapter-footer-nav .chapter-nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.84rem 1rem;
  border-radius: 16px;
  border: 1px solid transparent;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  box-shadow: 0 6px 16px rgba(35, 44, 60, 0.06);
}

body.chapter-book .chapter-footer-nav .chapter-nav-button:visited {
  text-decoration: none;
}

body.chapter-book .chapter-footer-nav .chapter-nav-button-prev,
body.chapter-book .chapter-footer-nav .chapter-nav-button-next,
body.chapter-book .chapter-footer-nav .chapter-nav-button-index,
body.chapter-book .chapter-footer-nav .chapter-nav-button-top,
body.chapter-book .chapter-footer-nav .chapter-nav-button-neutral {
  min-height: 54px;
}

body.chapter-book .chapter-footer-nav .chapter-nav-button-prev {
  background: linear-gradient(135deg, #2F6FA3 0%, #3E82B4 100%);
  border-color: #2f6fa3;
  color: #ffffff;
}

body.chapter-book .chapter-footer-nav .chapter-nav-button-next {
  background: linear-gradient(135deg, #A85A14 0%, #C97924 100%);
  border-color: #a85a14;
  color: #ffffff;
}

body.chapter-book .chapter-footer-nav .chapter-nav-button-index,
body.chapter-book .chapter-footer-nav .chapter-nav-button-top,
body.chapter-book .chapter-footer-nav .chapter-nav-button-neutral {
  background: #F3EFE6;
  border-color: #DDD4C4;
  color: #263548;
}

body.chapter-book .chapter-footer-nav .chapter-nav-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(35, 44, 60, 0.08);
}

body.chapter-book .chapter-footer-nav .chapter-nav-button-prev:hover {
  filter: brightness(1.03);
}

body.chapter-book .chapter-footer-nav .chapter-nav-button-next:hover {
  filter: brightness(1.03);
}

body.chapter-book .chapter-footer-nav .chapter-nav-button-index:hover,
body.chapter-book .chapter-footer-nav .chapter-nav-button-top:hover,
body.chapter-book .chapter-footer-nav .chapter-nav-button-neutral:hover {
  background: #ece6d8;
  border-color: #cfc3b0;
  color: #1f2e41;
}

body.chapter-book .chapter-footer-nav .chapter-nav-button-prev:focus-visible,
body.chapter-book .chapter-footer-nav .chapter-nav-button-next:focus-visible,
body.chapter-book .chapter-footer-nav .chapter-nav-button-index:focus-visible,
body.chapter-book .chapter-footer-nav .chapter-nav-button-top:focus-visible,
body.chapter-book .chapter-footer-nav .chapter-nav-button-neutral:focus-visible {
  outline: 2px solid rgba(47, 111, 163, 0.45);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  body.chapter-book .grade5-nav .grade5-sidebar-actions,
  body.chapter-book .grade5-nav .grade5-sidebar-nav,
  body.chapter-book .grade5-nav .grade5-footer-nav-buttons {
    gap: 0.6rem;
  }

  body.chapter-book .chapter-footer-nav .grade5-footer-nav-buttons {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body.chapter-book.top-dashboard-app.grade5-book-app .site-nav {
    display: none;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-frame {
    width: 100%;
    margin: 0;
    margin-top: -24px;
    padding: 0;
    grid-template-columns: 1fr;
    gap: 0;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .dashboard-main {
    width: 100%;
    min-width: 0;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell {
    width: 100%;
    margin: 0;
    padding: 0 0 28px;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell {
    width: 100%;
    gap: 0;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell > .hero {
    display: none;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell > .reference-mobile-topbar {
    display: grid;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgba(36, 106, 71, 0.10);
    border-radius: 0;
    background: #faf7f0;
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 80;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .reference-mobile-topbar__bar {
    padding: 4px 10px 3px;
    border-bottom: 1px solid rgba(36, 106, 71, 0.08);
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .reference-mobile-topbar__context {
    padding: 4px 10px 4px;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .reference-mobile-topbar__rail {
    padding: 0 10px 5px;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell > .panel.chapter-page,
  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell > .book-section {
    order: 2;
  }

  body.chapter-book.top-dashboard-app.grade5-book-app .page-shell.textbook-shell > .chapter-footer-nav {
    order: 3;
  }
}

body.chapter-book.grade5-reference-reader {
  min-height: 100vh;
  --reader-topbar-height: 48px;
  --reader-topbar-pad-x: 12px;
  --reader-topbar-pad-y: 5px;
  --reader-icon-size: 28px;
  --reader-bottom-bar-height: 52px;
  --reader-bottom-pad-x: 8px;
  --reader-bottom-pad-y: 8px;
  --reader-bottom-item-height: 36px;
  --reader-content-top-space: 52px;
  --reader-content-bottom-space: 128px;
}

body.chapter-book.grade5-reference-reader .reference-reader {
  width: min(1040px, calc(100% - 24px));
  margin: -24px auto 0;
  padding: var(--reader-content-top-space) 0 calc(var(--reader-content-bottom-space) + env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  width: 100%;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(68, 52, 28, 0.10);
  border-radius: 0;
  background: #f7f1e6;
  box-shadow: none;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: var(--reader-topbar-height);
  padding: var(--reader-topbar-pad-y) var(--reader-topbar-pad-x);
  border-radius: 0;
  background: transparent;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  color: var(--book-text);
  text-decoration: none;
  font-weight: 800;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__brand-icon {
  display: block;
  flex: 0 0 auto;
  width: var(--reader-icon-size);
  height: var(--reader-icon-size);
  border-radius: 8px;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__brand-text {
  white-space: nowrap;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0.3rem 0.72rem;
  border: 1px solid rgba(36, 106, 71, 0.16);
  border-radius: 999px;
  background: #fffaf1;
  color: #21422f;
  font-weight: 800;
  line-height: 1;
  cursor: default;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__search:disabled {
  opacity: 1;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.34rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--book-muted);
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__tab.is-active {
  background: #ffffff;
  border-color: rgba(36, 106, 71, 0.18);
  color: #21422f;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__tab--disabled {
  background: rgba(255, 255, 255, 0.5);
  color: rgba(34, 57, 46, 0.5);
}

body.chapter-book.grade5-reference-reader .reference-reader-bottom-tabs {
  position: fixed;
  left: 50%;
  bottom: env(safe-area-inset-bottom);
  z-index: 90;
  width: calc(100% - 8px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: var(--reader-bottom-pad-y) var(--reader-bottom-pad-x) max(var(--reader-bottom-pad-y), env(safe-area-inset-bottom));
  border: 1px solid rgba(68, 52, 28, 0.10);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  background: #f7f1e6;
  box-shadow: 0 -8px 24px rgba(35, 44, 60, 0.06);
}

body.chapter-book.grade5-reference-reader .reference-reader-bottom-tabs__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--reader-bottom-item-height);
  padding: 0.34rem 0.2rem;
  border-radius: 12px;
  color: var(--book-muted);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

body.chapter-book.grade5-reference-reader .reference-reader-bottom-tabs__item--active {
  background: #ffffff;
  border: 1px solid rgba(36, 106, 71, 0.18);
  color: #21422f;
}

body.chapter-book.grade5-reference-reader .reference-reader__header,
body.chapter-book.grade5-reference-reader .reference-reader__toc,
body.chapter-book.grade5-reference-reader .reference-reader__chapter {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(255, 250, 241, 0.86);
  border: 1px solid rgba(68, 52, 28, 0.10);
  border-radius: 24px;
  box-shadow: 0 14px 36px rgba(35, 44, 60, 0.08);
}

body.chapter-book.grade5-reference-reader .reference-reader__toc,
body.chapter-book.grade5-reference-reader .reference-reader__header {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.chapter-book.grade5-reference-reader .reference-reader__toc {
  order: -1;
  padding: 0;
}

body.chapter-book.grade5-reference-reader .reference-reader__header {
  order: 0;
  padding: 0;
}

body.chapter-book.grade5-reference-reader .reference-reader__eyebrow {
  margin: 0 0 8px;
  color: var(--book-accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.chapter-book.grade5-reference-reader .reference-reader__header h1 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  line-height: 1.2;
}

body.chapter-book.grade5-reference-reader .reference-reader__lead {
  margin: 8px 0 0;
  line-height: 1.55;
  color: var(--book-text);
  font-size: 0.96rem;
}

body.chapter-book.grade5-reference-reader .reference-reader__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

body.chapter-book.grade5-reference-reader .reference-reader__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.24rem 0.72rem;
  border-radius: 999px;
  background: rgba(36, 106, 71, 0.10);
  color: #21422f;
  font-size: 0.82rem;
  font-weight: 700;
}

body.chapter-book.grade5-reference-reader .reference-reader__toc {
  margin: 0;
}

body.chapter-book.grade5-reference-reader .reference-reader__toc h2 {
  display: none;
}

body.chapter-book.grade5-reference-reader .reference-reader__toc-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 0 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.chapter-book.grade5-reference-reader .reference-reader__toc-list::-webkit-scrollbar {
  display: none;
}

body.chapter-book.grade5-reference-reader .reference-reader__toc-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(36, 106, 71, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--book-text);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(35, 44, 60, 0.05);
}

body.chapter-book.grade5-reference-reader .reference-reader__toc-link:hover {
  border-color: rgba(36, 106, 71, 0.24);
  transform: translateY(-1px);
}

body.chapter-book.grade5-reference-reader .reference-reader__toc-no {
  flex: 0 0 auto;
  text-align: center;
  color: var(--book-accent-2);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
}

body.chapter-book.grade5-reference-reader .reference-reader__toc-title {
  display: none;
}

body.chapter-book.grade5-reference-reader .reference-reader__chapter {
  padding: 16px 16px 18px;
  display: grid;
  gap: 18px;
  border-radius: 20px;
  min-width: 0;
  scroll-margin-top: 112px;
}

body.chapter-book.grade5-reference-reader .reference-reader__chapter-summary {
  margin: 10px 0 0;
  color: var(--book-muted);
  line-height: 1.8;
}

body.chapter-book.grade5-reference-reader .reference-reader__section-head {
  display: grid;
  gap: 6px;
}

body.chapter-book.grade5-reference-reader .reference-reader__section-head--chapter {
  gap: 8px;
}

body.chapter-book.grade5-reference-reader .reference-reader__lesson {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(68, 52, 28, 0.08);
  box-shadow: 0 8px 24px rgba(35, 44, 60, 0.05);
  scroll-margin-top: 112px;
  scroll-margin-bottom: 108px;
  min-width: 0;
}

body.chapter-book.grade5-reference-reader .reference-reader__lesson-title {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.25;
}

body.chapter-book.grade5-reference-reader .reference-reader__lesson-subtitle,
body.chapter-book.grade5-reference-reader .reference-reader__note {
  margin: 0;
  color: var(--book-muted);
  line-height: 1.8;
}

body.chapter-book.grade5-reference-reader .reference-reader__block {
  display: grid;
  gap: 12px;
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(68, 52, 28, 0.08);
  background: rgba(255, 255, 255, 0.78);
  min-width: 0;
}

body.chapter-book.grade5-reference-reader .reference-reader__lesson-heading {
  margin: 0;
  line-height: 1.35;
  font-size: 1.08rem;
}

body.chapter-book.grade5-reference-reader .reference-reader__list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 8px;
  line-height: 1.8;
}

body.chapter-book.grade5-reference-reader .reference-reader__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

body.chapter-book.grade5-reference-reader .reference-reader__mini-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(68, 52, 28, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 238, 0.96));
}

body.chapter-book.grade5-reference-reader .reference-reader__mini-mark {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.9rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: rgba(47, 120, 80, 0.10);
  color: var(--book-accent-2);
  font-weight: 800;
}

body.chapter-book.grade5-reference-reader .reference-reader__mini-title {
  font-size: 1rem;
  line-height: 1.35;
}

body.chapter-book.grade5-reference-reader .reference-reader__mini-lines {
  display: grid;
  gap: 4px;
  color: var(--book-text);
  line-height: 1.6;
}

body.chapter-book.grade5-reference-reader .reference-reader__mini-example {
  display: grid;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(68, 52, 28, 0.12);
  color: var(--book-muted);
  line-height: 1.55;
}

body.chapter-book.grade5-reference-reader .reference-reader__mini-example strong {
  color: var(--book-text);
}

body.chapter-book.grade5-reference-reader .reference-reader__alphabet-grid {
  margin-top: 2px;
}

body.chapter-book.grade5-reference-reader .reference-reader__card {
  min-height: 100%;
}

body.chapter-book.grade5-reference-reader .reference-reader__quiz {
  display: grid;
  gap: 12px;
}

body.chapter-book.grade5-reference-reader .reference-reader__quiz-list {
  display: grid;
  gap: 10px;
}

body.chapter-book.grade5-reference-reader .reference-reader__quiz-item {
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(68, 52, 28, 0.10);
  background: rgba(255, 255, 255, 0.94);
  min-width: 0;
}

body.chapter-book.grade5-reference-reader .reference-reader__quiz-item > summary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

body.chapter-book.grade5-reference-reader .reference-reader__quiz-item > summary::-webkit-details-marker {
  display: none;
}

body.chapter-book.grade5-reference-reader .reference-reader__quiz-no {
  flex: 0 0 auto;
  min-width: 2.5rem;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: rgba(36, 106, 71, 0.10);
  color: #21422f;
  font-weight: 800;
  text-align: center;
}

body.chapter-book.grade5-reference-reader .reference-reader__quiz-prompt {
  line-height: 1.6;
  font-weight: 700;
}

body.chapter-book.grade5-reference-reader .reference-reader__quiz-instruction,
body.chapter-book.grade5-reference-reader .reference-reader__quiz-explanation {
  margin: 10px 0 0;
  color: var(--book-muted);
  line-height: 1.75;
}

body.chapter-book.grade5-reference-reader .reference-reader__quiz-answer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-top: 10px;
}

body.chapter-book.grade5-reference-reader .reference-reader__quiz-answer strong {
  color: var(--book-accent-2);
}

@media (max-width: 640px) {
  body.chapter-book.grade5-reference-reader .reference-reader {
    width: calc(100% - 16px);
    margin: -24px auto 0;
    gap: 8px;
    padding: 56px 0 calc(116px + env(safe-area-inset-bottom));
  }

  body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar {
    width: 100%;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__inner {
    gap: 6px;
    min-height: var(--reader-topbar-height);
    padding: var(--reader-topbar-pad-y) var(--reader-topbar-pad-x);
  }

  body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__brand-text {
    display: none;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__search {
    min-height: 28px;
    padding: 0.26rem 0.6rem;
    font-size: 0.82rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__tabs {
    gap: 4px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__tab {
    min-height: 28px;
    padding: 0.3rem 0.35rem;
    font-size: 0.8rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-bottom-tabs {
    width: calc(100% - 8px);
    gap: 4px;
    padding: var(--reader-bottom-pad-y) var(--reader-bottom-pad-x) max(var(--reader-bottom-pad-y), env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-bottom-tabs__item {
    min-height: 36px;
    padding: 0.34rem 0.2rem;
    font-size: 0.76rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__header,
  body.chapter-book.grade5-reference-reader .reference-reader__toc {
    border-radius: 0;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__chapter {
    border-radius: 18px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__header {
    padding: 0;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__header h1 {
    font-size: 1.12rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__lead {
    margin-top: 4px;
    font-size: 0.84rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__meta {
    gap: 5px;
    margin-top: 7px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__meta span {
    min-height: 1.65rem;
    padding: 0.2rem 0.46rem;
    font-size: 0.74rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__toc {
    padding: 0;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__toc h2 {
    display: none;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__chapter,
  body.chapter-book.grade5-reference-reader .reference-reader__block,
  body.chapter-book.grade5-reference-reader .reference-reader__lesson,
  body.chapter-book.grade5-reference-reader .reference-reader__mini-card,
  body.chapter-book.grade5-reference-reader .reference-reader__quiz-item {
    padding-left: 14px;
    padding-right: 14px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__toc-list,
  body.chapter-book.grade5-reference-reader .reference-reader__cards {
    grid-template-columns: 1fr;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__toc-link {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__toc-title {
    display: none;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__lesson-title {
    font-size: 1.3rem;
  }
}

body.chapter-book.grade5-reference-reader {
  --reader-topbar-height: 48px;
  --reader-topbar-pad-x: 12px;
  --reader-topbar-pad-y: 5px;
  --reader-icon-size: 28px;
  --reader-bottom-bar-height: 52px;
  --reader-bottom-pad-x: 8px;
  --reader-bottom-pad-y: 8px;
  --reader-bottom-item-height: 36px;
  --reader-content-top-space: 52px;
  --reader-content-bottom-space: 128px;
}

body.chapter-book.grade5-reference-reader.is-reader-toc-open {
  overflow: hidden;
}

body.chapter-book.grade5-reference-reader .reference-reader {
  margin: 0 auto;
  padding-top: var(--reader-content-top-space);
  padding-bottom: calc(var(--reader-content-bottom-space) + env(safe-area-inset-bottom));
  gap: 6px;
}

body.chapter-book.grade5-reference-reader .reference-reader-compact-hero {
  padding: 0 2px 2px;
}

body.chapter-book.grade5-reference-reader .reference-reader-compact-hero .reference-reader__eyebrow {
  margin-bottom: 4px;
  font-size: 0.76rem;
}

body.chapter-book.grade5-reference-reader .reference-reader-compact-hero h1 {
  font-size: clamp(1.08rem, 2.6vw, 1.58rem);
}

body.chapter-book.grade5-reference-reader .reference-reader-compact-hero .reference-reader__lead {
  margin-top: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
}

body.chapter-book.grade5-reference-reader .reference-reader-compact-hero .reference-reader__meta {
  margin-top: 8px;
  gap: 6px;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__inner {
  min-height: var(--reader-topbar-height);
  padding: var(--reader-topbar-pad-y) var(--reader-topbar-pad-x);
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__search {
  cursor: pointer;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__search[aria-expanded="true"] {
  background: #f0eadf;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__tabs {
  min-width: 0;
}

body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__tab.is-active,
body.chapter-book.grade5-reference-reader .reference-reader-chapter-rail__item.is-active,
body.chapter-book.grade5-reference-reader .reference-reader-chapter-rail__item[aria-current="page"] {
  background: linear-gradient(135deg, rgba(36, 106, 71, 0.12), rgba(217, 122, 47, 0.12));
  border-color: rgba(36, 106, 71, 0.24);
  color: #21422f;
}

body.chapter-book.grade5-reference-reader .reference-reader-bottom-tabs {
  left: 50%;
  bottom: env(safe-area-inset-bottom);
  transform: translateX(-50%);
  width: calc(100% - 8px);
  max-width: none;
  min-width: 0;
  gap: 4px;
  padding: var(--reader-bottom-pad-y) var(--reader-bottom-pad-x) max(var(--reader-bottom-pad-y), env(safe-area-inset-bottom));
  border: 1px solid rgba(68, 52, 28, 0.10);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 24px rgba(35, 44, 60, 0.06);
  background: #f7f1e6;
}

body.chapter-book.grade5-reference-reader .reference-reader-bottom-tabs__item {
  min-width: 0;
}

body.chapter-book.grade5-reference-reader .reference-reader-bottom-tabs__item--disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--reader-bottom-item-height);
  padding: 0.34rem 0.2rem;
  border-radius: 12px;
  color: rgba(34, 57, 46, 0.42);
  font-size: 0.76rem;
}

body.chapter-book.grade5-reference-reader .reference-reader__chapter-end {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid rgba(68, 52, 28, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

body.chapter-book.grade5-reference-reader .reference-reader-chapter-end__eyebrow {
  margin: 0;
  color: var(--book-accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

body.chapter-book.grade5-reference-reader .reference-reader-chapter-end__buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.chapter-book.grade5-reference-reader .reference-reader-chapter-end__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.48rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(36, 106, 71, 0.16);
  background: #fffaf1;
  color: #21422f;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
}

body.chapter-book.grade5-reference-reader .reference-reader-chapter-end__button--disabled {
  background: rgba(255, 255, 255, 0.56);
  color: rgba(34, 57, 46, 0.42);
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay[hidden] {
  display: none;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: stretch;
  padding: calc(var(--reader-topbar-height) + 8px) 8px calc(76px + env(safe-area-inset-bottom));
  background: rgba(22, 30, 42, 0.44);
  backdrop-filter: blur(6px);
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__backdrop {
  position: absolute;
  inset: 0;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__sheet {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - (var(--reader-topbar-height) + 92px));
  margin: 0 auto;
  overflow: auto;
  border: 1px solid rgba(68, 52, 28, 0.12);
  border-radius: 18px;
  background: rgba(250, 247, 240, 0.97);
  box-shadow: 0 10px 24px rgba(18, 26, 36, 0.12);
  padding: 16px;
  text-align: left;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__eyebrow {
  margin: 0 0 6px;
  color: var(--book-accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__header h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2.8vw, 1.55rem);
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__lead {
  margin: 6px 0 0;
  color: var(--book-muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(36, 106, 71, 0.18);
  border-radius: 999px;
  background: #fff;
  color: #21422f;
  font-weight: 700;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__chapters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 14px;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__chapters::-webkit-scrollbar {
  display: none;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__chapter {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(36, 106, 71, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--book-text);
  font-weight: 800;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__chapter.is-active,
body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__chapter[aria-selected="true"] {
  background: linear-gradient(135deg, rgba(36, 106, 71, 0.12), rgba(217, 122, 47, 0.12));
  border-color: rgba(36, 106, 71, 0.26);
  color: #21422f;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panels {
  margin-top: 14px;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel {
  display: none;
  gap: 12px;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel.is-active {
  display: grid;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel-head {
  display: grid;
  gap: 6px;
  justify-items: start;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel-eyebrow {
  margin: 0 0 4px;
  color: var(--book-accent-2);
  font-size: 0.8rem;
  font-weight: 800;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel-subtitle {
  margin: 0;
  color: var(--book-muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 106, 71, 0.18);
  background: #fff;
  color: #21422f;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(68, 52, 28, 0.08);
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__lesson-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(68, 52, 28, 0.08);
  border-radius: 0;
  background: transparent;
  color: var(--book-text);
  text-decoration: none;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__lesson-index {
  color: var(--book-accent-2);
  font-weight: 800;
  letter-spacing: 0.02em;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__lesson-title {
  flex: 1 1 auto;
  line-height: 1.5;
}

@media (max-width: 640px) {
  body.chapter-book.grade5-reference-reader {
    --reader-topbar-height: 48px;
    --reader-topbar-pad-x: 12px;
    --reader-topbar-pad-y: 5px;
    --reader-icon-size: 28px;
    --reader-bottom-bar-height: 52px;
    --reader-bottom-pad-x: 8px;
    --reader-bottom-pad-y: 8px;
    --reader-bottom-item-height: 36px;
    --reader-content-top-space: 52px;
    --reader-content-bottom-space: 128px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader {
    width: calc(100% - 16px);
    padding-top: var(--reader-content-top-space);
    padding-bottom: calc(var(--reader-content-bottom-space) + env(safe-area-inset-bottom));
  }

  body.chapter-book.grade5-reference-reader .reference-reader-compact-hero {
    padding: 0;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-compact-hero h1 {
    font-size: 1.08rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-compact-hero .reference-reader__lead {
    font-size: 0.84rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__inner {
    gap: 6px;
    min-height: var(--reader-topbar-height);
    padding: var(--reader-topbar-pad-y) 8px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__brand-text {
    display: none;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__search {
    min-height: 28px;
    padding: 0.26rem 0.6rem;
    font-size: 0.82rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__tabs {
    gap: 4px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-fixed-gradebar__tab {
    min-height: 28px;
    padding: 0.28rem 0.35rem;
    font-size: 0.8rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-bottom-tabs {
    width: calc(100% - 8px);
    gap: 4px;
    padding: var(--reader-bottom-pad-y) var(--reader-bottom-pad-x) max(var(--reader-bottom-pad-y), env(safe-area-inset-bottom));
  }

  body.chapter-book.grade5-reference-reader .reference-reader-bottom-tabs__item,
  body.chapter-book.grade5-reference-reader .reference-reader-bottom-tabs__item--disabled {
    min-height: var(--reader-bottom-item-height);
    padding: 0.34rem 0.2rem;
    font-size: 0.76rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-chapter-end__buttons {
    gap: 6px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-chapter-end__button {
    min-height: 2.3rem;
    padding: 0.38rem 0.45rem;
    font-size: 0.84rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay {
    padding: calc(var(--reader-topbar-height) + 6px) 6px calc(70px + env(safe-area-inset-bottom));
  }

  body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__sheet {
    padding: 12px;
    border-radius: 16px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__header {
    gap: 10px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__lead {
    font-size: 0.84rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__chapter {
    width: 40px;
    height: 40px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel-head {
    gap: 4px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel-link {
    width: fit-content;
  }
}

body.chapter-book.grade5-reference-reader .reference-reader {
  width: min(1040px, calc(100% - 16px));
  margin: 0 auto;
  padding-top: 30px;
  padding-bottom: calc(var(--reader-bottom-bar-height) + 56px + env(safe-area-inset-bottom));
  gap: 4px;
}

body.chapter-book.grade5-reference-reader .reference-reader__toc {
  margin: 0;
  padding: 0;
}

body.chapter-book.grade5-reference-reader .reference-reader__toc-list {
  gap: 8px;
}

body.chapter-book.grade5-reference-reader .reference-reader__toc-link {
  box-shadow: none;
}

body.chapter-book.grade5-reference-reader .reference-reader__chapter {
  padding: 0;
  display: grid;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scroll-margin-top: calc(var(--reader-topbar-height) + 8px);
  scroll-margin-bottom: calc(var(--reader-bottom-bar-height) + 16px);
}

body.chapter-book.grade5-reference-reader .reference-reader__section-head--chapter {
  padding: 8px 0 4px;
}

body.chapter-book.grade5-reference-reader .reference-reader__lesson {
  padding: 0;
  display: grid;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scroll-margin-top: calc(var(--reader-topbar-height) + 8px);
  scroll-margin-bottom: calc(var(--reader-bottom-bar-height) + 16px);
}

body.chapter-book.grade5-reference-reader .reference-reader__lesson-top {
  display: grid;
  gap: 6px;
  padding: 0 0 2px;
}

body.chapter-book.grade5-reference-reader .reference-reader__lesson-title {
  margin: 0;
  font-size: clamp(1.24rem, 2.8vw, 1.8rem);
  line-height: 1.25;
}

body.chapter-book.grade5-reference-reader .reference-reader__lesson-subtitle,
body.chapter-book.grade5-reference-reader .reference-reader__chapter-summary,
body.chapter-book.grade5-reference-reader .reference-reader__note {
  margin: 0;
  color: var(--book-muted);
  line-height: 1.75;
}

body.chapter-book.grade5-reference-reader .reference-reader__block {
  display: grid;
  gap: 10px;
  padding: 12px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.chapter-book.grade5-reference-reader .reference-reader__lesson-heading {
  font-size: 1rem;
}

body.chapter-book.grade5-reference-reader .reference-reader__cards {
  gap: 10px;
}

body.chapter-book.grade5-reference-reader .reference-reader__mini-card,
body.chapter-book.grade5-reference-reader .reference-reader__quiz-item {
  border-radius: 16px;
  box-shadow: none;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay {
  padding: calc(var(--reader-topbar-height) + 6px) 6px calc(var(--reader-bottom-bar-height) + 8px);
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__sheet {
  padding: 12px;
  border-radius: 16px;
  background: rgba(250, 247, 240, 0.97);
  border: 1px solid rgba(68, 52, 28, 0.08);
  box-shadow: 0 10px 24px rgba(18, 26, 36, 0.12);
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__header {
  align-items: flex-start;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__lead {
  display: none;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panels {
  margin-top: 12px;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel {
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(68, 52, 28, 0.08);
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel-head {
  display: grid;
  gap: 6px;
  justify-items: start;
  align-items: start;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel-list {
  gap: 0;
  border-top: 1px solid rgba(68, 52, 28, 0.08);
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__lesson-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(68, 52, 28, 0.06);
  border-radius: 0;
  background: transparent;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__lesson-index {
  color: var(--book-accent-2);
  font-weight: 800;
  letter-spacing: 0.02em;
}

body.chapter-book.grade5-reference-reader .reference-reader-toc-overlay__panel-link {
  display: none;
}

@media (max-width: 640px) {
  body.chapter-book.grade5-reference-reader .reference-reader {
    width: calc(100% - 12px);
    padding-top: var(--reader-content-top-space);
    padding-bottom: calc(var(--reader-content-bottom-space) + env(safe-area-inset-bottom));
  }

  body.chapter-book.grade5-reference-reader .reference-reader__toc-list {
    gap: 6px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__toc-link {
    width: 42px;
    min-width: 42px;
    height: 42px;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__lesson-title {
    font-size: 1.18rem;
  }

  body.chapter-book.grade5-reference-reader .reference-reader__mini-card,
  body.chapter-book.grade5-reference-reader .reference-reader__quiz-item {
    border-radius: 14px;
  }
}
