/* Cedar & Candle - an Arkham Horror: The Card Game fan companion */

:root {
  --bg: #0b110d;
  --bg-2: #111a14;
  --panel: #152018;
  --panel-2: #1b2a1f;
  --line: #2c3f30;
  --ink: #e6dcc3;
  --ink-dim: #b7ad94;
  --ink-faint: #8a8571;
  --gold: #c9a24a;
  --gold-2: #e3c477;
  --brass: #9b7a35;
  --moss: #7fa074;
  --blood: #a4483a;
  --parch: #efe3c6;
  --parch-2: #e2d2ab;
  --parch-ink: #2b2417;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --body: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 6px;
  --wrap: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(127, 160, 116, 0.16), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(155, 122, 53, 0.08), transparent 50%),
    linear-gradient(180deg, #0d1510 0%, #0a0f0b 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-2); text-decoration-color: rgba(227, 196, 119, 0.4); text-underline-offset: 2px; }
a:hover, a:focus-visible { color: #fff1c8; text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--parch); letter-spacing: 0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.05rem); margin: 2.2em 0 0.6em; }
h3 { font-size: 1.3rem; margin: 1.6em 0 0.5em; color: var(--gold-2); }
h4 { font-size: 1.08rem; margin: 1.2em 0 0.3em; color: var(--gold-2); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
strong { color: var(--parch); }
em { color: var(--parch-2); }
hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--brass), transparent); margin: 2.5em 0; }
small { color: var(--ink-faint); }

.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #111; padding: 0.5em 1em; z-index: 100; }
.skip:focus { left: 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }

/* ---------- Header & nav ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 12, 9, 0.96), rgba(13, 21, 16, 0.92));
  position: sticky; top: 0; z-index: 20;
}
.site-header::after {
  content: ""; display: block; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brass) 20%, var(--gold-2) 50%, var(--brass) 80%, transparent);
  opacity: 0.55;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--parch); min-width: 0; }
.brand img { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
.brand-name .amp { color: var(--gold); font-style: italic; }
.brand-sub { display: block; font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }

.nav-toggle { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block; padding: 6px 10px; border-radius: var(--radius);
  font-family: var(--sans); font-size: 0.88rem; letter-spacing: 0.03em;
  color: var(--ink-dim); text-decoration: none;
}
.site-nav a:hover { color: var(--parch); background: rgba(201, 162, 74, 0.1); }
.site-nav a[aria-current="page"] { color: var(--gold-2); background: rgba(201, 162, 74, 0.14); box-shadow: inset 0 -2px 0 var(--gold); }

@media (max-width: 940px) {
  .site-header { position: static; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { width: 100%; }
  .site-nav ul { gap: 4px; }
  .site-nav a { padding: 6px 9px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
  /* With JS, collapse the menu behind a toggle button */
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--parch); border: 1px solid var(--brass);
    border-radius: var(--radius); padding: 6px 12px; font: inherit; font-family: var(--sans); font-size: 0.9rem; cursor: pointer;
  }
  .js .nav-toggle .bars { width: 18px; height: 2px; background: var(--gold-2); position: relative; display: inline-block; }
  .js .nav-toggle .bars::before, .js .nav-toggle .bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--gold-2); }
  .js .nav-toggle .bars::before { top: -6px; }
  .js .nav-toggle .bars::after { top: 6px; }
  .js .site-nav { display: none; padding-bottom: 6px; }
  .js .site-nav.open { display: block; }
  .js .site-nav ul { flex-direction: column; }
}

/* ---------- Hero ---------- */

.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }
.eyebrow { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--moss); margin: 0 0 0.8em; }
.lede { font-size: 1.2rem; color: var(--ink); max-width: 38em; }
.hero-cards { position: relative; height: 340px; max-width: 460px; margin: 0 auto; width: 100%; }
.hero-cards img {
  position: absolute; width: 58%; border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(227, 196, 119, 0.25);
}
.hero-cards .c1 { left: 0; top: 30px; transform: rotate(-8deg); }
.hero-cards .c2 { left: 21%; top: 0; transform: rotate(1deg); z-index: 2; }
.hero-cards .c3 { right: 0; top: 40px; transform: rotate(9deg); }
@media (max-width: 480px) { .hero-cards { height: 260px; } }

