/* v80.8.46: only modifies the existing chapter prose font, selected through the
   already-persisted reader preferences. No extra font downloads or layout reset. */
body.reader-page .chapter-prose{font-family:var(--rw846-reader-font,Georgia,'Times New Roman',serif)}
#reading-tools label:has([data-reader="font"]){min-width:0}
@media(max-width:560px){#reading-tools label:has([data-reader="font"]){flex:1 1 140px}#reading-tools select[data-reader="font"]{min-width:0;max-width:100%}}

/* v80.8.48d — reader preferences only; does not alter sitewide theme rules. */
body.reader-page #reading-tools{
  display:flex;align-items:center;flex-wrap:nowrap;gap:.6rem;
  background:var(--reader-card);border:1px solid var(--reader-edge);
  color:var(--reader-text);padding:.75rem .9rem;position:relative;
  font:13px/1.4 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  margin-bottom:1.5rem;min-width:0;isolation:isolate;
}
body.reader-page #reading-tools .tools-title{
  flex:0 0 auto;white-space:nowrap;margin:0 .15rem 0 0;
  color:var(--reader-link);font-size:14px;font-weight:800;
}
body.reader-page #reading-tools .reader-primary-controls{
  display:flex;flex:1 1 auto;align-items:center;justify-content:space-between;
  gap:.6rem;flex-wrap:nowrap;min-width:0;
}
body.reader-page #reading-tools label{
  display:flex;flex:0 0 auto;flex-direction:row;align-items:center;
  width:auto;min-width:0;white-space:nowrap;gap:.4rem;
  color:var(--reader-text);font-size:12px;font-weight:500;
}
body.reader-page #reading-tools select,
body.reader-page #reading-tools button,
body.reader-page #reading-tools summary{
  background:var(--reader-bg);border:1px solid var(--reader-edge);color:var(--reader-text);
  border-radius:7px;padding:.38rem .5rem;font:600 12px/1.25 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}
body.reader-page #reading-tools select{max-width:100%;min-width:0;cursor:pointer}
body.reader-page #reading-tools .reader-theme-field select{width:70px}
body.reader-page #reading-tools .reader-font-field select{width:135px}
body.reader-page #reading-tools .reader-size-field,
body.reader-page #reading-tools .reader-width-field,
body.reader-page #reading-tools .reader-line-field{gap:.35rem}
body.reader-page #reading-tools input[type="range"]{
  display:block;flex:0 0 105px;width:105px;min-width:105px;height:22px;
  margin:0;padding:0;background:transparent;border:0;accent-color:var(--reader-link);
}
body.reader-page #reading-tools output{
  display:inline-block;min-width:34px;font-size:12px;color:var(--reader-text);font-variant-numeric:tabular-nums;
}
body.reader-page #reading-tools .reader-settings-more{position:relative;flex:0 0 auto;min-width:0}
body.reader-page #reading-tools .reader-settings-more summary{
  display:list-item;list-style-position:inside;white-space:nowrap;cursor:pointer;
}
body.reader-page #reading-tools .reader-more-content{
  position:absolute;right:0;top:calc(100% + 10px);z-index:40;
  display:flex;flex-direction:column;align-items:stretch;gap:.8rem;
  min-width:230px;max-width:min(320px,90vw);padding:1rem;
  border:1px solid var(--reader-edge);border-radius:9px;
  background:var(--reader-card);color:var(--reader-text);
  box-shadow:0 12px 35px #0004;
}
body.reader-page #reading-tools .reader-more-content label{justify-content:space-between;gap:.8rem}
body.reader-page #reading-tools .reader-more-content button{width:100%;text-align:center;cursor:pointer}
body.reader-page #reading-tools .reader-save-status{display:block;color:var(--reader-text);font-size:12px;line-height:1.5}
body.reader-page #reading-tools .reader-settings-toggle{display:none;cursor:pointer}
body.reader-page #reading-tools :is(select,button,summary):focus-visible,
body.reader-page #reading-tools input[type="range"]:focus-visible{
  outline:2px solid var(--reader-link);outline-offset:2px;
}
/* Reading settings follow the active reading theme, not dark global --surface. */
body.reader-page[data-theme="dark"] #reading-tools{--reader-toolbar-accent:#dbb9ef}
body.reader-page[data-theme="light"] #reading-tools{--reader-toolbar-accent:#674394}
body.reader-page[data-theme="sepia"] #reading-tools{--reader-toolbar-accent:#754d75}
body.reader-page #reading-tools .tools-title{color:var(--reader-toolbar-accent,var(--reader-link))}
body.reader-page #reading-tools input[type="range"]{accent-color:var(--reader-toolbar-accent,var(--reader-link))}
/* If there is insufficient width, show an intentional settings panel instead of
   wrapping and shortening the three adjustment sliders. */
@media(max-width:1170px){
  body.reader-page #reading-tools{justify-content:space-between;flex-wrap:nowrap}
  body.reader-page #reading-tools .reader-settings-toggle{display:inline-flex}
  body.reader-page #reading-tools .reader-primary-controls{display:none}
  body.reader-page #reading-tools[data-settings-open="true"] .reader-primary-controls{
    display:flex;position:absolute;top:calc(100% + 6px);right:0;left:0;z-index:35;
    flex-direction:column;align-items:stretch;gap:1rem;flex-wrap:nowrap;
    border:1px solid var(--reader-edge);border-radius:9px;
    background:var(--reader-card);padding:1rem;box-shadow:0 10px 30px #0003;
  }
  body.reader-page #reading-tools .reader-primary-controls>label{justify-content:space-between;width:100%;max-width:100%}
  body.reader-page #reading-tools input[type="range"]{width:140px;min-width:140px;flex-basis:140px}
  body.reader-page #reading-tools .reader-settings-more{align-self:stretch}
  body.reader-page #reading-tools .reader-settings-more summary{width:100%}
  body.reader-page #reading-tools .reader-more-content{position:static;max-width:none;min-width:0;margin-top:.55rem;box-shadow:none}
}
@media(max-width:375px){
  body.reader-page #reading-tools .reader-primary-controls>label{flex-wrap:wrap;justify-content:flex-start;gap:.6rem}
}
