/* Final reader layout safeguards, loaded after the legacy reader styles. */
.reader-lesson-stepper{inset:auto;top:auto;bottom:16px;left:46px;right:12px;transform:none}
.reader.reader-fullscreen .reader-lesson-stepper{inset:auto;top:auto;bottom:20px;left:24px;right:24px;transform:none}
.reader .passage .reading-character{margin-inline:.08em!important;ruby-align:space-around}.reader .passage .reading-unit .reading-character{margin-right:0!important}
.short-reading-passage .reading-unit,.short-reading-questions .reading-unit{display:inline;white-space:nowrap}.short-reading-passage .reading-punctuation,.short-reading-questions .reading-punctuation{display:inline-block;position:relative;top:.18em;margin-left:-.05em;font:inherit;font-size:.76em;line-height:1}.short-reading-passage .reading-unit-leading .reading-punctuation,.short-reading-questions .reading-unit-leading .reading-punctuation{top:-.42em;margin-right:-.08em}
@media(max-width:760px){.reader-lesson-stepper{inset:auto;top:auto;left:auto;right:auto}}

/* Lesson navigation should never cover the passage. Keep only the two quiet,
   direct arrows; the duplicated “本课字词” route is intentionally absent. */
.reader-lesson-stepper{display:flex;align-items:center;justify-content:space-between;pointer-events:none}.reader-lesson-stepper .reader-lesson-step{pointer-events:auto;display:grid;place-items:center;width:40px;height:40px;min-width:40px;padding:0!important;border-radius:50%;text-align:center!important}.reader-lesson-stepper .reader-lesson-step b{font-size:29px;line-height:1;font-weight:400}.reader-lesson-stepper .reader-lesson-step span,.reader-lesson-stepper .reader-lesson-step small{display:none!important}@media(max-width:760px){.reader-lesson-stepper{margin:8px 0 0;padding:8px 2px;background:transparent;border:0}.reader-lesson-stepper .reader-lesson-step{width:36px;height:36px;min-width:36px}.reader-lesson-stepper .reader-lesson-step b{font-size:26px}}

/* Printing keeps a normal lesson on one A4 page when its text length allows it. */
@page{size:A4 portrait;margin:12mm 14mm}
@media print{
  .reader[open],.reader.reader-fullscreen{position:static!important;display:block!important;width:auto!important;height:auto!important;max-height:none!important;overflow:visible!important;border:0!important;border-radius:0!important}
  .reader::backdrop{display:none!important}
  .reader-controls,.close-reader,.reader-display,.reader-font-size,.reader-fullscreen-toggle,.reader-tools-toggle,.reader-pk,.reader-lesson-stepper,.reader-hint,.reading-legend,.cover-paragraph,.download-preview{display:none!important}
  .reader-head{min-height:0!important;padding:0 0 5mm!important;border:0!important}
  .reader-head h2{font-size:18pt!important;line-height:1.35!important}
  .reader .reader-layout{display:block!important;height:auto!important}
  .reader .learning-content{overflow:visible!important;padding:0!important}
  .reader .passage{font-size:16pt!important;line-height:2.05!important;max-width:none!important}
  .reader .passage .paragraph{margin:0 0 3.5mm!important;break-inside:auto!important}
  .reader .passage .paragraph p{line-height:2.05!important;letter-spacing:0!important}
  .reader .passage .reading-character rt{font-size:9pt!important;line-height:1.05!important}
}

/* Reading can continue in either direction, or move straight into this
   lesson's character study.  The extra link only exists on a matching course
   page, so it never takes a child to a different lesson by mistake. */
.reader-lesson-stepper.has-study-link{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px}.reader-lesson-stepper.has-study-link .reader-lesson-step-previous{justify-self:start}.reader-lesson-stepper.has-study-link .reader-lesson-step-next{justify-self:end;text-align:right;grid-template-columns:1fr auto}.reader-lesson-stepper.has-study-link .reader-lesson-step-next small{grid-column:1}.reader-lesson-study{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:7px 13px;border:1px solid #bdadd8;border-radius:999px;background:#f2ecff;color:#5f4787;text-decoration:none;font:700 14px/1.2 Arial,"Microsoft YaHei",sans-serif;box-shadow:0 3px 0 #d4c5e9;white-space:nowrap}.reader-lesson-study:hover,.reader-lesson-study:focus-visible{background:#eadfff;outline:3px solid #ad94d1;outline-offset:2px}
@media(max-width:760px){.reader-lesson-stepper.has-study-link{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:7px;padding:9px 10px}.reader-lesson-stepper.has-study-link .reader-lesson-step{max-width:none;padding:7px 8px}.reader-lesson-study{min-height:34px;padding:6px 9px;font-size:12px}.reader-lesson-stepper.has-study-link .reader-lesson-step span{font-size:12px}}
