/* Scrapbook, for /worlds/indiana-jones/ and /grail-diary/ (style: scrapbook).

   The Grail Diary is Henry Jones Sr.'s scrapbook already: clippings,
   rubbings, sketches and tickets pasted into one book. So the world page is
   the field case the diary travels in, opened at night: black card pages
   with a fibre in them, prints in their white margins held by kraft photo
   corners, typed labels, notes held down with tape, and for each film a
   luggage label and a ticket stub, one per journey. The diary keeps its
   paper on its desk and takes the same pasted-in pieces: every site a stub
   torn at a perforation, the map mounted in photo corners, the other
   notebooks as luggage labels, the way back to the world page a ticket.

   One file for the pair, in three parts: the shared materials; the world
   page; the Grail Diary. The spec: docs/superpowers/specs/2026-10-11-page-
   styles-design.md, section 9, "Indiana Jones: Scrapbook".

   The risk is clutter, so: nothing turns 2 degrees or more (tape aside, as
   tape is never laid straight), tape is the only ornament, and the records
   (the index of everything, the LEGO tallies, the links) sit flat. Headings
   are typed in the diary's own typewriter, Special Elite, one font file for
   both pages; reading text stays Inter and labels stay JetBrains Mono.

   Everything is scoped to :root[data-style="scrapbook"]. Material rules use
   :where() for that scope where the page's own hover and focus must still
   win, and the full scope where a page's hover would otherwise paint over
   the paper (a hover that swaps a ticket for a tinted glass would leave
   dark ink on a dark ground). */

