:root {
  --reader-wine: #3a0b12;
  --reader-wine-soft: #5f1421;
  --reader-ink: #170f11;
  --reader-gold: #c9a35d;
  --reader-gold-light: #efd79e;
  --reader-parchment: #f2e8d6;
}

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

.magazine-reader-page { background: #f4ede1; }
.magazine-reader-page .admission-band { margin-top: 0; }
body.magazine-dialog-open { overflow: hidden; }
.magazine-dialog {
  background: #0d090a;
  border: 1px solid rgba(218, 181, 108, .48);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .62);
  color: #fff;
  height: min(96dvh, 980px);
  margin: auto;
  max-height: 96dvh;
  max-width: min(1500px, 98vw);
  overflow: hidden;
  padding: 0;
  width: min(1500px, 98vw);
}
.magazine-dialog::backdrop { background: rgba(15, 7, 9, .84); backdrop-filter: blur(6px); }
.magazine-dialog[open]::backdrop { animation: magazine-backdrop-in .45s ease both; }
.magazine-dialog.is-closing::backdrop { animation: magazine-backdrop-out .28s ease both; }
.magazine-dialog-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  transform-origin: var(--reveal-origin-x, 50%) var(--reveal-origin-y, 50%);
}
.magazine-dialog[open] .magazine-dialog-shell { animation: magazine-reveal .58s cubic-bezier(.2, .8, .2, 1) both; }
.magazine-dialog.is-closing .magazine-dialog-shell { animation: magazine-dismiss .28s cubic-bezier(.4, 0, 1, 1) both; }
@keyframes magazine-reveal {
  from { filter: blur(5px); opacity: 0; transform: translateY(28px) scale(.94); }
  to { filter: blur(0); opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes magazine-dismiss {
  from { filter: blur(0); opacity: 1; transform: translateY(0) scale(1); }
  to { filter: blur(3px); opacity: 0; transform: translateY(18px) scale(.97); }
}
@keyframes magazine-backdrop-in { from { background: rgba(15, 7, 9, 0); backdrop-filter: blur(0); } }
@keyframes magazine-backdrop-out { to { background: rgba(15, 7, 9, 0); backdrop-filter: blur(0); } }
.magazine-dialog-head {
  align-items: center;
  background: linear-gradient(90deg, #3a0b12, #21080d);
  border-bottom: 1px solid rgba(218, 181, 108, .35);
  display: flex;
  flex: 0 0 66px;
  justify-content: space-between;
  padding: 8px 18px 8px 22px;
}
.magazine-dialog-brand { align-items: center; display: flex; gap: 12px; }
.magazine-dialog-brand img { height: 45px; object-fit: contain; width: 37px; }
.magazine-dialog-brand span { display: flex; flex-direction: column; }
.magazine-dialog-brand small { color: var(--reader-gold); font-size: 7px; letter-spacing: .18em; }
.magazine-dialog-brand strong { color: #fff8e8; font-family: var(--serif); font-size: 19px; font-weight: 400; line-height: 1.2; }
.magazine-dialog-brand em { color: var(--reader-gold-light); font-size: 12px; font-style: normal; margin-left: 7px; }
.magazine-dialog-tip { color: rgba(255, 255, 255, .52); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.magazine-dialog-head > button { align-items: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .15); color: #fff; display: flex; gap: 8px; min-height: 42px; padding: 7px 13px; }
.magazine-dialog-head > button:hover { background: rgba(203, 161, 88, .18); border-color: var(--reader-gold); }
.magazine-dialog-head > button svg { height: 18px; width: 18px; }
.magazine-dialog-head > button span { font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.magazine-dialog .reader-section-modal { flex: 1 1 auto; min-height: 0; padding: 0; }
.magazine-dialog .flipbook-reader { border: 0; box-shadow: none; height: 100%; max-width: none; width: 100%; }
.magazine-dialog .reader-stage { height: calc(100% - 66px); min-height: 0; }
.magazine-dialog .reader-toolbar { min-height: 66px; }
.magazine-dialog .book-viewport { padding: 14px 70px; perspective: 1800px; }
.magazine-dialog .book-scale {
  aspect-ratio: 1190 / 842;
  height: min(840px, calc(96dvh - 160px));
  max-height: none;
  max-width: calc(98vw - 155px);
  min-height: 0;
  min-width: 0;
  width: auto;
}
.magazine-dialog .book-mount {
  height: 100%;
  max-height: none;
  min-height: 0;
  min-width: 0;
  width: 100%;
}
.reader-intro {
  background:
    radial-gradient(circle at 78% 15%, rgba(226, 187, 106, .18), transparent 28%),
    linear-gradient(110deg, rgba(30, 4, 9, .98), rgba(72, 12, 22, .96)),
    url("../images/backgrounds/heritage-parchment.webp") center/cover;
  color: #fff9ee;
  min-height: 570px;
  overflow: hidden;
  position: relative;
}
.reader-intro::after {
  border: 1px solid rgba(222, 187, 119, .18);
  border-radius: 50%;
  content: "";
  height: 620px;
  position: absolute;
  right: -270px;
  top: -310px;
  width: 620px;
}
.reader-intro-grid {
  align-items: center;
  display: grid;
  gap: clamp(50px, 9vw, 145px);
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 570px;
  padding-block: 55px;
  position: relative;
  z-index: 1;
}
.reader-breadcrumbs { color: rgba(255, 248, 235, .62); margin-bottom: 46px; }
.reader-breadcrumbs a:hover { color: var(--reader-gold-light); }
.reader-intro .eyebrow { color: var(--reader-gold-light); }
.reader-intro h1 {
  color: #fff8e8;
  font-size: clamp(58px, 7vw, 104px);
  letter-spacing: -.055em;
  line-height: .94;
  max-width: 800px;
}
.reader-intro p { color: rgba(255, 250, 239, .72); max-width: 710px; }
.reader-intro .reader-subtitle {
  color: #fff8e8;
  font-family: var(--serif);
  font-size: clamp(25px, 2.4vw, 38px);
  font-style: italic;
  line-height: 1.25;
  margin: 18px 0 22px;
}
.reader-intro-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; }
.reader-intro-actions svg, .edition-download svg { height: 18px; width: 18px; }
.reader-continue {
  align-items: center;
  background: transparent;
  border-bottom: 1px solid rgba(237, 211, 157, .55);
  color: var(--reader-gold-light);
  display: inline-flex;
  gap: 7px;
  padding: 9px 0;
}
.reader-continue svg { height: 16px; width: 16px; }
.reader-cover-preview {
  filter: drop-shadow(0 38px 36px rgba(0, 0, 0, .42));
  margin: 0;
  perspective: 1200px;
  position: relative;
  transform: rotateY(-7deg) rotateZ(1deg);
}
.reader-cover-preview::before {
  background: linear-gradient(90deg, #c7ad7c, #f8ecd2 35%, #d2b77f);
  bottom: 5px;
  content: "";
  position: absolute;
  right: -7px;
  top: 5px;
  width: 9px;
}
.reader-cover-preview img { aspect-ratio: 595 / 842; border: 1px solid rgba(255, 231, 183, .5); object-fit: cover; position: relative; width: 100%; z-index: 1; }
.reader-cover-preview figcaption { color: rgba(255, 248, 233, .65); font-size: 8px; letter-spacing: .16em; margin-top: 18px; text-align: center; text-transform: uppercase; }

.reader-section {
  background:
    radial-gradient(circle at 50% -20%, rgba(191, 145, 69, .2), transparent 33%),
    linear-gradient(rgba(24, 16, 18, .92), rgba(15, 11, 12, .96)),
    url("../images/backgrounds/heritage-parchment.webp") center/cover;
  color: #fff;
  overflow: hidden;
  padding: 72px 0 82px;
}
.reader-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: 30px; }
.reader-heading .eyebrow { color: var(--reader-gold); margin-bottom: 10px; }
.reader-heading h2 { color: #fffaf1; font-size: clamp(34px, 4vw, 56px); }
.reader-heading > p { color: rgba(255, 255, 255, .55); font-size: 12px; max-width: 340px; text-align: right; }
.flipbook-reader {
  background: #100b0c;
  border: 1px solid rgba(218, 181, 108, .34);
  box-shadow: 0 35px 100px rgba(0, 0, 0, .38);
  margin-inline: auto;
  max-width: 1480px;
  outline: none;
  position: relative;
  width: min(95vw, 1480px);
}
.flipbook-reader:focus-visible { box-shadow: 0 0 0 3px var(--reader-gold), 0 35px 100px rgba(0, 0, 0, .38); }
.reader-stage {
  align-items: center;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(142, 76, 52, .25), transparent 43%),
    radial-gradient(ellipse at center bottom, rgba(196, 147, 75, .1), transparent 38%),
    linear-gradient(135deg, #24191a 0%, #130d0f 52%, #090708 100%);
  display: flex;
  height: clamp(620px, 72vh, 820px);
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.reader-stage::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, .025), transparent),
    radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, .34) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}
.reader-stage::after {
  background: radial-gradient(ellipse, rgba(0, 0, 0, .5), transparent 68%);
  bottom: 4.5%;
  content: "";
  height: 45px;
  left: 50%;
  pointer-events: none;
  position: absolute;
  transform: translateX(-50%);
  width: min(760px, 62%);
  z-index: 1;
}
.book-viewport {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  overflow: hidden;
  padding: 34px 72px;
  scrollbar-color: var(--reader-gold) #1e1718;
  scrollbar-width: thin;
  width: 100%;
  z-index: 2;
}
.flipbook-reader.is-zoomed .book-viewport { overflow: auto; }
.book-scale {
  aspect-ratio: 1190 / 842;
  flex: 0 0 auto;
  height: min(740px, calc(72vh - 68px));
  max-height: 740px;
  max-width: calc(95vw - 180px);
  min-height: 520px;
  min-width: 780px;
  transform: translateX(var(--book-offset, 0)) scale(var(--book-zoom, 1));
  transform-origin: center;
  transition: transform .25s ease;
  width: auto;
}
.flipbook-reader.is-front-cover { --book-offset: -25%; }
.flipbook-reader.is-back-cover { --book-offset: 25%; }
.flipbook-reader:not(.is-ready) .book-scale { opacity: 0; transform: translateX(var(--book-offset, 0)) translateY(22px) scale(.96); }
.flipbook-reader.is-ready .book-scale {
  animation: book-arrive .65s cubic-bezier(.16, .8, .25, 1) both;
  opacity: 1;
  transform: translateX(var(--book-offset, 0)) translateY(0) scale(var(--book-zoom, 1));
}
@keyframes book-arrive {
  from { filter: blur(3px) drop-shadow(0 10px 16px rgba(0, 0, 0, .2)); opacity: 0; transform: translateX(var(--book-offset, 0)) translateY(28px) scale(.95); }
  to { filter: blur(0) drop-shadow(0 24px 38px rgba(0, 0, 0, .34)); opacity: 1; transform: translateX(var(--book-offset, 0)) translateY(0) scale(var(--book-zoom, 1)); }
}
.book-mount > .stf__wrapper { filter: drop-shadow(0 22px 28px rgba(0, 0, 0, .34)); }
.book-mount {
  height: 100%;
  max-height: 740px;
  max-width: none;
  min-height: 0;
  min-width: 0;
  width: 100%;
}
.flip-page {
  background: #f6f0e4;
  color: #3a2b27;
  overflow: hidden;
  position: relative;
}
.flip-page[data-density="hard"] { background: #e2d5be; }
.flip-page[data-page="1"] { border: 1px solid rgba(179, 142, 80, .46); }
.flip-page[data-page="1"]::before {
  background: linear-gradient(90deg, rgba(74, 42, 31, .22), rgba(255, 255, 255, .08) 4%, transparent 8%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}
.flip-page::after {
  background: linear-gradient(90deg, rgba(59, 34, 26, .08), transparent 4%, transparent 96%, rgba(59, 34, 26, .08));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}
.flip-page canvas { height: 100%; object-fit: fill; position: absolute; width: 100%; }
.page-skeleton {
  animation: page-pulse 1.3s ease-in-out infinite alternate;
  background: linear-gradient(105deg, #e8dfcf 20%, #f7f1e5 40%, #e8dfcf 60%);
  background-size: 300% 100%;
  inset: 0;
  position: absolute;
}
.flip-page.is-rendered .page-skeleton { display: none; }
.page-fallback { align-items: center; display: flex; font-family: var(--serif); inset: 0; justify-content: center; position: absolute; }
.back-cover-spacer { align-items: center; display: flex; justify-content: center; }
.spacer-mark { color: rgba(92, 54, 48, .12); font-family: var(--serif); font-size: 18px; letter-spacing: .2em; }
@keyframes page-pulse { to { background-position: 100% 0; } }

.page-arrow {
  align-items: center;
  background: rgba(25, 16, 18, .72);
  border: 1px solid rgba(214, 177, 105, .45);
  border-radius: 50%;
  color: #f4ddb0;
  display: flex;
  height: 58px;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: background .2s, border-color .2s, transform .2s;
  width: 58px;
  z-index: 20;
}
.page-arrow:hover { background: var(--reader-wine-soft); border-color: var(--reader-gold); transform: translateY(-50%) scale(1.06); }
.page-arrow:disabled { cursor: default; opacity: .25; }
.page-arrow svg { height: 27px; width: 27px; }
.page-arrow-prev { left: 17px; }
.page-arrow-next { right: 17px; }
.reader-corner-hint { bottom: 18px; color: rgba(255, 255, 255, .45); font-size: 8px; letter-spacing: .16em; position: absolute; right: 22px; text-transform: uppercase; }

.reader-toolbar {
  align-items: center;
  background: linear-gradient(180deg, #211719, #170f11);
  border-top: 1px solid rgba(212, 176, 107, .25);
  display: flex;
  gap: 3px;
  justify-content: center;
  min-height: 70px;
  padding: 9px 14px;
  position: relative;
  z-index: 35;
}
.flipbook-reader:not(.is-ready) .reader-toolbar,
.flipbook-reader:not(.is-ready) .page-arrow,
.flipbook-reader:not(.is-ready) .reader-corner-hint { opacity: 0; pointer-events: none; }
.flipbook-reader.is-ready .reader-toolbar { animation: controls-arrive .45s .2s ease both; }
.flipbook-reader.is-ready .page-arrow { animation: page-arrow-arrive .4s .28s ease both; }
.flipbook-reader.is-ready .reader-corner-hint { animation: controls-arrive .4s .36s ease both; }
@keyframes controls-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes page-arrow-arrive { from { opacity: 0; transform: translateY(calc(-50% + 8px)); } to { opacity: 1; transform: translateY(-50%); } }
.reader-tool {
  align-items: center;
  background: transparent;
  border-radius: 4px;
  color: rgba(255, 250, 240, .78);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
}
.reader-tool:hover, .reader-tool[aria-pressed="true"] { background: rgba(203, 161, 88, .13); color: #f3d89f; }
.reader-tool svg { height: 19px; width: 19px; }
.reader-tool span { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.sound-muted-mark { display: none; }
.sound-tool.is-muted .sound-waves { display: none; }
.sound-tool.is-muted .sound-muted-mark { display: block; }
.tool-compact span, .tool-wide span, .tool-overflow span, .more-tool span { display: none; }
.tool-divider { background: rgba(255, 255, 255, .12); height: 28px; margin: 0 5px; width: 1px; }
.page-counter { align-items: center; color: rgba(255, 255, 255, .58); display: inline-flex; font-size: 11px; gap: 7px; white-space: nowrap; }
.page-counter input {
  appearance: textfield;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 3px;
  color: #fff;
  height: 37px;
  padding: 4px;
  text-align: center;
  width: 54px;
}
.page-counter input::-webkit-inner-spin-button { appearance: none; }
.zoom-level { color: rgba(255, 255, 255, .55); font-size: 9px; min-width: 36px; text-align: center; }
.more-tool { display: none; }

.reader-loading, .reader-error {
  align-items: center;
  background:
    radial-gradient(circle at center, rgba(97, 24, 34, .38), transparent 47%),
    linear-gradient(145deg, #211619, #0d090a);
  display: flex;
  flex-direction: column;
  inset: 0;
  justify-content: center;
  position: absolute;
  text-align: center;
  z-index: 80;
}
.reader-loading { opacity: 1; transition: opacity .38s ease, visibility .38s; }
.reader-loading.is-leaving { opacity: 0; pointer-events: none; visibility: hidden; }
.reader-loading-logo { filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .3)); height: 92px; margin-bottom: 24px; object-fit: contain; width: 76px; }
.reader-loading > span { color: var(--reader-gold); font-size: 8px; letter-spacing: .23em; text-transform: uppercase; }
.reader-loading > strong { font-family: var(--serif); font-size: 24px; font-weight: 400; margin-top: 7px; }
.loading-track { background: rgba(255, 255, 255, .11); height: 2px; margin: 25px 0 10px; overflow: hidden; width: min(280px, 62vw); }
.loading-track i { background: linear-gradient(90deg, #946c2e, #efd28f); display: block; height: 100%; transition: width .2s ease; width: 0; }
.reader-loading small { color: rgba(255, 255, 255, .55); font-size: 9px; }
.reader-error { padding: 30px; }
.reader-error .error-mark { align-items: center; border: 1px solid var(--reader-gold); border-radius: 50%; color: var(--reader-gold); display: flex; font-family: var(--serif); font-size: 30px; height: 60px; justify-content: center; width: 60px; }
.reader-error h3 { color: #fff; margin: 20px 0 9px; }
.reader-error p { color: rgba(255, 255, 255, .65); }
.reader-error > div { align-items: center; display: flex; gap: 22px; margin-top: 25px; }
.reader-error .text-link { color: var(--reader-gold-light); }

.reader-drawer {
  background: #f7f0e4;
  bottom: 0;
  color: #302426;
  left: 0;
  max-width: 90vw;
  position: absolute;
  top: 0;
  transform: translateX(-105%);
  transition: transform .3s ease;
  visibility: hidden;
  width: 340px;
  z-index: 70;
}
.flipbook-reader.drawer-open .reader-drawer { transform: translateX(0); visibility: visible; }
.drawer-scrim { background: rgba(5, 3, 4, .67); inset: 0; opacity: 0; pointer-events: none; position: absolute; transition: opacity .25s; z-index: 60; }
.flipbook-reader.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
.drawer-head { align-items: center; background: var(--reader-wine); color: #fff6e6; display: flex; justify-content: space-between; min-height: 70px; padding: 15px 19px 15px 22px; }
.drawer-head strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.drawer-head button { background: transparent; color: #fff; height: 40px; width: 40px; }
.drawer-head svg { height: 20px; width: 20px; }
.drawer-tabs { border-bottom: 1px solid #d9cbb6; display: grid; grid-template-columns: 1fr 1fr; }
.drawer-tabs button { background: transparent; color: #71635d; font-size: 9px; font-weight: 700; letter-spacing: .14em; min-height: 48px; text-transform: uppercase; }
.drawer-tabs button[aria-selected="true"] { box-shadow: inset 0 -2px var(--reader-wine); color: var(--reader-wine); }
.drawer-panel { bottom: 0; overflow: auto; padding: 18px; position: absolute; top: 119px; width: 100%; }
.thumbnail-panel { display: grid; gap: 18px 12px; grid-template-columns: 1fr 1fr; }
.thumbnail-button { background: transparent; color: #4c4140; padding: 0; text-align: left; }
.thumbnail-button canvas, .thumbnail-placeholder { background: #e6ddce; box-shadow: 0 8px 20px rgba(45, 25, 21, .16); display: block; min-height: 142px; object-fit: contain; width: 100%; }
.thumbnail-placeholder { aspect-ratio: 595 / 842; }
.thumbnail-button span { display: block; font-size: 9px; letter-spacing: .08em; margin-top: 8px; text-align: center; text-transform: uppercase; }
.thumbnail-button[aria-current="page"] canvas, .thumbnail-button[aria-current="page"] .thumbnail-placeholder { box-shadow: 0 0 0 3px var(--reader-wine), 0 8px 20px rgba(45, 25, 21, .2); }
.contents-panel { padding: 22px; }
.outline-link { background: transparent; border-bottom: 1px solid #ddd1c1; color: #443739; display: block; font-family: var(--serif); padding: 14px 4px; text-align: left; width: 100%; }
.outline-link:hover { color: var(--reader-wine); }
.outline-child { padding-left: 17px; }
.drawer-empty { font-family: var(--serif); font-size: 17px; line-height: 1.6; padding: 15px 4px; }

.flipbook-reader:fullscreen { background: #0e090a; border: 0; height: 100vh; max-width: none; width: 100vw; }
.flipbook-reader:fullscreen .reader-stage { height: calc(100vh - 70px); }
.flipbook-reader:fullscreen .book-scale { aspect-ratio: 1190 / 842; height: calc(100vh - 116px); max-height: none; max-width: calc(100vw - 190px); width: auto; }
.flipbook-reader:fullscreen .book-mount { height: 100%; max-height: none; width: 100%; }
.flipbook-reader:fullscreen .reader-toolbar { bottom: 0; left: 0; position: absolute; right: 0; }

.edition-about { background: #efe4d2; padding: 90px 0; }
.edition-about-grid { align-items: start; display: grid; gap: clamp(35px, 6vw, 85px); grid-template-columns: minmax(0, 1.2fr) .65fr .9fr; }
.edition-about h2 { color: var(--reader-wine); font-size: clamp(38px, 4vw, 56px); margin-bottom: 20px; }
.edition-about p { line-height: 1.9; }
.edition-about dl { border-top: 1px solid #cdbb9d; margin: 8px 0 0; }
.edition-about dl div { border-bottom: 1px solid #cdbb9d; padding: 14px 0; }
.edition-about dt { color: #84745f; font-size: 8px; letter-spacing: .15em; text-transform: uppercase; }
.edition-about dd { color: #3f3230; font-family: var(--serif); font-size: 17px; margin: 3px 0 0; }
.edition-download { background: var(--reader-wine); box-shadow: 0 20px 45px rgba(69, 30, 23, .18); color: #fff; padding: 34px; }
.edition-download > span { color: var(--reader-gold-light); font-size: 8px; letter-spacing: .2em; }
.edition-download h3 { color: #fff8e8; font-size: 29px; margin: 11px 0 12px; }
.edition-download p { color: rgba(255, 255, 255, .68); font-size: 12px; }
.edition-download .button { margin-top: 22px; }

@media (max-width: 1100px) {
  .reader-intro-grid { gap: 60px; grid-template-columns: minmax(0, 1fr) 250px; }
  .reader-stage { height: 680px; }
  .book-scale {
    aspect-ratio: 1190 / 842;
    height: min(610px, calc(72vh - 68px));
    max-width: calc(95vw - 165px);
    min-height: 0;
    min-width: 0;
    width: auto;
  }
  .book-mount { height: 100%; min-height: 0; min-width: 0; width: 100%; }
  .magazine-dialog .book-scale {
    height: min(840px, calc(96dvh - 160px));
    max-width: calc(98vw - 155px);
  }
  .reader-toolbar { overflow-x: auto; justify-content: flex-start; }
  .reader-toolbar::before, .reader-toolbar::after { content: ""; flex: 1 0 4px; }
  .edition-about-grid { grid-template-columns: 1fr 1fr; }
  .edition-download { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .magazine-dialog { border: 0; height: 100dvh; max-height: 100dvh; max-width: 100vw; width: 100vw; }
  .magazine-dialog-head { flex-basis: 58px; padding: 7px 10px 7px 14px; }
  .magazine-dialog-brand img { height: 38px; width: 31px; }
  .magazine-dialog-brand small, .magazine-dialog-tip { display: none; }
  .magazine-dialog-brand strong { font-size: 16px; }
  .magazine-dialog-head > button { min-height: 40px; padding: 6px 10px; }
  .magazine-dialog-head > button span { display: none; }
  .magazine-dialog .reader-stage { height: calc(100% - 64px); }
  .magazine-dialog .reader-toolbar { min-height: 64px; }
  .magazine-dialog .book-viewport { padding: 10px 42px; }
  .magazine-dialog .book-scale {
    aspect-ratio: 595.25 / 842;
    height: auto;
    max-height: calc(100dvh - 142px);
    max-width: calc(100vw - 82px);
    min-height: 0;
    width: calc(100vw - 82px);
  }
  .magazine-dialog .book-mount { height: 100%; min-height: 0; width: 100%; }
  .reader-intro { min-height: 0; }
  .reader-intro-grid { gap: 35px; grid-template-columns: minmax(0, 1fr) 118px; min-height: 430px; padding-block: 38px; }
  .reader-breadcrumbs { grid-column: 1 / -1; margin-bottom: 18px; }
  .reader-intro h1 { font-size: clamp(47px, 14vw, 72px); }
  .reader-intro .reader-subtitle { font-size: 22px; margin: 12px 0 15px; }
  .reader-intro p:not(.reader-subtitle) { font-size: 12px; line-height: 1.7; }
  .reader-intro-actions { margin-top: 22px; }
  .reader-intro-actions .button { min-height: 45px; padding-inline: 16px; }
  .reader-cover-preview { align-self: center; }
  .reader-cover-preview figcaption { display: none; }
  .reader-section { padding: 50px 0 58px; }
  .reader-heading { align-items: start; display: block; }
  .reader-heading > p { margin-top: 10px; text-align: left; }
  .flipbook-reader { width: 100%; }
  .reader-stage { height: min(72svh, 670px); min-height: 530px; }
  .book-viewport { padding: 22px 43px; }
  .book-scale {
    aspect-ratio: 595.25 / 842;
    height: auto;
    max-height: min(620px, calc(72svh - 44px));
    max-width: calc(100vw - 92px);
    min-height: 0;
    min-width: 280px;
    width: calc(100vw - 92px);
  }
  .book-mount { height: 100%; min-height: 0; min-width: 280px; width: 100%; }
  .flipbook-reader { --book-offset: 0; }
  .page-arrow { height: 42px; width: 42px; }
  .page-arrow svg { height: 22px; width: 22px; }
  .page-arrow-prev { left: 3px; }
  .page-arrow-next { right: 3px; }
  .reader-corner-hint { display: none; }
  .reader-toolbar { gap: 1px; min-height: 64px; padding-inline: 6px; }
  .reader-tool { min-width: 42px; padding: 7px; }
  .tool-wide, .tool-overflow, .tool-divider.tool-wide { display: none; }
  .reader-toolbar.more-open .tool-overflow { display: inline-flex; }
  .reader-toolbar.more-open { flex-wrap: wrap; }
  .more-tool { display: inline-flex; }
  .tool-divider { margin-inline: 2px; }
  .page-counter input { width: 45px; }
  .reader-drawer { position: fixed; z-index: 500; }
  .drawer-scrim { position: fixed; z-index: 490; }
  .edition-about { padding: 60px 0; }
  .edition-about-grid { grid-template-columns: 1fr; }
  .edition-download { grid-column: auto; }
  .flipbook-reader:fullscreen .reader-stage { height: calc(100svh - 64px); }
  .flipbook-reader:fullscreen .book-scale { height: auto; max-height: calc(100svh - 108px); max-width: calc(100vw - 86px); min-height: 0; width: calc(100vw - 86px); }
  .flipbook-reader:fullscreen .book-mount { height: 100%; min-height: 0; width: 100%; }
}

@media (max-width: 520px) {
  .magazine-dialog .book-scale { height: auto; max-height: calc(100dvh - 138px); min-height: 0; }
  .magazine-dialog .book-mount { height: 100%; min-height: 0; }
  .reader-intro-grid { display: block; min-height: 0; padding: 30px 0 43px; }
  .reader-breadcrumbs { margin-bottom: 28px; }
  .reader-cover-preview { display: none; }
  .reader-intro h1 { font-size: 58px; }
  .reader-intro-actions { align-items: flex-start; flex-direction: column; }
  .reader-heading h2 { font-size: 36px; }
  .reader-stage { height: min(68svh, 590px); min-height: 480px; }
  .book-scale { height: auto; max-height: min(548px, calc(68svh - 40px)); min-height: 0; }
  .book-mount { height: 100%; min-height: 0; }
  .book-viewport { padding-block: 20px; }
  .reader-loading-logo { height: 74px; width: 61px; }
  .reader-loading > strong { font-size: 21px; }
  .reader-toolbar { justify-content: center; }
  .reader-toolbar::before, .reader-toolbar::after { display: none; }
  .reader-tool[data-action="drawer"] span { display: none; }
  .thumbnail-button canvas, .thumbnail-placeholder { min-height: 125px; }
  .edition-download { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .book-scale, .reader-drawer, .drawer-scrim { transition: none; }
  .page-skeleton { animation: none; }
  .magazine-dialog[open] .magazine-dialog-shell,
  .magazine-dialog.is-closing .magazine-dialog-shell,
  .magazine-dialog[open]::backdrop,
  .magazine-dialog.is-closing::backdrop,
  .flipbook-reader.is-ready .book-scale,
  .flipbook-reader.is-ready .reader-toolbar,
  .flipbook-reader.is-ready .page-arrow,
  .flipbook-reader.is-ready .reader-corner-hint { animation: none; }
}