.page-head { padding: 44px 0 10px; }
.page-head p { max-width: 46em; color: var(--ink-dim); font-size: 1.1rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.4em; }
.btn {
  display: inline-block; padding: 10px 18px; border-radius: var(--radius);
  font-family: var(--sans); font-size: 0.92rem; font-weight: 600; letter-spacing: 0.03em; text-decoration: none;
  border: 1px solid var(--gold); color: #1a1408;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}
.btn:hover { color: #000; background: linear-gradient(180deg, #f0d48c, var(--gold-2)); }
.btn.ghost { background: transparent; color: var(--gold-2); }
.btn.ghost:hover { background: rgba(201, 162, 74, 0.12); color: #fff1c8; }

/* ---------- Layout ---------- */

main { flex: 1 0 auto; padding-bottom: 60px; }
.prose { max-width: 50em; }
.two-col { display: grid; gap: 28px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } .two-col.wide-left { grid-template-columns: 1.4fr 1fr; } }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.2em 0 0.5em; padding: 0; list-style: none; }
.toc li { margin: 0; }
.toc a {
  display: inline-block; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
  font-family: var(--sans); font-size: 0.85rem; text-decoration: none; color: var(--ink-dim); background: rgba(255, 255, 255, 0.02);
}
.toc a:hover { border-color: var(--brass); color: var(--parch); }

section[id] { scroll-margin-top: 90px; }

/* ---------- Panels ---------- */

.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; position: relative;
}
.panel > :last-child { margin-bottom: 0; }
.panel h3:first-child, .panel h4:first-child { margin-top: 0; }

