:root {
  color-scheme: dark;
  --canvas: #141414;
  --paper: #1c1c1c;
  --ink: #f4f4f5;
  --muted: #a6a6ad;
  --rule: #333338;
  --page-separator: #303034;
  --accent: #a49aff;
  --hover: #272536;
  --case-width: 1280px;
  --header-height: 72px;
  --sheet-height: calc(100svh - var(--header-height));
  --frame-edge: max(24px, calc((100vw - var(--case-width)) / 2));
  font-family: "Helvetica Neue", "PingFang SC", sans-serif;
  background: var(--canvas);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.6; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 30; top: 10px; left: 24px; padding: 10px 20px; background: var(--accent); color: var(--canvas); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.p-header { position: sticky; top: 0; z-index: 10; height: var(--header-height); display: flex; align-items: center; gap: 24px; padding-inline: var(--frame-edge); background: var(--canvas); border-bottom: 1px solid var(--rule); }
.p-origin { display: flex; align-items: center; gap: 16px; flex: none; }
.p-back { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; white-space: nowrap; }
.p-back svg { width: 16px; height: 16px; }
.p-wordmark { font-size: 16px; font-weight: 600; white-space: nowrap; }
.p-wordmark span { margin-left: 10px; font-size: 12px; font-weight: 400; color: var(--muted); }
.p-chapters { display: flex; align-self: stretch; align-items: center; gap: 28px; margin-inline: auto; white-space: nowrap; }
.p-chapters a { position: relative; display: flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--muted); }
.p-chapters a[aria-current] { color: var(--ink); }
.p-chapters a[aria-current]::after { content: ''; position: absolute; bottom: 0; left: calc(50% - 12px); width: 24px; height: 2px; background: var(--accent); }
.p-controls { display: flex; align-items: center; gap: 8px; flex: none; }
.p-controls button { display: grid; place-items: center; width: 36px; height: 44px; padding: 8px; border: 0; border-radius: 4px; background: transparent; }
.p-controls button svg { width: 18px; height: 18px; }
.p-controls button:disabled { opacity: .3; cursor: default; }
.p-controls select { border: 0; background: transparent; width: 164px; min-height: 44px; padding: 8px 4px; font-size: 13px; color: var(--muted); }
.p-controls option { color: var(--ink); background: var(--canvas); }
.p-back:hover, .p-wordmark:hover, .p-chapters a:hover { color: var(--accent); }
.p-controls button:hover:not(:disabled) { color: var(--accent); background: var(--hover); }
.p-pages { display: grid; gap: 8px; width: 100%; margin: 0; background: var(--page-separator); }
/* Equal desktop sheets use a single 1280px canvas, aligned directly below navigation. */
.p-page { position: relative; display: grid; place-items: start center; width: 100%; height: var(--sheet-height); background: var(--page-background, var(--canvas)); scroll-margin-top: var(--header-height); }
.p-page-link { display: block; width: min(100%, var(--case-width), calc(var(--sheet-height) * 16 / 9)); aspect-ratio: 16 / 9; cursor: zoom-in; }
.p-page img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.p-page-link:focus-visible { outline-offset: -3px; }
.p-page-rail { display: none; position: fixed; z-index: 9; right: 6px; top: 50%; transform: translateY(-50%); }
.is-paged .p-page-rail { display: grid; }
.p-page-rail a { display: grid; place-items: center; width: 24px; height: 32px; }
.p-page-rail a > span { width: 5px; height: 5px; border-radius: 3px; background: var(--muted); transition: height 150ms, background-color 150ms; }
.p-page-rail a:hover > span { height: 12px; background: var(--accent); }
.p-page-rail a[aria-current] > span { height: 21px; background: var(--accent); }
.p-page-rail a:focus-visible { outline-offset: -2px; }
.p-zoom { width: calc(100vw - 48px); height: calc(100dvh - 48px); max-width: 1680px; max-height: none; margin: auto; padding: 0; border: 1px solid var(--rule); border-radius: 8px; background: var(--canvas); color: var(--ink); }
.p-zoom::backdrop { background: #000c; }
.p-zoom[open] { display: flex; flex-direction: column; }
.p-zoom-bar { display: flex; align-items: center; flex: none; flex-wrap: wrap; gap: 8px 24px; padding: 12px 20px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.p-zoom-bar p { margin: 0 auto 0 0; font-size: 13px; }
.p-zoom-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.p-zoom-actions button, .p-zoom-actions a, .p-zoom-actions select { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; border: 1px solid var(--rule); border-radius: 4px; padding: 8px 12px; background: var(--canvas); font-size: 12px; }
.p-zoom-actions button:hover, .p-zoom-actions a:hover { background: var(--hover); border-color: var(--accent); }
.p-zoom-actions select { max-width: 240px; }
.p-zoom-actions select[hidden] { display: none; }
.p-zoom-viewport { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 24px; }
.p-zoom-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; margin: auto; }
.p-zoom[data-detail=true] .p-zoom-image { width: var(--p-image-width); max-width: none; max-height: none; margin: 0 auto; }
.p-zoom-viewport:focus-visible { outline-offset: -5px; }
body:has(.p-zoom[open]) { overflow: hidden; }
@media (max-width: 1100px) and (min-width: 901px) {
  .p-header { gap: 16px; }
  .p-wordmark span { display: none; }
  .p-chapters { gap: 20px; }
}
@media (max-width: 900px) {
  :root { --header-height: 52px; --frame-edge: 12px; }
  .p-header { gap: 8px; justify-content: space-between; }
  .p-wordmark, .p-chapters { display: none; }
  .p-back { font-size: 12px; gap: 6px; }
  .p-back svg { width: 14px; }
  .p-controls { gap: 2px; }
  .p-controls button { width: 32px; }
  .p-controls select { width: 156px; font-size: 12px; }
  /* On small screens, stack intact source compositions; details open at native size. */
  .p-page { height: auto; aspect-ratio: 16 / 9; }
  .p-page-link { width: 100%; }
  .p-zoom { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  .p-zoom-bar { padding: 12px; }
  .p-zoom-bar p { font-size: 12px; }
  .p-zoom-actions { width: 100%; gap: 6px; }
  .p-zoom-actions select { width: 100%; max-width: 100%; }
  .p-zoom-actions button, .p-zoom-actions a { padding: 8px 10px; }
  .p-zoom-viewport { padding: 12px; }
}
@media (max-width: 360px) {
  .p-back { font-size: 11px; }
  .p-controls select { width: 140px; }
  .p-controls button { width: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
@page { size: 16in 9in; margin: 0; }
@media print {
  html, body { margin: 0; background: #141414; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .p-header, .p-page-rail, .p-zoom, .skip-link { display: none !important; }
  .p-pages { display: block; margin: 0; padding: 0; background: var(--canvas); }
  .p-page { width: 16in; height: 9in; aspect-ratio: auto; margin: 0; break-inside: avoid; break-after: page; }
  .p-page:last-child { break-after: auto; }
  .p-page-link { width: 100%; height: 100%; }
  .p-page img { width: 100%; height: 100%; object-fit: contain; }
}
