:root {
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  background: none;
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
svg {
  flex: none;
  vertical-align: middle;
}
button,
a {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--book-accent, #476252);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  background: #2d3d36;
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.reader-fallback {
  max-width: 680px;
  margin: 10vh auto;
  padding: 28px;
  line-height: 1.8;
}
.reader-fallback a {
  text-decoration: underline;
}
/* The document owns the window. Reader chrome stays compact and independent of the homepage. */
body.book-room {
  overflow: hidden;
  background: #dedbd2;
}
.book-room #app {
  height: 100dvh;
  min-height: 0;
}
.book-app {
  --desk: #dedbd2;
  --chrome: #f7f7f2;
  --book-ink: #2d3d36;
  --book-muted: #748078;
  --book-border: #dde1d8;
  --book-accent: #476252;
  --book-hover: #e8ece3;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--book-ink);
  font-size: 12px;
  background: var(--chrome);
}
.book-app[data-dark='true'] {
  --chrome: #202a2d;
  --book-ink: #e4e9df;
  --book-muted: #a6b0aa;
  --book-border: #3b4749;
  --book-hover: #354144;
  color-scheme: dark;
}
.book-topbar {
  height: 72px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 20px;
  border-bottom: 1px solid var(--book-border);
  z-index: 8;
  background: var(--chrome);
}
.book-identity,
.book-actions,
.book-brand {
  display: flex;
  align-items: center;
}
.book-identity {
  gap: 25px;
}
.book-brand {
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: -1px;
  gap: 8px;
}
.book-brand > .icon {
  width: 24px;
  height: 28px;
  stroke-width: 1.2;
}
.book-divider {
  width: 1px;
  height: 25px;
  background: var(--book-border);
  flex: none;
}
.book-title h1 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 450;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.book-title em {
  font-weight: 400;
  color: var(--book-muted);
}
.book-title > span {
  display: block;
  font-size: 8px;
  letter-spacing: 1.6px;
  color: var(--book-muted);
  margin-top: 5px;
}
.book-title i {
  font-style: normal;
  margin: 0 4px;
}
.book-actions {
  gap: 5px;
}
.book-actions .book-divider {
  margin: 0 8px;
  height: 20px;
}
.book-tool {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.16s,
    color 0.16s,
    transform 0.16s;
  flex: none;
  padding: 0;
  color: inherit;
}
.book-tool > .icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.6;
}
.book-tool:hover:not(:disabled) {
  background: var(--book-hover, #e8ece3);
}
.book-tool:active:not(:disabled) {
  transform: scale(0.93);
}
.book-tool[aria-expanded='true'] {
  background: var(--book-hover);
}
.book-tool.is-saved .icon {
  fill: var(--book-accent);
  color: var(--book-accent);
}
.book-tool.muted {
  opacity: 0.45;
}
.book-tool.muted:after {
  content: '';
  width: 21px;
  height: 1px;
  background: currentColor;
  position: absolute;
  transform: rotate(-45deg);
}
.book-view-switch {
  display: flex;
  align-items: center;
  background: var(--book-hover);
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--book-border);
  gap: 2px;
}
.book-view-switch > button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--book-muted);
  min-width: 78px;
  transition:
    background 0.18s,
    box-shadow 0.18s;
}
.book-view-switch > button > .icon {
  width: 16px;
  height: 16px;
}
.book-view-switch > button[aria-pressed='true'] {
  color: var(--book-ink);
  background: var(--chrome);
  box-shadow: 0 1px 4px #00000012;
}
.book-view-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.book-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
  isolation: isolate;
  background: var(--desk);
  transition: background 0.25s;
}
.book-workspace:before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, #ffffff15, transparent 70%);
}
.book-viewport {
  flex: 1;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #7b857666 transparent;
  outline-offset: -4px !important;
}
.book-stage {
  display: grid;
  align-items: center;
  justify-items: center;
  position: relative;
  min-width: 100%;
  min-height: 100%;
  width: max-content;
  padding: 24px 56px;
  isolation: isolate;
  overflow: clip;
}
.book-sheet {
  grid-area: 1/1;
  position: relative;
  flex: none;
  filter: drop-shadow(0 13px 17px #18232530);
}
.book-app[data-single='false'] .book-sheet.is-cover {
  transform: translateX(-25%);
}
.book-crop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 1px;
  background: white;
  box-shadow:
    0 1px 2px #18232540,
    2px 3px 0 #f1f0e9,
    3px 4px 0 #bbc0b066;
}
.book-paper {
  position: absolute;
  top: 0;
  left: 0;
  background: white;
}
.book-paper > canvas {
  display: block;
}
.book-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 30px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent,
    #29291f0a 32%,
    #29291f20 48%,
    #ffffff1a 51%,
    #29291f09 60%,
    transparent
  );
  pointer-events: none;
  z-index: 6;
}
.book-sheet .textLayer {
  --min-font-size: 1;
  --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));
  --min-font-size-inv: calc(1 / var(--min-font-size));
  z-index: 3;
}
.book-sheet .textLayer :is(span, br) {
  color: transparent;
}
.book-sheet .textLayer span:not(.markedContent) {
  font-size: calc(var(--text-scale-factor) * var(--font-height));
  transform: rotate(var(--rotate, 0deg)) scaleX(var(--scale-x, 1)) scale(var(--min-font-size-inv));
}
.book-sheet .textLayer .search-hit {
  background: #e9c35788;
  box-shadow: 0 0 0 2px #e9c35755;
  border-radius: 1px;
}
.book-sheet .textLayer ::selection {
  background: #64887266;
}
.book-loading {
  grid-area: 1/1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 17px;
  color: var(--book-ink);
  font-size: 12px;
}
.book-loading > .icon {
  width: 36px;
  height: 36px;
  stroke-width: 1;
  animation: breath 2s ease-in-out infinite;
}
/* A leaf has a front and a back. Only that half of the book rotates around the spine. */
.turn-scene {
  position: relative;
  grid-area: 1/1;
  perspective: 2600px;
  z-index: 5;
  pointer-events: none;
  transform-style: preserve-3d;
}
.leaf-face {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #fff;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.leaf-face > canvas {
  display: block;
}
.leaf-face.empty-leaf {
  background: transparent;
}
.base-left {
  left: 0;
  box-shadow: -2px 7px 19px #1420201a;
}
.base-right {
  right: 0;
  box-shadow: 2px 7px 19px #1420201a;
}
.turn-leaf {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  transform-style: preserve-3d;
  will-change: transform;
  z-index: 4;
}
.turn-forward {
  left: 50%;
  transform-origin: left center;
}
.turn-backward {
  left: 0;
  transform-origin: right center;
}
.turn-leaf .leaf-face {
  width: 100%;
  height: 100%;
  border-radius: 1px;
  box-shadow: 0 3px 15px #16202528;
}
.leaf-front {
  transform: rotateY(0deg) translateZ(0.2px);
}
.leaf-back {
  transform: rotateY(180deg) translateZ(0.2px);
}
.leaf-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, #1b201e, transparent 65%);
  z-index: 2;
}
.turn-backward .leaf-shade {
  background: linear-gradient(-90deg, #1b201e, transparent 65%);
}
.book-edge {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 35px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--book-ink);
  background: var(--chrome);
  border: 1px solid #ffffff44;
  border-radius: 20px;
  box-shadow: 0 2px 10px #1620250a;
  opacity: 0.55;
  transition:
    opacity 0.18s,
    background 0.18s;
  z-index: 7;
}
.book-edge:hover:not(:disabled) {
  opacity: 1;
}
.book-edge:disabled {
  opacity: 0.1;
}
.book-edge-prev {
  left: 11px;
}
.book-edge-next {
  right: 11px;
}
.has-panel .book-edge-prev {
  left: 299px;
}
.book-bottom {
  height: 78px;
  flex: none;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 6px 28px 0;
  background: var(--chrome);
  border-top: 1px solid var(--book-border);
  z-index: 8;
}
.book-progress {
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  height: 9px;
  z-index: 3;
}
.book-progress input {
  display: block;
  appearance: none;
  margin: 0;
  width: 100%;
  height: 9px;
  background: transparent;
  cursor: pointer;
}
.book-progress input::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(
    to right,
    var(--book-accent) var(--progress, 0%),
    transparent var(--progress, 0%)
  );
  transition: height 0.15s;
}
.book-progress input:hover::-webkit-slider-runnable-track {
  height: 4px;
}
.book-progress input::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--book-accent);
  opacity: 0;
  transition: opacity 0.15s;
}
.book-progress input:hover::-webkit-slider-thumb,
.book-progress input:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}
.book-location {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.book-location > :is(span, a) {
  font-family: var(--serif);
  font-size: 19px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.book-location > small {
  font-size: 9px;
  color: var(--book-muted);
}
.book-pagination {
  display: flex;
  align-items: center;
  gap: 18px;
}
.book-pagination > .book-tool {
  width: 34px;
  height: 34px;
  border: 1px solid var(--book-border);
  border-radius: 50%;
}
.book-pagination > .book-tool > .icon {
  width: 16px;
  height: 16px;
}
.book-page-entry {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.book-page-entry input {
  appearance: textfield;
  -moz-appearance: textfield;
  width: 29px;
  text-align: center;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--book-ink);
  padding: 4px 0;
}
.book-page-entry input:hover {
  border-color: var(--book-border);
}
.book-page-entry input::-webkit-inner-spin-button {
  appearance: none;
}
.page-total {
  color: var(--book-muted);
  margin-left: 7px;
}
.book-zoom {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}
.book-zoom > output {
  width: 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: var(--book-muted);
}
.book-zoom > .book-tool {
  width: 30px;
  height: 32px;
}
.book-zoom > .book-tool > .icon {
  width: 16px;
  height: 16px;
}
.book-zoom select {
  background: transparent;
  color: var(--book-ink);
  font-size: 10px;
  border: 1px solid var(--book-border);
  padding: 7px 6px;
  border-radius: 5px;
  margin: 0 8px;
  max-width: 96px;
}
.book-sidebar {
  width: 288px;
  flex: none;
  background: var(--chrome);
  border-right: 1px solid var(--book-border);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--book-border) transparent;
  z-index: 9;
}
.book-sidebar[hidden] {
  display: none;
}
.book-panel-tabs {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 60px;
  padding: 0 16px;
  background: var(--chrome);
  border-bottom: 1px solid var(--book-border);
  z-index: 2;
}
.book-panel-tabs > button:not(.book-tool) {
  font-size: 11px;
  padding: 9px 4px;
  color: var(--book-muted);
}
.book-panel-tabs > button[aria-pressed='true'] {
  color: var(--book-ink);
  box-shadow: 0 1px 0 var(--book-accent);
}
.book-panel-tabs .book-tool {
  margin-left: auto;
  width: 30px;
}
.book-panel-tabs span {
  font-size: 9px;
  margin-left: 3px;
  color: var(--book-muted);
}
.panel-eyebrow {
  font-size: 9px;
  letter-spacing: 1.4px;
  font-weight: 500;
  color: var(--book-muted, #748078);
  margin: 24px 22px 15px;
}
.book-chapters {
  padding: 0 12px 20px;
}
.book-chapters > button {
  display: flex;
  gap: 13px;
  width: 100%;
  padding: 13px 10px;
  text-align: left;
  border-radius: 7px;
  transition: background 0.15s;
  align-items: center;
}
.book-chapters > button:hover {
  background: var(--book-hover);
}
.book-chapters > button[aria-current='page'] {
  background: var(--book-hover);
  box-shadow: inset 2px 0 var(--book-accent);
}
.book-chapters img {
  width: 75px;
  max-height: 55px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px #00000022);
}
.book-chapters strong,
.book-saved-list strong {
  font-size: 11px;
  line-height: 1.5;
  font-weight: 500;
  display: block;
}
.book-chapters small,
.book-saved-list small {
  font-size: 9px;
  line-height: 1.5;
  color: var(--book-muted);
  display: block;
  margin-top: 4px;
}
.book-chapters span {
  flex: 1;
  min-width: 0;
}
.book-saved-list {
  padding: 0 15px;
}
.book-saved-list > div {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--book-border);
  padding: 14px 0;
  gap: 8px;
}
.book-saved-list [data-leaf] {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  text-align: left;
}
.book-saved-list [data-leaf] > .icon {
  width: 16px;
  color: var(--book-accent);
}
.book-saved-list .book-tool {
  width: 25px;
  height: 30px;
}
.book-saved-list .book-tool > .icon {
  width: 14px;
}
.panel-empty {
  text-align: center;
  padding: 55px 27px;
  color: var(--book-muted);
}
.panel-empty > .icon {
  width: 26px;
  height: 26px;
  margin-bottom: 18px;
  stroke-width: 1;
}
.panel-empty h2 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  color: var(--book-ink);
  margin-bottom: 13px;
  line-height: 1.2;
}
.panel-empty p {
  font-size: 11px;
  line-height: 1.8;
}
.book-search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 17px 12px;
  padding: 11px;
  border: 1px solid var(--book-border);
  border-radius: 7px;
}
.book-search-field > .icon {
  width: 16px;
  color: var(--book-muted);
}
.book-search-field input {
  width: 100%;
  min-width: 0;
  font-size: 11px;
  background: none;
  border: 0;
  color: var(--book-ink);
  outline: 0;
}
.book-search-field:focus-within {
  border-color: var(--book-accent);
}
.book-search-hint {
  font-size: 10px;
  line-height: 1.7;
  color: var(--book-muted);
  margin: 12px 22px;
}
.search-result {
  display: block;
  text-align: left;
  margin: 6px 12px;
  padding: 15px 11px;
  border-radius: 7px;
  width: calc(100% - 24px);
}
.search-result:hover {
  background: var(--book-hover);
}
.search-result strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.search-result small {
  display: block;
  font-size: 9px;
  color: var(--book-muted);
  margin-top: 5px;
}
.search-result p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  margin-top: 12px;
  opacity: 0.8;
}
.book-exit-focus {
  display: none;
  position: absolute;
  top: 13px;
  right: 18px;
  padding: 10px 14px;
  background: var(--chrome);
  border-radius: 22px;
  box-shadow: 0 2px 12px #00000012;
  font-size: 11px;
  gap: 7px;
  align-items: center;
  z-index: 12;
}
.book-exit-focus .icon {
  width: 14px;
  height: 14px;
}
.book-focused .book-topbar {
  display: none;
}
.book-focused .book-exit-focus {
  display: flex;
}
.book-focused .book-bottom {
  height: 62px;
}
.book-focused .book-location > small {
  display: none;
}
.book-dialog {
  --book-border: #dfe2d9;
  --book-accent: #476252;
  --book-muted: #718075;
  background: #fafbf6;
  color: #2d3d36;
  border: 1px solid #e6e9df;
  border-radius: 16px;
  padding: 26px 30px 20px;
  width: 440px;
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-shadow: 0 25px 110px #14232133;
  font-family: var(--sans);
}
.book-dialog::backdrop {
  background: #17251e48;
  backdrop-filter: blur(5px);
}
.book-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
}
.book-dialog-header > .panel-eyebrow {
  margin: 0;
  font-size: 8px;
  letter-spacing: 1.5px;
}
.book-dialog-header .book-tool {
  width: 26px;
  height: 26px;
}
.book-dialog h2 {
  font-family: var(--serif);
  font-size: 33px;
  font-weight: 400;
  letter-spacing: -0.5px;
  margin: 0 0 10px;
}
.book-dialog-intro {
  font-size: 11px;
  line-height: 1.8;
  color: var(--book-muted);
  margin-bottom: 24px;
}
.settings-label {
  font-size: 8px;
  letter-spacing: 1.4px;
  font-weight: 600;
  color: var(--book-muted);
  display: block;
  margin: 22px 0 13px;
}
.book-palettes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.book-palettes > button {
  font-size: 9px;
  padding: 0;
  color: var(--book-muted);
}
.book-palettes > button > span {
  height: 47px;
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  background: var(--swatch);
  border-radius: 7px;
  margin-bottom: 8px;
  box-shadow: inset 0 0 0 1px #2d3e3610;
  transition: transform 0.15s;
}
.book-palettes > button:hover > span {
  transform: translateY(-2px);
}
.book-palettes > button[aria-pressed='true'] > span {
  outline: 2px solid #476252;
  outline-offset: 3px;
}
.book-palettes .icon {
  width: 15px;
  color: #263c31;
  opacity: 0;
  z-index: 2;
}
.book-palettes [aria-pressed='true'] .icon {
  opacity: 1;
}
.book-setting-row {
  border-top: 1px solid var(--book-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  gap: 20px;
}
.book-setting-row strong {
  font-size: 11px;
  font-weight: 500;
}
.book-setting-row small {
  display: block;
  font-size: 9px;
  color: var(--book-muted);
  margin-top: 5px;
}
.book-toggle {
  width: 33px;
  height: 20px;
  border-radius: 20px;
  background: #d0d7ce;
  padding: 3px;
  transition: background 0.2s;
}
.book-toggle > span {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 2px #00000012;
  transition: transform 0.2s;
}
.book-toggle[aria-checked='true'] {
  background: var(--book-accent);
}
.book-toggle[aria-checked='true'] > span {
  transform: translateX(13px);
}
.book-settings-bottom {
  border-top: 1px solid var(--book-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 17px;
  font-size: 9px;
  color: var(--book-muted);
}
.book-settings-bottom button {
  font-size: 9px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.book-shortcuts {
  margin: 5px 0 25px;
}
.book-shortcuts > div {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--book-border);
  font-size: 11px;
}
.book-shortcuts dd {
  margin: 0;
}
.book-dialog-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--book-border);
  font-size: 10px;
}
.book-dialog-links > * {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
}
.book-dialog-links .icon {
  width: 15px;
  height: 15px;
}
.book-app[data-reduced='true'] * {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}
@media (min-width: 1700px) {
  .book-topbar {
    padding: 0 38px;
  }
  .book-bottom {
    padding-left: 38px;
    padding-right: 38px;
  }
  .book-title h1 {
    font-size: 24px;
  }
}
@media (max-width: 1120px) {
  .book-topbar {
    padding: 0 18px;
    gap: 14px;
  }
  .book-brand span {
    display: none;
  }
  .book-identity {
    gap: 16px;
  }
  .book-title h1 {
    font-size: 20px;
  }
  .book-actions {
    gap: 2px;
  }
  .book-bottom {
    padding-left: 20px;
    padding-right: 20px;
    gap: 12px;
  }
  .book-location > :is(span, a) {
    font-size: 16px;
  }
  .book-location > small {
    font-size: 8px;
  }
  .book-pagination {
    gap: 11px;
  }
  .book-zoom select {
    margin: 0 3px;
  }
}
@media (max-width: 899px) {
  .book-sidebar {
    position: absolute;
    inset: 0 auto 0 0;
    box-shadow: 12px 0 35px #15241a22;
  }
  .has-panel .book-edge-prev {
    display: none;
  }
  .book-title h1 em {
    display: none;
  }
  .book-actions .book-divider {
    margin: 0 3px;
  }
  .book-view-switch > button {
    min-width: 60px;
    padding: 7px 8px;
  }
  .book-location > :is(span, a) {
    max-width: 155px;
  }
  .book-location > small {
    max-width: 165px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .book-zoom #book-help {
    display: none;
  }
}
@media (max-width: 699px) {
  .book-topbar {
    height: 106px;
    flex: none;
  }
  .book-identity {
    gap: 11px;
  }
  .book-identity > .book-divider {
    height: 21px;
  }
  .book-title h1 {
    font-size: 20px;
  }
  .book-title h1 em {
    display: inline;
  }
  .book-title > span {
    font-size: 8px;
    letter-spacing: 1.1px;
    margin-top: 3px;
  }
  .book-brand > .icon {
    width: 22px;
  }
  .book-actions {
    display: contents;
  }
  .book-actions #book-focus,
  .book-actions .book-divider {
    display: none;
  }
  .book-tool {
    width: 36px;
    height: 36px;
  }
  .book-view-switch > button {
    min-width: 59px;
    font-size: 11px;
    padding: 6px 7px;
    gap: 5px;
  }

  .book-stage {
    padding: 24px 12px;
  }
  .book-edge {
    display: none;
  }
  .book-bottom {
    height: 100px;
    grid-template-columns: 1fr auto;
    grid-template-rows: 43px 44px;
    padding: 5px 14px 4px;
    gap: 0 10px;
  }
  .book-location {
    grid-area: 1/1;
    gap: 0;
  }
  .book-location > :is(span, a) {
    font-size: 16px;
    max-width: none;
  }
  .book-location > small {
    display: none;
  }
  .book-pagination {
    grid-area: 2/1;
    gap: 8px;
  }
  .book-pagination > .book-tool {
    width: 30px;
    height: 30px;
  }
  .book-page-entry {
    font-size: 11px;
  }
  .book-zoom {
    grid-area: 2/2;
    gap: 0;
  }
  .book-zoom > output {
    width: 35px;
    font-size: 9px;
  }
  .book-zoom > .book-tool {
    width: 25px;
    height: 30px;
  }
  .book-zoom select {
    font-size: 9px;
    margin-right: 0;
    padding: 5px 2px;
    max-width: 74px;
  }
  .book-location {
    grid-column: 1/-1;
  }
  .book-sidebar {
    width: min(310px, 90vw);
  }
  .book-panel-tabs {
    height: 53px;
  }
  .book-dialog {
    padding: 20px 23px;
  }
  .book-dialog h2 {
    font-size: 30px;
  }
}
@media (max-height: 550px) and (min-width: 700px) {
  .book-topbar {
    height: 56px;
  }
  .book-bottom {
    height: 60px;
  }
  .book-title > span {
    display: none;
  }
  .book-location > small {
    display: none;
  }
}
@media (max-width: 699px) {
  .book-focused .book-bottom {
    height: 100px;
  }
  .book-view-tools {
    display: contents;
  }
  .book-location:has(+ .book-pagination) #book-location-detail {
    display: block;
    max-width: 100%;
    font-size: 8px;
    margin-top: 3px;
  }
  .book-location:has(+ .book-pagination) {
    gap: 0;
  }
  .book-topbar {
    display: block;
    position: relative;
    padding: 0 14px;
  }
  .book-identity {
    position: absolute;
    left: 14px;
    top: 11px;
    right: 56px;
  }
  .book-title h1 {
    white-space: nowrap;
  }
  .book-actions #book-settings {
    position: absolute;
    right: 14px;
    top: 10px;
  }
  .book-view-switch {
    position: absolute;
    left: 14px;
    bottom: 10px;
    margin: 0;
  }
  .book-actions #book-contents,
  .book-actions #book-search,
  .book-actions #book-bookmark,
  .book-actions #book-sound {
    position: absolute;
    bottom: 10px;
    margin: 0;
  }
  .book-actions #book-contents {
    right: 122px;
  }
  .book-actions #book-search,
  .book-actions:has(#book-search[hidden]) #book-contents {
    right: 86px;
  }
  .book-actions #book-bookmark {
    right: 50px;
  }
  .book-actions #book-sound {
    right: 14px;
  }
}
@media (max-width: 350px) {
  .book-title h1 {
    font-size: 17px;
  }
  .book-identity {
    gap: 8px;
  }
  .book-view-switch > button {
    min-width: 49px;
    padding: 6px 5px;
  }
  .book-pagination {
    gap: 3px;
  }
  .book-zoom > .book-tool {
    width: 25px;
  }
  .book-zoom > output {
    width: 30px;
  }
  .book-zoom select {
    max-width: 69px;
  }
}

