.brochure-editions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
}

.brochure-editions article {
  display: grid;
  justify-items: start;
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid currentColor;
}

.brochure-editions h2 {
  margin: 0;
}

.brochure-editions a:not(.button) {
  text-decoration: underline;
}

.flipbook {
  margin: 0;
  background: #151216;
  color: #faf7f8;
  font: 1rem/1.5 system-ui, sans-serif;
  color-scheme: dark;
}

.flipbook * {
  box-sizing: border-box;
}

.flipbook a {
  color: inherit;
  text-underline-offset: .2em;
}

.flipbook :focus-visible {
  outline: 2px solid #ff8296;
  outline-offset: 3px;
}

.reader-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1.25rem;
  padding: .75rem clamp(.75rem, 4vw, 3rem);
}

.reader-header h1 {
  margin: 0;
  font-size: clamp(1.125rem, 3vw, 1.5rem);
}

.reader-header h1 span {
  display: inline-block;
  margin-inline-start: .4em;
  color: #ffafbd;
  font-size: .85em;
}

.reader-header div {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}

.reader-controls {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: .5rem .25rem;
  background: #211b23;
}

.reader-controls button,
.reader-controls select {
  min-height: 44px;
  padding: .4rem .5rem;
  border: 1px solid #665766;
  border-radius: .375rem;
  background: #322935;
  color: inherit;
  font: inherit;
}

.reader-controls button:enabled {
  cursor: pointer;
}

.reader-controls button:disabled {
  opacity: .5;
}

.reader-controls label {
  white-space: nowrap;
}

.reader figure {
  margin: .5rem auto 1.25rem;
  width: min(100%, 880px);
  overflow-x: auto;
  touch-action: pan-y pinch-zoom;
}

.reader figure.is-zoomed {
  touch-action: auto;
}

.reader figure img {
  display: block;
  width: 100%;
  height: auto;
}

.reader figure.is-zoomed img {
  width: 200%;
}

.reader-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.book-stage {
  position: relative;
  touch-action: pan-y pinch-zoom;
}

.book-stage:has(.is-zoomed) {
  touch-action: auto;
}

.reader figure {
  position: relative;
  background: #211b23;
  box-shadow: 0 .6rem 2rem #0007;
}

.reader figure .turning-page {
  position: absolute;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.book-edge {
  position: absolute;
  inset-block: 0;
  width: 50%;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.book-edge:disabled {
  cursor: default;
}

.book-previous { left: 0; }
.book-next { right: 0; }

.book-edge span {
  position: absolute;
  top: min(35vh, 40%);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #ffffff70;
  border-radius: 50%;
  background: #211b23e8;
  font-size: 1.65rem;
  line-height: 1;
}

.book-previous span { left: .5rem; }
.book-next span { right: .5rem; }
.book-edge:disabled span { visibility: hidden; }
.book-edge:enabled:hover span,
.book-edge:focus-visible span { background: #84243a; }

.book-edge:focus-visible {
  outline-offset: -3px;
}

@media (min-width: 800px) and (min-height: 560px) {
  .flipbook {
    background: #181419;
  }

  .reader-header {
    max-width: 90rem;
    margin-inline: auto;
    padding-block: .9rem;
  }

  .book-stage {
    --paper-width: min(calc(50vw - 4rem), calc((100dvh - 9.25rem) * .7073), 54rem);
    display: flow-root;
    background: radial-gradient(ellipse at center, #3b303c, #181419 72%);
  }

  .reader figure {
    width: var(--paper-width);
    margin-block: .75rem;
    box-shadow: 0 0 0 1px #ffffff26, 0 .7rem 2.5rem #000a;
  }

  .reader figure.is-zoomed {
    width: min(90%, 880px);
  }

  .book-edge span {
    top: calc(50% - 1.5rem);
    width: 3rem;
    height: 3rem;
    font-size: 2rem;
  }

  .book-previous span {
    left: auto;
    right: calc(var(--paper-width) / 2 + 1rem);
  }

  .book-next span {
    right: auto;
    left: calc(var(--paper-width) / 2 + 1rem);
  }
}

.brochure-download {
  width: min(27rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 1.25rem;
  border: 1px solid #625364;
  border-radius: .75rem;
  background: #211b23;
  color: #faf7f8;
  box-shadow: 0 1rem 3rem #0008;
}

.brochure-download::backdrop {
  background: #080609b8;
}

.download-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.download-heading h2 {
  margin: 0;
  font-size: 1.25rem;
}

.download-heading button {
  width: 44px;
  height: 44px;
  border: 1px solid #665766;
  border-radius: .375rem;
  background: #322935;
  color: inherit;
  font: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}

.brochure-download .download-full {
  display: grid;
  gap: .15rem;
  padding: .75rem 1rem;
  border: 1px solid #665766;
  border-radius: .375rem;
  background: #322935;
  text-decoration: none;
}

.download-full span,
.brochure-download a:not([href]) {
  color: #c9bacb;
}

.brochure-download ul {
  margin: .5rem 0 0;
  padding: 0;
  list-style: none;
}

.brochure-download li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .25rem .5rem;
}

.reader figure img[hidden] {
  display: none;
}

.reader figure.is-spread {
  display: flex;
  width: calc(var(--paper-width) * 2);
  background: transparent;
  box-shadow: none;
}

.reader figure.is-spread img {
  flex: 0 0 auto;
  width: 50%;
  aspect-ratio: 1556 / 2200;
  box-shadow: 0 0 0 1px #ffffff26, 0 .6rem 1.4rem #0007;
}

.reader figure.is-spread img.empty-leaf {
  visibility: hidden;
}

.reader figure.is-spread:not(.is-zoomed):has(img:not(.empty-leaf) + img:not(.empty-leaf))::after {
  content: '';
  position: absolute;
  inset-block: 0;
  left: 50%;
  width: 1.5rem;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #0007 49%, #0009 50%, transparent);
  pointer-events: none;
}

.reader figure.is-spread .turning-page {
  z-index: 1;
}

.reader figure.is-spread:has(.turning-right) #brochure-page,
.reader figure.is-spread:has(.turning-page:not(.turning-right)) #brochure-right-page {
  visibility: hidden;
}

.reader figure.is-spread.is-zoomed {
  width: min(90%, 880px);
}

.reader figure.is-spread.is-zoomed img {
  width: 100%;
}

#spread-range {
  padding-inline: .35rem;
  color: #e2cfdc;
  white-space: nowrap;
}

.book-stage:has(.is-spread) .book-previous span {
  right: calc(var(--paper-width) + .75rem);
}

.book-stage:has(.is-spread) .book-next span {
  left: calc(var(--paper-width) + .75rem);
}
