:root{box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}html{scroll-padding-top:env(safe-area-inset-top,0px)}body{margin:0;padding:0}img{max-width:100%}

  /* One committed world: a night sea and a vellum page. Single theme by design;
     the page itself has a lamp-light variant for reading in the dark. */
  :root {
    color-scheme: dark;
    --night: #07141d;
    --night-2: #0c2230;
    --gold: #e2b551;
    --gold-dim: rgba(226, 181, 81, 0.38);
    --mist: #a3b6bf;
    --mist-dim: #6d838e;
    --vellum: #efe5cb;
    --lost: #7a8b93;
    --paper: #efe5cb;
    --paper-edge: #d9caa3;
    --ink: #2a1f14;
    --ink-soft: #5d4b34;
    --rubric: #9c2b1b;
    --rule: rgba(93, 75, 52, 0.25);
    --fs: 18px;
    --display: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --display-sc: "IM Fell English SC", "IM Fell English", "Iowan Old Style", Palatino, Georgia, serif;
    --body: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  }
  body.lamp { --paper: #1b1914; --paper-edge: #2c281f; --ink: #e9e0ca; --ink-soft: #b3a88f; --rubric: #e39b7b; --rule: rgba(233, 224, 202, 0.16); }
  body.size-s { --fs: 16.5px; }
  body.size-l { --fs: 20.5px; }
  html, body { height: 100%; }
  body {
    background: radial-gradient(120% 80% at 30% 40%, var(--night-2) 0%, var(--night) 60%) fixed, var(--night);
    color: var(--mist); font-family: var(--body); -webkit-font-smoothing: antialiased;
  }
  [hidden] { display: none !important; }
  button { font: inherit; }
  button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

  .app { height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding-inline: 20px; padding-block: 14px 10px; box-sizing: border-box; max-width: 1560px; margin: 0 auto; }

  /* ---------- Header ---------- */
  header.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; }
  .brand h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3vw, 36px); color: var(--vellum); line-height: 1.05; }
  .brand h1 em { color: var(--gold); }
  .brand p { margin: 4px 0 0; font-family: var(--display); font-style: italic; font-size: 16px; color: var(--mist); }
  .ledger { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: flex-end; }
  .stat { display: grid; gap: 3px; }
  .stat .k { font-family: var(--display-sc); font-size: 13.5px; letter-spacing: 0.04em; color: var(--mist-dim); }
  .stat .v { font-family: var(--body); font-size: 19px; line-height: 1.15; color: var(--vellum); font-variant-numeric: oldstyle-nums tabular-nums; white-space: nowrap; }
  .fleet { display: flex; gap: 4px; flex-wrap: wrap; }
  .ship-chip { font-family: var(--display-sc); font-size: 13px; line-height: 1; padding: 4px 7px 5px; border-radius: 2px; border: 1px solid var(--gold-dim); color: var(--gold); background: rgba(226,181,81,0.07); transition: color .4s, border-color .4s, background .4s; }
  .ship-chip.lost { color: var(--lost); border-color: rgba(122,139,147,0.35); background: transparent; text-decoration: line-through; text-decoration-color: rgba(122,139,147,0.7); }

  /* ---------- Globe ---------- */
  main.stage { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 41vw, 620px); gap: 20px; }
  .globe-wrap { position: relative; min-height: 0; }
  #globe { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; display: block; }
  #globe:active { cursor: grabbing; }
  .gbtn { font-family: var(--display-sc); font-size: 14.5px; letter-spacing: 0.02em; color: var(--vellum); background: rgba(7,20,29,0.76); border: 1px solid rgba(163,182,191,0.3); border-radius: 3px; padding: 6px 10px; cursor: pointer; backdrop-filter: blur(4px); }
  .gbtn:hover, .gbtn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
  .globe-tools { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 6px; }
  .follow { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); letter-spacing: 0.06em; }
  .legend { position: absolute; left: 6px; bottom: 9px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; max-width: 52%; font-family: var(--display); font-style: italic; font-size: 13.5px; color: var(--mist-dim); pointer-events: none; }
  .legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
  .legend .sw-parch { background: radial-gradient(circle at 40% 40%, #f4ecd6, #d9c69c); box-shadow: inset 0 0 0 1px #6b5230; }
  .gstatus { display: none; }
  .tip {
    position: absolute; left: 8px; top: 8px; z-index: 3; max-width: min(310px, calc(100% - 16px)); box-sizing: border-box;
    background: rgba(7,20,29,0.93); border: 1px solid rgba(226,181,81,0.45); border-radius: 4px; padding: 9px 12px 11px;
    color: var(--vellum); font-size: 14.5px; line-height: 1.42; box-shadow: 0 10px 26px -12px rgba(0,0,0,0.9); cursor: pointer;
  }
  .tip small { display: block; font-family: var(--display-sc); font-size: 13px; letter-spacing: 0.04em; color: var(--mist-dim); }
  .tip b { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--gold); margin: 1px 0 3px; }

  /* ---------- Journal ---------- */
  .journal { min-height: 0; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; perspective: 1800px; }
  .booktools { display: flex; align-items: center; gap: 8px; }
  .booktools .spacer { flex: 1; }
  .tbtn { font-family: var(--display-sc); font-size: 15px; letter-spacing: 0.03em; color: var(--mist); background: transparent; border: 1px solid rgba(163,182,191,0.26); border-radius: 3px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
  .tbtn:hover, .tbtn[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
  .tbtn.codexbtn { color: var(--gold); border-color: var(--gold-dim); }
  .tbtn.codexbtn.bump { animation: bump .6s ease; }
  @keyframes bump { 30% { transform: scale(1.12); background: rgba(226,181,81,0.18); } }
  .page {
    min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    background: radial-gradient(140% 90% at 100% 0%, rgba(160,120,60,0.10), transparent 55%), radial-gradient(120% 100% at 0% 100%, rgba(140,100,50,0.12), transparent 60%), var(--paper);
    color: var(--ink); border-radius: 2px 6px 6px 2px;
    box-shadow: inset 14px 0 18px -14px rgba(40,25,5,0.45), 0 18px 40px -18px rgba(0,0,0,0.7);
    border-left: 3px solid var(--paper-edge); padding: 20px clamp(20px, 3vw, 34px) 28px;
    transform-origin: left center; backface-visibility: hidden; transition: background-color .3s, color .3s;
  }
  body.lamp .page { background: var(--paper); }
  .page.out { animation: turnOut .3s cubic-bezier(.5,0,.75,.4) forwards; }
  .page.in  { animation: turnIn .42s cubic-bezier(.2,.7,.3,1) forwards; }
  .page.out.back { animation-name: turnOutBack; }
  .page.in.back  { animation-name: turnInBack; }
  @keyframes turnOut { to { transform: rotateY(-88deg); filter: brightness(.7); } }
  @keyframes turnIn { from { transform: rotateY(70deg); filter: brightness(.8); } to { transform: none; filter: none; } }
  @keyframes turnOutBack { to { transform: rotateY(70deg); opacity: .2; } }
  @keyframes turnInBack { from { transform: rotateY(-88deg); } to { transform: none; } }
  @media (prefers-reduced-motion: reduce) {
    .page.out, .page.in, .page.out.back, .page.in.back { animation: fade .2s ease forwards; }
    @keyframes fade { from { opacity: .3; } to { opacity: 1; } }
    .tbtn.codexbtn.bump, .toast { animation: none; }
  }
  .runhead { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-family: var(--display-sc); font-size: 14.5px; letter-spacing: 0.03em; color: var(--ink-soft); padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
  .runhead span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .partline { margin: 22px 0 0; font-family: var(--display-sc); font-size: 15px; letter-spacing: 0.08em; color: var(--ink-soft); }
  .chapno { margin: 18px 0 2px; font-family: var(--display-sc); color: var(--rubric); font-size: 17px; letter-spacing: 0.04em; }
  .partline + .chapno { margin-top: 6px; }
  .page h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.2vw, 38px); line-height: 1.05; text-wrap: balance; color: var(--ink); }
  .place { margin: 0 0 6px; font-style: italic; color: var(--ink-soft); font-size: calc(var(--fs) * 0.95); }
  .rubric { margin: 16px 0 10px; font-family: var(--display-sc); color: var(--rubric); font-size: calc(var(--fs) * 0.95); letter-spacing: 0.03em; }
  .page p.b { margin: 0 0 0.85em; font-size: var(--fs); line-height: 1.6; max-width: 64ch; hyphens: auto; -webkit-hyphens: auto; }
  .page p.lede::first-letter { font-family: var(--display); float: left; font-size: 3.3em; line-height: .8; padding: 6px 8px 0 0; color: var(--rubric); }
  .marg { margin: 18px 0 0; padding: 12px 0 0 14px; border-left: 2px solid var(--rubric); font-size: calc(var(--fs) * 0.88); line-height: 1.5; color: var(--ink-soft); max-width: 62ch; }
  .marg b { font-family: var(--display-sc); font-weight: 400; color: var(--rubric); letter-spacing: 0.04em; margin-right: 4px; }
  .found { margin: 20px 0 0; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px dashed var(--rule); border-radius: 4px; background: rgba(226,181,81,0.07); cursor: pointer; color: var(--ink); font: inherit; text-align: left; width: 100%; }
  .found .medal { width: 46px; height: 46px; flex: none; }
  .found small { display: block; font-family: var(--display-sc); font-size: 13.5px; letter-spacing: 0.03em; color: var(--ink-soft); }
  .found span.fn { font-family: var(--display); font-size: calc(var(--fs) * 1.05); }
  .finis { margin: 26px 0 4px; text-align: center; font-family: var(--display); font-style: italic; font-size: 26px; color: var(--rubric); }

  .turners { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
  .btn { font-family: var(--display); font-size: 17px; color: var(--night); background: var(--gold); border: 0; border-radius: 3px; padding: 9px 16px 10px; cursor: pointer; white-space: nowrap; }
  .btn.ghost { background: transparent; color: var(--vellum); border: 1px solid rgba(239,229,203,0.3); }
  .btn:disabled { opacity: .35; cursor: default; }
  .btn:not(:disabled):hover { filter: brightness(1.08); }
  .btn.ghost:not(:disabled):hover { border-color: var(--gold); color: var(--gold); filter: none; }
  .progress { display: grid; gap: 5px; justify-items: center; min-width: 0; }
  .progress .ptext { font-family: var(--display-sc); font-size: 14px; letter-spacing: 0.03em; color: var(--mist-dim); white-space: nowrap; }
  .progress .pbar { width: 100%; max-width: 180px; height: 2px; background: rgba(163,182,191,0.2); border-radius: 2px; overflow: hidden; }
  .progress .pbar i { display: block; height: 100%; background: var(--gold); width: 0; transition: width .4s ease; }

  /* ---------- Timeline ---------- */
  .timeline { position: relative; height: 44px; margin-inline: 8px; }
  .tl-track { position: absolute; left: 0; right: 0; top: 14px; height: 2px; background: rgba(163,182,191,0.18); }
  .tl-fill { position: absolute; left: 0; top: 14px; height: 2px; background: var(--gold); transition: width .6s ease; }
  .tl-dot { position: absolute; top: 15px; width: 18px; height: 18px; margin: -9px 0 0 -9px; padding: 0; border: 0; background: transparent; cursor: pointer; }
  .tl-dot::after { content: ""; position: absolute; left: 5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--night); border: 1.5px solid var(--mist-dim); box-sizing: border-box; transition: all .25s; }
  .tl-dot.done::after { background: var(--gold); border-color: var(--gold); }
  .tl-dot.cur::after { left: 2px; top: 2px; width: 14px; height: 14px; background: var(--gold); border-color: var(--vellum); box-shadow: 0 0 0 4px rgba(226,181,81,0.22); }
  .tl-dot:hover::after { border-color: var(--gold); }
  .tl-year { position: absolute; top: 26px; transform: translateX(-50%); font-family: var(--body); font-size: 14px; font-variant-numeric: oldstyle-nums; color: var(--mist-dim); }
  .tl-year::before { content: ""; position: absolute; left: 50%; top: -14px; width: 1px; height: 8px; background: rgba(163,182,191,0.3); }

  /* ---------- Medallions ---------- */
  .medal {
    width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; box-sizing: border-box;
    background: radial-gradient(circle at 36% 30%, #bf4a30, #7a1d12 72%); border: 2px solid #561209; color: #f6e0c6;
    box-shadow: inset 0 0 0 2px rgba(255,214,180,0.14), inset 0 -3px 6px rgba(0,0,0,0.25), 0 3px 10px -4px rgba(0,0,0,0.7);
  }
  .medal svg { width: 54%; height: 54%; display: block; }
  .medal.locked { border-color: rgba(163,182,191,0.3); color: rgba(163,182,191,0.4); background: #0a1a24; box-shadow: none; }
  .medal.art { background: #e4d6b3; border: 0; padding: 0; overflow: hidden; box-shadow: 0 0 0 1px rgba(226,181,81,0.4), 0 3px 10px -4px rgba(0,0,0,0.7); }
  .medal.art.ghost { background: transparent; box-shadow: 0 0 0 1px rgba(163,182,191,0.25); }
  .medal.art.ghost img, .bigart.ghost img { opacity: 0.38; filter: grayscale(1); }
  .medal.art img { width: 100%; height: 100%; display: block; border-radius: 50%; }

  /* ---------- Sheets (contents, codex) ---------- */
  .overlay { position: fixed; inset: 0; z-index: 40; background: rgba(3,10,15,0.62); display: flex; justify-content: flex-end; }
  .sheet { width: min(460px, 100%); height: 100%; box-sizing: border-box; background: var(--night-2); border-left: 1px solid rgba(163,182,191,0.18); display: grid; grid-template-rows: auto 1fr auto; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .sheet header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid rgba(163,182,191,0.14); }
  .sheet h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--vellum); }
  .sheet footer { padding: 12px 20px 16px; border-top: 1px solid rgba(163,182,191,0.14); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .sheet footer p { margin: 0; font-size: 14px; color: var(--mist-dim); }
  .toc { list-style: none; margin: 0; padding: 8px 12px 16px; overflow-y: auto; overscroll-behavior: contain; }
  .toc li.cpart { font-family: var(--display-sc); font-size: 15px; letter-spacing: 0.08em; color: var(--gold); padding: 16px 8px 6px; }
  .toc li button { width: 100%; display: grid; grid-template-columns: 2.2em 1fr; column-gap: 8px; text-align: left; align-items: baseline; background: transparent; border: 0; border-radius: 3px; padding: 8px; cursor: pointer; color: var(--vellum); }
  .toc li button:hover { background: rgba(163,182,191,0.08); }
  .toc li button.here { background: rgba(226,181,81,0.12); }
  .toc .cno { font-family: var(--body); font-size: 16px; color: var(--mist-dim); text-align: right; font-variant-numeric: oldstyle-nums tabular-nums; }
  .toc .ct { font-family: var(--display); font-size: 19px; line-height: 1.2; }
  .toc .cw { grid-column: 2; font-family: var(--body); font-style: italic; font-size: 14.5px; font-variant-numeric: oldstyle-nums; color: var(--mist-dim); margin-top: 1px; }

  .codex-sheet { width: min(560px, 100%); }
  .codex-body { overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 20px; display: grid; gap: 18px; align-content: start; }
  .cprog { font-family: var(--display-sc); font-size: 14.5px; letter-spacing: 0.03em; color: var(--mist-dim); margin-right: auto; margin-left: 12px; }
  .cdetail { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: start; padding: 16px; border: 1px solid rgba(226,181,81,0.25); border-radius: 6px; background: linear-gradient(180deg, rgba(226,181,81,0.07), rgba(226,181,81,0.02)); }
  .cdetail .medal { width: 76px; height: 76px; grid-row: span 3; }
  .cdetail.has-art { grid-template-columns: minmax(0, 1fr); }
  .cdetail .bigart { justify-self: center; width: min(250px, 74%); max-width: 100%; aspect-ratio: 1; border-radius: 50%; margin: 2px 0 10px; background: #e4d6b3; box-shadow: 0 0 0 1px rgba(226,181,81,0.4), 0 16px 34px -14px rgba(0,0,0,0.85); }
  .cdetail .bigart.ghost { background: transparent; box-shadow: 0 0 0 1px rgba(163,182,191,0.25); }
  .cdetail .bigart img { width: 100%; height: 100%; display: block; border-radius: 50%; }
  .cdetail small { font-family: var(--display-sc); font-size: 13.5px; letter-spacing: 0.03em; color: var(--mist-dim); }
  .cdetail h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--vellum); }
  .cdetail p { margin: 4px 0 0; grid-column: 1 / -1; font-size: 16.5px; line-height: 1.5; color: var(--vellum); }
  .cdetail .acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
  .cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 12px 8px; }
  .cgrid .medal { width: 58px; height: 58px; }
  .cgrid button { background: transparent; border: 0; padding: 4px 0; cursor: pointer; display: grid; justify-items: center; gap: 5px; color: var(--mist-dim); border-radius: 6px; }
  .cgrid button:hover { background: rgba(163,182,191,0.07); }
  .cgrid button.sel { background: rgba(226,181,81,0.12); }
  .cgrid button span.cn { font-family: var(--body); font-size: 13px; line-height: 1.15; text-align: center; max-width: 76px; }
  .cgrid button.got span.cn { color: var(--vellum); }

  /* ---------- Toast ---------- */
  .toast {
    position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30;
    display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 40px; max-width: calc(100% - 32px); box-sizing: border-box;
    background: rgba(9,26,37,0.96); border: 1px solid var(--gold); box-shadow: 0 16px 34px -14px rgba(0,0,0,0.9); animation: toastIn .5s cubic-bezier(.2,.8,.3,1.2);
  }
  .toast .medal { width: 42px; height: 42px; flex: none; }
  .toast small { display: block; font-family: var(--display-sc); font-size: 13px; letter-spacing: 0.04em; color: var(--gold); }
  .toast b { display: block; font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--vellum); line-height: 1.15; }
  @keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }

  /* ---------- Phones and narrow windows ---------- */
  @media (max-width: 860px) {
    html, body { height: auto; }
    .app { height: auto; min-height: 100%; display: block; padding-inline: 16px; padding-block: 12px 0; }
    header.top { margin-bottom: 10px; }
    .brand h1 { font-size: 28px; }
    .ledger { gap: 6px 14px; }
    .stat .k { font-size: 12.5px; }
    .stat .v { font-size: 16.5px; }
    .stat.hide-narrow { display: none; }
    main.stage { display: block; }
    .globe-wrap { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; height: 38vh; min-height: 230px; max-height: 380px; background: var(--night); box-shadow: 0 10px 14px -10px rgba(0,0,0,0.8); }
    .legend { display: none; }
    .gstatus { display: block; position: absolute; left: 6px; top: 8px; font-family: var(--body); font-size: 14.5px; font-variant-numeric: oldstyle-nums; color: var(--vellum); background: rgba(7,20,29,0.76); border: 1px solid rgba(163,182,191,0.22); border-radius: 3px; padding: 4px 7px; pointer-events: none; }
    .follow { top: 8px; right: 6px; left: auto; transform: none; }
    .tip { top: 38px; left: 6px; right: 6px; max-width: none; font-size: 14px; }
    .gbtn .lg, .btn .lg, .tbtn .lg { display: none; }
    .journal { display: block; margin-top: 12px; }
    .booktools { margin-bottom: 10px; }
    .page { overflow: visible; box-shadow: inset 14px 0 18px -14px rgba(40,25,5,0.45); }
    .turners { position: sticky; bottom: 0; z-index: 6; margin-inline: -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--night) 72%, rgba(7,20,29,0)); }
    .timeline { margin: 18px 8px 24px; }
    .toast { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
    .cdetail .medal { width: 64px; height: 64px; }
  }

  /* ---------- Public site ---------- */
  .brand h1 a { color: inherit; text-decoration: none; }
  .toc li a { width: 100%; box-sizing: border-box; display: grid; grid-template-columns: 2.2em 1fr; column-gap: 8px; align-items: baseline; border-radius: 3px; padding: 8px; color: var(--vellum); text-decoration: none; }
  .toc li a:hover { background: rgba(163,182,191,0.08); }
  .toc li a.here { background: rgba(226,181,81,0.12); }
  .toc li a:focus-visible, .site-foot a:focus-visible, .obj a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  .gist { margin: 10px 0 2px; max-width: 60ch; font-style: italic; font-size: calc(var(--fs) * 0.93); line-height: 1.5; color: var(--ink-soft); }
  /* If the map can't start, the chapter reads as one continuous page. */
  .nojs .page .leaf[hidden] { display: block !important; }
  .nojs .page .leaf + .leaf { margin-top: 28px; border-top: 1px solid var(--rule); }
  .nojs .globe-tools, .nojs .booktools, .nojs .turners { visibility: hidden; }

  /* The index at the foot of every page */
  .site-foot { max-width: 1160px; margin: 0 auto; padding: 56px 20px calc(40px + env(safe-area-inset-bottom, 0px)); color: var(--mist); }
  .site-foot .sf-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 56px; }
  .site-foot h2 { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--vellum); }
  .site-foot p { margin: 0 0 12px; font-size: 17px; line-height: 1.55; max-width: 60ch; }
  .site-foot a { color: var(--gold); text-decoration: none; }
  .site-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .site-foot ol { margin: 0; padding: 0 0 0 1.9em; columns: 2; column-gap: 36px; font-size: 16.5px; line-height: 1.35; color: var(--mist-dim); }
  .site-foot ol li { break-inside: avoid; padding: 3px 0 6px; }
  .site-foot ol li span { display: block; font-style: italic; font-size: 14.5px; }
  .site-foot .sf-credits { margin: 36px 0 0; padding-top: 16px; border-top: 1px solid rgba(163,182,191,0.14); font-size: 14px; color: var(--mist-dim); max-width: none; }

  /* The codex gallery and other plain pages */
  html.plain, html.plain body { height: auto; }
  .plainwrap { max-width: 1160px; margin: 0 auto; padding: 14px 20px 0; }
  .gallery-head { margin: 36px 0 32px; max-width: 70ch; }
  .gallery-head h2 { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4vw, 46px); line-height: 1.05; color: var(--vellum); }
  .gallery-head p { margin: 0 0 10px; font-size: 18px; line-height: 1.55; }
  .gallery-head a { color: var(--gold); text-decoration: none; }
  .objgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 40px 28px; }
  .obj { margin: 0; scroll-margin-top: 16px; }
  .obj img { display: block; width: 100%; max-width: 300px; height: auto; aspect-ratio: 1; margin: 0 auto 14px; border-radius: 50%; background: #e4d6b3; box-shadow: 0 0 0 1px rgba(226,181,81,0.4), 0 16px 34px -14px rgba(0,0,0,0.85); }
  .obj h3 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.15; color: var(--vellum); }
  .obj .where { margin: 0 0 8px; font-family: var(--display-sc); font-size: 14px; letter-spacing: 0.03em; color: var(--mist-dim); }
  .obj .where a { color: var(--gold); text-decoration: none; }
  .obj p { margin: 0; font-size: 16.5px; line-height: 1.5; color: var(--vellum); }

  @media (max-width: 860px) {
    .site-foot { padding-top: 40px; }
    .site-foot .sf-cols { grid-template-columns: minmax(0, 1fr); }
    .site-foot ol { columns: 1; }
  }

  /* The shelf: the site's front page, one volume per voyage */
  .shelf .volume { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 40px; align-items: center; margin: 56px 0 32px; }
  .vol-cover { display: block; }
  .vol-cover img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; background: #e4d6b3; box-shadow: 0 0 0 1px rgba(226,181,81,0.4), 0 22px 44px -18px rgba(0,0,0,0.9); }
  .vol-no { margin: 0 0 6px; font-family: var(--display-sc); font-size: 15px; letter-spacing: 0.06em; color: var(--gold); }
  .volume h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: clamp(36px, 4.4vw, 52px); line-height: 1.02; color: var(--vellum); }
  .volume h2 a { color: inherit; text-decoration: none; }
  .vol-sub { margin: 0 0 18px; font-family: var(--display); font-style: italic; font-size: 17px; color: var(--mist); }
  .volume p { font-size: 18px; line-height: 1.55; max-width: 60ch; }
  .volume .btn { display: inline-block; margin-top: 6px; text-decoration: none; }
  @media (max-width: 860px) {
    .shelf .volume { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 28px; }
    .vol-cover { max-width: 280px; margin: 0 auto; }
  }

  /* Plain book pages: the brand is a plain line and the page's own title is the h1 */
  .brand .bname { margin: 0; font-family: var(--display); font-style: normal; font-weight: 400; font-size: clamp(26px, 3vw, 36px); line-height: 1.05; color: var(--vellum); }
  .brand .bname em { font-style: italic; color: var(--gold); }
  .brand .bname a { color: inherit; text-decoration: none; }
  .gallery-head h1 { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4vw, 46px); line-height: 1.05; color: var(--vellum); }
  .vol-links { font-size: 16px; color: var(--mist-dim); }
  .vol-links a { color: var(--gold); text-decoration: none; }
  .site-foot .sf-links { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; font-size: 17px; }

  /* Long-form pages: the summary, about */
  .prose { max-width: 72ch; margin: 36px 0 24px; }
  .prose h1 { margin: 0 0 14px; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4vw, 46px); line-height: 1.08; color: var(--vellum); text-wrap: balance; }
  .prose h2 { margin: 40px 0 12px; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.15; color: var(--vellum); }
  .prose h3 { margin: 28px 0 10px; font-family: var(--display-sc); font-weight: 400; font-size: 16px; letter-spacing: 0.06em; color: var(--gold); }
  .prose p, .prose li, .prose dd { font-size: 18px; line-height: 1.6; color: var(--mist); }
  .prose p { margin: 0 0 14px; }
  .prose .lead { font-size: 20px; line-height: 1.55; color: var(--vellum); }
  .prose strong { font-weight: 500; color: var(--vellum); }
  .prose a { color: var(--gold); text-decoration: none; }
  .prose a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .prose a.btn { display: inline-block; margin-top: 8px; color: var(--night); text-decoration: none; }
  .prose a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  .facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0; }
  .facts dt { padding-top: 3px; font-family: var(--display-sc); font-size: 15px; letter-spacing: 0.04em; color: var(--mist-dim); }
  .facts dd { margin: 0; }
  .chlist { margin: 0; padding-left: 2.2em; }
  .chlist li { margin: 0 0 14px; padding-left: 4px; }
  .chlist li::marker { color: var(--mist-dim); }
  .chlist .where { display: block; font-style: italic; font-size: 15px; color: var(--mist-dim); }
  .chlist p { margin: 2px 0 0; }
  @media (max-width: 860px) {
    .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .facts dd { margin-bottom: 10px; }
  }
