/* The PDF renderer fits its viewport to .read_text; zoom remains scrollable. */
.reader .ebs_func:focus-visible { outline: 2px solid #293f99; outline-offset: 2px; }
@media (max-width:900px) {
  body:has(.reader) nav { position:relative; height:auto; min-height:0; }
  body:has(.reader) nav .wrapper { padding:8px 12px; }
  body:has(.reader) nav .flex-between { display:flex; flex-wrap:wrap; justify-content:flex-start; gap:6px; }
  body:has(.reader) nav .flex-between > div:first-child { display:flex; align-items:center; flex:0 0 auto; width:auto; gap:8px; }
  body:has(.reader) nav .logo { position:static; width:28px; height:36px; margin:0; }
  body:has(.reader) nav .back_button { display:block; margin:0; height:36px; min-height:36px; padding:7px 8px 7px 24px; font-size:12px; line-height:20px; }
  body:has(.reader) nav .flex-between > div:empty { display:none; }
  body:has(.reader) nav .flex-between > div:last-child,
  body:has(.reader) nav .flex-between > div:last-child > div,
  body:has(.reader) nav .flex-between > div:last-child > div > span,
  body:has(.reader) nav .flex-between > div:last-child > div > span > div,
  body:has(.reader) nav .flex-between > div:last-child > div > div { display:contents; }
  body:has(.reader) nav .context { display:none; }
  body:has(.reader) nav .exit_button { float:none; margin:0; min-height:36px; height:auto; padding:7px 8px; font-size:12px; line-height:20px; white-space:normal; }
  section.reader { position:relative; width:100%; height:auto; min-height:0; margin:0; }
  .reader .read_book { display:flex; flex-direction:column; width:100%; max-width:none; height:auto; min-height:0; margin:0; padding:0; }
  .reader .read_text { flex:0 0 auto; width:100%; box-sizing:border-box; min-width:0; margin:0; padding:8px; overflow:auto; background:#f1f2f4; -webkit-overflow-scrolling:touch; }
  .reader #pageContainer { width:100%; padding:0; }
  .reader #pageContainer > div { width:max-content; min-width:100%; }
  .reader .pdfViewer .page { margin:0 auto; box-shadow:0 1px 4px #0002; }
  .reader .read_sidebar,
  .reader .read_sidebar.open-b,
  .reader .read_sidebar.open-h { position:sticky; order:-1; top:0; right:auto; bottom:auto; width:100%; height:auto; box-sizing:border-box; display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:6px; margin:0; padding:8px; border:0; border-bottom:1px solid #ddd; z-index:5; transition:none; background:#fff; }
  .reader .sidebar_meta { position:static; flex:0 0 100%; order:-1; width:auto; height:auto; overflow:visible; }
  .reader .sidebar_title,.reader .sidebar_author { position:static; transform:none; -webkit-transform:none; margin:0; width:auto; white-space:normal; text-align:left; }
  .reader .sidebar_title { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:14px; line-height:19px; color:#5a5028; }
  .reader .sidebar_author { font-size:12px; line-height:18px; color:#777; }
  .reader .contents,.reader .bookmark { position:static; }
  .reader .ebs_func { position:static; box-sizing:border-box; width:40px; height:40px; min-height:40px; margin:0; padding:0; background-size:28px; flex:0 0 40px; }
  .reader .sidebar_pagenav { position:static; display:flex; align-items:center; justify-content:flex-end; flex:1 1 180px; width:auto; min-width:180px; gap:3px; }
  .reader .page_num { float:none; box-sizing:border-box; width:38px; height:40px; margin:0; padding:4px 0; font-size:16px; border:1px solid transparent; border-radius:3px; }
  .reader .page_num:first-child { border-color:#ccc; }
  .reader .pagenav_text { float:none; padding:0; font-size:13px; }
  .reader .sidebar_pagenav .ebs_func { width:36px; flex-basis:36px; background-size:20px; }
  .reader .sidebar_headline { display:none; }
  .reader .read_sidebar.open-c .contents .sidebar_headline,
  .reader .read_sidebar.open-b .bookmark .sidebar_headline { display:block; position:absolute; top:100%; left:0; width:100%; height:auto; max-height:50vh; max-height:50dvh; box-sizing:border-box; padding:16px; opacity:1; overflow:auto; color:#555; background:#fff; box-shadow:0 4px 8px #0002; transition:none; }
  .reader .sidebar_headline .headline_title { margin:0 0 12px; }
  .reader .sidebar_headline .ebs_input { box-sizing:border-box; max-width:100%; font-size:16px; }
  .reader .reader-version-notice { position:static; margin:8px; width:auto; }
  .reader-version-notice + .read_book .read_text,
  .reader-version-notice + .read_book .read_sidebar { margin-top:0; }
  .reader > p[role="alert"] { margin:24px 16px; }
}
