:root {
  --ink: #292522;
  --wine: #592b32;
  --paper: #fdfaf6;
  --rule: #c6b9a8;
  font-family: Georgia, serif;
  color: var(--ink);
  background: #f5f1e9;
}
* { box-sizing: border-box; }
body { margin: 0; }
header, main { width: min(100% - 40px, 860px); margin: auto; }
header, footer, .label, .folio, .controls { font: 13px/1.5 system-ui, sans-serif; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
header span { font-family: Georgia, serif; }
a { color: var(--wine); text-underline-offset: 4px; }
.label, .folio { color: var(--wine); text-transform: uppercase; font-size: 11px; letter-spacing: .16em; }
.label { margin: 28px 0 6px; }
h1, h2 { font-weight: 400; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.06; letter-spacing: -.04em; }
.intro { color: #574e44; font-size: 16px; margin: 10px 0 24px; }
.tools { border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
h2 { font-size: clamp(20px, 3vw, 29px); line-height: 1.2; }
.controls { display: flex; align-items: center; gap: 12px; }
.controls label { min-width: 0; }
.controls button, select { font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule); min-height: 44px; cursor: pointer; }
.controls button { white-space: nowrap; }
select { width: 100%; max-width: 180px; }
.mount { --edge: clamp(8px, 2vw, 22px); position: relative; isolation: isolate; perspective: 1500px; padding: var(--edge); background: #4b3735; border-radius: 3px; box-shadow: 0 10px 26px #392b2524; }
#sheet { background: var(--paper); }
#sheet { height: clamp(300px, 66svh, 800px); overflow: auto; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; box-shadow: 1px 2px #b5a695, 2px 4px #ece5d9, 3px 5px #a79988; }
#page { width: 100%; height: 100%; display: block; object-fit: contain; }
#sheet.enlarged { touch-action: pan-x pan-y pinch-zoom; }
#sheet.enlarged img { width: 1265px; height: auto; }
.leaf { pointer-events: none; position: absolute; top: var(--edge); left: var(--edge); width: calc(100% - 2 * var(--edge)); height: calc(100% - 2 * var(--edge)); z-index: 1; }
.turn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 48px; border: 1px solid #aa9485; background: var(--wine); color: white; font: 32px/1 Georgia, serif; cursor: pointer; box-shadow: 0 2px 6px #21171330; }
.prev { left: 0; border-radius: 0 20px 20px 0; }
.next { right: 0; border-radius: 20px 0 0 20px; }
.turn:disabled { visibility: hidden; }
.turn:hover { background: #713944; }
footer { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 18px 0 32px; }
footer span { flex-basis: 100%; color: #62584e; }
:focus-visible { outline: 3px solid #a4692f; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 620px) {
  header, main { width: calc(100% - 24px); }
  .label { margin-top: 18px; }
  .intro { margin-bottom: 18px; }
  .tools { flex-wrap: wrap; gap: 4px; }
  .controls { width: 100%; justify-content: space-between; }
  select { max-width: 240px; }
  #sheet { height: clamp(270px, calc(100svh - 355px), 620px); }
  .turn { top: auto; bottom: 14px; transform: none; }
}