.book-sheet {
  display: flex;
}
.reader-leaf {
  position: relative;
  width: 50%;
  height: 100%;
}
.book-sheet[data-single='true'] .reader-leaf {
  width: 100%;
}
.textLayer {
  position: absolute;
  inset: 0;
  overflow: clip;
  line-height: 1;
  text-align: initial;
  text-size-adjust: none;
  forced-color-adjust: none;
  transform-origin: 0 0;
  caret-color: CanvasText;
}
.textLayer :is(span, br) {
  position: absolute;
  white-space: pre;
  transform-origin: 0 0;
  cursor: text;
}
.book-title {
  min-width: 0;
}
.book-title h1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-identity {
  min-width: 0;
}
.book-view-tools,
.book-actions {
  flex-shrink: 0;
}
.book-location > a {
  font-family: var(--serif);
  font-size: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.book-location > a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.book-loading {
  max-width: min(440px, 80vw);
  text-align: center;
  line-height: 1.7;
}
.book-loading a,
.book-loading button {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.palette-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}
.book-palettes [data-palette='midnight'] .icon {
  color: white;
}
.book-tool.muted {
  position: relative;
}
.book-dialog kbd {
  display: inline-block;
  border: 1px solid var(--book-border);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 3px;
  font-size: 11px;
}
.reader-credit {
  color: var(--book-muted);
  margin-top: 20px;
  font-size: 10px;
  line-height: 1.7;
}
.reader-credit a {
  text-decoration: underline;
}
#reader-toast {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 36px);
  padding: 12px 20px;
  border-radius: 8px;
  background: #283f34;
  color: #fff;
  box-shadow: 0 8px 28px #0002;
  z-index: 50;
  font-size: 13px;
}
@media (max-width: 699px) {
  .book-dialog {
    max-height: calc(100dvh - 24px);
  }
  .book-title {
    max-width: 100%;
  }
  .book-title h1 {
    max-width: 100%;
  }
  .book-identity .book-title em {
    display: none;
  }
  .book-location > a {
    font-size: 16px;
  }
  .book-dialog-intro,
  .book-setting-row strong {
    font-size: 13px;
  }
  .book-setting-row small,
  .book-settings-bottom {
    font-size: 11px;
  }
  .book-palettes > button {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
