:root {
  color-scheme: light;
  --paper: #fbfaf5;
  --green: #315741;
  --ink: #2f3730;
  --muted: #636c61;
  --line: #d9ddcf;
  --sage: #e9eee1;
  --serif: Baskerville, "Iowan Old Style", "Palatino Linotype", Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); }
button, input { font: inherit; }
button, summary, label { cursor: pointer; }
[hidden], .symbols { display: none !important; }
:focus-visible { outline: 3px solid #65835b; outline-offset: 3px; }
.skip { position: absolute; top: -7rem; left: 1rem; background: white; padding: 10px; }
.skip:focus { top: 5px; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.masthead { border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1080px; margin: auto; padding: 15px 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--green); }
.brand b { display: block; font: 26px/1.02 Georgia, serif; letter-spacing: -.6px; }
.section-name { font-size: 12px; color: var(--muted); }
main { max-width: 920px; padding: 0 32px 70px; margin: auto; overflow-wrap: anywhere; }
#loading, noscript { display: block; margin: 4rem 0; color: var(--muted); }
.message { max-width: 570px; margin: 9vh auto; padding: 42px 20px; text-align: center; }
.message > .icon { width: 42px; height: 42px; color: var(--green); stroke-width: 1; }
.message h1, .library h1 { font: 500 clamp(26px, 4.5vw, 38px)/1.5 var(--serif); color: var(--green); }
.message p { line-height: 1.8; color: var(--muted); }
.action { display: inline-block; margin-top: 12px; padding: 10px 15px; border-radius: 4px; background: var(--green); color: white; text-decoration: none; }
.library { margin-top: clamp(38px, 8vw, 78px); }
.library-head { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; border-bottom: 2px solid var(--green); padding-bottom: 16px; }
.library h1 { margin: 0; }
.count, .reading-meta { font-size: 13px; color: var(--muted); }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li { border-bottom: 1px solid var(--line); }
.lesson-list a { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 27px 14px 27px 4px; text-decoration: none; }
.lesson-list a:hover { background: #f1f3e9; }
.lesson-list h2 { font: 500 clamp(26px, 4vw, 37px)/1.16 var(--serif); letter-spacing: -.02em; margin: 6px 0 9px; }
.lesson-info { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; font-size: 12px; font-weight: 500; line-height: 1.6; margin: 0; color: var(--muted); }
time { font-variant-numeric: tabular-nums; }
.lesson-info time:not(:empty) + span::before, .chapter:not(:empty) + .words:not(:empty)::before { content: ""; display: inline-block; height: .85em; border-left: 1px solid #b6c1af; margin-right: 10px; }
.byline, .author { font-family: var(--serif); color: var(--muted); margin: 0; }
.byline { font-size: 18px; }
.word-label { display: inline-block; margin-left: 12px; font: 12px/1.4 system-ui, sans-serif; color: var(--muted); }
.reader-tools { display: flex; align-items: center; justify-content: space-between; margin: 25px auto 24px; max-width: 700px; }
.reader-tools a, .reader-tools button { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--green); }
.back { min-height: 42px; text-decoration: none; }
.back:hover { text-decoration: underline; }
.reader-tools button { background: transparent; border: 1px solid #b6c1af; border-radius: 5px; padding: 9px 13px; min-height: 40px; }
.reader-tools button:hover { background: var(--sage); }
.reader { max-width: 700px; margin: 0 auto; }
.reading-head { border-top: 2px solid var(--green); padding: 30px 0 23px; border-bottom: 1px solid var(--line); }
.work-title { font: 500 clamp(38px, 6.1vw, 64px)/1.04 var(--serif); letter-spacing: -.038em; margin: 15px 0 12px; color: var(--green); text-wrap: balance; }
.author { font-size: 22px; }
.reading-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-top: 20px; }
.intro { font-size: 15px; line-height: 1.9; margin: 27px 0 8px; border-left: 3px solid #a6b496; padding-left: 15px; }
.intro:empty { display: none; }
.highlight-controls { display: flex; justify-content: flex-end; margin: 18px 0 10px; }
.highlight-controls label { position: relative; display: inline-flex; align-items: center; gap: 9px; min-height: 42px; font-size: 12px; color: var(--green); }
.highlight-controls input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.track { display: inline-flex; width: 31px; height: 18px; align-items: center; border: 1px solid #a7b0a2; border-radius: 30px; background: #e3e6dc; }
.track::before { content: ""; display: block; margin-left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #64705f; }
input:checked + .track { background: var(--green); border-color: var(--green); }
input:checked + .track::before { transform: translateX(13px); background: white; }
input:focus-visible + .track { outline: 3px solid #65835b; outline-offset: 3px; }
#passage { font: 22px/1.62 var(--serif); white-space: pre-wrap; tab-size: 2; margin: 0 0 37px; color: #262d28; }
mark { background: #dbe8bc; color: inherit; box-shadow: inset 0 -1px #80985f; }
.study { border-top: 1px solid var(--line); }
details, .question { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 12px; font-size: 15px; color: var(--green); font-weight: 600; }
summary::-webkit-details-marker { display: none; }
details[open] > summary .icon { transform: rotate(180deg); }
details > div { font-size: 14px; line-height: 1.85; padding: 0 0 16px; }
.lines { white-space: pre-wrap; }
.question { padding: 18px 0; }
.question h2, .source h2 { font-size: 15px; margin: 0 0 11px; color: var(--green); }
.prompt { font-size: 15px; line-height: 1.8; margin: 0 0 12px; }
#answer-panel { background: #eef1e7; padding: 0 15px; border: 0; border-radius: 4px; }
#answer-panel summary { font-size: 13px; min-height: 42px; }
.grammar-name { font-weight: 600; margin: 0; }
blockquote { font: italic 20px/1.55 var(--serif); margin: 8px 0; color: var(--green); }
.explanation { margin: 0; }
.source { margin-top: 26px; }
.passage-title { font-size: 17px; line-height: 1.6; margin: 8px 0 15px; color: var(--green); }
.source p { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 3px 0; }
@media screen {
  .print-preview { background: #e9eae3; }
  .print-preview .masthead, .print-preview .highlight-controls,
  .print-preview details:not([open]), .print-preview .reader .icon { display: none; }
  .print-preview .reader-tools { max-width: 794px; }
  .print-preview .print-actions { gap: 8px; }
  .print-actions #back-to-reader { border-color: transparent; }
  .print-actions #print-button { background: var(--green); color: white; border-color: var(--green); }
  .print-preview .reader {
    background: white; color: black; margin: auto; max-width: 794px; min-height: 860px;
    padding: clamp(24px, 6vw, 60px) clamp(20px, 7vw, 68px);
    border: 1px solid #d1d4c9; box-shadow: 0 2px 10px #23382110;
  }
  .print-preview .reading-head { padding: 0 0 10px; border-top: 0; }
  .print-preview .work-title { font-size: clamp(27px, 4.5vw, 37px); color: black; margin: 8px 0; }
  .print-preview .author { font-size: 17px; }
  .print-preview .reading-meta { margin-top: 7px; }
  .print-preview .intro { font-size: 14px; margin: 14px 0; }
  .print-preview #passage { font-size: 18px; line-height: 1.48; margin: 18px 0; }
  .print-preview mark { background: transparent; box-shadow: none; text-decoration: underline 1.5px; }
  .print-preview summary, .print-preview #answer-panel summary { cursor: default; min-height: 0; margin: 6px 0; }
  .print-preview .question { padding: 11px 0; }
  .print-preview .prompt, .print-preview details > div, .print-preview blockquote { font-size: 14px; margin: 4px 0; }
  .print-preview #answer-panel { padding: 0; background: transparent; }
  .print-preview .source { margin-top: 18px; }
  .print-preview .source h2 { font-size: 13px; margin-bottom: 2px; }
  .print-preview .source p { font-size: 11px; }
}
@media (max-width: 600px) {
  .header-inner { padding: 13px 20px; }
  main { padding: 0 20px 48px; }
  .reader-tools { margin: 14px 0 13px; }
  .reading-head { padding: 24px 0 17px; }
  .intro { margin-top: 22px; }
  #passage { font-size: 20px; line-height: 1.57; }
  .lesson-list a { padding: 22px 2px; }
}
@page { margin: 16mm 18mm; }
@media print {
  :root, body { background: white; color: black; }
  .masthead, .reader-tools, .highlight-controls, .skip, .icon, #loading { display: none !important; }
  main, .reader { width: auto; max-width: none; margin: 0; padding: 0; }
  .reading-head { padding: 0 0 8pt; border-top: 0; }
  .work-title { margin: 5pt 0; font-size: 26pt; color: black; }
  .reading-meta { margin-top: 6pt; }
  .author { font-size: 12pt; }
  .intro { font-size: 10pt; margin: 9pt 0; }
  #passage { font-size: 13pt; line-height: 1.48; margin: 12pt 0; orphans: 3; widows: 3; }
  mark { background: transparent; box-shadow: none; text-decoration: underline 1.5pt; }
  details:not([open]) { display: none; }
  details[open], .question, .source { break-inside: avoid; }
  summary, #answer-panel summary { min-height: 0; margin: 5pt 0; }
  .question { padding: 8pt 0; }
  .prompt, details > div, blockquote { font-size: 10pt; margin: 3pt 0; }
  #answer-panel { padding: 0; background: none; }
  .source { margin-top: 12pt; }
  .source h2 { font-size: 9pt; margin-bottom: 1pt; }
  .source p { font-size: 8pt; }
}
