/* WORLDTAKER wiki — war table: charred oak, iron, parchment, crimson and gold.
   Generated by tools/gen-wiki.mjs. Edits here are overwritten. */
:root {
  --ground: #14100e;
  --panel: #1e1814;
  --panel-light: #241c16;
  --line: #3a2d22;
  --ink: #e8ddc8;
  --ink-dim: #a89878;
  --crimson: #c22a35;
  --gold: #c9973b;
  --gold-bright: #e8bb5e;
  --display: Georgia, "Times New Roman", serif;
  --body: "Trebuchet MS", Verdana, Geneva, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--gold-bright); text-decoration: none; border-bottom: 1px solid rgba(201,151,59,.35); }
a:hover { color: #fff; border-bottom-color: var(--gold-bright); }

.masthead {
  border-bottom: 2px solid var(--line);
  background: linear-gradient(180deg, #221a15, #16110e);
  padding: .7rem 1.25rem;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.25rem;
  position: sticky; top: 0; z-index: 10;
}
.brand img { vertical-align: middle; margin-right: .5rem; }
.brand { display: inline-flex; align-items: center; }
.wordmark img { display: block; margin: 0 auto; max-width: min(600px, 88%); height: auto; }
.brand-legacy {
  font-family: var(--display);
  font-size: 1.1rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); border: 0;
}
.brand:hover { color: var(--gold-bright); }
.masthead nav { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.masthead nav .nav-up { color: var(--gold-bright); border-right: 1px solid var(--line); padding-right: 1rem; }
.masthead nav .nav-up:hover { color: var(--gold-bright); }
.masthead nav a {
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-dim); border: 0; padding: .1rem 0;
}
.masthead nav a:hover { color: var(--ink); }
.masthead nav a.nav-on { color: var(--gold-bright); box-shadow: inset 0 -2px 0 var(--crimson); }

/* ---- THE ARRIVAL: the game's name over the game's art, on every page ---- */
.hero { position: relative; border-bottom: 2px solid var(--line); overflow: hidden; }
.hero-art {
  position: absolute; inset: 0;
  background: url(img/hero.webp) center/cover no-repeat;
  filter: saturate(.75) contrast(1.05);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,8,6,.92) 0%, rgba(10,8,6,.74) 42%, rgba(10,8,6,.34) 100%),
    linear-gradient(180deg, rgba(10,8,6,.5), rgba(10,8,6,.1) 45%, rgba(10,8,6,.72) 100%);
}
.hero-in {
  position: relative; z-index: 1;
  max-width: 68rem; margin: 0 auto; padding: 1.6rem 1.25rem 1.5rem;
}
.wordmark {
  font-family: var(--display); font-weight: normal;
  font-size: clamp(2.4rem, 9vw, 5rem); line-height: .95;
  letter-spacing: .16em; text-transform: uppercase;
  margin: 0; color: var(--gold);
  text-shadow: 0 2px 0 #0a0806, 0 0 40px rgba(201,151,59,.25);
}
.kicker {
  font-family: var(--display); font-size: clamp(1rem, 2.6vw, 1.4rem);
  letter-spacing: .3em; text-transform: uppercase; color: var(--ink-dim);
  margin: .5rem 0 .6rem; border-top: 1px solid rgba(201,151,59,.3); padding-top: .5rem;
  display: inline-block;
}
.wordmark-sm {
  display: inline-block; border: 0;
  font-family: var(--display); font-size: .95rem;
  letter-spacing: .34em; text-transform: uppercase; color: var(--gold);
  text-shadow: 0 1px 0 #0a0806;
}
.wordmark-sm:hover { color: var(--gold-bright); }
.hero h1 {
  font-family: var(--display); font-weight: normal;
  font-size: clamp(1.8rem, 5.6vw, 2.9rem); line-height: 1.05;
  letter-spacing: .06em; text-transform: uppercase;
  margin: .15rem 0 .5rem; color: var(--ink);
  text-shadow: 0 2px 6px #0a0806;
}
.hero-home .hero-in { padding: 1.35rem 1.25rem 1.25rem; }
.hero-home .wordmark img { max-width: min(430px, 76%); }
.hero .lede { color: var(--ink); text-shadow: 0 1px 4px #0a0806; margin: 0; }

main { max-width: 68rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

h2 {
  font-family: var(--display); font-weight: normal;
  font-size: 1.5rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); margin: 2.5rem 0 .75rem;
  padding-bottom: .4rem; border-bottom: 1px solid var(--line);
}
section:first-of-type > h2 { margin-top: 1rem; }
h3 {
  font-family: var(--display); font-weight: normal;
  font-size: 1.25rem; letter-spacing: .05em; color: var(--gold-bright);
  margin: 0 0 .5rem;
}
h3.band { font-size: .95rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-dim); margin: 1.4rem 0 .5rem; }
h4 {
  font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-dim); margin: 1.5rem 0 .5rem; font-weight: 700;
}
p { margin: 0 0 .85rem; max-width: 62ch; }
.lede { font-size: 1.05rem; color: var(--ink); max-width: 60ch; }
.note { font-size: .86rem; color: var(--ink-dim); max-width: 70ch; }
.caption { font-size: .86rem; color: var(--ink-dim); max-width: 70ch; margin-top: .7rem; }
.plain { color: var(--ink-dim); }
.dim { color: var(--ink-dim); }