.parchment {
  background-color: var(--parch);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(ellipse at 90% 90%, rgba(160, 120, 60, 0.22), transparent 55%);
  color: var(--parch-ink);
  border-radius: 4px; padding: 24px 26px;
  box-shadow: 0 0 0 1px #b99c5e, 0 0 0 5px #20180c, 0 0 0 6px #6b5528, 0 14px 30px rgba(0, 0, 0, 0.5);
  margin: 28px 6px;
}
.parchment h2, .parchment h3, .parchment h4, .parchment strong { color: #3a2a10; }
.parchment em { color: #4a3a1e; }
.parchment a { color: #6b3f12; }
.parchment > :first-child { margin-top: 0; }
.parchment > :last-child { margin-bottom: 0; }

.callout { border-left: 3px solid var(--gold); padding: 10px 16px; background: rgba(201, 162, 74, 0.07); border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2em 0; }
.callout.warn { border-left-color: var(--blood); background: rgba(164, 72, 58, 0.09); }
.callout > :last-child { margin-bottom: 0; }

.grid { display: grid; gap: 18px; }
.grid.g2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid.g3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.grid.g4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }

/* ---------- Feature tiles (home) ---------- */

.tile { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); overflow: hidden; padding: 0; }
.tile:hover { border-color: var(--brass); color: var(--ink); }
.tile:hover h3 { color: #fff1c8; }
.tile .tile-img { aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-bottom: 1px solid var(--line); }
.tile .tile-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; opacity: 0.85; transition: opacity 0.2s, transform 0.4s; }
.tile:hover .tile-img img { opacity: 1; transform: scale(1.03); }
.tile .tile-body { padding: 16px 18px 18px; }
.tile h3 { margin: 0 0 0.3em; }
.tile p { margin: 0; color: var(--ink-dim); font-size: 0.97rem; }

/* ---------- Figures / card images ---------- */

figure { margin: 0; }
.card-fig img { border-radius: 9px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(227, 196, 119, 0.2); }
.card-fig figcaption { font-family: var(--sans); font-size: 0.82rem; color: var(--ink-faint); margin-top: 8px; text-align: center; }
.float-card { float: right; width: 210px; margin: 0 0 16px 22px; }
.float-card.land { width: 300px; }
@media (max-width: 600px) { .float-card, .float-card.land { float: none; width: auto; max-width: 300px; margin: 0 auto 18px; } }
.clear { clear: both; }

.card-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); margin: 1.4em 0; }
.card-row.land { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* ---------- Class colours ---------- */

.cls-guardian { --cls: #3f7fc2; }
.cls-seeker { --cls: #d89a2b; }
.cls-rogue { --cls: #3e9b5a; }
.cls-mystic { --cls: #8a5bbf; }
.cls-survivor { --cls: #c0443b; }
.cls-neutral { --cls: #9a9a8a; }

.class-head { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.class-head .sigil { width: 14px; height: 14px; border-radius: 50%; background: var(--cls); box-shadow: 0 0 12px var(--cls); flex: none; }
.class-head h2 { margin: 0; }
.class-intro { color: var(--ink-dim); margin: 0.8em 0 1.2em; max-width: 50em; }

.inv { border-top: 3px solid var(--cls, var(--brass)); display: flex; flex-direction: column; }
.inv img { border-radius: 8px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); margin-bottom: 12px; }
.inv h3 { margin: 0; font-size: 1.2rem; color: var(--parch); }
.inv .sub { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cls); margin-bottom: 8px; }
.inv p { font-size: 0.97rem; color: var(--ink-dim); margin-bottom: 0.7em; }
.inv .from { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-faint); margin-top: auto; }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 6px 0 12px; padding: 0; list-style: none; font-family: var(--sans); text-align: center; }
.stats li { margin: 0; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); border-radius: 4px; padding: 3px 0; }
.stats b { display: block; font-size: 1.02rem; color: var(--parch); }
.stats span { font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.stats .hp b { color: #e08a7c; }
.stats .san b { color: #8fb2e0; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.filter-bar button {
  font-family: var(--sans); font-size: 0.86rem; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--ink-dim);
}
.filter-bar button:hover { color: var(--parch); border-color: var(--brass); }
.filter-bar button[aria-pressed="true"] { color: #17120a; background: var(--gold-2); border-color: var(--gold-2); }
.is-hidden { display: none !important; }

/* ---------- Campaigns ---------- */

.camp { display: grid; gap: 20px; padding: 0; overflow: hidden; margin-bottom: 22px; }
@media (min-width: 760px) { .camp { grid-template-columns: 300px 1fr; } }
.camp .camp-img { background: #000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.camp .camp-img img { border-radius: 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6); }
.camp .camp-img.empty { background: radial-gradient(circle at 50% 40%, #3a1712, #0b0706 70%); min-height: 160px; }
.camp .camp-img.empty span { font-family: var(--serif); font-size: 1.4rem; color: #d78f80; letter-spacing: 0.06em; text-align: center; }
.camp .camp-body { padding: 18px 22px 20px 22px; }
@media (min-width: 760px) { .camp .camp-body { padding-left: 0; } }
.camp h3 { margin: 0 0 0.2em; font-size: 1.45rem; color: var(--parch); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--sans); font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 10px; }
.meta span { white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.tags li { margin: 0; font-family: var(--sans); font-size: 0.75rem; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-dim); background: rgba(0, 0, 0, 0.25); }

.dread { display: inline-flex; gap: 3px; vertical-align: middle; }
.dread i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--blood); display: inline-block; }
.dread i.on { background: var(--blood); box-shadow: 0 0 6px rgba(164, 72, 58, 0.8); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 0.9rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: rgba(201, 162, 74, 0.1); color: var(--gold-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { display: inline-block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--moss), var(--gold)); vertical-align: middle; margin-right: 8px; }
.w0 { width: 0; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }
.bar-cell { min-width: 160px; }
.bar-track { display: inline-block; width: 90px; background: rgba(255, 255, 255, 0.06); border-radius: 4px; vertical-align: middle; margin-right: 8px; }
.bar-track .bar { margin: 0; display: block; }

/* ---------- Chaos tokens ---------- */

.tokens { display: flex; flex-wrap: wrap; gap: 8px; margin: 1em 0; padding: 0; list-style: none; }
.tokens li { margin: 0; }
.token {
  width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.02rem; color: #f3ead2;
  background: radial-gradient(circle at 35% 30%, #4a4a44, #1d1d1a 70%);
  border: 2px solid #8b8b80; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), inset 0 0 6px rgba(0, 0, 0, 0.7);
}
.token.sym { background: radial-gradient(circle at 35% 30%, #3e2a1f, #160d08 70%); border-color: var(--brass); font-size: 0.66rem; font-family: var(--sans); letter-spacing: 0.02em; text-align: center; line-height: 1.05; }
.token.elder { background: radial-gradient(circle at 35% 30%, #2f5a3a, #0e2014 70%); border-color: var(--moss); font-size: 0.66rem; font-family: var(--sans); }
.token.fail { background: radial-gradient(circle at 35% 30%, #6a1f17, #200806 70%); border-color: var(--blood); font-size: 0.66rem; font-family: var(--sans); }
.token.big { width: 96px; height: 96px; font-size: 1.9rem; }
.token.big.sym, .token.big.elder, .token.big.fail { font-size: 0.95rem; }

.bag-sim { display: none; }
.js .bag-sim { display: block; }
.bag-sim .bag-out { display: flex; align-items: center; gap: 18px; min-height: 110px; flex-wrap: wrap; }
.bag-sim .bag-text { font-family: var(--sans); font-size: 0.92rem; color: var(--ink-dim); max-width: 28em; }
.bag-sim button { margin-top: 6px; cursor: pointer; font-family: var(--sans); }
.bag-sim .bag-history { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; min-height: 30px; }
.bag-sim .bag-history .token { width: 30px; height: 30px; font-size: 0.72rem; border-width: 1px; }
.bag-sim .bag-history .token.sym, .bag-sim .bag-history .token.elder, .bag-sim .bag-history .token.fail { font-size: 0.5rem; }
.token.pop { animation: pop 0.35s ease-out; }
@keyframes pop { from { transform: scale(0.4) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Phases ---------- */

.phases { counter-reset: phase; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin: 1.2em 0; padding: 0; list-style: none; }
.phases li { margin: 0; counter-increment: phase; }
.phases .panel { height: 100%; }
.phases h4 { margin-top: 0; }
.phases h4::before { content: counter(phase, upper-roman) ". "; color: var(--brass); }

/* ---------- Spotlight ---------- */

.spot { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; }
.spot img { border-radius: 7px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); }
.spot h4 { margin: 0 0 0.2em; }
.spot .cls-line { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cls, var(--ink-faint)); margin-bottom: 6px; }
.spot p { font-size: 0.95rem; color: var(--ink-dim); margin-bottom: 0.5em; }
@media (max-width: 420px) { .spot { grid-template-columns: 90px 1fr; } }

/* ---------- Gallery ---------- */

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 170px), 1fr)); margin: 1em 0 2em; }
.gallery.land { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.gallery a { display: block; text-decoration: none; color: var(--ink-faint); }
.gallery img { border-radius: 8px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55); transition: transform 0.2s, box-shadow 0.2s; width: 100%; }
.gallery a:hover img { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--gold); }
.gallery figcaption { font-family: var(--sans); font-size: 0.78rem; margin-top: 6px; line-height: 1.35; }

.lightbox {
  position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; flex-direction: column;
  background: rgba(4, 7, 5, 0.94); padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 80vh; max-width: min(92vw, 640px); width: auto; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8); }
.lightbox .lb-cap { color: var(--ink); font-family: var(--sans); font-size: 0.9rem; margin-top: 12px; text-align: center; max-width: 40em; }
.lightbox button {
  position: absolute; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--brass); color: var(--gold-2);
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; line-height: 1;
}
.lightbox .lb-close { top: 14px; right: 14px; }
.lightbox .lb-prev { left: 10px; top: 50%; }
.lightbox .lb-next { right: 10px; top: 50%; }
body.lb-lock { overflow: hidden; }

/* ---------- Links page ---------- */

.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.link-list li { margin: 0; }
.link-list a.link-title { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; }
.link-list .url { display: block; font-family: var(--sans); font-size: 0.76rem; color: var(--ink-faint); word-break: break-all; }
.link-list p { margin: 4px 0 0; color: var(--ink-dim); font-size: 0.95rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line); background: #070a08; color: var(--ink-faint);
  font-family: var(--sans); font-size: 0.84rem; padding: 28px 0 34px;
}
.site-footer .foot-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .site-footer .foot-grid { grid-template-columns: 1.6fr 1fr; } }
.site-footer a { color: var(--ink-dim); }
.site-footer .disclaimer { color: var(--ink-dim); max-width: 46em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.site-footer li { margin: 0; }
.quote { font-family: var(--serif); font-style: italic; color: var(--ink-faint); }

/* ---------- Misc ---------- */

.center { text-align: center; }
.muted { color: var(--ink-dim); }
.mt0 { margin-top: 0; }
.big-404 { font-family: var(--serif); font-size: clamp(4rem, 18vw, 9rem); color: var(--gold); line-height: 1; margin: 0; text-shadow: 0 0 40px rgba(201, 162, 74, 0.35); }
.portrait { max-width: 240px; border-radius: 4px; box-shadow: 0 0 0 1px #6b5528, 0 10px 24px rgba(0, 0, 0, 0.6); filter: sepia(0.25); }
.pulp-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr)); }
.pulp-row img { border-radius: 3px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); }
.to-top { display: inline-block; margin-top: 1em; font-family: var(--sans); font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .filter-bar, .bag-sim { display: none; }
  body { background: #fff; color: #000; }
}
.center .btn-row { justify-content: center; }
@media (min-width: 860px) { .grid.tiles { grid-template-columns: repeat(3, 1fr); } }
