/* Realism pass on the v3 bookcase. Same structure and motion as v3; what changes is the
   material: real textures, one light source for the whole case, seven binding types,
   and wear that is deliberate per book rather than one gradient on everything. */

:root {
  --tex-cloth: url("../assets/tex/cloth.webp"); --tex-leather: url("../assets/tex/leather.webp"); --tex-paper: url("../assets/tex/paper.webp");
  --tex-oak: url("../assets/tex/oak.webp"); --tex-marble: url("../assets/tex/marble.webp"); --foil-mask: url("../assets/tex/foil-mask.webp");
  --foil: linear-gradient(180deg, #6b4c20 0%, #b8913f 22%, #f1dc9c 42%, #fff4cf 50%, #d9b866 60%, #8a6a2c 80%, #5e431a 100%);
}

/* ---------- the case ---------- */
.bookcase { position: relative; border-radius: 3px; padding: 12px 12px 0;
  background: linear-gradient(180deg, rgba(255,236,205,.08), rgba(0,0,0,.18)), var(--tex-oak) 0 0 / 512px 256px, #8a6540;
  box-shadow: inset 0 1px 0 rgba(255,236,205,.28), inset 0 -1px 0 rgba(0,0,0,.4), 0 2px 0 #3a2617, 0 30px 44px -30px rgba(30,15,5,.85); }
/* the back panel sits inside the face frame, darker and in shadow under the top rail */
.case-in { position: relative; overflow: hidden; border-radius: 1px;
  background: linear-gradient(180deg, rgba(8,3,0,.86), rgba(8,3,0,.6) 16%, rgba(8,3,0,.5) 55%, rgba(8,3,0,.66)), linear-gradient(rgba(70,46,28,.6), rgba(70,46,28,.6)), var(--tex-oak) 140px 0 / 1024px 512px, #4a321f;
  box-shadow: inset 0 22px 26px -12px rgba(0,0,0,.85), inset 0 3px 2px -1px rgba(0,0,0,.7); }
/* the inner side walls, seen at a slant: the right one faces the lamp, the left one turns away */
.case-in::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.7), rgba(0,0,0,.35) 10px, rgba(0,0,0,0) 26px, rgba(0,0,0,0) calc(100% - 24px), rgba(255,232,196,.06) calc(100% - 14px), rgba(0,0,0,.25) 100%); }
/* one lamp, up and to the left of the case, lights everything on the shelf at once */
.case-in::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: multiply;
  background: radial-gradient(120% 140% at 18% -10%, #fff 0 30%, #e9ddd0 55%, #b9a898 100%); }
.shelf { position: relative; display: flex; align-items: flex-end; overflow-x: auto; overflow-y: hidden; padding: 40px 40px 0; height: 430px; scrollbar-width: none; scroll-behavior: smooth; cursor: grab; }
.shelf::-webkit-scrollbar { display: none; }
.shelf > :first-child { margin-left: auto; } .shelf > :last-child { margin-right: auto; }
/* shelf: a thin strip of top surface, then the front edge, lighter than the back panel */
.plank { position: relative; z-index: 4; height: 30px;
  background: radial-gradient(circle, rgba(235,225,205,.35) 0 .5px, transparent .9px) 0 2px / 7px 5px repeat-x, linear-gradient(180deg, #2e1f13 0, #5a3f27 3px, #806040 8px, rgba(0,0,0,0) 9px), linear-gradient(180deg, rgba(255,232,196,.22) 9px, rgba(255,232,196,.08) 11px, rgba(0,0,0,.05) 60%, rgba(0,0,0,.35)), var(--tex-oak) 30px 40px / 512px 256px, #9a7449;
  box-shadow: 0 1px 0 rgba(255,236,205,.18) inset, 0 10px 12px -6px rgba(0,0,0,.55); }
.plank::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 22px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.38)); pointer-events: none; }

/* ---------- a spine ---------- */
.book { flex: 0 0 auto; position: relative; width: var(--w); height: var(--h); margin-left: var(--gap, 1px); border: 0; padding: 0; background: none; cursor: pointer;
  filter: brightness(var(--depth, 1)); transition: transform .35s cubic-bezier(.22,.8,.24,1); }
.book:hover, .book:focus-visible { transform: translateY(-12px); outline: none; }
.book:focus-visible .skin { outline: 2px solid var(--paper-3); outline-offset: 2px; box-shadow: 0 0 0 5px var(--accent); }
.book.out { visibility: hidden; }
.book.lean { transform-origin: 0 100%; transform: rotate(-6deg); margin-left: var(--lean-gap); }
.book.lean:hover { transform: rotate(-6deg) translateY(-8px); }
/* where each book meets the shelf, a tight contact shadow */
.book::after { content: ""; position: absolute; left: -1px; right: -3px; bottom: -3px; height: 6px; z-index: -1; background: rgba(0,0,0,.6); filter: blur(2px); border-radius: 50%; }
/* each book throws a soft shadow onto the back panel, away from the lamp */
.book::before { content: ""; position: absolute; inset: 6px -11px 0 30%; z-index: -1; background: rgba(0,0,0,.55); filter: blur(8px); border-radius: 30%; }

.skin { position: absolute; inset: 0; overflow: hidden; border-radius: var(--rad, 3px 3px 1px 1px);
  background: var(--tex) var(--tx, 0) var(--ty, 0) / var(--ts, 256px), var(--c);
  background-blend-mode: multiply, normal;
  filter: saturate(calc(1 - var(--fade, 0) * .45)) sepia(calc(var(--fade, 0) * .22)) brightness(calc(1 + var(--fade, 0) * .1)); }
/* the spine is a curve: dark where it turns away, a soft highlight where it faces the lamp */
.skin::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,calc(var(--round) * .62)) 0, rgba(0,0,0,calc(var(--round) * .14)) 9%, rgba(255,250,240,calc(var(--round) * .16)) var(--hi, 32%), rgba(255,250,240,calc(var(--round) * .03)) calc(var(--hi, 32%) + 18%), rgba(0,0,0,calc(var(--round) * .12)) 72%, rgba(0,0,0,calc(var(--round) * .66)) 100%); }
/* wear: sun on the top of the spine, rubbed head and tail caps */
.skin::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,240,214,calc(var(--rub, .3) * .5)) 0, rgba(255,240,214,0) 5px), linear-gradient(0deg, rgba(255,240,214,calc(var(--rub, .3) * .45)) 0, rgba(255,240,214,0) 4px),
    linear-gradient(180deg, rgba(255,238,205,calc(var(--fade, 0) * .22)), rgba(255,238,205,0) 70%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), inset 0 2px 1px -1px rgba(255,240,214,calc(var(--rub, .3) * .6)); }
