* {
  box-sizing: border-box;
}
:root {
  color-scheme: light;
  --ink: #171c19;
  --cream: #f8f5ec;
  --muted: #766f62;
  --red: #a92027;
  --gold: #a92027;
}
html {
  background: var(--cream);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  font-family: Tahoma, "Segoe UI", sans-serif;
  font-size: 14px;
  background: radial-gradient(
    ellipse at 50% 40%,
    #fffdf6 0,
    #f8f5ec 60%,
    #f2ebdd 100%
  );
}
a {
  color: inherit;
  text-decoration: none;
}
button,
select {
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.3;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  padding: 12px;
  background: var(--cream);
  color: var(--ink);
  z-index: 100;
}
.skip-link:focus {
  top: 10px;
}
.site-header {
  min-height: 86px;
  padding: 12px clamp(18px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e9dfcc;
  background: #f8f5ecf2;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 54px;
  height: 50px;
  object-fit: contain;
  background: var(--cream);
  border-radius: 2px;
}
.brand-text {
  display: grid;
  gap: 5px;
}
.brand-text b {
  font-family: Georgia, serif;
  font-size: 16px;
  letter-spacing: 1.5px;
}
.brand-text > span {
  font-size: 10px;
  color: var(--muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.language-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 44px;
  padding: 8px;
  font-size: 12px;
}
.order-link {
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #a9202760;
  padding: 13px 19px;
  font-size: 12px;
  border-radius: 3px;
}
.order-link:hover {
  background: #a920270a;
}
.intro {
  text-align: center;
  padding: 24px 15px 18px;
}
.eyebrow {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 3px;
  margin: 0 0 10px;
  direction: ltr;
}
.eyebrow span {
  display: inline-block;
  font-size: 14px;
  margin-left: 8px;
}
h1 {
  font-size: clamp(23px, 3.1vw, 38px);
  line-height: 1.55;
  font-weight: 400;
  margin: 0;
}
h1 em {
  font-style: normal;
  color: var(--gold);
}
.intro-caption {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.reader-shell {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}
.reader-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 10px;
  max-width: 1080px;
  gap: 8px;
}
.edition {
  color: #766f62;
  font-size: 9px;
  letter-spacing: 2px;
  direction: ltr;
}
.tool-buttons {
  display: flex;
  gap: 8px;
}
.tool-button {
  min-height: 40px;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  background: #f2ecdf;
  border: 1px solid #d9d1c1;
  border-radius: 4px;
  color: #5e574b;
  padding: 8px 12px;
  font-size: 11px;
}
.tool-button:hover {
  background: #e9dfcc;
}
.tool-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
.tool-button.icon-only {
  width: 40px;
  padding: 8px;
}
.book-stage {
  position: relative;
  min-height: 280px;
  height: clamp(360px, calc(100svh - 355px), 850px);
  display: flex;
  justify-content: center;
  align-items: center;
  isolation: isolate;
}
.book-stage::before {
  content: "";
  position: absolute;
  width: 85%;
  max-width: 1050px;
  height: 10px;
  bottom: 0;
  background: #000;
  filter: blur(20px);
  opacity: 0.65;
  border-radius: 50%;
  z-index: -1;
}
.book-mount {
  margin: 0 auto;
  filter: drop-shadow(0 12px 18px #392c172b);
}
.paper-page {
  background: #f5efdf;
  overflow: hidden;
}
.paper-page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.paper-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #0000000a,
    transparent 5%,
    transparent 95%,
    #00000012
  );
  pointer-events: none;
}
.closing-page {
  text-align: center;
  padding: 24% 10% 10%;
  color: #992329;
}
.closing-page img {
  width: 40%;
  height: auto;
  margin: 0 auto;
  mix-blend-mode: multiply;
}
.closing-page p {
  font-family: Georgia, serif;
  font-size: 18px;
  margin-top: 26px;
}
.closing-page > span {
  display: block;
  font-size: 28px;
  margin-top: 30px;
}
.stf__wrapper {
  border-radius: 2px;
}
.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}
.loading[hidden] {
  display: none;
}
.loading-flower {
  font-size: 40px;
  color: var(--gold);
  animation: spin 4s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.reader-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin-top: 15px;
}
.page-arrow {
  border: 1px solid #a9202750;
  border-radius: 50%;
  background: #fffaf1;
  color: var(--ink);
  width: 44px;
  height: 44px;
  font-size: 24px;
  line-height: 1;
}
.page-arrow:hover:not(:disabled) {
  background: var(--cream);
  color: var(--ink);
}
.page-information {
  min-width: 165px;
  text-align: center;
  display: grid;
  gap: 6px;
}
#page-title {
  font-size: 12px;
  color: #332e25;
}
#page-count {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 13px;
  letter-spacing: 3px;
}
.gesture-hint {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin: 12px 0 16px;
  line-height: 1.8;
}
.gesture-hint > span:first-child {
  color: var(--gold);
  font-size: 17px;
  vertical-align: middle;
  margin-inline-end: 6px;
}
.page-tabs {
  display: flex;
  justify-content: center;
  gap: 9px;
  max-width: 800px;
  margin: 0 auto;
}
.page-tab {
  flex: 1;
  max-width: 142px;
  border: 1px solid #ded4c2;
  background: #fffaf1;
  color: var(--muted);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 7px 10px;
  min-height: 49px;
  font-size: 10px;
  text-align: start;
}
.page-tab img {
  width: 24px;
  height: 34px;
  object-fit: cover;
  border-radius: 1px;
  flex-shrink: 0;
}
.page-tab[aria-current="page"] {
  border-color: var(--gold);
  background: #a920270a;
  color: var(--ink);
}
.page-tab:hover {
  border-color: #a9202780;
}
.order-note {
  text-align: center;
  padding: 4px 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}