blockquote {
  margin: 0 0 .8rem; padding: .35rem 0 .35rem 1rem;
  border-left: 3px solid var(--crimson);
  font-family: var(--display); font-style: italic;
  color: var(--gold-bright); font-size: 1.1rem; max-width: 46ch;
}

/* ---- pictures ---- */
.ri { display: block; width: 40px; height: 40px; object-fit: contain; image-rendering: auto; }
.ii { width: 20px; height: 20px; object-fit: contain; vertical-align: -.32em; margin-right: .3em; }
a.ref { border-bottom-color: transparent; }
a.ref:hover { border-bottom-color: var(--gold-bright); }
.portrait { display: block; object-fit: contain; }
.portrait.champ { width: 140px; height: 140px; }

/* ---- the browse grid: no category page opens with prose ---- */
.tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: .6rem; margin: 0 0 1rem;
}
.tiles-wide { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.tiles-sm { grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); }
.tile {
  --ink: var(--line);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: .25rem; padding: .6rem .4rem .5rem;
  background: var(--panel); border: 1px solid var(--line);
  border-bottom: 3px solid var(--ink);
  color: var(--ink-dim); font-size: .78rem; line-height: 1.3;
}
.tile:hover { background: var(--panel-light); color: var(--ink-dim); border-color: var(--gold); border-bottom-color: var(--gold); }
.tile.static:hover { background: var(--panel); border-color: var(--line); border-bottom-color: var(--ink); }
.tile-art { display: block; }
.tile-art .art { display: block; width: 84px; height: 84px; object-fit: contain; }
.tiles-wide .tile-art .art { width: 132px; height: 132px; }
.tiles-sm .tile-art .art { width: 60px; height: 60px; }
.tile-name { color: var(--gold-bright); font-family: var(--display); font-size: .92rem; letter-spacing: .02em; }
.tile:hover .tile-name { color: #fff; }
.tile-sub { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.tiles-curse .tile { border-bottom-color: var(--crimson); }
.band-head {
  display: flex; align-items: center; gap: .5rem;
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-dim); margin: 1.2rem 0 .5rem;
}
.band-head a { border: 0; color: var(--ink-dim); }
.band-head a:hover { color: var(--gold-bright); }

/* ---- the world map ---- */
.mapwrap { display: grid; grid-template-columns: minmax(0, 32rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.mapside { position: sticky; top: 4.5rem; }
.key { display: inline-block; width: .85rem; height: .85rem; vertical-align: -.1em; margin-right: .4rem; background: #2a221b; }
.key-seat { border: 2px solid var(--crimson); }
.key-yours { border: 2px solid var(--gold-bright); }
.wmap { display: block; width: 100%; height: auto; max-width: 32rem; margin: 0 auto;
  background: #100c0a; border: 1px solid var(--line); }
.wmap .edges line { stroke: rgba(201,151,59,.3); stroke-width: 7; stroke-linecap: round; }
.wmap .prov { fill-opacity: .5; stroke: #100c0a; stroke-width: 7; transition: fill-opacity .12s; }
.wmap .prov.seat { stroke: var(--crimson); stroke-width: 12; }
.wmap .prov.yours { stroke: var(--gold-bright); stroke-width: 12; }
.wmap a { border: 0; }
.wmap a:hover .prov, .wmap a:focus .prov { fill-opacity: .95; }
.wmap text { pointer-events: none; fill: #17110d; font-family: Georgia, serif; text-anchor: middle; }
.wmap .tier { font-size: 84px; font-weight: 700; }
.wmap .pname { font-size: 46px; letter-spacing: 1px; paint-order: stroke; stroke: rgba(232,221,200,.35); stroke-width: 5px; }
.mapdefs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wmini { display: block; width: 100%; max-width: 15rem; height: auto;
  background: #100c0a; border: 1px solid var(--line); }
.wmini .nbr { fill: #4a3a2c; stroke: #100c0a; stroke-width: 7; }
.wmini .here { fill-opacity: 1; stroke: var(--gold-bright); stroke-width: 14; }

/* ---- the animated bestiary ---- */
.bestiary-intro { margin-bottom: 2.3rem; }
.bestiary-jumps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem; margin: 0 0 1rem;
}
.bestiary-jumps a {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .15rem .45rem;
  min-width: 0; padding: .8rem .9rem; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-bottom: 3px solid var(--faction-ink, var(--crimson));
}
.bestiary-jumps a:hover { color: #fff; background: var(--panel-light); border-color: var(--faction-ink, var(--crimson)); }
.bestiary-jumps .ink { grid-row: 1 / span 2; background: var(--faction-ink, var(--crimson)); }
.bestiary-jumps strong { font-family: var(--display); color: var(--gold-bright); font-weight: normal; }
.bestiary-jumps small { color: var(--ink-dim); text-transform: uppercase; letter-spacing: .08em; font-size: .65rem; }
.bestiary-family { margin: 0 0 2.7rem; }
.bestiary-family-head {
  padding: 1rem 1.15rem .35rem; margin: 0 0 .7rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--faction-ink) 11%, var(--panel)), var(--panel));
  border: 1px solid var(--line); border-left: 4px solid var(--faction-ink);
}
.bestiary-family-head h2 { margin: 0 0 .6rem; }
.bestiary-family-lore { max-width: 66rem; margin: 0 0 .8rem; color: var(--ink); }
.bestiary-family-head .facts { margin-bottom: .65rem; }
.bestiary-list { display: grid; gap: .7rem; }
.bestiary-card {
  --faction-ink: var(--gold);
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--faction-ink); box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.bestiary-card > summary {
  list-style: none; display: grid; grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 1rem; align-items: center; min-height: 160px; padding: 0 1rem 0 0;
  cursor: pointer; user-select: none;
}
.bestiary-card > summary::-webkit-details-marker { display: none; }
.bestiary-card > summary:hover { background: linear-gradient(90deg, rgba(255,255,255,.025), transparent); }
.bestiary-card > summary:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.bestiary-card[open] { border-color: color-mix(in srgb, var(--faction-ink) 72%, var(--line)); }
.bestiary-art {
  display: grid; place-items: center; width: 160px; height: 160px; overflow: hidden;
  background: radial-gradient(circle, color-mix(in srgb, var(--faction-ink) 10%, var(--panel)) 0%, var(--panel) 68%);
}
.bestiary-art .art, .bestiary-art .portrait { display: block; width: 160px; height: 160px; object-fit: contain; }
.bestiary-summary { display: flex; flex-direction: column; min-width: 0; gap: .28rem; padding: .8rem 0; }
.bestiary-eyebrow {
  color: var(--faction-ink); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 700;
}
.bestiary-summary strong { color: var(--gold-bright); font-family: var(--display); font-size: 1.45rem; font-weight: normal; }
.bestiary-promise { color: var(--ink); line-height: 1.4; }
.bestiary-glance { color: var(--ink-dim); font-size: .78rem; letter-spacing: .03em; }
.bestiary-first { color: var(--faction-ink); font-size: .72rem; }
.bestiary-open {
  justify-self: end; color: var(--gold); border: 1px solid currentColor;
  padding: .38rem .55rem; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
}
.when-open { display: none; }
.bestiary-card[open] .when-closed { display: none; }
.bestiary-card[open] .when-open { display: inline; }
.bestiary-body { padding: 1rem 1.15rem .25rem; border-top: 1px solid var(--line); }
.bestiary-body .facts { margin-bottom: .85rem; }
.wardens-section { --faction-ink: var(--crimson); }
.warden-card { --faction-ink: var(--crimson); }
.warden-jump { --faction-ink: var(--crimson); }

/* ---- entries ---- */
.entry {
  background: var(--panel);
  border: 1px solid var(--line);
  margin: 0 0 1.25rem;
}
.entry-body { padding: 1.1rem 1.25rem 1.25rem; border-left: 3px solid var(--crimson); }
.entry .rank {
  font-family: var(--body); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-dim); margin-left: .5rem;
}

/* the province's own ground art as its header */
.banner {
  position: relative; background-size: 256px; background-repeat: repeat;
  border-bottom: 1px solid var(--line);
}
.banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(12,9,7,.94) 0%, rgba(12,9,7,.82) 55%, rgba(12,9,7,.5) 100%);
}
.banner-in { position: relative; z-index: 1; padding: 1.1rem 1.25rem 1rem; }
.banner-in h3 { font-size: 1.5rem; margin-bottom: .15rem; text-shadow: 0 2px 4px #000; }
.banner-meta {
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-dim); margin: 0 0 .5rem;
}
.banner blockquote { margin-bottom: 0; }

/* art → the game's own words → the numbers */
.item { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: .5rem; }
.item-art { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.item-art .plate {
  display: block; width: 128px; height: 128px; object-fit: contain;
  background: #100c0a; border: 1px solid var(--line); border-bottom: 3px solid var(--gold);
  padding: .35rem;
}
.item-fx { display: flex; flex-direction: column; align-items: center; font-size: .68rem; letter-spacing: .06em; }
.item-fx .fx { width: 44px; height: 44px; object-fit: contain; }
.item-in { flex: 1 1 22rem; min-width: 0; }
.card-line {
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 .7rem;
}
.evo { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: .8rem; }
.evo-art { position: relative; flex: 0 0 auto; }
.evo-art .evo-icon {
  display: block; width: 112px; height: 112px; object-fit: contain;
  background: #100c0a; border: 1px solid var(--crimson); padding: .3rem;
}
.evo-fx { position: absolute; right: -14px; bottom: -14px; width: 52px; height: 52px; object-fit: contain; }
.evo-in { flex: 1 1 20rem; min-width: 0; }
.recipe { font-size: .9rem; color: var(--ink-dim); }

.finale { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: .5rem; }
.finale-art {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .35rem;
  background: var(--panel); padding: .5rem; border: 1px solid var(--line);
}
.finale-cap { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.finale-in { flex: 1 1 20rem; min-width: 0; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.split > div { min-width: 0; }

/* the moving wardens, from public/assets/anim */
.walk { display: block; background-repeat: no-repeat; background-color: #1e1814; }

.walk-briarheart_walk {
  width: 160px; height: 160px;
  background-image: url(img/a/briarheart_walk.webp?v=1785874556401);
  background-size: 2240px 160px;
  animation: walk-briarheart_walk 1.17s steps(14) infinite;
}
@keyframes walk-briarheart_walk { to { background-position-x: -2240px; } }

.walk-carrion_king_strut {
  width: 160px; height: 160px;
  background-image: url(img/a/carrion_king_strut.webp?v=1785874556650);
  background-size: 4160px 160px;
  animation: walk-carrion_king_strut 2.13s steps(26) infinite;
}
@keyframes walk-carrion_king_strut { to { background-position-x: -4160px; } }

.walk-granite_walk {
  width: 160px; height: 160px;
  background-image: url(img/a/granite_walk.webp?v=1785874556883);
  background-size: 4160px 160px;
  animation: walk-granite_walk 2.17s steps(26) infinite;
}
@keyframes walk-granite_walk { to { background-position-x: -4160px; } }

.walk-hollow_crown_advance {
  width: 160px; height: 160px;
  background-image: url(img/a/hollow_crown_advance.webp?v=1785874557067);
  background-size: 3840px 160px;
  animation: walk-hollow_crown_advance 1.96s steps(24) infinite;
}
@keyframes walk-hollow_crown_advance { to { background-position-x: -3840px; } }

.walk-thornhound_run {
  width: 160px; height: 160px;
  background-image: url(img/a/thornhound_run.webp?v=1785874557129);
  background-size: 1760px 160px;
  animation: walk-thornhound_run 0.92s steps(11) infinite;
}
@keyframes walk-thornhound_run { to { background-position-x: -1760px; } }

.walk-pebbleling_run {
  width: 160px; height: 160px;
  background-image: url(img/a/pebbleling_run.webp?v=1785874557182);
  background-size: 1600px 160px;
  animation: walk-pebbleling_run 0.79s steps(10) infinite;
}
@keyframes walk-pebbleling_run { to { background-position-x: -1600px; } }

.walk-diver_fly {
  width: 160px; height: 160px;
  background-image: url(img/a/diver_fly.webp?v=1785874557217);
  background-size: 1120px 160px;
  animation: walk-diver_fly 0.58s steps(7) infinite;
}
@keyframes walk-diver_fly { to { background-position-x: -1120px; } }

.walk-sprig_run {
  width: 160px; height: 160px;
  background-image: url(img/a/sprig_run.webp?v=1785874557307);
  background-size: 1440px 160px;
  animation: walk-sprig_run 0.75s steps(9) infinite;
}
@keyframes walk-sprig_run { to { background-position-x: -1440px; } }

.walk-bulwark_run {
  width: 160px; height: 160px;
  background-image: url(img/a/bulwark_run.webp?v=1785874557474);
  background-size: 2880px 160px;
  animation: walk-bulwark_run 1.5s steps(18) infinite;
}
@keyframes walk-bulwark_run { to { background-position-x: -2880px; } }

.walk-shaman_walk {
  width: 160px; height: 160px;
  background-image: url(img/a/shaman_walk.webp?v=1785874557686);
  background-size: 3360px 160px;
  animation: walk-shaman_walk 1.75s steps(21) infinite;
}
@keyframes walk-shaman_walk { to { background-position-x: -3360px; } }

.walk-pecker_run {
  width: 160px; height: 160px;
  background-image: url(img/a/pecker_run.webp?v=1785874557832);
  background-size: 1760px 160px;
  animation: walk-pecker_run 0.92s steps(11) infinite;
}
@keyframes walk-pecker_run { to { background-position-x: -1760px; } }

.walk-roc_walk {
  width: 160px; height: 160px;
  background-image: url(img/a/roc_walk.webp?v=1785874557935);
  background-size: 2400px 160px;
  animation: walk-roc_walk 1.21s steps(15) infinite;
}
@keyframes walk-roc_walk { to { background-position-x: -2400px; } }

.walk-plague_crow_fly {
  width: 160px; height: 160px;
  background-image: url(img/a/plague_crow_fly.webp?v=1785874557982);
  background-size: 1280px 160px;
  animation: walk-plague_crow_fly 0.67s steps(8) infinite;
}
@keyframes walk-plague_crow_fly { to { background-position-x: -1280px; } }

.walk-husk_shamble {
  width: 160px; height: 160px;
  background-image: url(img/a/husk_shamble.webp?v=1785874558303);
  background-size: 2560px 160px;
  animation: walk-husk_shamble 1.33s steps(16) infinite;
}
@keyframes walk-husk_shamble { to { background-position-x: -2560px; } }

.walk-obsidian_stomp {
  width: 160px; height: 160px;
  background-image: url(img/a/obsidian_stomp.webp?v=1785874558441);
  background-size: 3360px 160px;
  animation: walk-obsidian_stomp 1.75s steps(21) infinite;
}
@keyframes walk-obsidian_stomp { to { background-position-x: -3360px; } }

.walk-geode_walk {
  width: 160px; height: 160px;
  background-image: url(img/a/geode_walk.webp?v=1785874558606);
  background-size: 4480px 160px;
  animation: walk-geode_walk 2.33s steps(28) infinite;
}
@keyframes walk-geode_walk { to { background-position-x: -4480px; } }

.walk-rootweaver_walk {
  width: 160px; height: 160px;
  background-image: url(img/a/rootweaver_walk.webp?v=1785874558715);
  background-size: 3520px 160px;
  animation: walk-rootweaver_walk 1.79s steps(22) infinite;
}
@keyframes walk-rootweaver_walk { to { background-position-x: -3520px; } }

.walk-carrion_scavenger_sprint {
  width: 160px; height: 160px;
  background-image: url(img/a/carrion_scavenger_sprint.webp?v=1785874558768);
  background-size: 1440px 160px;
  animation: walk-carrion_scavenger_sprint 0.75s steps(9) infinite;
}
@keyframes walk-carrion_scavenger_sprint { to { background-position-x: -1440px; } }

.walk-husk_resonator_walk {
  width: 160px; height: 160px;
  background-image: url(img/a/husk_resonator_walk.webp?v=1785874832317);
  background-size: 4000px 160px;
  animation: walk-husk_resonator_walk 2.04s steps(25) infinite;
}
@keyframes walk-husk_resonator_walk { to { background-position-x: -4000px; } }
@media (prefers-reduced-motion: reduce) { .walk { animation: none !important; } }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .85rem; }
.card {
  display: flex; gap: .8rem; align-items: center;
  border: 1px solid var(--line); border-bottom: 3px solid var(--line);
  background: var(--panel); padding: .8rem .9rem; color: var(--ink);
}
.card:hover { border-bottom-color: var(--crimson); background: var(--panel-light); color: var(--ink); }
.card-art { flex: 0 0 auto; width: 54px; height: 54px; object-fit: contain; }
.card-in { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.card-in b { font-family: var(--display); font-weight: normal; font-size: 1.1rem; color: var(--gold-bright); }
.card-in span { font-size: .84rem; color: var(--ink-dim); }
.guide-home {
  margin: 0 0 2.4rem; padding: 1.1rem 1.15rem 1.25rem;
  background: linear-gradient(145deg, rgba(36,28,22,.96), rgba(24,18,15,.96));
  border: 1px solid var(--line); border-top: 3px solid var(--gold);
  box-shadow: 0 16px 38px rgba(0,0,0,.22);
}
.guide-home > h2 { margin-top: 0; }
.guide-home .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-home .card { min-height: 92px; }
.guide-home .card-art { width: 64px; height: 64px; }

.facts { margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0 1.6rem; }
.facts > div { display: flex; gap: .6rem; padding: .3rem .1rem; border-bottom: 1px solid rgba(58,45,34,.6); min-width: 0; }
.facts dt { flex: 0 0 8.5rem; color: var(--ink-dim); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; padding-top: .12rem; }
.facts dd { margin: 0; flex: 1 1 auto; font-size: .93rem; overflow-wrap: anywhere; min-width: 0; }

.scroll { overflow-x: auto; margin: 0 0 1rem; border: 1px solid var(--line); }
/* natural width, never squeezed: a wide table SCROLLS inside .scroll rather than
   crushing its last column into a twelve-line paragraph */
table.grid { border-collapse: collapse; width: max-content; min-width: 100%; font-size: .87rem; font-variant-numeric: tabular-nums; }
table.grid th, table.grid td { padding: .42rem .6rem; text-align: left; border-bottom: 1px solid rgba(58,45,34,.7); white-space: nowrap; }
table.grid td.art { padding: .2rem .4rem; width: 3.4rem; }
table.grid td.art a { border: 0; }
table.grid thead th {
  background: #1a1410; color: var(--gold); font-family: var(--body);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 2px solid var(--line); position: sticky; top: 0;
}
table.grid tbody tr:nth-child(even) { background: rgba(255,255,255,.018); }
table.grid tbody tr:hover { background: rgba(201,151,59,.07); }
table.grid tbody th[scope=row] { color: var(--ink); font-weight: 700; }
table.grid td:last-child { white-space: normal; min-width: 14rem; max-width: 26rem; }

code { font-family: var(--mono); font-size: .85em; color: var(--ink-dim); background: rgba(0,0,0,.3); padding: .05em .35em; border: 1px solid rgba(58,45,34,.8); }
pre {
  font-family: var(--mono); font-size: .85rem; line-height: 1.7;
  background: #100c0a; border: 1px solid var(--line); border-left: 3px solid var(--crimson);
  padding: .8rem 1rem; margin: 0; overflow-x: auto; color: var(--ink);
}
.contracts { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: .85rem; }
.contract { min-width: 0; }
.contract h4 { margin-top: 0; display: flex; align-items: center; gap: .4rem; color: var(--gold); }

.tag {
  display: inline-block; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .1rem .45rem; border: 1px solid currentColor; vertical-align: .15em;
}
.tag-common { color: #9aa08c; }
.tag-rare { color: #6fa8d8; }
.tag-epic { color: #b98ad8; }

.swatch, .ink {
  display: inline-block; width: .85rem; height: .85rem;
  border: 1px solid var(--line); vertical-align: -.1em; margin-right: .4rem;
}

footer {
  border-top: 1px solid var(--line); margin-top: 3rem;
  padding: 1.25rem; color: var(--ink-dim); font-size: .8rem;
}
footer p { max-width: none; margin: 0 0 .3rem; }
footer b { color: var(--gold); }

.back-to-top {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(232,187,94,.72);
  border-radius: 50%;
  background: rgba(30,24,20,.94);
  color: var(--gold-bright);
  box-shadow: 0 6px 22px rgba(0,0,0,.38);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease, color .12s ease, background .12s ease;
  cursor: pointer;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { color: #fff; background: #2a211a; }
.back-to-top:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.back-to-top svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 46rem) {
  .hero-home .hero-in { padding: 1.15rem 1rem 1.1rem; }
  .hero-in { padding: 1.2rem 1rem 1.2rem; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { flex-basis: 8rem; }
  main { padding: 1.25rem 1rem 3rem; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .45rem; }
  .tile-art .art { width: 64px; height: 64px; }
  .tiles-wide .tile-art .art { width: 96px; height: 96px; }
  /* four rows of navigation pinned to a phone screen is a wall, not a header */
  .masthead { position: static; }
  .mapwrap { grid-template-columns: 1fr; }
  .mapside { position: static; }
  .guide-home .cards { grid-template-columns: 1fr; }
  .bestiary-jumps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bestiary-card > summary {
    grid-template-columns: 112px minmax(0, 1fr); gap: .65rem;
    min-height: 112px; padding-right: .75rem;
  }
  .bestiary-art { width: 112px; height: 112px; }
  .bestiary-art .walk, .bestiary-art .art, .bestiary-art .portrait {
    transform: scale(.7); transform-origin: center;
  }
  .bestiary-summary { padding: .65rem 0 .35rem; }
  .bestiary-summary strong { font-size: 1.2rem; }
  .bestiary-promise { font-size: .88rem; }
  .bestiary-glance { font-size: .7rem; }
  .bestiary-open {
    grid-column: 1 / -1; justify-self: stretch; text-align: center;
    margin: 0 0 .7rem .75rem;
  }
  .back-to-top {
    right: calc(.75rem + env(safe-area-inset-right));
    bottom: calc(.75rem + env(safe-area-inset-bottom));
    width: 38px;
    height: 38px;
  }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: none; } }
/* the masthead is pinned, so an anchor must not land underneath it */
[id] { scroll-margin-top: 4.5rem; }
:target { outline: 1px solid rgba(201,151,59,.5); outline-offset: .35rem; }
