@font-face { font-family: 'Literata'; src: url('assets/fonts/literata-regular.woff2') format('woff2'); font-style: normal; font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Literata'; src: url('assets/fonts/literata-italic.woff2') format('woff2'); font-style: italic; font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('assets/fonts/inter-tight.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: light;
  --paper: #edebe6;
  --sheet: #f4f2ed;
  --ink: #141414;
  --cobalt: #1f3fb0;
  --muted: #6D6A63;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --h: min(46vh, 31vw);
  --reference-ease: cubic-bezier(.2, .8, .2, 1);
  --w: calc(var(--h) * .77142857);
  --d: calc(var(--h) * .19);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Inter Tight', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body::after { content: ""; pointer-events: none; position: fixed; inset: 0; z-index: 40; opacity: .55; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22220%22%20height%3D%22220%22%3E%3Cfilter%20id%3D%22n%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%22.85%22%20numOctaves%3D%223%22%20stitchTiles%3D%22stitch%22%2F%3E%3CfeColorMatrix%20type%3D%22matrix%22%20values%3D%220%200%200%200%20.45%200%200%200%200%20.42%200%200%200%200%20.38%200%200%200%20.22%200%22%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url%28%23n%29%22%2F%3E%3C%2Fsvg%3E"); mix-blend-mode: multiply; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 8px; }
.label { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; line-height: 1.5; }
.masthead { height: 84px; padding: 0 32px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { display: flex; flex-direction: column; align-items: center; color: var(--cobalt); font: 700 29px 'Literata', Georgia, serif; letter-spacing: -.05em; text-decoration: none; }
.brand span { margin-top: 5px; font: 600 8px 'Inter Tight', sans-serif; letter-spacing: .25em; }
.edition { text-align: right; }
main { min-height: calc(100svh - 84px); }
.shelf-label { position: absolute; left: 50%; top: calc(50svh - var(--h) / 2 - 114px); transform: translateX(-50%); white-space: nowrap; display: flex; align-items: center; gap: 12px; color: var(--cobalt); margin-bottom: 40px; }
.shelf-label .index { padding: 3px 7px; border: 1px solid var(--cobalt); }
.stage { position: absolute; top: calc(50svh - var(--h) / 2 - 40px); width: 100%; height: var(--h); display: grid; place-items: center; perspective: 2200px; perspective-origin: 50% 50%; touch-action: pan-y pinch-zoom; }
.book-control { appearance: none; position: relative; padding: 0; width: var(--w); height: var(--h); border: 0; background: transparent; transform-style: preserve-3d; }
.book-tilt { display: block; position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 160ms var(--ease-out); }
.stage[data-instant="true"] .book, .stage[data-instant="true"] .ground-shadow { transition-duration: .001ms; }
.book { display: block; position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(-5deg) rotateY(78deg); transition: transform 850ms var(--ease-in-out); }
.face { display: block; position: absolute; backface-visibility: hidden; }
.front, .back { inset: 0; border-radius: 3px 6px 6px 3px; }
.front { transform: translateZ(calc(var(--d) / 2)); background: #efc1ba; box-shadow: 2px 3px 3px #30232155; }
.front img { width: 100%; height: 100%; object-fit: fill; display: block; border-radius: inherit; }
.front::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(100deg, #2f151233 0%, #fff5 3%, transparent 9%, transparent 86%, #422c2126); box-shadow: inset 0 0 0 1px #ffffff55; }
.binding { position: absolute; top: 0; bottom: 0; left: 3%; width: 1.3%; background: linear-gradient(90deg, #513d3d33, #fff5, transparent); }
.back { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); background: #dba59e; padding: 35px; display: flex; flex-direction: column; justify-content: space-between; font: 30px Georgia, serif; color: #4c3532; }
.spine { left: calc((var(--w) - var(--d)) / 2); width: var(--d); height: var(--h); transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); border-radius: 5px 3px 3px 5px; display: flex; align-items: center; flex-direction: column; background: linear-gradient(90deg, #98685e, #dca99d 7%, #f3cbbb 20%, #f0c5b7 67%, #bd8275 92%, #754a40); box-shadow: inset 2px 0 2px #fff7, inset -2px 0 2px #69473966; color: #352c2b; overflow: hidden; }
.spine::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, #fff0 0 3px, #fff2 3px 4px); opacity: .2; }
.spine-mark { position: absolute; top: 5%; font: bold calc(var(--h) * .022) Georgia, serif; letter-spacing: .14em; }
.spine-art { position: absolute; top: 12%; width: 67%; aspect-ratio: 1; border-radius: 50%; background: #e9bcac; box-shadow: 0 0 0 1px #63403633; }
.spine-title { position: absolute; top: 31%; font: 700 calc(var(--h) * .071) Georgia, serif; writing-mode: vertical-rl; letter-spacing: .09em; }
.spine-subtitle { position: absolute; top: 37%; left: 13%; font-size: calc(var(--h) * .016); letter-spacing: .13em; writing-mode: vertical-rl; }
.spine-number { position: absolute; bottom: 5%; border-top: 1px solid #765344; border-bottom: 1px solid #765344; padding: 5% 18%; font: calc(var(--h) * .033) Georgia, serif; }
.pages { width: calc(var(--d) - 7px); height: calc(var(--h) - 10px); left: calc((var(--w) - var(--d) + 7px) / 2); top: 5px; transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 3px)); background: repeating-linear-gradient(90deg, #c7bdad 0 1px, #f3eddf 1px 3px); }
.top, .bottom { width: calc(var(--w) - 4px); height: var(--d); left: 2px; top: calc((var(--h) - var(--d)) / 2); background: repeating-linear-gradient(0deg, #c6baa9 0 1px, #f3eddf 1px 3px); }
.top { transform: rotateX(90deg) translateZ(calc(var(--h) / 2 - 3px)); }
.bottom { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2 - 3px)); }
.ground-shadow { position: absolute; top: calc(50% + var(--h) / 2 - 12px); width: calc(var(--w) * .85); height: 32px; background: #34271c; filter: blur(19px); opacity: .24; transform: scaleX(.55); transition: transform 850ms var(--ease-in-out); pointer-events: none; }
.stage[data-view='cover'] .ground-shadow { transform: translateX(13px) scaleX(1.1); opacity: .19; }
.stage[data-lift='true'] .book { transform: translateY(-19px) rotateX(-5deg) rotateY(78deg); transition-duration: 220ms; transition-timing-function: var(--ease-out); }
.stage[data-view='cover'] .book { transform: translateY(-10px) rotateZ(-4.5deg) rotateX(-3deg) rotateY(12deg); }
.side-note { position: absolute; left: calc(50% + var(--w) * .8); top: 47%; color: var(--muted); font-size: 9px; line-height: 1.8; pointer-events: none; }
.caption { position: absolute; top: calc(50svh + var(--h) / 2 + 30px); left: 50%; width: min(92vw, 760px); transform: translateX(-50%); text-align: center; }
.caption h2 { margin: 0; font: 400 31px/1.12 'Literata', Georgia, serif; letter-spacing: -.01em; }
.subtitle { color: var(--cobalt); margin: 12px 0 0; }
.hint { font-size: 11px; color: var(--muted); margin: 18px 0 12px; }
.reset, .close { border: 1px solid #57534c; background: transparent; padding: 7px 12px; }
.reset { font-size: 9px; }
.footer { position: fixed; left: 32px; right: 32px; bottom: 26px; display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }
.detail { max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: var(--sheet); color: var(--ink); overflow: auto; }
.detail::backdrop { background: transparent; }
.detail-top { height: 84px; padding: 0 32px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.detail-top .close { justify-self: start; }
.detail-top > :last-child { justify-self: end; }
.detail-grid { min-height: calc(100svh - 84px); display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; align-items: center; padding: 26px 6vw 56px 7vw; }
.detail-copy { max-width: 520px; }
h2 { font: 400 clamp(44px, 5.4vw, 84px)/1.02 'Literata', Georgia, serif; letter-spacing: -.025em; margin: 25px 0; }
.meta { color: var(--muted); }
.description { font: 17px/1.5 'Literata', Georgia, serif; max-width: 42ch; margin: 25px 0; }
.credit { font: italic 15px/1.5 'Literata', Georgia, serif; color: var(--muted); }
.detail-cover { margin: 0; justify-self: center; width: min(100%, 60.17vh); aspect-ratio: 1080 / 1400; }
.detail-cover img { width: 100%; height: auto; display: block; }
@media (max-width: 767px) {
  :root { --h: min(72vw, 40svh); }
  .masthead, .detail-top { height: 64px; padding: 0 16px; }
  .brand { font-size: 25px; }
  .brand span { font-size: 6px; }
  .collection { font-size: 8px; }
  .edition { visibility: hidden; }
  main { min-height: calc(100svh - 64px); }
  .shelf-label { top: calc(50svh - var(--h) / 2 - 106px); }
  .side-note { display: none; }
  .caption { top: calc(50svh + var(--h) / 2 + 25px); }
  .caption h2 { font-size: 24px; }
  .hint { max-width: 280px; margin-left: auto; margin-right: auto; line-height: 1.6; }
  .footer { left: 16px; right: 16px; bottom: 18px; font-size: 7px; gap: 20px; }
  .footer > :last-child { text-align: right; }
  .detail-top { grid-template-columns: 1fr auto; }
  .detail-top > :last-child { display: none; }
  .detail-grid { grid-template-columns: 1fr; gap: 40px; padding: 30px 25px 45px; }
  .detail-cover { grid-row: 1; width: min(100%, 35.49svh); }
  .description { font-size: 16px; }
  h2 { font-size: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .stage[data-lift='true'] .book { transform: rotateX(-5deg) rotateY(78deg); }
}

@media (max-height: 650px) {
  main { display: flex; flex-direction: column; align-items: center; min-height: 520px; padding: 32px 16px 70px; }
  .stage { position: relative; top: auto; }
  .shelf-label, .caption { position: relative; top: auto; left: auto; transform: none; }
  .shelf-label { margin-bottom: 30px; }
  .caption { margin-top: 40px; }
  .footer { position: relative; left: auto; right: auto; bottom: auto; padding: 18px 16px; }
}

.ink-poster { width: 100%; height: auto; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.visual-lines, .line-mask, .line-content { display: block; }
.line-mask { overflow: hidden; padding-block: .06em; margin-block: -.06em; }
.line-content { white-space: pre; }
.open-ring { position: absolute; left: calc(50% - var(--w) / 2 - 27px); top: calc(50% + var(--h) * .36 - 21px); width: 42px; height: 42px; border: 1px solid var(--cobalt); border-radius: 50%; background: #edebe6bf; color: var(--cobalt); font: 22px 'Inter Tight', sans-serif; z-index: 2; }
.cursor { position: fixed; top: 0; left: 0; right: auto; bottom: auto; width: 58px; height: 58px; margin: -29px 0 0 -29px; padding: 0; overflow: visible; border: none; background: none; pointer-events: none; color: var(--ink); }
.cursor::backdrop { pointer-events: none; background: none; }
.cursor-ring { position: absolute; inset: 0; border: 1.5px solid var(--ink); border-radius: 50%; transition: transform .5s var(--reference-ease), background-color .4s var(--reference-ease), border-color .4s var(--reference-ease); }
.cursor-dot { position: absolute; width: 6px; height: 6px; left: 26px; top: 26px; background: var(--ink); border-radius: 50%; transition: transform .4s var(--reference-ease); }
.cursor-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; font: 600 10px/1.25 'Inter Tight', sans-serif; letter-spacing: .06em; transform: scale(0); transition: transform .45s var(--reference-ease); }
.cursor[data-mode='spine'] .cursor-ring { transform: scale(.72); }
.cursor[data-mode='button'] .cursor-ring { transform: scale(.55); }
.cursor[data-mode='button'] .cursor-dot, .cursor[data-mode='open'] .cursor-dot { transform: scale(0); }
.cursor[data-mode='open'] .cursor-ring { transform: scale(1.75); background: var(--cobalt); border-color: var(--cobalt); }
.cursor[data-mode='open'] .cursor-label { transform: scale(1); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.custom-cursor, html.custom-cursor * { cursor: none !important; }
}

/* Full collection: every book owns its width while the spine pitch stays constant. */
.full-shelf { overflow-x: clip; }
.shelf-viewport { position: absolute; inset: 0 0 auto; height: 100svh; overflow: hidden; pointer-events: none; }
.full-shelf .stage { pointer-events: auto; }
.full-shelf .book-control { position: absolute; left: 50%; top: 50%; margin-left: calc(var(--w) / -2); margin-top: calc(var(--h) / -2); transition: none; }
.full-shelf .book-control .book { transform: none; transition: none; }
.full-shelf .book-control .front::after { background: linear-gradient(100deg, #2f151233 0%, #fff5 3%, transparent 9%, transparent 86%, #422c2126), linear-gradient(rgb(0 0 0 / var(--face-shade, 0)), rgb(0 0 0 / var(--face-shade, 0))); }
.full-shelf .book-control .spine::after { opacity: 1; background: linear-gradient(rgb(0 0 0 / var(--face-shade, 0)), rgb(0 0 0 / var(--face-shade, 0))), repeating-linear-gradient(0deg, #fff0 0 3px, #fff1 3px 4px); }
.full-shelf .spine-title { font-size: calc(var(--h) * .052); max-height: 52%; white-space: nowrap; }
.full-shelf .long-title .spine-title { font-size: calc(var(--h) * .025); letter-spacing: .03em; }
.full-shelf .spine-subtitle { font-size: calc(var(--h) * .014); left: 10%; }
.full-shelf .ground-shadow { width: 110%; opacity: .12; transform: none; }
.full-shelf .open-ring { z-index: 150; }
.full-shelf .stage[data-settled='false'] .open-ring { visibility: hidden; }
.full-shelf .caption h2 { font-size: clamp(20px, 2.2vw, 31px); }
.collection-count { font-size: 9px; color: var(--muted); }
.shelf-navigation { position: absolute; left: 20px; right: 20px; top: calc(50svh + var(--h) / 2 + 30px); display: flex; justify-content: space-between; pointer-events: none; }
.shelf-navigation button { width: 44px; height: 44px; background: none; border: none; font-size: 25px; pointer-events: auto; touch-action: manipulation; }
@media (max-width: 767px) {
  .full-shelf .shelf-label { font-size: 9px; }
  .full-shelf .caption { width: calc(100vw - 100px); }
  .full-shelf .caption h2 { font-size: 24px; }
  .shelf-navigation { left: 6px; right: 6px; top: calc(50svh + var(--h) / 2 + 20px); }
}
@media (max-height: 650px) {
  .shelf-viewport { position: relative; height: calc(var(--h) + 60px); width: 100vw; }
  .full-shelf .stage { top: 20px; }
  .shelf-navigation { position: relative; top: auto; left: auto; right: auto; width: 100%; }
}

/* The supplied mark keeps its native proportions and black artwork. */
.brand { letter-spacing: normal; color: var(--ink); }
.brand img { display: block; width: 45px; height: auto; }
.brand span { font-size: 7px; letter-spacing: .16em; margin-top: 5px; }
.spine-mark { letter-spacing: .2em; }
@media (max-width: 600px) { .brand img { width: 38px; } .brand span { font-size: 6px; } }

/* Raised medallions sit above the cloth grain, never behind its stripes. */
.spine::after { z-index: 1; }
.spine-art { z-index: 2; background-repeat: no-repeat; }

/* Reference-style shared-border region strip. Overflow stays within the nav. */
.region-tabs { position: absolute; left: 50%; top: calc(50svh - var(--h) / 2 - 114px); transform: translateX(-50%); max-width: calc(100vw - 32px); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; z-index: 4; }
.region-tabs::-webkit-scrollbar { display: none; }
.region-track { position: relative; display: flex; width: max-content; padding: 1px; }
.region-button { position: relative; z-index: 1; flex: none; margin-left: -1px; padding: 0 11px; height: 44px; background: transparent; border: 1px solid #14141488; font: 500 10.5px 'Inter Tight', sans-serif; white-space: nowrap; transition: color .45s; }
.region-button:first-of-type { margin-left: 0; }
.region-button[aria-current='true'] { color: white; }
.region-button:focus-visible { outline-offset: -3px; outline-color: var(--cobalt); }
.region-button[aria-current='true']:focus-visible { outline-color: white; }
.region-indicator { position: absolute; left: 0; top: 1px; width: 1px; height: 44px; background: var(--cobalt); transform-origin: left center; transition: transform .6s var(--reference-ease); pointer-events: none; }
@media (max-width: 767px) {
  .region-tabs { top: calc(50svh - var(--h) / 2 - 106px); }
  .region-button { padding: 0 7px; }
}
@media (max-height: 650px) { .region-tabs { position: relative; top: auto; left: auto; transform: none; margin-bottom: 30px; } }

/* Native guide links retain keyboard semantics; motion is hover feedback only. */
.masthead, .detail-top { padding-top: 12px; }
.guide-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 10px; padding: 0 20px; border: 1px solid var(--cobalt); color: var(--cobalt); background: transparent; text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
.detail-cover-link { display: block; color: inherit; text-decoration: none; }
.guide-cta:focus-visible, .detail-cover-link:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 6px; transition: none; }
@media (hover: hover) and (pointer: fine) {
  .guide-cta:hover { background-color: var(--cobalt); color: white; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .detail-cover-link { transition: transform 180ms var(--ease-out); }
  .detail-cover-link:hover:not(:focus-visible) { transform: translateY(-4px); }
}
@media (max-width: 767px) { .masthead, .detail-top { padding-top: 8px; } }


/* A stable touch surface extends below the artwork without changing projection. */
.gesture-band { display: none; }
@media (max-width: 767px) {
  .gesture-band { display: block; position: absolute; left: 0; right: 0; pointer-events: auto; touch-action: pan-y pinch-zoom; }
  .full-shelf .stage { z-index: 1; }
}
@media (max-width: 767px) and (min-height: 651px) and (orientation: portrait) {
  :root {
    --shelf-top: calc(50svh - var(--h) / 2 + 10px);
    --caption-top: calc(50svh + var(--h) / 2 + 65px);
  }
  body.full-shelf { display: flex; flex-direction: column; min-height: 100svh; }
  .full-shelf .masthead { flex-shrink: 0; }
  .full-shelf main { display: flow-root; flex: 1; min-height: 0; }
  .full-shelf .stage { top: var(--shelf-top); }
  .region-tabs { top: calc(var(--shelf-top) - 66px); }
  .gesture-band { top: calc(var(--shelf-top) - 24px); height: calc(var(--caption-top) - var(--shelf-top) + 12px); }
  .full-shelf .caption {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: calc(var(--caption-top) - 64px) auto 0;
    text-align: center;
  }
  .shelf-navigation { top: calc(var(--caption-top) - 5px); }
  .full-shelf .footer { position: relative; left: auto; right: auto; bottom: auto; padding: 18px 16px; flex-shrink: 0; }
}
@media (max-width: 767px) and (min-height: 780px) and (orientation: portrait) {
  :root {
    --shelf-top: calc(50svh - var(--h) / 2 + 26px);
    --caption-top: calc(50svh + var(--h) / 2 + 91px);
  }
}
@media (max-width: 767px) and (min-height: 651px) and (max-height: 779px) and (orientation: portrait) {
  .full-shelf .caption .subtitle { margin-top: 8px; }
  .full-shelf .caption .hint { margin: 8px auto 4px; line-height: 1.4; }
}
@media (max-width: 767px) and (max-height: 650px) {
  .gesture-band { top: 0; height: calc(var(--h) + 60px); }
}

/* Touch-managed focus is visually quiet; Tab/Escape remain visible. */
@media (pointer: coarse) {
  .book-control[data-pointer-restored-focus]:focus-visible,
  .close[data-pointer-restored-focus]:focus-visible { outline: none; }
}

/* Small independent portraits keep the existing spine circle and book geometry. */
.spine-art { overflow: hidden; }
.spine-art img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* Desktop looks slimmer; the full-height button remains the touch target. */
@media (min-width: 768px) {
  .region-tabs { top: max(84px, calc(50svh - var(--h) / 2 - max(146px, calc(var(--h) * .16 + 74px)))); }
  .region-button { padding: 0 3px; border: 0; }
  .region-button::before { content: ''; position: absolute; inset: 6px 0; border: 1px solid #14141488; pointer-events: none; }
  .region-indicator { top: 7px; height: 32px; }
  @media (max-height: 650px) {
    .region-tabs { top: -32px; }
  }
}

/* Keep live mobile sizing; only lift the region strip away from tilted covers. */
@media (max-width: 767px) {
  .region-tabs { top: max(72px, calc(50svh - var(--h) / 2 - 138px)); }
  @media (min-height: 651px) and (orientation: portrait) {
    .region-tabs { top: max(72px, calc(var(--shelf-top) - 98px)); }
  }
  @media (max-height: 650px) {
    .region-tabs { top: -32px; }
  }
}

/* Reuse the approved short-viewport flow for constrained desktop heights. */
@media (min-width: 768px) and (min-height: 651px) and (max-height: 780px) {
  .full-shelf main { display: flex; flex-direction: column; align-items: center; min-height: 520px; padding: 32px 16px 70px; }
  .stage { position: relative; top: auto; }
  .shelf-label, .caption { position: relative; top: auto; left: auto; transform: none; }
  .shelf-label { margin-bottom: 30px; }
  .caption { margin-top: 40px; }
  .shelf-viewport { position: relative; height: calc(var(--h) + 60px); width: 100vw; }
  .full-shelf .stage { top: 20px; }
  .shelf-navigation { position: relative; top: auto; left: auto; right: auto; width: 100%; }
  .region-tabs { position: relative; top: -32px; left: auto; transform: none; margin-bottom: 30px; }
  .footer { position: relative; left: auto; right: auto; bottom: auto; padding: 18px 16px; }
}

/* Manual homepage themes alter interface ink only, never the printed books. */
.masthead-actions { display: flex; align-items: center; justify-self: end; gap: 12px; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 13px; border: 0; background: transparent; }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .theme-sun { display: none; }
.theme-toggle:active { background: #14141412; }
:root[data-home-theme='dark'] {
  color-scheme: dark;
  --paper: #20211f;
  --sheet: #272824;
  --ink: #eeeae1;
  --muted: #b5b2aa;
  --ui-accent: #9dafff;
}
[data-home-theme='dark'] .masthead .brand img, [data-home-theme='dark'] .detail-top .brand img { filter: invert(1) brightness(.93); }
[data-home-theme='dark'] .caption .subtitle, [data-home-theme='dark'] .detail .subtitle { color: var(--ui-accent); }
[data-home-theme='dark'] .theme-toggle:active { background: #eeeae114; }
[data-home-theme='dark'] .theme-toggle .theme-moon { display: none; }
[data-home-theme='dark'] .theme-toggle .theme-sun { display: block; }
[data-home-theme='dark'] .region-button { border-color: #b5b2aa80; }
[data-home-theme='dark'] .region-button::before { border-color: #b5b2aa80; }
[data-home-theme='dark'] button:focus-visible, [data-home-theme='dark'] a:focus-visible { outline-color: var(--ui-accent); }
[data-home-theme='dark'] .region-button[aria-current='true']:focus-visible { outline-color: white; }
[data-home-theme='dark'] .open-ring { background: #272824ed; color: var(--ui-accent); border-color: var(--ui-accent); }
[data-home-theme='dark'] .guide-cta { color: var(--ui-accent); border-color: var(--ui-accent); }
[data-home-theme='dark'] .close { border-color: #b5b2aa80; }
[data-home-theme='dark'] .ground-shadow { background: #000; }
@media (hover: hover) and (pointer: fine) {
  [data-home-theme='dark'] .guide-cta:hover { background: var(--ui-accent); color: #20211f; }
}
@media (max-width: 767px) { .masthead-actions .edition { display: none; } }

/* The collection name is the page heading; the selected book stays a live subheading. */
.site-title { margin: 0; min-width: 0; max-width: 100%; font: 500 16px/1.25 'Inter Tight', Arial, sans-serif; letter-spacing: 0; }
@media (max-width: 767px) {
  .site-title { max-width: calc(100% - 12px); font-size: 13px; line-height: 1.3; }
}

.footer > :only-child { margin-left: auto; }

/* Native destinations retain the existing book and circular-arrow geometry. */
.book-control { display: block; color: inherit; font: inherit; text-decoration: none; }
.open-ring { display: grid; place-items: center; text-decoration: none; }
