.book-reader {
  box-sizing: border-box;
  width: min(100%, 60rem);
  margin-inline: auto;
  padding: clamp(1.25rem, 4vw, 3.5rem) clamp(.75rem, 3.5vw, 2.5rem) clamp(2rem, 6vw, 5rem);
  color: #203e40;
}
.br-heading { margin: 0 auto clamp(1rem, 2.5vw, 1.75rem); text-align: center; }
.br-heading h1 {
  max-width: 22ch;
  margin: .4rem auto .35rem;
  font: 400 clamp(2rem, 5vw, 3.6rem)/1.05 var(--serif, Georgia, serif);
  letter-spacing: -.025em;
  color: #203e40;
}
.br-heading p { margin: 0; color: #526663; font-size: 1rem; }
.br-books-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.br-books-link, .br-tools a, .br-choose summary { color: #31594f; text-underline-offset: .2em; }
.br-mode { scroll-margin-top: .35rem; }
.br-mode:focus { outline: none; }
.br-text-mode { display: none; }
.br-text-mode:target { display: block; }
.br-text-mode:target ~ .br-art-mode { display: none; }
.br-tools {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem 1rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}
.br-tools > a, .br-choose summary { display: inline-flex; min-height: 2.75rem; align-items: center; font-size: .96rem; }
.br-choose summary { display: list-item; padding: .65rem .15rem; cursor: pointer; }
.br-choose ol {
  position: absolute;
  inset-inline-end: 0;
  z-index: 1;
  width: min(100%, 25rem);
  max-height: 48vh;
  overflow: auto;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(2.75rem, 1fr));
  gap: .3rem;
  margin: 0;
  padding: .65rem;
  border: 1px solid #9fb8af;
  border-radius: .6rem;
  background: #fbfcf8;
  box-shadow: 0 .5rem 1.25rem #314e4722;
}
.br-choose li { margin: 0; }
.br-choose li a {
  display: grid;
  min-height: 2.75rem;
  place-items: center;
  text-decoration: none;
  color: #254d43;
  border-radius: .3rem;
}
.br-choose li a:hover { background: #e2eee5; }
.br-choose li a[aria-current] { background: #30564c; color: white; font-weight: 650; }
.br-art {
  display: grid;
  place-items: center;
  margin: 0;
  padding: clamp(.4rem, 1.5vw, .9rem);
  background: #e0e9e5;
  border-radius: .6rem;
  border: 1px solid #c7d6cf;
}
.br-art img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(85svh, 64rem);
  object-fit: contain;
  box-shadow: 0 .15rem .75rem #203b3730;
}
.br-text-page {
  padding: clamp(1.5rem, 6vw, 4rem);
  border: 1px solid #ccd8d0;
  border-radius: .6rem;
  background: #fffcf6;
}
.br-page-words {
  margin: 0 auto;
  max-width: 42ch;
  white-space: pre-line;
  overflow-wrap: anywhere;
  font: 400 clamp(1.25rem, 2.6vw, 1.75rem)/1.65 var(--serif, Georgia, serif);
  color: #273e39;
}
.br-page-turns {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .45rem;
  padding-top: .8rem;
}
.br-turn {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: .4em;
  min-height: 2.75rem;
  padding: .5rem .9rem;
  border: 1px solid #74988a;
  border-radius: .45rem;
  color: #274f44;
  text-decoration: none;
  font-weight: 600;
}
.br-turn:hover { background: #e0ebe4; }
.br-turn.br-next { justify-self: end; background: #30564c; color: white; border-color: #30564c; }
.br-turn.br-next:hover { background: #23463e; }
.br-progress { color: #405c55; font-size: .9rem; text-align: center; font-variant-numeric: tabular-nums; }
.book-reader :is(a,summary):focus-visible { outline: 3px solid #966a21; outline-offset: 2px; }
@media (max-width: 31rem) {
  .br-art { padding: .2rem; }
  .br-turn { padding-inline: .55rem; gap: .28em; }
  .br-page-words { font-size: 1.3rem; }
}
@media print {
  .book-reader .br-mode { display: none !important; }
}
