/* Reader17: keep controls usable in narrow and short viewports. */
@media screen {
  .reader-header:has(.reader-options[open]) {z-index:30}
  /* Position is below the top toolbar, not below the complete tabbed header. */
  .options-panel {
    max-height:calc(100dvh - 72px);
  }
  .reader-identity .book-title {
    white-space:normal;
  }
  .reader-identity {overflow-wrap:anywhere}
}
@media screen and (max-width:600px) {
  /* The View button is not at the right edge; anchoring to it clipped the menu. */
  .options-panel {
    position:fixed;
    top:58px;
    left:max(12px,env(safe-area-inset-left));
    right:max(12px,env(safe-area-inset-right));
    width:auto;
    max-width:none;
    max-height:calc(100dvh - 72px);
  }
}
@media screen and (max-height:480px) {
  /* Preserve all navigation while reclaiming reading space at high zoom or in landscape. */
  .reader-topline {min-height:44px}
  .reader-topline .book-title {font-size:18px}
  .reader-identity {padding-block:2px}
  .document-switch button {min-height:36px;padding:3px 2px}
  .place-note {display:none}
  #return-to-discussion {min-height:26px;margin-block:0}
}
