.reader-demo {
  padding-block: clamp(4.5rem, 8vw, 8rem);
  scroll-margin-top: 4rem;
  color: #191915;
  background: #f6f3eb;
}
.reader-demo [hidden] {
  display: none;
}
.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
}
.reader-copy .section-title {
  margin-block: 1rem;
}
.reader-copy .section-title em {
  color: #b53125;
}
.reader-intro {
  max-width: 37ch;
  margin-block: 1.2rem 1.8rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #514d44;
}
.reader-intro cite {
  font-style: italic;
}
.reader-modes {
  border-bottom: 1px solid #c8c0b3;
}
.reader-mode {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 4.35rem;
  padding: 0.8rem 0.35rem;
  border: 0;
  border-top: 1px solid #c8c0b3;
  color: #514d44;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.reader-mode strong,
.reader-mode small {
  display: block;
}
.reader-mode strong {
  font-size: 1.05rem;
  line-height: 1.3;
}
.reader-mode small {
  margin-top: 0.13rem;
  font-size: 0.865rem;
}
.reader-mode[aria-selected="true"] {
  color: #a82d22;
}
.reader-mode[aria-selected="true"]::after {
  content: "";
  margin-left: auto;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
}
.reader-format-icon {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 1.8rem;
  height: 1.5rem;
  gap: 2px;
  flex: none;
}
.reader-format-icon i {
  display: block;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  width: 1.04rem;
}
.reader-format-spread i {
  width: 0.75rem;
}
.reader-format-strip {
  flex-direction: column;
  align-items: center;
}
.reader-format-strip i {
  flex: 1;
}
.reader-proof {
  min-width: 0;
  border: 1px solid #282821;
  border-radius: 0.45rem;
  overflow: hidden;
  color: #f6f3eb;
  background: #24241f;
}
.reader-proof-head,
.reader-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem clamp(1rem, 3vw, 1.75rem);
  background: #24241f;
}
.reader-proof-head {
  min-height: 3.5rem;
  border-bottom: 1px solid #48463e;
}
.reader-book-title cite {
  font:
    600 1.15rem/1.1 "Playfair Display",
    Georgia,
    serif;
}
.reader-proof-head > span:last-child,
.reader-position {
  font-size: 0.82rem;
  color: #dfdacf;
}
.reader-proof-head > span:last-child {
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.reader-viewport {
  --stage-height: clamp(17.5rem, 33vw, 26rem);
  display: flex;
  width: 100%;
  height: var(--stage-height);
  direction: rtl;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #928676 #37362e;
  background: radial-gradient(ellipse at center, #514c41 0%, #34332c 75%);
}
.reader-leaf {
  display: grid;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  padding: 1.15rem;
  place-items: center;
  scroll-snap-align: start;
  box-sizing: border-box;
}
.reader-leaf img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(var(--stage-height) - 2.65rem);
  box-shadow: 0.2rem 0.25rem 0.6rem #16161170;
}
.reader-viewport[data-mode="comic"] {
  direction: ltr;
}
.reader-viewport[data-mode="comic"] .reader-leaf {
  flex-basis: 50%;
}
.reader-viewport[data-mode="comic"] .reader-leaf:nth-child(odd) {
  justify-items: end;
  padding-right: 1px;
}
.reader-viewport[data-mode="comic"] .reader-leaf:nth-child(even) {
  justify-items: start;
  padding-left: 1px;
  scroll-snap-align: none;
}
.reader-viewport[data-mode="webtoon"] {
  display: block;
  overflow: auto;
  direction: ltr;
  scroll-snap-type: none;
}
.reader-viewport[data-mode="webtoon"] .reader-leaf {
  height: auto;
  padding: 0.25rem 1rem;
}
.reader-viewport[data-mode="webtoon"] .reader-leaf img {
  width: min(100%, 19rem);
  max-height: none;
}
.reader-tools {
  border-top: 1px solid #48463e;
}
.reader-position {
  font-variant-numeric: tabular-nums;
}
.reader-paging {
  display: flex;
  gap: 0.4rem;
}
.reader-paging button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #817d70;
  border-radius: 50%;
  padding: 0;
  color: #f6f3eb;
  background: transparent;
  cursor: pointer;
}
.reader-paging button[aria-disabled="true"] {
  opacity: 0.38;
  cursor: default;
}
.reader-paging button span {
  width: 0.56rem;
  height: 0.56rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateX(1px) rotate(135deg);
}
.reader-paging button:last-child span {
  transform: translateX(-1px) rotate(-45deg);
}
.reader-paging button[data-direction="up"] span {
  transform: translateY(1px) rotate(-135deg);
}
.reader-paging button[data-direction="down"] span {
  transform: translateY(-1px) rotate(45deg);
}
.reader-mode:focus-visible {
  outline: 2px solid #a82d22;
  outline-offset: -2px;
}
.reader-paging button:focus-visible,
.reader-viewport:focus-visible {
  outline: 2px solid #fff9e8;
  outline-offset: -3px;
}
@media (hover: hover) {
  .reader-mode:hover {
    background: #ece7da;
  }
  .reader-paging button:not([aria-disabled="true"]):hover {
    background: #4d4a3f;
  }
}
@media (max-width: 760px) {
  .reader-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .reader-intro {
    max-width: 52ch;
  }
  .reader-modes {
    display: flex;
    border-bottom: 1px solid #c8c0b3;
  }
  .reader-mode {
    width: auto;
    flex: 1;
    justify-content: center;
    border-top: 0;
    gap: 0.45rem;
    padding: 0.5rem 0;
    min-height: 3rem;
  }
  .reader-mode strong {
    font-size: 0.95rem;
  }
  .reader-mode .reader-format-icon {
    width: 1.35rem;
    height: 1.2rem;
  }
  .reader-mode[aria-selected="true"] {
    box-shadow: inset 0 -2px #a82d22;
  }
  .reader-mode[aria-selected="true"]::after,
  .reader-mode small {
    display: none;
  }
  .reader-viewport {
    --stage-height: clamp(19rem, 65vw, 26rem);
  }
}