/* ── 1. shared: card, prints, labels, tickets, tape ─────────────────────── */
:root[data-style="scrapbook"] {
  --sb-card: #17120d;                 /* black album card */
  --sb-print: #1b1612;                /* a dark print, inside its margin */
  --sb-margin: #e6dcc7;               /* a print's white margin, gone ivory */
  --sb-corner: #b48e57;               /* gummed kraft photo corners */
  --sb-corner-2: #75572d;
  --sb-kraft: #c49a5c;                /* luggage label */
  --sb-manila: #dcc596;
  --sb-stock: #ebdfc0;                /* ticket card */
  --sb-ink: #2b1e10;                  /* typed ink */
  --sb-ink-2: #55391b;
  --sb-red: #9c3119;                  /* a ticket's red print */
  --sb-cream: #efe3c4;                /* white ink, on the black pages */
  --sb-line: rgba(220, 197, 150, .2);
  --sb-type: "Special Elite", "Courier New", monospace;
  /* tape: the diary's own gummed strip, laid on both pages */
  --sb-tape: linear-gradient(170deg, rgba(240, 226, 192, .62), rgba(205, 180, 128, .48));
  /* the card's fibre: a few short pale strands and flecks, drawn, not noise */
  --sb-fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg stroke='%23e6d6b0' stroke-opacity='.2' stroke-width='.8' stroke-linecap='round' fill='none'%3E%3Cpath d='M14 22l9 3M60 80l-4 7M120 30l10-2M200 54l6 6M236 120l-8 3M170 150l3 9M98 140l-9 4M30 190l7-5M140 220l9 1M220 210l-3 8M80 240l6-2M250 20l-5 6'/%3E%3C/g%3E%3Cg fill='%23e6d6b0' fill-opacity='.16'%3E%3Ccircle cx='44' cy='120' r='.9'/%3E%3Ccircle cx='150' cy='96' r='.8'/%3E%3Ccircle cx='206' cy='176' r='1'/%3E%3Ccircle cx='110' cy='196' r='.8'/%3E%3Ccircle cx='12' cy='250' r='.9'/%3E%3C/g%3E%3C/svg%3E");

  --s-surface: var(--sb-print);
  --s-surface-hi: #221c17;
  --s-edge: rgba(220, 197, 150, .26);
  --s-bw: 1px;
  --s-r: 2px;
  --s-r-sm: 2px;
  --s-shadow: 0 14px 24px -16px rgba(0, 0, 0, .95);
  --s-shadow-hi: 0 22px 34px -18px rgba(0, 0, 0, .95);
  --s-lift: -3px;
  --s-display: "Special Elite", "Courier New", monospace;
  --s-display-w: 400;
  --s-display-ls: 0.01em;
  /* lamp-lit brass for the keyboard ring: every ring sits on dark card or
     the desk, never on the paper, so one colour holds 3:1 everywhere */
  --s-focus: #ffd27a;

  /* the bars: strips of the same black card, no glass */
  --s-bar: rgba(18, 14, 10, .94);
  --s-bar-edge: rgba(220, 197, 150, .2);
  --s-bar-r: 4px;
  --s-bar-blur: none;
  --s-bar-shadow: 0 14px 28px -16px rgba(0, 0, 0, .9);

  /* the film grain stays (it is the card's tooth); no circuits, no grid, no
   scanlines in an album; the cursor's halo is torchlight */
  --s-grain: .06;
  --s-field: 0;
  --hud-grid: transparent;
  --hud-scan: transparent;
  --hud-sweep: transparent;
  --hud-lit: transparent;
  --hud-halo: rgba(255, 190, 100, .07);
}
@media (prefers-contrast: more) {
  :root[data-style="scrapbook"] { --sb-ink-2: #3d2810; --sb-line: rgba(220, 197, 150, .45); --s-edge: rgba(220, 197, 150, .5); }
}
@media (prefers-reduced-transparency: reduce) {
  :root[data-style="scrapbook"] { --sb-tape: linear-gradient(#d9c9a2, #d9c9a2); }
}

/* Photo corners: four kraft triangles, each with a darker fold along its
   long edge, laid over the corners of a print (--c is their size). */
:root[data-style="scrapbook"] .fan-card::after,
:root[data-style="scrapbook"] .ij-stage::after,
:root[data-style="scrapbook"] .fan-shot > a::after,
:root[data-style="scrapbook"] .gd-leaf--l::after {
  --c: 20px;
  content: ""; position: absolute; inset: -9px; pointer-events: none; z-index: 1;
  background:
    linear-gradient(135deg, var(--sb-corner) 0 46%, var(--sb-corner-2) 0 50%, transparent 0) 0 0 / var(--c) var(--c),
    linear-gradient(225deg, var(--sb-corner) 0 46%, var(--sb-corner-2) 0 50%, transparent 0) 100% 0 / var(--c) var(--c),
    linear-gradient(315deg, var(--sb-corner) 0 46%, var(--sb-corner-2) 0 50%, transparent 0) 100% 100% / var(--c) var(--c),
    linear-gradient(45deg, var(--sb-corner) 0 46%, var(--sb-corner-2) 0 50%, transparent 0) 0 100% / var(--c) var(--c);
  background-repeat: no-repeat;
}

/* Tape, one strip per piece, laid across its top (or its ends) */
:root[data-style="scrapbook"] :is(.fan-tile, .fan-quote, .fan-intro-when, .fan-title, .gd-panel)::before,
:root[data-style="scrapbook"] :is(.fan-title, .gd-panel)::after {
  content: ""; position: absolute; pointer-events: none; z-index: 2;
  width: 58px; height: 19px; top: -9px; left: calc(50% - 29px);
  rotate: -4deg;
}
:root[data-style="scrapbook"] :is(.fan-tile, .fan-quote, .fan-intro-when, .fan-title, .gd-panel)::before,
:root[data-style="scrapbook"] :is(.fan-title, .gd-panel)::after,
:root[data-style="scrapbook"] .gd-tape {
  background: var(--sb-tape);
  border-inline: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .28);
}

/* The luggage label: kraft card, its left end cut off at the corners and
   punched with a reinforced eyelet. The hole shows whatever the label is
   tied over (--hole). Not a control anywhere, so clip-path can cut it. */
:root[data-style="scrapbook"] #films .fan-num,
:root[data-style="scrapbook"] .gd-trial-n {
  --hole: var(--sb-stock);
  display: grid; place-items: center; flex: none;
  width: 3.9rem; height: 2.4rem; min-width: 0; padding-left: 0.95rem;
  border: 0; border-radius: 0; opacity: 1;
  background: radial-gradient(circle at 0.72rem 50%, var(--hole) 0 3.5px, #8d6a3a 4px 6.5px, transparent 7px), var(--sb-kraft);
  clip-path: polygon(0.6rem 0, 100% 0, 100% 100%, 0.6rem 100%, 0 calc(100% - 0.6rem), 0 0.6rem);
  font-family: var(--s-display); font-weight: 400; font-size: 1.15rem; line-height: 1;
  letter-spacing: 0.04em; color: var(--sb-ink);
}

/* ── 2. the world page: the field case, open at night ───────────────────── */

/* only the tab bar takes the world's colour; items keep their own --a */
:root[data-style="scrapbook"] .tabbar { --s-accent: var(--a); }

/* The ground is a black album page with its fibre. The map's hatching goes
   (card is not hatched); the red route, its pins, the airplane, the ruins
   and the torches stay, as the world's own set pieces. The sky is capped
   at .36 by fanpages.css, so the fibre is drawn strong. */
:root[data-style="scrapbook"] .ij-sky {
  background: var(--sb-fibre), radial-gradient(90% 70% at 50% 0%, #241c13 0%, #130f0b 50%, #0a0807 100%);
}
:root[data-style="scrapbook"] .ij-sky::before { opacity: 0; }

/* The title is a typed label, pasted onto the page with a strip of tape at
   each end. Out-specifies the page's own Georgia small caps. */
:root[data-style="scrapbook"] .fan-title {
  position: relative; display: inline-block;
  padding: 0.2em 0.45em 0.12em; margin-bottom: 1.3rem;
  font-family: var(--s-display); font-weight: 400; font-variant: normal;
  font-size: clamp(2.3rem, 6.4vw, 5rem); line-height: 1; letter-spacing: 0.02em;
  color: var(--sb-ink);
  background: var(--sb-fibre), linear-gradient(172deg, #e6d2a6, #d3ba86);
  background-color: var(--sb-manila);
  box-shadow: 0 16px 26px -18px #000;
  rotate: -1.2deg;
}
:root[data-style="scrapbook"] .fan-title::before { top: -0.12em; left: -0.32em; rotate: -36deg; width: 64px; }
:root[data-style="scrapbook"] .fan-title::after { top: auto; bottom: -0.1em; left: auto; right: -0.32em; rotate: -36deg; width: 64px; }

/* section heads typed in white ink, the rule after them a perforation */
:root[data-style="scrapbook"] .subsec--fan {
  font-family: var(--s-display); font-weight: 400; font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: 0.02em; text-transform: none; color: var(--sb-cream);
}
:root[data-style="scrapbook"] .subsec--fan .subsec-yr {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: #a39a88;
}
:root[data-style="scrapbook"] .subsec--fan::after {
  height: 0; background: none; border-top: 2px dashed rgba(220, 197, 150, .28);
}
:root[data-style="scrapbook"] :is(.fan-card :is(h2, h3, h4, h5), .fan-rankhead b, .fan-tiletext b, .fan-land-head h3, .fan-linkhead b, .fan-shot figcaption b, .fan-quote blockquote, .fan-art-body q, .wsib-h b) {
  font-family: var(--s-display); font-weight: 400; letter-spacing: 0.01em;
}

/* An item's own colour, set on a dark print: lifted a quarter toward white
   so the darker leathers still read. :where keeps the shared rules' weight,
   so hovering and playing still win. */
:root[data-style="scrapbook"] :is(.fan-tiletext i, .fan-card .fan-sub) { color: color-mix(in srgb, var(--a) 75%, #fff); opacity: 1; }
:where(:root[data-style="scrapbook"]) :is(.fan-tag, .fan-visit, .fan-hear) { color: color-mix(in srgb, var(--a) 75%, #fff); }

/* the hero's links are small paper tags, punched for their string */
:where(:root[data-style="scrapbook"]) :is(.fan-link, .wsib-i a) { background: #1d1813; border-color: rgba(220, 197, 150, .55); }
:root[data-style="scrapbook"] .fan-link::before {
  content: ""; flex: none; width: 7px; height: 7px; margin-left: -0.35rem; border-radius: 50%;
  background: #0b0908; box-shadow: 0 0 0 1.5px rgba(220, 197, 150, .7);
}

/* The door to the diary is a ticket: card stock printed with a frame, the
   arrow on its stub past a perforation, notches bitten at the tear. */
:root[data-style="scrapbook"] .fan-iface {
  --tear: calc(100% - 3.4rem);
  border: 0; border-radius: 3px; color: var(--sb-ink);
  background:
    radial-gradient(circle at var(--tear) 0, #0c0a08 0 7px, transparent 7.5px),
    radial-gradient(circle at var(--tear) 100%, #0c0a08 0 7px, transparent 7.5px);
  background-color: var(--sb-stock);
  box-shadow: inset 0 0 0 4px var(--sb-stock), inset 0 0 0 5px rgba(43, 30, 16, .3), 0 14px 24px -16px #000;
  rotate: -0.8deg;
}
:root[data-style="scrapbook"] .fan-iface-k { color: var(--sb-red); }
:root[data-style="scrapbook"] .fan-iface-a {
  width: 2.6rem; height: 100%; min-height: 2.4rem; justify-self: end;
  border: 0; border-left: 2px dashed rgba(43, 30, 16, .4); border-radius: 0;
  color: var(--sb-red);
}

/* the whip and the hat: a print, in its margin and corners */
:root[data-style="scrapbook"] .fan-art--ij .ij-stage {
  position: relative; overflow: visible; border-radius: 1px;
  border: 9px solid var(--sb-margin);
  box-shadow: 0 22px 34px -20px #000;
  rotate: -1.4deg;
}
:root[data-style="scrapbook"] .fan-art--ij .ij-stage figcaption { color: #a39a88; }
:root[data-style="scrapbook"] .fan-art-body q { font-size: clamp(1.1rem, 2.2vw, 1.4rem); font-style: normal; color: var(--sb-cream); }

/* "When I got into it": a note on black card, taped at its top edge, laid
   straight (it is a date, and on a phone it runs edge to edge) */
:where(:root[data-style="scrapbook"]) .fan-intro-when {
  position: relative; border: 1px solid var(--sb-line); border-radius: 2px;
  background: var(--sb-card); box-shadow: var(--s-shadow);
}
:root[data-style="scrapbook"] .fan-intro-when::before { left: auto; right: 1.4rem; top: -10px; rotate: 5deg; }

/* The signature: each film a ticket stub, one per journey. Card stock in a
   different colour each, a printed frame, the year on the stub past a
   perforation with notches bitten at the tear, the release, the setting and
   the places along the foot as the route. Its numeral is on a kraft
   luggage label. Each stub is pasted at its own small angle. */
:root[data-style="scrapbook"] #films .fan-rank { gap: 1.2rem; padding-top: 0.4rem; }
:root[data-style="scrapbook"] #films .fan-rankrow {
  --stock: var(--sb-stock); --stub: 6.4rem; --r: -1.1deg;
  position: relative; width: min(100%, 54rem);
  padding: 1.15rem calc(var(--stub) + 1.2rem) 1.1rem 1.1rem;
  border: 0; border-radius: 3px; color: var(--sb-ink);
  background:
    radial-gradient(circle at calc(100% - var(--stub)) 0, #0c0a08 0 8px, transparent 8.5px),
    radial-gradient(circle at calc(100% - var(--stub)) 100%, #0c0a08 0 8px, transparent 8.5px);
  background-color: var(--stock);
  box-shadow: inset 0 0 0 5px var(--stock), inset 0 0 0 6px rgba(43, 30, 16, .26), 0 16px 26px -18px #000;
  rotate: var(--r);
}
:root[data-style="scrapbook"] #films .fan-rankrow:nth-child(2) { --stock: #e7c7ae; --r: 0.8deg; }
:root[data-style="scrapbook"] #films .fan-rankrow:nth-child(3) { --stock: #d3dbbb; --r: -0.5deg; }
:root[data-style="scrapbook"] #films .fan-rankrow:nth-child(4) { --stock: #c9d6d8; --r: 1.2deg; }
:root[data-style="scrapbook"] #films .fan-rankrow:nth-child(5) { --stock: #ead59c; --r: -0.8deg; }
@media (min-width: 900px) {
  :root[data-style="scrapbook"] #films .fan-rankrow:nth-child(even) { margin-left: clamp(0rem, 7vw, 7rem); }
}
:root[data-style="scrapbook"] #films .fan-rankrow::after {
  content: ""; position: absolute; top: 12px; bottom: 12px; right: var(--stub);
  border-left: 2px dashed rgba(43, 30, 16, .4); pointer-events: none;
}
:root[data-style="scrapbook"] #films .fan-num { --hole: var(--stock); }
:root[data-style="scrapbook"] #films .fan-rankhead b { font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.15; color: var(--sb-ink); }
:root[data-style="scrapbook"] #films .fan-rankhead i {
  position: absolute; top: 0; bottom: 0; right: 0; width: var(--stub);
  display: grid; place-items: center;
  font-size: 1.1rem; letter-spacing: 0.12em; color: var(--sb-red);
}
:root[data-style="scrapbook"] #films .fan-rankdesc { font-size: 0.9rem; color: var(--sb-ink-2); }
:root[data-style="scrapbook"] #films .fan-rankmeta {
  margin-top: 0.45rem; padding-top: 0.5rem; border-top: 1px solid rgba(43, 30, 16, .22);
  font-size: 0.7rem; color: var(--sb-red);
}
/* on a phone the stub tears off the foot instead of the side */
@media (max-width: 640px) {
  :root[data-style="scrapbook"] #films .fan-rankrow {
    --stub: 2.8rem; gap: 0.8rem; padding: 1rem 1rem calc(var(--stub) + 0.7rem);
    background:
      radial-gradient(circle at 0 calc(100% - var(--stub)), #0c0a08 0 8px, transparent 8.5px),
      radial-gradient(circle at 100% calc(100% - var(--stub)), #0c0a08 0 8px, transparent 8.5px);
    background-color: var(--stock);
  }
  :root[data-style="scrapbook"] #films .fan-rankrow::after {
    top: auto; bottom: var(--stub); left: 12px; right: 12px; border-left: 0; border-top: 2px dashed rgba(43, 30, 16, .4);
  }
  :root[data-style="scrapbook"] #films .fan-rankhead i { top: auto; left: 0; width: auto; height: var(--stub); }
  :root[data-style="scrapbook"] #films .fan-num { width: 3.3rem; height: 2.1rem; font-size: 1rem; }
}
/* the one authored moment: a stub is pressed flat onto the page as it
   scrolls in, from a little more than its resting angle */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    :root[data-style="scrapbook"] #films .fan-rankrow {
      animation: sb-press linear backwards; animation-timeline: view(); animation-range: entry 5% entry 95%;
    }
  }
  :root[data-style="scrapbook"] :is(#films .fan-rankrow, .fan-card, .fan-shot, .fan-quote, .fan-tile) {
    transition: rotate .35s var(--ease), transform .35s var(--ease), box-shadow .35s;
  }
}
@keyframes sb-press { from { rotate: calc(var(--r) * 1.6); scale: 1.03; } to { rotate: var(--r); scale: 1; } }

/* Prints: a dark photograph in its ivory margin, in kraft corners, each
   pasted at its own small angle. The page's hover would tint the margin, so
   the margin is held at full weight. */
:root[data-style="scrapbook"] .fan-card {
  --r: -0.7deg;
  border: 7px solid var(--sb-margin); border-radius: 1px;
  background: radial-gradient(130% 90% at 28% 12%, #241e18, var(--sb-print) 70%);
  background-color: var(--sb-print);
  box-shadow: var(--s-shadow);
  rotate: var(--r);
}
:root[data-style="scrapbook"] .fan-card:nth-child(4n+2) { --r: 0.6deg; }
:root[data-style="scrapbook"] .fan-card:nth-child(4n+3) { --r: -0.3deg; }
:root[data-style="scrapbook"] .fan-card:nth-child(4n) { --r: 0.9deg; }
:root[data-style="scrapbook"] .fan-card::after { inset: -9px; }
:root[data-style="scrapbook"] .ij-stage::after { inset: -11px; }
:root[data-style="scrapbook"] .fan-shot > a::after { inset: -2px; }
:root[data-style="scrapbook"] .fan-card .fan-meta { font-size: 0.7rem; color: #96938b; }

/* tags on a print: square-cut paper, not pills */
:where(:root[data-style="scrapbook"]) .fan-tag { border-radius: 1px; justify-self: start; font-size: 0.66rem; }

/* my own photographs: the same prints, the caption under each in white ink
   on the page, the way an album is captioned */
:where(:root[data-style="scrapbook"]) .fan-shot {
  --r: 1deg; overflow: visible; border: 0; border-radius: 0; background: none; rotate: var(--r);
}
:where(:root[data-style="scrapbook"]) .fan-shot:nth-child(even) { --r: -0.8deg; }
:root[data-style="scrapbook"] .fan-shot > a {
  position: relative; display: block; padding: 9px; background-color: var(--sb-margin);
  box-shadow: 0 18px 28px -18px #000;
}
:where(:root[data-style="scrapbook"]) .fan-shot figcaption { border-top: 0; padding: 0.95rem 0.2rem 0.4rem; }
:root[data-style="scrapbook"] .fan-shot figcaption b { color: var(--sb-cream); font-size: 1.05rem; }

/* the LEGO screenshots are small prints too, in a narrow margin */
:where(:root[data-style="scrapbook"]) .fan-tileshot { border: 3px solid var(--sb-margin); border-radius: 1px; }

/* Tiles: notes on black card, each held by one strip of tape. The LEGO
   tallies are records, so they keep flat; the rest lie a little askew. */
:where(:root[data-style="scrapbook"]) .fan-tile {
  background: var(--sb-card); border-color: var(--sb-line); box-shadow: var(--s-shadow);
}
:root[data-style="scrapbook"] .fan-tiles:not(.fan-tiles--switch) > .fan-tile:nth-child(odd) { rotate: -0.5deg; }
:root[data-style="scrapbook"] .fan-tiles:not(.fan-tiles--switch) > .fan-tile:nth-child(3n) { rotate: 0.6deg; }
:root[data-style="scrapbook"] .fan-tile::before { top: -10px; width: 52px; left: calc(50% - 26px); rotate: 3deg; }
:where(:root[data-style="scrapbook"]) .fan-swatch { border-radius: 1px; box-shadow: none; }
:root[data-style="scrapbook"] .fan-tile.is-done .fan-swatch { box-shadow: none; }

/* The lines: typed on strips of card and taped in at one end. Held at full
   weight, because the page's hover swaps the background for a tint. */
:root[data-style="scrapbook"] .fan-quote {
  --r: -0.6deg;
  position: relative; border-left: 0; border-radius: 1px;
  background: linear-gradient(176deg, #f1e6cb, #e4d4ae); background-color: var(--sb-stock);
  box-shadow: 0 14px 22px -16px #000; rotate: var(--r);
}
:root[data-style="scrapbook"] .fan-quote:nth-child(even) { --r: 0.7deg; }
:root[data-style="scrapbook"] .fan-quote:nth-child(3n) { --r: -0.2deg; }
:root[data-style="scrapbook"] .fan-quote::before { top: -8px; left: -14px; rotate: -32deg; width: 50px; }
:root[data-style="scrapbook"] .fan-quote blockquote { font-size: 1.12rem; color: var(--sb-ink); }
:root[data-style="scrapbook"] .fan-quote figcaption { color: var(--sb-red); }

/* The records sit flat and plain on black card: the index of everything,
   the links out, the interactive strip. */
:where(:root[data-style="scrapbook"]) :is(.fan-land, .fan-linkcard) {
  background: var(--sb-card); border-color: var(--sb-line); border-radius: 2px;
}
:where(:root[data-style="scrapbook"]) .fan-land-bar { height: 2px; background: var(--a); }
/* the whip's heading is typed like the section heads, in the same white ink */
:root[data-style="scrapbook"] .fp-head :is(h2, h3) {
  font-family: var(--s-display); font-weight: 400; font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: 0.02em; text-transform: none; color: var(--sb-cream);
}
:where(:root[data-style="scrapbook"]) :is(.fp-bar, .fp-out) { background: var(--sb-card); border-color: var(--sb-line); border-radius: 2px; }
:where(:root[data-style="scrapbook"]) .fp-slot { background: #1f1913; border-color: rgba(220, 197, 150, .28); box-shadow: none; }
:where(:root[data-style="scrapbook"]) .fp-go { border-radius: 2px; }

@media (hover: hover) {
  :root[data-style="scrapbook"] :is(#films .fan-rankrow, .fan-card, .fan-shot, .fan-quote):hover { rotate: 0deg; }
  :root[data-style="scrapbook"] #films .fan-rankrow:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 5px var(--stock), inset 0 0 0 6px rgba(43, 30, 16, .26), var(--s-shadow-hi); }
  :root[data-style="scrapbook"] .fan-card:hover { border-color: #f3ead6; box-shadow: var(--s-shadow-hi); }
  :root[data-style="scrapbook"] .fan-shot:hover { box-shadow: none; }
  :root[data-style="scrapbook"] .fan-quote:hover { transform: translateY(-3px); background-color: #f4ead3; box-shadow: var(--s-shadow-hi); }
  :root[data-style="scrapbook"] .fan-iface:hover { background-color: #f3e8cd; }
}

/* ── 3. the Grail Diary: its paper and desk, with the same pieces ─────────
   Everything the diary does stays: the open book, the drawn map and its
   line, the pasted sites, the trials, the leap and the bridge, the torch. */

/* each site's colour is printed ink on paper now, darkened toward the
   ink until its label reads (the yellow was 1.9:1 on the paper) */
:root[data-style="scrapbook"] .gd-k { color: color-mix(in srgb, var(--c) 40%, var(--sb-ink)); }

/* the left leaf's drawing is a plate tipped into the diary, in corners */
:root[data-style="scrapbook"] .gd-leaf--l::after { --c: clamp(18px, 2vw, 26px); inset: clamp(0.45rem, 1vw, 0.8rem); }

/* the kicker is a typed label pasted on the right leaf */
:root[data-style="scrapbook"] .gd-kicker {
  display: inline-block; padding: 0.22rem 0.55rem 0.18rem;
  background: #f4ead2; box-shadow: 0 3px 8px -3px rgba(59, 42, 22, .55); rotate: -1deg;
}

/* the map, mounted: an ivory margin, kraft corners and a drop shadow, all
   painted as the frame's background, because the frame scrolls and a drawn
   corner would scroll away with the map */
:root[data-style="scrapbook"] .gd-mapframe {
  --c: 30px;
  border: 8px solid transparent; border-radius: 1px;
  background:
    linear-gradient(135deg, var(--sb-corner) 0 46%, var(--sb-corner-2) 0 50%, transparent 0) 0 0 / var(--c) var(--c) no-repeat border-box,
    linear-gradient(225deg, var(--sb-corner) 0 46%, var(--sb-corner-2) 0 50%, transparent 0) 100% 0 / var(--c) var(--c) no-repeat border-box,
    linear-gradient(315deg, var(--sb-corner) 0 46%, var(--sb-corner-2) 0 50%, transparent 0) 100% 100% / var(--c) var(--c) no-repeat border-box,
    linear-gradient(45deg, var(--sb-corner) 0 46%, var(--sb-corner-2) 0 50%, transparent 0) 0 100% / var(--c) var(--c) no-repeat border-box,
    linear-gradient(170deg, #2d2416, #1a130b) padding-box,
    var(--sb-margin) border-box;
  box-shadow: 0 26px 40px -24px #000;
}

/* Every site is a ticket now: its year is the stub, torn off along a
   perforation with a bite out of each edge. The tape it was pasted with
   is the same tape as the world page's. */
:root[data-style="scrapbook"] .gd-y {
  position: relative; margin: auto -1rem -1rem; padding: 0.55rem 1rem 0.95rem;
  border-top: 2px dashed rgba(59, 42, 22, .38);
  background: rgba(154, 59, 36, .07);
}
:root[data-style="scrapbook"] .gd-y::before,
:root[data-style="scrapbook"] .gd-y::after {
  content: ""; position: absolute; top: -8px; left: 0; width: 7px; height: 14px;
  border-radius: 0 7px 7px 0; background: #241a10; pointer-events: none;
}
:root[data-style="scrapbook"] .gd-y::after { left: auto; right: 0; border-radius: 7px 0 0 7px; }


/* the trials and the other notebooks: black album card pasted on the
   desk, the world page's own material, taped at its two top corners */
:root[data-style="scrapbook"] .gd-panel {
  --panel: #16110c;
  position: relative; border: 1px solid rgba(216, 176, 106, .2); border-radius: 2px;
  background: var(--sb-fibre), var(--panel); background-color: var(--panel);
  box-shadow: 0 26px 40px -24px #000;
}
:root[data-style="scrapbook"] .gd-panel::before { left: -14px; top: -6px; rotate: -38deg; }
:root[data-style="scrapbook"] .gd-panel::after { left: auto; right: -14px; top: -6px; rotate: 38deg; }

/* the trials are numbered on the same kraft labels as the films */
:root[data-style="scrapbook"] .gd-trial-n { --hole: var(--panel); font-family: var(--titl); }

/* the other men's notebooks are luggage labels: manila, cut at the left
   corners, punched with an eyelet. Painted, not clipped, so the keyboard
   ring is never cut off; the cuts and the hole are the panel's own black. */
:root[data-style="scrapbook"] .gd-note {
  position: relative; padding-left: 1.9rem; border: 0; border-radius: 2px;
  background:
    linear-gradient(135deg, var(--panel) 0 7px, transparent 7.5px) 0 0 / 50% 50% no-repeat,
    linear-gradient(45deg, var(--panel) 0 7px, transparent 7.5px) 0 100% / 50% 50% no-repeat,
    radial-gradient(circle at 0.85rem 50%, var(--panel) 0 3.5px, #9a7944 4px 6.5px, transparent 7px);
  background-color: var(--sb-manila);
  box-shadow: 0 8px 14px -8px rgba(0, 0, 0, .8);
}
:root[data-style="scrapbook"] .gd-notes > li:nth-child(odd) .gd-note { rotate: -0.5deg; }
:root[data-style="scrapbook"] .gd-notes > li:nth-child(3n) .gd-note { rotate: 0.6deg; }
:root[data-style="scrapbook"] .gd-note-k { color: var(--sb-ink-2); }
:root[data-style="scrapbook"] .gd-note b { color: var(--sb-ink); }
:root[data-style="scrapbook"] .gd-note i { color: var(--sb-ink-2); }

/* the leap is an admission ticket, bitten at both ends */
:root[data-style="scrapbook"] .gd-leap {
  border: 0; border-radius: 3px; color: var(--sb-ink);
  padding-inline: 2.2rem;
  background:
    radial-gradient(circle at 0 50%, #201810 0 9px, transparent 9.5px),
    radial-gradient(circle at 100% 50%, #201810 0 9px, transparent 9.5px);
  background-color: var(--sb-stock);
  box-shadow: 0 14px 24px -14px #000;
}

/* The world button is a ticket too, the other half of the world page's
   ticket to the diary: card stock, a perforation before the arrow and a
   bite at each end of it, all painted, so the button keeps its exact box. */
:root[data-style="scrapbook"] .gd .iw {
  --iw-a: #d8b06a; --hole: #17110a;
  border-color: var(--sb-stock); border-radius: 3px; color: var(--sb-ink);
  background:
    radial-gradient(circle at calc(100% - 1.95rem) 0, var(--hole) 0 6px, transparent 6.5px),
    radial-gradient(circle at calc(100% - 1.95rem) 100%, var(--hole) 0 6px, transparent 6.5px),
    linear-gradient(rgba(43, 30, 16, .4) 50%, transparent 0) calc(100% - 1.95rem) 0 / 2px 7px repeat-y;
  background-color: var(--sb-stock);
  box-shadow: 0 10px 18px -12px #000;
}
:root[data-style="scrapbook"] .gd .iw--foot { --hole: #1e160d; }
:root[data-style="scrapbook"] .gd .iw-i { background: var(--sb-kraft); color: var(--sb-ink); }
:root[data-style="scrapbook"] .gd .iw-k { opacity: 1; color: var(--sb-ink-2); }
:root[data-style="scrapbook"] .gd .iw-t b { color: var(--sb-ink); }
:root[data-style="scrapbook"] .gd .iw-a { opacity: 1; color: var(--sb-red); }

/* one ring for every control on the diary, in the world page's brass */
:root[data-style="scrapbook"] .gd :is(.gd-note, .gd-leap, .iw, .gd-exit, .gd-torch-btn, .gd-done a):focus-visible,
:root[data-style="scrapbook"] .gd .gd-site:focus-visible .gd-card {
  outline: 2px solid var(--s-focus); outline-offset: 3px;
}

@media (hover: hover) {
  :root[data-style="scrapbook"] .gd .gd-note:hover { background-color: #e7d4aa; }
  :root[data-style="scrapbook"] .gd .gd-leap:hover { background-color: #f5ebd2; }
  :root[data-style="scrapbook"] .gd .iw:hover { border-color: #f5ebd2; background-color: #f5ebd2; box-shadow: 0 14px 22px -12px #000; }
}