/* hardback joints: the grooves where the boards hinge, just inside each edge */
.joint .skin { box-shadow: inset 3px 0 0 -2px rgba(0,0,0,.35), inset -3px 0 0 -2px rgba(0,0,0,.35); }
.sp { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; }

/* gilt: a metal gradient clipped to the letters, flecked where the foil has rubbed off.
   --g moves the glint; it is set from each book's position under the lamp, and shifts on hover. */
.foil { background: var(--foil); background-size: 100% 340%; background-position: 50% var(--g, 40%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-mask: var(--foil-mask) var(--tx, 0) var(--ty, 0) / 128px; mask: var(--foil-mask) var(--tx, 0) var(--ty, 0) / 128px;
  filter: drop-shadow(0 -.6px 0 rgba(0,0,0,.55)); transition: background-position .6s ease; }
.gilt { background: var(--foil); background-size: 100% 340%; background-position: 50% var(--g, 40%); -webkit-mask: var(--foil-mask) var(--tx, 0) var(--ty, 0) / 128px; mask: var(--foil-mask) var(--tx, 0) var(--ty, 0) / 128px; transition: background-position .6s ease; }
.book:hover .foil, .book:hover .gilt, .book:focus-visible .foil, .book:focus-visible .gilt { background-position: 50% calc(var(--g, 40%) + 22%); }
.blind { color: rgba(0,0,0,.34); text-shadow: 0 1px 0 rgba(255,255,255,.12); }
.v { writing-mode: vertical-rl; white-space: nowrap; line-height: 1; }
.v.up { transform: rotate(180deg); }            /* reads bottom to top: the European habit */
.caps { text-transform: uppercase; letter-spacing: .14em; }

/* ---------- binding types ---------- */
/* 1. cloth, gilt-stamped: the Barometer Series, two volumes bought years apart */
.b-cloth { --tex: var(--tex-cloth); --round: 1; --rad: 4px 4px 2px 2px; }
.b-cloth .rule2 { width: 100%; height: 6px; margin-top: 16px; }
.b-cloth .rule2 i, .b-ledger .rule2 i { display: block; height: 1.2px; margin-bottom: 3px; }
.b-cloth .series { margin-top: 14px; font: 500 7.5px/1.25 var(--serif); letter-spacing: .16em; text-align: center; }
.b-cloth .ttl { margin-top: 12px; font: 500 10px/1.15 var(--serif); letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.b-cloth .vol { margin-top: 10px; font: 400 22px/1 var(--display); }
.b-cloth .orn { margin-top: auto; margin-bottom: 8px; width: 14px; height: 14px; }
.b-cloth .imprint { margin-bottom: 18px; font: 500 7px/1 var(--serif); letter-spacing: .2em; }
.libl { position: absolute; z-index: 5; left: 50%; bottom: 34px; width: 74%; transform: translateX(-50%) rotate(-1.2deg); padding: 4px 0 3px; text-align: center;
  font: 7.5px/1.25 var(--mono); color: #2a2622; background: var(--tex-paper) 0 0 / 128px, #ece4d1; box-shadow: 0 0 0 .5px rgba(60,40,20,.4), inset 0 0 6px rgba(120,90,40,.35); border-radius: 1px; }

/* 2. dust jacket: glossy printed paper over the boards; the spine has faded and the head is chipped */
.b-jacket { --tex: var(--tex-paper); --ts: 180px; --round: .8; --rad: 3px 3px 2px 2px; }
.b-jacket .skin { clip-path: polygon(0 3px, 14% 1px, 30% 4px, 38% 0, 100% 2px, 100% 100%, 0 100%); }
.b-jacket .gloss { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(90deg, transparent 22%, rgba(255,255,255,.2) 28%, rgba(255,255,255,.05) 33%, transparent 40%); }
:is(.b-jacket, .b-trade) .au { margin-top: 18px; font: 7.5px/1 var(--mono); letter-spacing: .14em; color: color-mix(in srgb, var(--ink2) 80%, transparent); }
:is(.b-jacket, .b-trade) .bar { width: 60%; height: 2px; margin-top: 12px; background: var(--ink3); }
:is(.b-jacket, .b-trade) .ttl { margin-top: 14px; font: 400 21px/1 var(--display); color: var(--ink2); }
:is(.b-jacket, .b-trade) .dev { margin-top: auto; margin-bottom: 16px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--ink2); display: grid; place-items: center; }
:is(.b-jacket, .b-trade) .dev svg { width: 14px; height: 14px; fill: none; stroke: var(--ink2); stroke-width: 3; }
:is(.b-jacket, .b-trade) .pub { margin-bottom: 12px; font: 6.5px/1 var(--mono); letter-spacing: .16em; color: var(--ink2); opacity: .8; }

/* 2b. trade paperback: printed card, flat spine, creased */
.b-trade { --tex: var(--tex-paper); --ts: 180px; --round: .35; --rad: 2px; }

/* 3. paperback, tri-band: the series colour fades, the spine is creased from reading */
.b-paper { --tex: var(--tex-paper); --ts: 180px; --round: .35; --rad: 2px; }
.b-paper .band { position: absolute; left: 0; right: 0; background: var(--band); }
.b-paper .band.t { top: 0; height: 27%; } .b-paper .band.b { bottom: 0; height: 21%; }
.b-paper .band.t span { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); font: 6.5px/1 var(--mono); letter-spacing: .16em; color: #f4ecdb; opacity: .9; }
.b-paper .mid { position: absolute; left: 0; right: 0; top: 27%; bottom: 21%; display: grid; place-items: center; }
.b-paper .ttl { font: 500 12.5px/1 var(--serif); letter-spacing: .02em; color: #1e1b18; }
.b-paper .ttl small { font: 400 9px var(--serif); font-style: italic; color: #4a443d; margin-top: 10px; display: inline-block; }
.b-paper .roundel { position: absolute; bottom: 14px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #f1e9d6; display: grid; place-items: center; }
.b-paper .roundel svg { width: 11px; height: 11px; fill: none; stroke: var(--band); stroke-width: 4; }
.crease { position: absolute; z-index: 3; top: 0; bottom: 0; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent 4%, rgba(255,250,240,.55) 10%, rgba(255,250,240,.15) 30%, rgba(255,250,240,.6) 44%, transparent 52%, rgba(255,250,240,.45) 66%, rgba(255,250,240,.1) 82%, transparent); }

/* 4. music score: thin, tall, soft blue-grey paper wrappers */
.b-score { --tex: var(--tex-paper); --ts: 200px; --round: .25; --rad: 1px; }
.b-score .ttl { margin-top: 26px; font: 500 9.5px/1 var(--serif); letter-spacing: .2em; text-transform: uppercase; color: #1f2d4d; }
.b-score .op { margin-top: auto; margin-bottom: 14px; font: 7px/1 var(--mono); color: #1f2d4d; }
.b-score .skin { box-shadow: inset 0 3px 3px -2px rgba(70,60,40,.4); }

/* 5. quarter leather: raised bands, a red lettering piece, gilt fillets and tools */
.b-leather { --tex: var(--tex-leather); --ts: 200px; --round: 1.1; --rad: 5px 5px 3px 3px; }
.b-leather .sp { justify-content: space-between; padding: 10px 0 12px; }
.b-leather .band { position: relative; width: 100%; height: 8px; flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(255,235,200,.25) 35%, rgba(255,235,200,.12) 55%, rgba(0,0,0,.5)); border-radius: 50%/30%; }
.b-leather .band::before, .b-leather .band::after { content: ""; position: absolute; left: 4px; right: 4px; height: 1px; }
.b-leather .band::before { top: -3px; } .b-leather .band::after { bottom: -3px; }
.b-leather .band.g::before, .b-leather .band.g::after { background: var(--foil); background-size: 100% 340%; background-position: 50% var(--g, 40%); }
.b-leather .panel { flex: 1; display: grid; place-items: center; width: 100%; }
.b-leather .tool { width: 12px; height: 12px; }
.b-leather .piece { width: 86%; padding: 7px 0 6px; text-align: center; border-radius: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.18)), var(--tex-leather) 30px 10px / 120px, var(--piece);
  background-blend-mode: normal, multiply, normal; box-shadow: 0 0 0 .5px rgba(0,0,0,.5), inset 0 0 3px rgba(0,0,0,.4); }
.b-leather .piece b { display: block; font: 400 13px/1 var(--display); }
.b-leather .piece small { display: block; margin-top: 4px; font: 500 6.5px/1 var(--serif); letter-spacing: .16em; text-transform: uppercase; }

/* 6. cloth with a pasted paper label: a small almanac */
.b-label { --tex: var(--tex-cloth); --round: .9; --rad: 3px 3px 2px 2px; }
.b-label .plabel { position: absolute; z-index: 3; left: 14%; right: 14%; top: 32px; height: 52%; transform: rotate(-.7deg);
  background: linear-gradient(180deg, rgba(140,100,40,.18), transparent 20%, transparent 80%, rgba(140,100,40,.22)), var(--tex-paper) 40px 0 / 150px, #efe6d0;
  box-shadow: 0 0 0 .5px rgba(80,60,30,.45), 0 1px 1px rgba(0,0,0,.25); display: grid; place-items: center; }
.b-label .plabel::before { content: ""; position: absolute; inset: 3px; border: .75px solid #6b3a2b; outline: .5px solid #6b3a2b; outline-offset: -2.5px; }
.b-label .plabel span { font: 9px/1 var(--mono); letter-spacing: .08em; color: #3a2a20; }
.b-label .dot { position: absolute; bottom: 20px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; }

/* 7. ledger notebook: red cloth spine tape, a typed sticker */
.b-ledger { --tex: var(--tex-cloth); --round: .9; --rad: 3px; }
.b-ledger .rule2 { width: 100%; margin-top: 14px; } .b-ledger .rule2.b { margin-top: auto; margin-bottom: 12px; }
.b-ledger .rule2 i { background: rgba(0,0,0,.35); box-shadow: 0 1px 0 rgba(255,255,255,.1); }
.b-ledger .tape { position: relative; z-index: 3; margin-top: 46px; width: 86%; padding: 7px 0; background: var(--tex-paper) 0 0 / 120px, #f3eee2; box-shadow: 0 0 0 .5px rgba(0,0,0,.25), 0 1px 1px rgba(0,0,0,.2); transform: rotate(1.4deg); display: grid; place-items: center; }
.b-ledger .tape span { font: 8px/1.25 var(--mono); color: #222; letter-spacing: .02em; }

/* lying flat at the end of the row */
.stack { flex: 0 0 auto; display: flex; flex-direction: column-reverse; align-self: flex-end; margin-left: 30px; }
.stack i { display: block; position: relative; height: var(--t); width: var(--l); margin-left: var(--x, 0); border-radius: 2px 4px 4px 2px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,250,240,.16), rgba(0,0,0,.05) 40%, rgba(0,0,0,.35)), var(--tex-cloth) var(--x, 0) 0 / 256px, var(--c); background-blend-mode: normal, multiply, normal; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.stack i.pages { background: linear-gradient(180deg, var(--c) 0 2px, transparent 2px calc(100% - 2px), var(--c) calc(100% - 2px)), repeating-linear-gradient(180deg, #efe6d2 0 .8px, #d9ccb0 .8px 1.6px); }
.stack i.pages::after { content: none; }
.stack i::after { content: ""; position: absolute; left: 12%; right: 12%; top: 50%; height: 1px; margin-top: -2px; background: var(--foil); background-size: 340% 100%; opacity: .75; box-shadow: 0 3px 0 rgba(216,189,124,.6); }
.bookend { flex: 0 0 auto; position: relative; width: 58px; height: 168px; align-self: flex-end; margin-left: 4px; }
.bookend::before { content: ""; position: absolute; left: 0; bottom: 0; width: 7px; height: 100%; border-radius: 2px 2px 0 0; background: linear-gradient(90deg, #6e5a3a, #c7a86a 40%, #8a6f42 70%, #4a3a22); box-shadow: 4px 0 8px rgba(0,0,0,.45); }
.bookend::after { content: ""; position: absolute; left: 0; bottom: 0; width: 58px; height: 4px; background: linear-gradient(180deg, #b7985c, #5e4a2c); }

/* ---------- the pulled-out book ---------- */
/* above the case and its sticky note (z 7), so nothing on the bookcase can sit over an open book */
.stage { position: absolute; inset: 0; perspective: 2200px; pointer-events: none; z-index: 8; transition: background .4s; }
.stage.active { pointer-events: auto; background: rgba(28,14,6,.42); }
.fbook { position: absolute; width: var(--W); height: var(--H); transform-style: preserve-3d; will-change: transform; }
.fbook:focus { outline: none; }   /* focus lands here while it flies out, then moves to its link */
.fbook .f { position: absolute; backface-visibility: hidden; }
.spine-f { width: var(--T); height: var(--H); left: calc(var(--T) / -2); top: 0; transform: rotateY(-90deg); }
.spine-f .clone { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.spine-f .clone::before { display: none; }
/* page edges: cream, gilt on the fine bindings, sprinkled red on the ledger */
.fbook { --edge: repeating-linear-gradient(var(--ed, 90deg), #f1e9d6 0 1px, #d8cbb0 1px 2px); }
.edge-f, .top-f, .bottom-f { background: var(--edge); }
.edge-f { width: var(--T); height: calc(var(--H) - 2 * var(--sq)); top: var(--sq); left: calc(var(--W) - var(--T) / 2 - var(--sq)); transform: rotateY(90deg); }
.top-f, .bottom-f { --ed: 180deg; width: calc(var(--W) - var(--sq)); height: var(--T); left: 0; }
.top-f { top: calc(var(--T) / -2 + var(--sq)); transform: rotateX(90deg); } .bottom-f { top: calc(var(--H) - var(--T) / 2 - var(--sq)); transform: rotateX(-90deg); }
.fbook.teg .top-f { background: linear-gradient(90deg, #8a6a2c, #e8cf8c 40%, #b8913f 70%, #7a5a22); }
.fbook.sprinkled .edge-f, .fbook.sprinkled .top-f, .fbook.sprinkled .bottom-f { background: radial-gradient(circle, rgba(150,40,40,.75) 0 .7px, transparent 1px) 0 0 / 5px 4px, radial-gradient(circle, rgba(150,40,40,.6) 0 .6px, transparent .9px) 2px 2px / 7px 6px, var(--edge); }
.back-f { width: var(--W); height: var(--H); transform: translateZ(calc(var(--T) / -2)) rotateY(180deg); border-radius: 4px 1px 1px 4px; }

.bmat { background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(0,0,0,.18)), var(--tex) var(--tx, 0) var(--ty, 0) / var(--ts, 256px), var(--c); background-blend-mode: normal, multiply, normal; }

.page-f { width: calc(var(--W) - var(--sq) - 1px); height: calc(var(--H) - 2 * var(--sq)); top: var(--sq); left: 0; transform: translateZ(calc(var(--T) / 2 - 1px)); overflow: hidden;
  background: linear-gradient(90deg, rgba(60,40,20,.26), rgba(60,40,20,.06) 5%, rgba(60,40,20,0) 11%), var(--foxing, linear-gradient(transparent, transparent)), var(--tex-paper) 0 0 / 256px, var(--leaf, #f6f0e2);
  color: var(--ink); padding: 11% 11% 6% 13%; display: flex; flex-direction: column; border-radius: 0 2px 2px 0;
  box-shadow: inset -1px 0 0 rgba(120,100,70,.25), inset -3px 0 0 -1px rgba(255,255,255,.4), inset -4px 0 0 -2px rgba(120,100,70,.25), inset -6px 0 0 -3px rgba(120,100,70,.2); }
/* set like a title page: small type, a lot of paper, the imprint at the foot. Every size is in --u,
   so shelf.js can step the whole page down (--k) when a project's text is long. */
.page-f .pg { --u: calc(var(--k, 1) * 1px); flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.page-f .kind { font: calc(8.5 * var(--u))/1 var(--mono); letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
.page-f h3 { margin: calc(15 * var(--u)) 0 0; font: 400 calc(19 * var(--u))/1.18 var(--display); letter-spacing: .005em; text-wrap: balance; }
.page-f .q { margin: calc(10 * var(--u)) 0 0; font: italic calc(13.5 * var(--u))/1.36 var(--serif); color: #3a352f; text-wrap: balance; }
.page-f hr { flex: 0 0 auto; width: 22px; border: 0; border-top: .75px solid var(--accent); margin: calc(12 * var(--u)) 0; }
.page-f .s { margin: 0; font: calc(11.5 * var(--u))/1.42 var(--serif); color: #5f584f; text-wrap: balance; }
.page-f .kids { margin: calc(9 * var(--u)) 0 0; font: calc(9.5 * var(--u))/1.6 var(--mono); letter-spacing: .04em; } .page-f .kids span { color: var(--muted); }
.page-f .by { margin-top: auto; padding-top: calc(14 * var(--u)); font: 500 calc(9.5 * var(--u))/1 var(--serif); letter-spacing: .24em; text-transform: uppercase; color: #4a443d; }
.page-f .imprint { margin-top: calc(10 * var(--u)); display: grid; justify-items: center; gap: calc(5 * var(--u)); }
.page-f .imprint svg { width: calc(15 * var(--u)); height: calc(15 * var(--u)); fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; opacity: .7; }
.page-f .imprint span { font: calc(7.5 * var(--u))/1 var(--mono); letter-spacing: .22em; color: #6f6a62; }
:is(.page-f, .card) .foot { margin-top: calc(13 * var(--u)); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: calc(8 * var(--u)) calc(14 * var(--u)); }
:is(.page-f, .card) .go { font-size: calc(11 * var(--u)); padding: calc(6 * var(--u)) calc(11 * var(--u)); }
:is(.page-f, .card) .put { font-size: calc(10.5 * var(--u)); }
/* turning between the two pages when the spread is shown one page at a time */
.turn { display: block; margin: calc(8 * var(--u, 1px)) auto 0; font: 10px var(--mono); letter-spacing: .06em; color: var(--accent); background: none; border: 0; padding: 4px 6px; cursor: pointer; }
.paste .turn { margin: 0; padding: 4px 8px; background: rgba(247,243,234,.88); border-radius: 999px; }
.ribbon { position: absolute; z-index: 2; top: -4px; left: 10px; width: 6px; height: calc(100% + 30px); transform: rotate(-2.5deg); transform-origin: 50% 0;
  background: linear-gradient(90deg, rgba(0,0,0,.25), rgba(255,255,255,.18) 40%, rgba(0,0,0,.12)), var(--rib, #7b2d3b); box-shadow: 1px 1px 2px rgba(0,0,0,.25); }
.go { font: 11px var(--mono); display: inline-block; white-space: nowrap; color: var(--paper-3); background: var(--accent); border-radius: 999px; padding: 6px 11px; text-decoration: none; box-shadow: 0 3px 0 var(--accent-deep); transition: transform .08s, box-shadow .08s; }
.go:active { transform: translateY(3px); box-shadow: none; }
.status { font: 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); border: .75px solid currentColor; border-radius: 999px; padding: 4px 9px; white-space: nowrap; }
.put { font: 10.5px var(--mono); background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

.lid { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 0 50%; transform: translateZ(calc(var(--T) / 2)); }
.cover-f, .inside-f { inset: 0; width: 100%; height: 100%; }
.cover-f { border-radius: 1px 4px 4px 1px; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; }
/* boards: the hinge groove near the spine, rubbed outer corners */
.cover-f::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.32), rgba(0,0,0,0) 3%, rgba(255,255,255,.08) 3.6%, rgba(0,0,0,.18) 4.6%, rgba(0,0,0,0) 6%),
    radial-gradient(circle at 100% 0, rgba(255,240,214,calc(var(--rub, .3) * .55)) 0 4px, transparent 10px), radial-gradient(circle at 100% 100%, rgba(255,240,214,calc(var(--rub, .3) * .55)) 0 4px, transparent 11px);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.28), inset -1px 0 0 2px rgba(255,240,214,calc(var(--rub, .3) * .12)); }
.cover-f .kind { font: 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.inside-f { transform: rotateY(180deg); border-radius: 4px 1px 1px 4px; }
/* the cover material turns in over the board edges; the endpaper is pasted down inside that */
.inside-f .paste { position: absolute; inset: 11px 13px 11px 11px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px; padding: 22px 18px;
  background: linear-gradient(270deg, rgba(60,40,20,.28), rgba(60,40,20,0) 9%), var(--tex-paper) 0 0 / 256px, var(--endpaper, #ece2cc);
  box-shadow: 0 0 0 .5px rgba(60,40,20,.35), -1px 0 2px rgba(0,0,0,.18); }
.inside-f.marbled .paste { background: linear-gradient(270deg, rgba(20,10,5,.4), rgba(20,10,5,0) 10%), linear-gradient(rgba(40,18,10,.18), rgba(40,18,10,.18)), var(--tex-marble) 70% 60% / 560px auto, #6b3a2b; }
.inside-f.flush .paste { inset: 0; box-shadow: none; }

/* screenshots are mounted with photo corners, the way you would paste a print into a book */
.plate { position: relative; margin: 0; background: #fbf8f0; padding: 7px 7px 9px; box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 10px 18px -10px rgba(0,0,0,.45); transform: rotate(var(--pr, -1deg)); width: 100%; }
.plate img { display: block; width: 100%; height: auto; }
.plate figcaption { font-style: italic; font-size: 12.5px; color: var(--muted); margin-top: 7px; text-align: center; }
.plate .pc { position: absolute; width: 18px; height: 18px; background: linear-gradient(135deg, #2b2724 50%, transparent 50%); filter: drop-shadow(0 .5px .5px rgba(0,0,0,.4)); }
.plate .pc:nth-of-type(1) { left: -3px; top: -3px; } .plate .pc:nth-of-type(2) { right: -3px; top: -3px; transform: rotate(90deg); }
.plate .pc:nth-of-type(3) { right: -3px; bottom: -3px; transform: rotate(180deg); } .plate .pc:nth-of-type(4) { left: -3px; bottom: -3px; transform: rotate(270deg); }
.plate.glyph { display: grid; place-items: center; gap: 10px; padding: 30px 10px; } .plate.glyph svg { width: 76px; height: 76px; fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; color: var(--ink); }
.plate.glyph span { font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
/* a bookplate on the front pastedown */
.bookplate { position: relative; flex: 0 0 auto; transform: rotate(.6deg); width: 104px; padding: 9px 8px 8px; text-align: center; background: var(--tex-paper) 0 0 / 120px, #f5efe2; box-shadow: 0 0 0 .5px rgba(60,40,20,.3), 0 1px 2px rgba(0,0,0,.15); }
.bookplate::before { content: ""; position: absolute; inset: 3px; border: .75px solid var(--accent); }
.bookplate i { display: block; font: 7.5px var(--mono); letter-spacing: .2em; color: var(--accent); }
.bookplate b { display: block; font: 400 13px/1.1 var(--display); color: var(--ink); margin-top: 3px; }
/* a dust jacket's front flap, tucked inside the board, price corner clipped off */
.flap { position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; width: 30%; padding: 30px 12px 0 14px; text-align: left;
  background: var(--tex-paper) 0 0 / 180px, var(--c); background-blend-mode: multiply, normal; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
  box-shadow: 3px 0 6px rgba(0,0,0,.25); color: var(--ink2); }
.flap p { margin: 0; font: italic 13px/1.35 var(--serif); } .flap span { display: block; margin-top: 12px; font: 8px/1.5 var(--mono); letter-spacing: .1em; opacity: .8; }
.inside-f.jacketed .paste { left: 27%; padding: 18px 12px; }

/* front covers, one per binding */
.cv-cloth { color: var(--gilt); padding: 40px 30px; gap: 12px; }
.cv-cloth .frame { position: absolute; inset: 14px 14px 14px 22px; border: 1px solid rgba(0,0,0,.32); box-shadow: 1px 1px 0 rgba(255,255,255,.08), inset 1px 1px 0 rgba(255,255,255,.06), inset 0 0 0 5px transparent, inset 0 0 0 6px rgba(0,0,0,.22); }
.cv-cloth .series { margin-top: 18px; font: 500 10px var(--serif); letter-spacing: .24em; }
.cv-cloth h3 { margin: 6px 0 0; font: 500 21px/1.2 var(--serif); letter-spacing: .14em; text-transform: uppercase; }
.cv-cloth .vol { font: 400 40px/1 var(--display); margin-top: 6px; }
.cv-cloth .orn { margin-top: auto; margin-bottom: 26px; } .cv-cloth .orn svg { width: 58px; height: 58px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; color: rgba(0,0,0,.38); filter: drop-shadow(0 1px 0 rgba(255,255,255,.1)); }
.cv-jacket { align-items: flex-start; text-align: left; padding: 34px 28px 26px 34px; color: var(--ink2); }
.cv-jacket .au { font: 10px var(--mono); letter-spacing: .18em; opacity: .85; }
.cv-jacket h3 { margin: 18px 0 0; font: 400 38px/1 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.cv-jacket .art { position: absolute; right: -30px; bottom: -36px; width: 230px; height: 230px; opacity: .9; }
.cv-jacket .art svg { width: 100%; height: 100%; fill: none; stroke: var(--ink3); stroke-width: 2.2; stroke-linecap: round; }
.cv-jacket .q { margin-top: 14px; max-width: 70%; font: italic 15px/1.3 var(--serif); opacity: .9; }
.cv-jacket .gloss { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.14) 38%, transparent 46%); pointer-events: none; }
.cv-paper { padding: 0; }
.cv-paper .cband { width: 100%; height: 30%; background: var(--band); display: grid; place-items: center; color: #f4ecdb; font: 10px var(--mono); letter-spacing: .3em; }
.cv-paper .cband.b { height: 22%; margin-top: auto; }
.cv-paper .cmid { flex: 1; width: 100%; display: grid; place-content: center; gap: 10px; padding: 0 22px; }
.cv-paper h3 { margin: 0; font: 500 26px/1.12 var(--serif); color: #1e1b18; }
.cv-paper .crule { width: 60%; height: 1px; background: var(--band); margin: 0 auto; }
.cv-paper .cau { font: italic 15px var(--serif); color: #4a443d; }
.cv-paper .croundel { width: 34px; height: 34px; border-radius: 50%; background: #f1e9d6; display: grid; place-items: center; }
.cv-paper .croundel svg { width: 22px; height: 22px; fill: none; stroke: var(--band); stroke-width: 3; }
.cv-paper .dog { position: absolute; right: 0; top: 0; width: 34px; height: 34px; background: linear-gradient(225deg, transparent 49%, rgba(255,255,255,.45) 50%, rgba(0,0,0,.06) 56%, transparent 62%); pointer-events: none; }
.cv-score { padding: 46px 30px; color: #1f2d4d; }
.cv-score .frame { position: absolute; inset: 16px; border: 1px solid rgba(31,45,77,.55); outline: .5px solid rgba(31,45,77,.4); outline-offset: -5px; }
.cv-score .comp { font: 500 11px var(--serif); letter-spacing: .3em; text-transform: uppercase; margin-top: 18px; }
.cv-score h3 { margin: 18px 0 0; font: 500 24px/1.2 var(--serif); letter-spacing: .12em; text-transform: uppercase; }
.cv-score .for { margin-top: 10px; font: italic 16px var(--serif); }
.cv-score .op { margin-top: auto; margin-bottom: 12px; font: 10px var(--mono); letter-spacing: .2em; }
.cv-leather { background: linear-gradient(rgba(40,18,10,.22), rgba(40,18,10,.22)), var(--tex-marble) 30% 20% / 560px auto, #6b3a2b !important; }
.cv-leather .lth { position: absolute; background: linear-gradient(90deg, rgba(0,0,0,.4), rgba(0,0,0,0) 30%, rgba(255,235,200,.08) 70%, rgba(0,0,0,.2)), var(--tex-leather) 0 0 / 200px, var(--c); background-blend-mode: normal, multiply, normal; }
.cv-leather .lth.spn { left: 0; top: 0; bottom: 0; width: 18%; }
.cv-leather .lth.c1, .cv-leather .lth.c2 { right: 0; width: 64px; height: 64px; }
.cv-leather .lth.c1 { top: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); } .cv-leather .lth.c2 { bottom: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.cv-leather .fillet { position: absolute; left: 18%; top: 0; bottom: 0; width: 1.5px; background: linear-gradient(180deg, #8a6a2c, #e8cf8c 40%, #b8913f 70%, #7a5a22); }
.cv-label { padding-top: 70px; }
.cv-label .clabel { position: relative; width: 74%; padding: 18px 10px 16px; transform: rotate(-.8deg); background: var(--tex-paper) 0 0 / 160px, #efe6d0; box-shadow: 0 0 0 .5px rgba(80,60,30,.45), 0 1px 2px rgba(0,0,0,.25); color: #3a2a20; }
.cv-label .clabel::before { content: ""; position: absolute; inset: 4px; border: .75px solid #6b3a2b; outline: .5px solid #6b3a2b; outline-offset: -3px; }
.cv-label h3 { margin: 0; font: 400 15px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.cv-label .sub { display: block; margin-top: 8px; font: italic 13px/1.25 var(--serif); }
.cv-ledger .corner { position: absolute; right: 0; width: 56px; height: 56px; background: var(--tex-cloth) 0 0 / 256px, #8e2a2a; background-blend-mode: multiply; }
.cv-ledger .corner.t { top: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); } .cv-ledger .corner.b { bottom: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.cv-ledger .strip { position: absolute; left: 0; top: 0; bottom: 0; width: 14%; background: var(--tex-cloth) 0 0 / 256px, #8e2a2a; background-blend-mode: multiply; box-shadow: 1px 0 0 rgba(0,0,0,.4); }
.cv-ledger .tape { position: relative; margin-top: 90px; width: 58%; padding: 14px 10px; transform: rotate(-1.2deg); background: var(--tex-paper) 0 0 / 120px, #f3eee2; box-shadow: 0 1px 2px rgba(0,0,0,.3); font: 13px/1.5 var(--mono); color: #222; text-align: left; }

@media (max-width: 860px) {
  .shelf { height: 404px; padding: 34px 22px 0; }
  /* the open book is fitted inside the stage; this only stops a page sliding sideways mid-flight */
  .stage { overflow: clip; }
}
/* ---------- 8. a board-game box, standing on its edge among the books ----------
   Printed card in two inks (--ink2 red, --ink3 black) on cream, square corners, and the wear a
   box gets: the print rubbed through to white board along every edge, worst at the corners.
   The red is printed a hair out of register with the black. */
.b-box, .fbox { --gsans: "Avenir Next", "Futura", "Helvetica Neue", Arial, sans-serif; }
.b-box { --tex: var(--tex-paper); --ts: 180px; --round: .22; --rad: 1px; }
.b-box .bx-band { position: absolute; z-index: 2; left: 0; right: 0; display: grid; place-items: center; }
.b-box .bx-band.t { top: 0; height: 14%; background: var(--ink2); }
.b-box .bx-band.t svg { width: 58%; fill: var(--c); transform: translate(.4px, .3px); }
.b-box .bx-band.b { bottom: 0; height: 16%; background: var(--ink3); color: var(--c); grid-template-rows: 1fr 1fr; padding: 8px 0 7px; }
.b-box .bx-pl { display: flex; align-items: center; gap: 2px; font: 800 10px/1 var(--gsans); } .b-box .bx-pl svg { width: 18px; fill: currentColor; } .b-box .bx-pl i { font-style: normal; }
.b-box .bx-mw { font: 6.5px/1 var(--mono); letter-spacing: .2em; opacity: .8; }
.b-box .bx-ttl { position: absolute; z-index: 2; top: 18%; left: 50%; transform: translateX(-50%); font: 900 25px/1 var(--gsans); letter-spacing: -.01em; }
.b-box .bx-ttl b, .lidtop h3 b, .card h3 b { color: var(--ink3); font-weight: inherit; } .b-box .bx-ttl b.r, .lidtop h3 b.r, .card h3 b.r { color: var(--ink2); }
.b-box .bx-ttl b.r { display: inline-block; transform: translate(.5px, .4px); }
.b-box .bx-sub { position: absolute; z-index: 2; bottom: 19%; left: 50%; transform: translateX(-50%); font: 6.5px/1 var(--mono); letter-spacing: .2em; color: var(--ink3); opacity: .85; }
/* the lid stops short of the bottom: a strip of the black tray shows along one edge, in the lid's shadow */
.b-box .sp { right: 8px; }
.bx-seam { position: absolute; z-index: 3; top: 0; bottom: 0; right: 0; width: 8px; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.15) 3px, rgba(255,250,240,.06) 6px, rgba(0,0,0,.2)), var(--tex-paper) 0 0 / 120px, #2a2622;
  box-shadow: -1px 0 0 rgba(255,248,232,.35); }
/* edge wear: white board showing through, broken up by the foil-wear mask so it is never a clean line */
.bx-wear, .lt-wear, .l-wall::after { position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(circle at 0 0, #f6f1e6 0 2.5px, transparent 5px), radial-gradient(circle at 100% 0, #f6f1e6 0 3px, transparent 6px), radial-gradient(circle at 100% 100%, #f6f1e6 0 2px, transparent 4px), radial-gradient(circle at 0 100%, #f6f1e6 0 3.5px, transparent 6px),
    linear-gradient(90deg, #f3ede1 0 1.4px, transparent 2.2px calc(100% - 2.2px), #f3ede1 calc(100% - 1.4px)), linear-gradient(180deg, #f3ede1 0 1.2px, transparent 2px calc(100% - 2px), #f3ede1 calc(100% - 1.2px));
  -webkit-mask: var(--foil-mask) var(--ty, 0) var(--tx, 0) / 70px; mask: var(--foil-mask) var(--ty, 0) var(--tx, 0) / 70px; opacity: calc(.4 + var(--rub, .3)); }

/* the open box */
.fbox .tray, .fbox .blid { position: absolute; inset: 0; transform-style: preserve-3d; }
.fbox .blid { transform: none; transform-origin: 50% 50%; }
.fbox .l-wall { overflow: hidden; background: linear-gradient(180deg, var(--ink2) 0 14%, transparent 14% 84%, var(--ink3) 84%), var(--tex-paper) var(--tx, 0) 0 / 180px, var(--c); }
.fbox .l-wall::after { content: ""; }
.fbox .l-wall.r { width: var(--T); height: var(--H); left: calc(var(--W) - var(--T) / 2); transform: rotateY(90deg); }
.fbox .l-wall.t, .fbox .l-wall.b { width: var(--W); height: var(--T); left: 0; background: linear-gradient(90deg, var(--ink2) 0 12%, transparent 12%), var(--tex-paper) 0 var(--ty, 0) / 180px, var(--c); }
.fbox .l-wall.t { top: calc(var(--T) / -2); transform: rotateX(90deg); } .fbox .l-wall.b { top: calc(var(--H) - var(--T) / 2); transform: rotateX(-90deg); }
.lidtop { inset: 0; width: 100%; height: 100%; transform: translateZ(calc(var(--T) / 2)); overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 26px 24px; color: var(--ink3);
  background: radial-gradient(130% 100% at 18% -8%, rgba(255,250,238,.4), rgba(255,250,238,0) 55%, rgba(60,40,20,.12)), var(--tex-paper) var(--tx, 0) var(--ty, 0) / 180px, var(--c);
  box-shadow: 6px 12px 22px -8px rgba(0,0,0,.6); }
.lt-frame { position: absolute; inset: 11px; border: 2.5px solid var(--ink2); box-shadow: 0 0 0 4px var(--c), 0 0 0 5px var(--ink3); transform: translate(.5px, .4px); }
.lt-course { position: relative; margin-top: 4px; font: 8.5px/1 var(--mono); letter-spacing: .22em; }
.lidtop h3 { position: relative; margin: 12px 0 0; font: 900 54px/.92 var(--gsans); letter-spacing: -.025em; }
.lidtop h3 b { display: block; } .lidtop h3 b.r { transform: translate(.7px, .5px); }
.lt-tag { position: relative; margin: 10px 0 0; max-width: 84%; font: italic 15px/1.25 var(--serif); color: #3b342c; }
.lt-art { position: relative; width: 39%; margin-top: auto; overflow: visible; }
.lt-art .k path:first-child { fill: var(--ink3); } .lt-art .k rect { fill: #f3ecdc; stroke: var(--ink3); stroke-width: 2.6; } .lt-art .cut { fill: #f3ecdc; }
.lt-art .ln { fill: none; stroke: var(--ink3); stroke-width: 1.2; opacity: .45; }
.lt-art .slip path:first-child { fill: #fbf7ee; stroke: var(--ink3); stroke-width: 2; }
.lt-art .rd { fill: var(--ink2); transform: translate(.8px, .6px); } .lt-art .rd path + path { fill: none; stroke: var(--ink2); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.lt-art text { font: 900 10px var(--gsans); letter-spacing: .12em; text-anchor: middle; }
.lt-foot { position: relative; margin-top: 10px; display: flex; gap: 14px; font: 8px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.lt-foot span { display: flex; align-items: center; gap: 4px; } .lt-foot svg { width: 13px; fill: currentColor; }

/* the tray: plain grey board inside, a lip of white card at the rim */
.t-back { inset: 0; width: 100%; height: 100%; transform: translateZ(calc(var(--T) / -2)) rotateY(180deg); background: #cfc5b2; }
.t-in { background: linear-gradient(var(--sh, 90deg), rgba(0,0,0,.42), rgba(0,0,0,.08) 70%, rgba(255,250,240,.1)), var(--tex-paper) 0 0 / 180px, #ddd4c3; }
.t-in.l, .t-in.r { width: var(--T); height: var(--H); } .t-in.t, .t-in.b { width: var(--W); height: var(--T); left: 0; }
.t-in.l { left: calc(4px - var(--T) / 2); transform: rotateY(90deg); }
.t-in.r { left: calc(var(--W) - 4px - var(--T) / 2); transform: rotateY(-90deg); --sh: 270deg; }
.t-in.t { top: calc(4px - var(--T) / 2); transform: rotateX(-90deg); --sh: 0deg; }
.t-in.b { top: calc(var(--H) - 4px - var(--T) / 2); transform: rotateX(90deg); --sh: 180deg; }
.t-rim { inset: 0; width: 100%; height: 100%; transform: translateZ(calc(var(--T) / 2)); box-shadow: inset 0 0 0 4px #efe9dd, inset 0 0 0 4.75px rgba(60,45,30,.35); pointer-events: none; }
.t-floor { inset: 4px; transform: translateZ(calc(var(--T) / -2 + 1px));
  background: linear-gradient(150deg, rgba(255,250,240,.12), rgba(0,0,0,.1)), var(--tex-paper) 0 0 / 180px, #d2c8b5; box-shadow: inset 0 0 18px rgba(0,0,0,.5), inset 0 0 3px rgba(0,0,0,.45); }
/* the board: art cropped from the game's own screen, wrapped in black at the edge, folded in four */
.board { position: absolute; left: 5%; top: 4%; width: 88%; aspect-ratio: 418 / 395; overflow: hidden; transform: rotate(-1.2deg); border: 5px solid #1d1a17; border-radius: 2px;
  box-shadow: 2px 3px 4px rgba(0,0,0,.4), 0 0 0 .5px rgba(255,255,255,.12) inset; }
.board img { position: absolute; width: 191.39%; left: -4.785%; top: -26.58%; max-width: none; filter: saturate(.92) contrast(.97); }
.board .fold { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(50% - 1.5px), rgba(0,0,0,.3) 50%, rgba(255,250,240,.22) calc(50% + 1px), transparent calc(50% + 2.5px)),
    linear-gradient(180deg, transparent calc(50% - 1.5px), rgba(0,0,0,.26) 50%, rgba(255,250,240,.2) calc(50% + 1px), transparent calc(50% + 2.5px)),
    radial-gradient(120% 110% at 15% 0%, rgba(255,250,235,.16), transparent 50%, rgba(30,15,5,.22)); }
/* Parliament Seat chips, as on the board */
i.chip { position: absolute; z-index: 1; left: var(--x); top: var(--y); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; transform: rotate(var(--r));
  font: 800 8.5px/1 var(--gsans); font-style: normal; letter-spacing: .02em; color: #e9e2d2;
  background: radial-gradient(circle at 35% 30%, #5a5650, #23211f 65%, #171514); box-shadow: 2px 3px 3px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.18); }
i.chip::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 1.2px dashed rgba(233,226,210,.55); }
/* the card that tells you what the game is about */
.card { --u: calc(var(--k, 1) * 1px); position: absolute; z-index: 2; right: 4%; bottom: 4%; width: 60%; height: 64%; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  padding: calc(16 * var(--u)) calc(15 * var(--u)) calc(12 * var(--u)); transform: rotate(2deg); border-radius: 7px; color: var(--ink3);
  background: linear-gradient(180deg, var(--ink2) 0 5px, transparent 5px), radial-gradient(120% 90% at 10% 0, rgba(255,252,244,.5), transparent 60%), var(--tex-paper) 30px 10px / 160px, #f4eddc;
  box-shadow: 0 0 0 .5px rgba(60,40,20,.35), 4px 7px 12px -2px rgba(0,0,0,.45); }
.card .ck { font: calc(8 * var(--u))/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--ink2); }
.card h3 { margin: calc(8 * var(--u)) 0 0; font: 900 calc(24 * var(--u))/1 var(--gsans); letter-spacing: -.02em; }
.card .q { margin: calc(8 * var(--u)) 0 0; font: italic calc(14 * var(--u))/1.3 var(--serif); color: #2f2a25; }
.card .s { margin: calc(7 * var(--u)) 0 0; font: calc(11.5 * var(--u))/1.4 var(--serif); color: #5f584f; }
.card .foot { margin-top: auto; padding-top: calc(10 * var(--u)); justify-content: flex-start; }
.card .go { background: var(--ink2); box-shadow: 0 3px 0 color-mix(in srgb, var(--ink2) 60%, #000); }
.fbox.narrow .card { right: 6%; bottom: 5%; width: 86%; height: 62%; transform: rotate(1.2deg); }

@media (prefers-reduced-motion: reduce) { .foil, .gilt { transition: none; } }

