.fbas-reader{border:1px solid rgba(230,214,185,.32);border-radius:12px;background:#f9f5ec;color:#263339;box-shadow:0 25px 70px rgba(0,0,0,.22);overflow:hidden;--fbas-text-size:19px}.fbas-reader .fbas-reader-top,.fbas-reader .fbas-reader-toolbar,.fbas-reader .fbas-reader-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.fbas-reader-top{padding:18px 22px;background:#f0e9dc;border-bottom:1px solid #e2d7c8}.fbas-reader-identity{display:flex;align-items:center;gap:12px}.fbas-dot{display:block;width:11px;height:11px;border-radius:50%;background:#b88648}.fbas-reader-identity strong{font-size:14px;letter-spacing:.13em}.fbas-reader-identity small{display:block;font-size:11px;color:#657275}.fbas-reader-tabs{display:flex;gap:4px;flex-wrap:wrap}.fbas-reader button{cursor:pointer;border:0;background:transparent;color:inherit;padding:9px 12px;border-radius:6px;font-size:13px}.fbas-reader button:focus-visible{outline:3px solid #c48f4f;outline-offset:2px}.fbas-reader-tabs button.active{background:#183440;color:#fff}.fbas-reader-toolbar{padding:9px 22px;border-bottom:1px solid #e2d7c8;background:#f8f3e9}.fbas-reader-toolbar label{font-size:12px;color:#39474b}.fbas-reader-toolbar select{margin-left:6px;border:1px solid #cfc8be;border-radius:5px;max-width:240px;padding:8px;background:#fffdfa;color:#27363a}.fbas-reader-settings{display:flex;gap:2px}.fbas-reader-settings button{background:#ebe3d7;margin-left:3px;font-size:13px;font-weight:700}.fbas-progress-track{height:4px;background:#ded5c7}.fbas-progress-track>div{height:100%;width:0;background:#bc884b;transition:width .15s}.fbas-reader-viewport{overflow:auto;max-height:min(75vh,760px);overscroll-behavior:contain;scrollbar-color:#b9aa92 transparent;scrollbar-width:thin}.fbas-reader-viewport-text{background:#fffdf8;color:#222d2e}.fbas-reader-body{max-width:730px;margin:0 auto;padding:clamp(22px,5vw,55px) clamp(17px,5vw,60px);font-family:Georgia,'Times New Roman',serif;font-size:var(--fbas-text-size);line-height:1.86;overflow-wrap:anywhere}.fbas-reader-body section{padding-bottom:36px;scroll-margin-top:10px}.fbas-reader-body h3{font-family:Georgia,serif;font-size:1.5em;text-align:center;line-height:1.4;margin:1em 0 1.1em;font-weight:normal}.fbas-reader-body h3 span{display:block;font:700 .44em system-ui,sans-serif;letter-spacing:.16em;margin-bottom:.7em;color:#8a7359}.fbas-reader-body p{margin:0 0 1.08em;text-align:left;hyphens:auto}.fbas-reader-body p.fbas-chapter-start:first-letter{font-size:1.45em}.fbas-end-note{text-align:center;padding:60px 20px;border-top:1px solid #ddd3c6;background:#f6f0e5}.fbas-end-note p{font-size:13px;color:#78674e;margin:0 0 10px}.fbas-end-note strong{display:block;font:italic 28px Georgia,serif;margin:0 0 22px}.fbas-end-note a{color:#6d4934;text-decoration:underline;font-size:13px}.fbas-reader-viewport-pages{padding:20px;background:#333c3b}.fbas-page-wrap{max-width:770px;margin:auto;display:flex;align-items:start;justify-content:center}.fbas-page-wrap img{display:block;width:100%;height:auto;background:white;box-shadow:0 7px 30px #0006}.fbas-page-nav{display:flex;justify-content:center;align-items:center;gap:14px;color:#fff;margin:14px 0 2px}.fbas-page-nav button{color:#fff;border:1px solid #798381}.fbas-page-nav button:disabled{opacity:.35;cursor:not-allowed}.fbas-reader-bottom{background:#f0e9dc;padding:13px 22px;border-top:1px solid #e2d7c8;font-size:12px;color:#435255}.fbas-reader-bottom a{color:#4f574c!important;font-weight:700}.fbas-reader[data-theme=sepia] .fbas-reader-viewport-text{background:#f1e5ce;color:#3c3228}.fbas-reader[data-theme=dark] .fbas-reader-viewport-text{background:#15242a;color:#e3e7df}.fbas-reader[data-theme=dark] .fbas-reader-body h3 span{color:#d7bc8e}.fbas-reader[data-theme=dark] .fbas-end-note{background:#193039;border-color:#39515a;color:#eee}.fbas-reader[data-theme=dark] .fbas-end-note p{color:#b6c4c3}.fbas-reader[data-theme=dark] .fbas-end-note a{color:#edcc94}
@media(max-width:700px){.fbas-reader-top{padding:13px 14px}.fbas-reader-identity{width:100%}.fbas-reader-tabs{width:100%}.fbas-reader-tabs button{flex:1}.fbas-reader-toolbar{padding:10px 14px}.fbas-reader-toolbar label{width:100%}.fbas-reader-toolbar select{max-width:calc(100% - 75px)}.fbas-reader-settings{width:100%;justify-content:space-between}.fbas-reader-settings button{flex:1}.fbas-reader-viewport{max-height:72vh}.fbas-reader-body{line-height:1.8}.fbas-reader-viewport-pages{padding:6px}.fbas-reader-bottom{padding:11px 14px}}


/* FBOS 0.3.3 — laptop/desktop reader: real reading area, not max-height only.
   ID scope intentionally defeats old theme CSS without touching the Portal. */
@media (min-width: 801px) {
  #fbas-reader .fbas-reader-viewport:not([hidden]) {
    display:block;
    height: clamp(620px, calc(100dvh - 130px), 980px);
    min-height: 620px;
    max-height: none;
    overflow-y: auto;
  }
  #fbas-reader .fbas-reader-body {max-width: 810px; padding: 48px 64px 78px;}
}
#fbas-reader .fbas-reader-expand {
  font-weight: 700;
  font-size: 13px;
  padding: 9px 14px;
  background: #20404b;
  color: #fff;
  white-space: nowrap;
  border-radius: 6px;
}
#fbas-reader .fbas-reader-expand:hover { background: #315765; }
#fbas-reader.fbas-reader--expanded {
  position: fixed!important;
  top: 10px!important; left: 10px!important;
  right: 10px!important; bottom: 10px!important;
  width: auto!important; height: auto!important;
  max-width: none!important; max-height: none!important;
  z-index: 2147483000!important;
  display: flex!important; flex-direction: column!important;
  margin: 0!important;
  border-radius: 10px;
  overflow:hidden;
  box-shadow: 0 0 0 9999px rgba(2,8,12,.78), 0 20px 80px #0009;
}
#fbas-reader.fbas-reader--expanded .fbas-reader-viewport:not([hidden]) {
  display:block;
  flex: 1 1 auto!important;
  min-height: 0!important;
  max-height: none!important;
  height: auto!important;
  overflow-y: auto!important;
}
#fbas-reader.fbas-reader--expanded .fbas-reader-top,
#fbas-reader.fbas-reader--expanded .fbas-reader-toolbar,
#fbas-reader.fbas-reader--expanded .fbas-progress-track,
#fbas-reader.fbas-reader--expanded .fbas-reader-bottom {flex:0 0 auto;}
html.fbas-reader-modal-open, body.fbas-reader-modal-open{overflow:hidden!important;}
@media(max-width:800px){
  #fbas-reader .fbas-reader-viewport:not([hidden]) {
    height: min(72dvh, 700px); min-height: 390px; max-height:none; overflow-y:auto;
  }
  #fbas-reader .fbas-reader-expand{font-size:12px;padding:8px 9px}
  #fbas-reader.fbas-reader--expanded{inset:0!important;border-radius:0;}
}
/* Prefer readable, centered lines in both modes, without clipping paragraphs. */
#fbas-reader .fbas-reader-viewport-text .fbas-reader-body p {max-height:none!important;overflow:visible!important;}
