/* Readable lessons, responsive reference tables and keyboard-friendly practice. */
.guide-main a:not(.nav-button), .quiz-info a, .quiz-note a { color: #096e65; text-decoration: underline; text-underline-offset: .18em; }
.guide-main .guide-cta a { color: #fff; }
.guide-main .guide-cta .nav-button { display: inline-flex; margin-top: 20px; margin-left: 0; background: #126e61; }
.lesson-toc { padding: 24px; margin: 0 0 36px; background: #f0faf7; border: 1px solid #cfe9e2; border-radius: 20px; }
.lesson-toc ol { padding-left: 22px; margin-bottom: 0; }
.lesson-toc li { margin: 10px 0; line-height: 1.5; }
.guide-section, .quiz-info h2 { scroll-margin-top: 100px; }
.guide-section h2 { overflow-wrap: anywhere; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 24px 0; border: 1px solid #d8e6e1; border-radius: 14px; }
.lesson-table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.6; }
.lesson-table caption { text-align: left; padding: 16px; font-weight: 750; background: #f5faf8; color: #284a45; }
.lesson-table th { text-align: left; background: #e9f4ef; color: #163f38; }
.lesson-table th, .lesson-table td { padding: 14px; border-bottom: 1px solid #dce9e3; vertical-align: top; min-width: 90px; }
.lesson-table tbody tr:last-child td { border-bottom: 0; }
.lesson-table .jp { font-size: 21px; line-height: 1.8; white-space: pre; }
.jp { font-family: 'Yu Gothic', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif; }
.lesson-example { border-left: 4px solid #169585; padding: 18px 22px; margin: 22px 0; background: #f2faf7; border-radius: 0 16px 16px 0; }
.lesson-example p { margin: 6px 0; }
.lesson-example p.jp { color: #173c36; font-size: 23px; line-height: 1.8; }
.lesson-example .reading { color: #3c635b; font-size: 15px; }
.lesson-example .example-note { font-size: 15px; }
.practice-answer { padding: 18px; border: 1px solid #d6e7df; border-radius: 14px; margin: 12px 0; }
.practice-answer summary { cursor: pointer; font-weight: 700; line-height: 1.65; }
.practice-answer[open] { background: #f4faf7; }
.practice-answer .jp { font-size: 20px; }
.lesson-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lesson-links a { padding: 18px; background: #f2f8f5; border: 1px solid #d7e7df; border-radius: 12px; line-height: 1.5; }
.guide-byline a { text-decoration: underline; }
.quiz-settings { padding: 18px; margin: 22px 0; border: 1px solid #d4e5df; border-radius: 16px; text-align: left; }
.quiz-settings legend { padding: 0 6px; font-weight: 750; }
.row-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row-choices label { display: flex; gap: 8px; align-items: center; min-height: 46px; padding: 8px; border-radius: 8px; background: #f3faf6; cursor: pointer; }
.row-choices input { width: 18px; height: 18px; accent-color: #0d8076; }
.quiz-settings select { width: 100%; padding: 14px 10px; border: 1px solid #9cbdb2; border-radius: 8px; color: #142124; background: #fff; font: inherit; }
.quiz-settings .quiz-secondary { margin-top: 14px; }
.quiz-note { font-size: 14px; line-height: 1.65; margin-top: 20px; color: #48615b; }
#quiz-error { color: #a12626; }
#answer-feedback { font-size: 18px; line-height: 1.7; margin-top: 18px; }
.missed-review { text-align: left; margin-top: 24px; padding: 20px; background: #f4faf7; border-radius: 16px; }
.missed-review ul { columns: 2; list-style: none; padding: 0; }
.missed-review li { margin: 8px 0; break-inside: avoid; line-height: 1.6; }
.missed-review li span { font-size: 24px; }
.quiz-option:disabled { opacity: 1; cursor: default; }
.quiz-option.correct { background: #d7f4e4; color: #16482e; border-color: #288957; }
.quiz-option.wrong { background: #ffe4e4; color: #7f2020; border-color: #c95a5a; }
.guide-wrap .guide-byline { padding-bottom: 8px; }
.set-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.set-actions .quiz-secondary { font-size: 13px; padding: 10px; min-width: 0; }
.lesson-input { display: block; width: 100%; max-width: 560px; border: 1px solid #a6beb4; padding: 14px; border-radius: 10px; background: #fff; color: #173c36; font: inherit; margin: 12px 0; }
#filter-status { display: block; min-height: 24px; font-size: 14px; }
.reading-passage { font-size: 23px; line-height: 2.5; background: #f1f8f4; border-left: 4px solid #169585; padding: 24px; border-radius: 0 16px 16px 0; }
.reading-passage rt { font-size: .52em; }
.hide-furigana .reading-passage rt { visibility: hidden; }
.practice-tool { padding: 24px; background: #f2faf6; border: 1px solid #d0e4d9; border-radius: 18px; margin-top: 20px; }
.practice-prompt { font-size: 28px; line-height: 1.6; }
.practice-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.practice-options button { padding: 14px; min-height: 54px; white-space: normal; line-height: 1.5; background: #fff; color: #183b33; border: 1px solid #aac8b8; border-radius: 10px; cursor: pointer; font: inherit; }
.practice-options button.answer-correct { background: #d6f3df; border-color: #27894b; }
.practice-options button.answer-wrong { background: #ffe5e3; border-color: #ba4646; }
.practice-tool .quiz-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 18px; background: #126e61; color: #fff; border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 700; }
.stroke-gallery { display: flex; flex-wrap: wrap; gap: 14px; }
.stroke-gallery figure { margin: 0; padding: 10px; border: 1px solid #dae6de; border-radius: 12px; text-align: center; }
.guide-section audio { display: block; width: 100%; max-width: 500px; margin: 18px 0; }
.lesson-table details img { min-width: 109px; }
.lesson-table [lang="ja"] { white-space: normal; overflow-wrap: normal; }
.lesson-table th { min-width: 100px; }
.footer-links { flex-wrap: wrap; }
:focus-visible { outline: 3px solid #097969; outline-offset: 4px; }
[tabindex="-1"]:focus { outline: none; }
@media (max-width: 600px) {
  .practice-options { grid-template-columns: 1fr; }
  .reading-passage { padding: 16px; font-size: 21px; }
  .lesson-links, .row-choices { grid-template-columns: 1fr; }
  .lesson-table th, .lesson-table td { padding: 10px; }
  .lesson-example { padding: 14px; }
  .lesson-example p.jp { font-size: 21px; overflow-wrap: anywhere; }
  .missed-review ul { columns: 1; }
  .guide-hero h1 { font-size: clamp(34px, 9vw, 48px); line-height: 1.13; }
  .breadcrumbs { overflow-wrap: anywhere; }
}
@media print {
  .header, .footer, .guide-aside, .guide-cta, .lesson-toc { display: none; }
  .guide-layout { display: block; }
  .table-scroll { overflow: visible; }
  .lesson-example { break-inside: avoid; }
}
