.blader-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.blader-body .bar { flex: 0 0 auto; }
.reader-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.reader-shell {
  width: 100%;
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #2b2b2b;
  color: #f5f5f5;
  position: relative;
}
.reader-shell:fullscreen {
  width: 100vw;
  height: 100vh;
}
.toolbar {
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .55rem;
  padding: .45rem .7rem;
  background: #161d2c;
  box-shadow: 0 1px 8px #0008;
  z-index: 5;
}
.toolbar button,
.toolbar-download {
  min-width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: .4rem;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .65rem;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
}
.toolbar button:hover,
.toolbar-download:hover { background: var(--yellow); }
.toolbar button:disabled { opacity: .35; cursor: default; background:#fff; }
.toolbar button:focus-visible,
.toolbar-download:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
#status {
  min-width: 10.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.jump-form {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: .15rem;
}
.jump-form label {
  white-space: nowrap;
}
.jump-form input {
  width: 6.2rem;
  height: 2.35rem;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: .4rem;
  background: #fff;
  color: #111;
  padding: 0 .55rem;
  font: inherit;
}
.jump-form input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.toolbar-separator {
  width: 1px;
  height: 1.8rem;
  background: rgba(255,255,255,.28);
  margin-inline: .1rem;
}
.book-host {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: auto;
  touch-action: pan-x pan-y;
}
.zoom-stage {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(1);
  transform-origin: center center;
  transition: transform .16s ease;
}
.book {
  margin: auto;
}
.flip-page {
  background: #fff;
  overflow: hidden;
  position: relative;
}
.flip-page img {
  width: 100%;
  height: 100%;
  display: block;
  background: #fff;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
}
.flip-page.loading::after {
  content: "";
  display: block;
  width: 2rem;
  height: 2rem;
  border: .25rem solid #ddd;
  border-top-color: #5d6678;
  border-radius: 50%;
  position: absolute;
  inset: 0;
  margin: auto;
  animation: reader-spin .9s linear infinite;
}
@keyframes reader-spin { to { transform: rotate(360deg); } }
.reader-message {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(34rem, calc(100% - 2rem));
  background: #fff;
  color: #111;
  padding: 1rem 1.2rem;
  border-radius: .5rem;
  box-shadow: 0 12px 40px #0009;
  z-index: 20;
}
@media (max-width: 620px) {
  .toolbar { gap: .3rem; padding: .35rem; }
  #status { min-width: 8.6rem; font-size: .88rem; }
  
.jump-form {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: .15rem;
}
.jump-form label {
  white-space: nowrap;
}
.jump-form input {
  width: 6.2rem;
  height: 2.35rem;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: .4rem;
  background: #fff;
  color: #111;
  padding: 0 .55rem;
  font: inherit;
}
.jump-form input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.toolbar-separator { display:none; }
  .book-host { padding: .45rem; }
  .toolbar button, .toolbar-download { min-width: 2.15rem; height: 2.15rem; padding: 0 .5rem; }
  .jump-form { gap: .25rem; }
  .jump-form label { display: none; }
  .jump-form input { width: 5.5rem; height: 2.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .flip-page.loading::after { animation: none; }
}