.order-note a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-inline-start: 5px;
}
.reader-footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 18px clamp(18px, 5vw, 80px);
  margin-top: 24px;
  border-top: 1px solid #ded4c2;
  color: #766f62;
  font-size: 10px;
  line-height: 1.7;
}
.reader-footer > span:first-child {
  font-family: Georgia, serif;
  font-style: italic;
}
.signature {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: clamp(9px, 2.5vw, 10px);
  white-space: nowrap;
}
.signature a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
}
.signature a:hover {
  color: var(--ink);
}
.zoom-dialog {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  margin: 0;
  inset: 0;
  color: var(--ink);
  background: #f8f5ec;
  overflow: hidden;
}
.zoom-dialog[open] {
  display: flex;
  flex-direction: column;
}
.zoom-dialog::backdrop {
  background: #000c;
}
.zoom-toolbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 22px;
  border-bottom: 1px solid #d9d1c1;
}
.zoom-toolbar h2 {
  font-size: 14px;
  font-weight: 400;
}
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.zoom-controls button {
  color: var(--ink);
  border: 1px solid #c8baa0;
  border-radius: 4px;
  background: transparent;
  width: 42px;
  min-height: 42px;
  font-size: 23px;
}
.zoom-controls output {
  font-size: 11px;
  min-width: 40px;
  text-align: center;
}
#zoom-close {
  margin-inline-start: 8px;
  border: 0;
}
.zoom-stage {
  overflow: auto;
  flex: 1;
  min-height: 0;
  text-align: center;
  direction: ltr;
  padding: 16px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.zoom-stage img {
  display: block;
  margin: auto;
  max-width: none;
  height: auto;
}
.zoom-page-choice {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-top: 1px solid #d9d1c1;
  font-size: 11px;
}
.zoom-page-choice select {
  color: var(--ink);
  background: var(--ink);
  border: 1px solid #c8baa0;
  border-radius: 3px;
  padding: 8px;
  min-height: 40px;
  max-width: 240px;
}
.zoom-page-choice > span {
  color: var(--muted);
}
.no-script {
  padding: 24px;
  background: var(--cream);
  color: var(--ink);
  line-height: 2;
}
.no-script a {
  text-decoration: underline;
}
.reader-shell:fullscreen {
  background: var(--ink);
  max-width: none;
  padding: 16px;
  overflow: auto;
}
.reader-shell:fullscreen .book-stage {
  height: calc(100svh - 195px);
}
@media (max-width: 759px) {
  .site-header {
    min-height: 74px;
    padding: 10px 16px;
  }
  .brand img {
    width: 45px;
    height: 43px;
  }
  .brand-text b {
    font-size: 13px;
    letter-spacing: 0.7px;
  }
  .header-actions {
    gap: 8px;
  }
  .order-link {
    padding: 10px 11px;
    gap: 7px;
    font-size: 10px;
    min-height: 42px;
  }
  .intro {
    padding: 21px 10px 17px;
  }
  .intro-caption {
    font-size: 10px;
  }
  .reader-shell {
    padding: 0 14px;
  }
  .reader-tools {
    margin-bottom: 8px;
  }
  .edition {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .book-stage {
    height: min(62svh, 640px);
    min-height: 270px;
  }
  .reader-navigation {
    margin-top: 15px;
    gap: 21px;
  }
  .page-tabs {
    gap: 6px;
  }
  .page-tab {
    padding: 7px 3px;
    min-width: 0;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    font-size: 8px;
    line-height: 1.6;
  }
  .page-tab img {
    width: 24px;
    height: 34px;
  }
  .reader-footer {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    text-align: center;
  }
  .zoom-toolbar {
    padding: 8px 12px;
  }
  .zoom-toolbar h2 {
    font-size: 11px;
    max-width: 120px;
    line-height: 1.7;
  }
  .zoom-controls {
    gap: 4px;
  }
  .zoom-controls button {
    width: 37px;
  }
  .zoom-page-choice > span {
    width: 100%;
    text-align: center;
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .loading-flower {
    animation: none;
  }
}

.order-link {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.order-link:hover {
  background: #8e1b20;
}
.page-arrow {
  color: var(--red);
}
.page-arrow:hover:not(:disabled) {
  background: var(--red);
  color: white;
}
.page-tab[aria-current="page"] {
  color: var(--red);
}
.zoom-page-choice select {
  color: var(--ink);
  background: var(--cream);
}
.reader-shell:fullscreen {
  background: var(--cream);
}
.mobile-book {
  position: relative;
  width: 100%;
  perspective: 1600px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.mobile-leaf {
  position: absolute;
  inset: 0;
  background: #f5efdf;
  transform-origin: left center;
  backface-visibility: hidden;
  box-shadow: 0 2px 9px #1a130c18;
  overflow: hidden;
}
.mobile-leaf img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
}
.mobile-turn-next {
  z-index: 2;
  animation: mobile-next 0.38s ease-in-out forwards;
}
.mobile-turn-previous {
  z-index: 2;
  animation: mobile-previous 0.38s ease-in-out forwards;
}
@keyframes mobile-next {
  from {
    transform: rotateY(0);
    filter: brightness(1);
  }
  to {
    transform: rotateY(-105deg);
    filter: brightness(0.72);
  }
}
@keyframes mobile-previous {
  from {
    transform: rotateY(-105deg);
    filter: brightness(0.72);
  }
  to {
    transform: rotateY(0);
    filter: brightness(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-leaf {
    animation: none;
  }
}
