/* Omnoxia whitepaper — the game's palette (web/src/styles/global.css):
   dark wood panels, brass trim, parchment accents. */

@font-face { font-family: 'Bree Serif'; src: url('/assets/fonts/bree-serif.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Aleo'; src: url('/assets/fonts/aleo-variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/inter-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/inter-black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  --brass: #b8863b;
  --brass-lit: #f3dc9a;
  --brass-dim: #8a6429;
  --wood: #5b4229;
  --wood-dark: #2b1d10;
  --parchment: #d6c7a3;
  --parchment-lo: #bfae88;
  --parchment-ink: #3a2a18;
  --panel: #2c2118;
  --panel-hi: #35281d;
  --panel-lo: #1d150f;
  --void: #140f0b;
  --ink: #ecebe6;
  --ink-soft: #d7cfbf;
  --ink-dim: #b3a081;
  --ink-faint: #7d6a53;
  --line: rgba(236, 235, 230, 0.12);
  --line-brass: rgba(184, 134, 59, 0.45);
  --ok: #6fbf73;
  --danger: #e0645c;
  --gem: #c4548f;
  --info: #7aa9e8;

  --r-common: #a3a3a3;
  --r-uncommon: #7fce7a;
  --r-rare: #7aa9e8;
  --r-epic: #c088e8;
  --r-legendary: #f0b849;

  --display: 'Bree Serif', 'Aleo', Georgia, serif;
  --serif: 'Aleo', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --topbar-h: 60px;
  --sidebar-w: 280px;
  --aside-w: 230px;
  --content-w: 820px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(184, 134, 59, 0.12), transparent 60%),
    linear-gradient(180deg, #1a130d 0%, var(--void) 70%);
  background-attachment: fixed;
  color: var(--ink-soft);
  font: 16px/1.7 var(--sans);
}
img { max-width: 100%; height: auto; }
a { color: var(--brass-lit); text-decoration-color: rgba(243, 220, 154, 0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
strong, b { color: var(--ink); font-weight: 700; }
::selection { background: rgba(184, 134, 59, 0.45); color: #fff; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--brass); color: var(--wood-dark); padding: 8px 12px; z-index: 100; border-radius: 4px; }
.skip:focus { left: 8px; }

/* ---- logo: the game's two-layer wordmark (web/src/components/LogoMark.tsx) ---
   Plaque and gear share one 1567×548 canvas; the gear ratchets one of its six
   teeth (60°) at a time around its own axle at 18.12% / 49.54%. */
.logo-mark { position: relative; display: block; aspect-ratio: 1567 / 548; margin: 0; }
.logo-mark__layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.logo-mark__layer--gear { transform-origin: 18.12% 49.54%; animation: gear-ratchet 14.4s ease-in-out infinite; will-change: transform; }
@keyframes gear-ratchet {
  0%, 10.42% { transform: rotate(0deg); }
  11.25% { transform: rotate(-3deg); }
  13.75% { transform: rotate(68deg); }
  15%, 27.08% { transform: rotate(60deg); }
  27.92% { transform: rotate(57deg); }
  30.42% { transform: rotate(128deg); }
  31.67%, 43.75% { transform: rotate(120deg); }
  44.58% { transform: rotate(117deg); }
  47.08% { transform: rotate(188deg); }
  48.33%, 60.42% { transform: rotate(180deg); }
  61.25% { transform: rotate(177deg); }
  63.75% { transform: rotate(248deg); }
  65%, 77.08% { transform: rotate(240deg); }
  77.92% { transform: rotate(237deg); }
  80.42% { transform: rotate(308deg); }
  81.67%, 93.75% { transform: rotate(300deg); }
  94.58% { transform: rotate(297deg); }
  97.08% { transform: rotate(368deg); }
  98.33%, 100% { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) { .logo-mark__layer--gear { animation: none; } }

/* ---- top bar ------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: linear-gradient(180deg, #3a2a1b, #2a1e13);
  border-bottom: 2px solid var(--brass-dim);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.topbar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.topbar__logo { width: 126px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.topbar__tag { font: 600 11px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-dim); border: 1px solid var(--line-brass); padding: 4px 7px 3px; border-radius: 3px; }
.topbar__menu { display: none; width: 40px; height: 40px; border: 1px solid var(--line-brass); background: var(--panel-lo); border-radius: 4px; padding: 10px 9px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.topbar__menu span { display: block; height: 2px; background: var(--brass-lit); border-radius: 1px; }
.search-trigger {
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; height: 38px; padding: 0 10px 0 12px;
  background: var(--panel-lo); color: var(--ink-dim);
  border: 1px solid var(--line-brass); border-radius: 5px;
  font: 14px var(--sans); cursor: pointer;
}
.search-trigger span { flex: 1; text-align: left; }
.search-trigger:hover { border-color: var(--brass); color: var(--ink); }
kbd { font: 11px/1 var(--sans); color: var(--ink-dim); background: var(--panel-hi); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 4px 6px; }
.topbar__play {
  font: 18px/1 var(--display); color: var(--wood-dark); text-decoration: none;
  padding: 10px 20px 9px; border-radius: 5px;
  background: linear-gradient(180deg, #f6d98c, #c99440 55%, #a8772f);
  border: 1px solid #6e4c1c; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 2px 0 #3a2710;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.topbar__play:hover { filter: brightness(1.08); }

/* ---- shell -------------------------------------------------------------- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--aside-w);
  max-width: 1480px; margin: 0 auto;
}
.sidebar {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 24px 16px 32px 20px;
  border-right: 1px solid var(--line);
  scrollbar-width: thin; scrollbar-color: var(--wood) transparent;
}
.nav-group { margin-bottom: 22px; }
.nav-group__title {
  margin: 0 0 6px; padding-left: 12px;
  font: 13px/1.4 var(--display); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brass);
}
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group a {
  display: block; padding: 5px 12px; margin: 1px 0;
  color: var(--ink-dim); text-decoration: none; font-size: 14.5px; line-height: 1.45;
  border-left: 2px solid transparent; border-radius: 0 4px 4px 0;
}
.nav-group a:hover { color: var(--ink); background: rgba(236, 235, 230, 0.04); }
.nav-group a[aria-current='page'] {
  color: var(--brass-lit); background: linear-gradient(90deg, rgba(184, 134, 59, 0.2), rgba(184, 134, 59, 0.03));
  border-left-color: var(--brass);
}
.sidebar__version { font-size: 12px; color: var(--ink-faint); padding-left: 12px; margin-top: 28px; }

.main { min-width: 0; padding: 40px 48px 0; }
.article { max-width: var(--content-w); margin: 0 auto; }
.aside { position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; padding: 40px 20px 32px 8px; }
.toc__title { font: 13px/1.4 var(--display); text-transform: uppercase; letter-spacing: 0.06em; color: var(--brass); margin: 0 0 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 3px 0 3px 12px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13px; line-height: 1.5; color: var(--ink-faint); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--brass-lit); border-left-color: var(--brass); }
.toc__l3 a { padding-left: 24px; }

/* ---- typography --------------------------------------------------------- */
.breadcrumb { margin: 0 0 4px; font: 13px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); }
.page-title, .article h1 {
  margin: 0 0 18px;
  font: 44px/1.12 var(--display); color: var(--brass-lit);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
}
.article h2 {
  position: relative;
  margin: 56px 0 14px; padding-bottom: 10px;
  font: 29px/1.25 var(--display); color: var(--ink);
  border-bottom: 1px solid var(--line-brass);
}
.article h3 { position: relative; margin: 34px 0 10px; font: 21px/1.3 var(--display); color: var(--brass-lit); }
.article h4 { margin: 24px 0 6px; font: 600 15px/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim); }
.anchor { position: absolute; left: -24px; width: 20px; color: var(--brass-dim); text-decoration: none; opacity: 0; transition: opacity .15s; font-family: var(--sans); font-weight: 400; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
.article p { margin: 0 0 16px; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 24px; }
.article li { margin: 4px 0; }
.article li::marker { color: var(--brass); }
.lead { font: 19px/1.65 var(--serif); color: var(--ink); margin-bottom: 26px !important; }
.muted { color: var(--ink-faint); }
hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-brass), transparent); margin: 40px 0; }
code, .mono { font: 0.92em/1.4 ui-monospace, 'Cascadia Mono', Consolas, monospace; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--brass-lit); }
.ico { width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin: 0 1px; }

/* ---- rarities ----------------------------------------------------------- */
.r-common { color: var(--r-common); }
.r-uncommon { color: var(--r-uncommon); }
.r-rare { color: var(--r-rare); }
.r-epic { color: var(--r-epic); }
.r-legendary { color: var(--r-legendary); }
.badge { display: inline-block; font: 600 12px/1 var(--sans); padding: 4px 8px 3px; border-radius: 20px; border: 1px solid currentColor; white-space: nowrap; vertical-align: 1px; }
.badge.r-common { background: rgba(163,163,163,.1); }
.badge.r-uncommon { background: rgba(127,206,122,.1); }
.badge.r-rare { background: rgba(122,169,232,.1); }
.badge.r-epic { background: rgba(192,136,232,.1); }
.badge.r-legendary { background: rgba(240,184,73,.12); }
.badge--plain { color: var(--ink-dim); }

/* ---- tables ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line-brass); border-radius: var(--radius); background: var(--panel-lo); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
th { text-align: left; font: 600 12.5px/1.3 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; color: var(--brass-lit); background: linear-gradient(180deg, #3a2a1b, #30231a); padding: 11px 14px; border-bottom: 1px solid var(--line-brass); vertical-align: bottom; }
td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
tr:first-child td { border-top: 0; }
tbody tr:nth-child(even) td { background: rgba(236, 235, 230, 0.02); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { white-space: nowrap; }
td .ico { margin-right: 4px; }
/* A comparison grid: the label column reads left, every value sits centred
   under its heading. */
table.compare td:not(:first-child), table.compare th:not(:first-child) { text-align: center; }
table.compare td:first-child { color: var(--ink-dim); }
table.compare th:not(:first-child) { width: 22%; }
table.compare--all td, table.compare--all th { text-align: center; color: inherit; }
table.compare--all td:first-child { color: var(--ink-dim); }

/* ---- notes: parchment cards, like the quest scrolls in the Capsule -------- */
.callout {
  position: relative;
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; align-items: start;
  margin: 8px 0 28px; padding: 18px 22px 18px 18px;
  color: var(--parchment-ink);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 248, 225, 0.55), transparent 60%),
    linear-gradient(180deg, #e2d4b0, #cfbd94);
  border: 1px solid #8a6429;
  border-radius: 6px;
  box-shadow: 0 0 0 3px var(--wood-dark), 0 0 0 4px var(--brass-dim), 0 12px 26px rgba(0, 0, 0, 0.45), inset 0 0 22px rgba(120, 85, 40, 0.28);
}
.callout::before {
  content: '✦';
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  font: 22px/1 var(--display); color: var(--brass-lit);
  background: radial-gradient(circle at 35% 30%, #6b4a26, #2b1d10 75%);
  border: 2px solid var(--brass);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.callout > div > :last-child, .callout p:last-child { margin-bottom: 0; }
.callout p { color: #3d2c18; }
.callout strong { color: #2b1d10; }
.callout a { color: #7a4a12; text-decoration-color: rgba(122, 74, 18, 0.45); }
.callout .muted { color: #6b5638; }
.callout__title { display: block; margin: 1px 0 6px; font: 19px/1.25 var(--display); color: #4a2f12; }
.callout--tip::before { content: '★'; border-color: #6fbf73; color: #bfe8c0; }
.callout--warn::before { content: '!'; border-color: #e0645c; color: #f6c1bc; font-size: 24px; }
.callout--info::before { content: 'i'; border-color: #7aa9e8; color: #cfe0f8; font-family: Georgia, serif; font-style: italic; }
.callout .badge { background: rgba(43, 29, 16, 0.08); }
.callout .badge.r-legendary { color: #9a6410; }

/* A mission from the Capsule's board, quoted as the game shows it. */
.quest {
  max-width: 460px; margin: 6px auto 30px; padding: 26px 30px 24px;
  text-align: center; color: var(--parchment-ink);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 250, 230, 0.6), transparent 65%),
    linear-gradient(180deg, #e8dcbc, #d2c199);
  border: 1px solid #8a6429; border-radius: 4px;
  box-shadow: 0 0 0 3px var(--wood-dark), 0 0 0 4px var(--brass-dim), 0 16px 34px rgba(0, 0, 0, 0.5), inset 0 0 28px rgba(120, 85, 40, 0.3);
  position: relative;
}
.quest::before {
  content: ''; position: absolute; top: -14px; left: 50%; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c99a52, #7a531f 70%); border: 2px solid #4a3114; box-shadow: 0 3px 4px rgba(0,0,0,.45);
}
.quest__era { margin: 0 0 4px !important; font: 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #8a6429; }
.quest__title { margin: 0 0 12px !important; font: 30px/1.15 var(--display); color: #3a2410; }
.quest__body { margin: 0 !important; font: 15.5px/1.65 var(--serif); color: #3d2c18; }
.quest__rule { width: 60%; height: 1px; margin: 0 auto 14px; background: linear-gradient(90deg, transparent, #8a6429, transparent); }

.formula {
  margin: 0 0 22px; padding: 14px 18px;
  background: var(--panel-lo); border: 1px dashed var(--line-brass); border-radius: var(--radius);
  font: 15px/1.7 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: var(--brass-lit);
  overflow-x: auto; white-space: pre;
}

.shot { margin: 8px 0 28px; }
.shot img {
  display: block; width: 100%;
  border: 2px solid var(--brass-dim); border-radius: var(--radius);
  box-shadow: 0 0 0 4px var(--wood-dark), 0 18px 40px rgba(0, 0, 0, 0.55);
  cursor: zoom-in; background: var(--panel-lo);
}
.shot figcaption { margin-top: 12px; font-size: 13.5px; color: var(--ink-faint); text-align: center; }
.shot--small { max-width: 560px; margin-left: auto; margin-right: auto; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 28px; }
.duo .shot { margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 0 0 26px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line-brass); border-radius: var(--radius);
  color: inherit; text-decoration: none;
}
a.card:hover { border-color: var(--brass); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
a.card { transition: transform .15s, box-shadow .15s, border-color .15s; }
.card__icon { width: 44px; height: 44px; object-fit: contain; margin-bottom: 10px; }
.card__art { width: 100%; aspect-ratio: 1440 / 1024; object-fit: cover; margin: -4px 0 10px; border-radius: 4px; border: 1px solid var(--line-brass); }
.card .card__title { font: 18px/1.3 var(--display); color: var(--brass-lit); margin: 0 0 4px; }
.card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-dim); }
.card__meta { margin-top: auto !important; padding-top: 10px; font-size: 13px !important; color: var(--ink-faint) !important; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0 0 28px; }
.stat { padding: 16px 14px; text-align: center; background: var(--panel); border: 1px solid var(--line-brass); border-radius: var(--radius); }
.stat__value { display: block; font: 34px/1.1 var(--display); color: var(--brass-lit); text-shadow: 0 2px 0 rgba(0,0,0,.45); }
.stat__label { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--ink-dim); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0 0 26px; border: 1px solid var(--line-brass); border-radius: var(--radius); overflow: hidden; background: var(--panel-lo); }
.facts dt, .facts dd { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14.5px; }
.facts dt { color: var(--ink-dim); background: rgba(184,134,59,.06); font-weight: 400; }
.facts dd { color: var(--ink); }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top: 0; }

.steps { counter-reset: step; list-style: none; padding: 0 !important; margin: 0 0 24px; }
.steps > li { position: relative; padding: 2px 0 14px 50px; margin: 0; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 34px; height: 34px;
  display: grid; place-items: center;
  font: 17px/1 var(--display); color: var(--wood-dark);
  background: radial-gradient(circle at 35% 30%, #f6d98c, #b8863b 70%);
  border: 1px solid #6e4c1c; border-radius: 50%;
}
.steps > li::after { content: ''; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 1px; background: var(--line-brass); }
.steps > li:last-child::after { display: none; }
.steps > li > strong:first-child { display: block; color: var(--brass-lit); font: 17px/1.4 var(--display); font-weight: 400; margin-bottom: 2px; }

.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 0 0 26px; }
.flow__step { flex: 1 1 130px; padding: 12px; text-align: center; background: var(--panel); border: 1px solid var(--line-brass); border-radius: var(--radius); font-size: 13.5px; line-height: 1.45; color: var(--ink-dim); }
.flow__step b { display: block; font: 16px/1.3 var(--display); font-weight: 400; color: var(--brass-lit); margin-bottom: 3px; }
.flow__arrow { align-self: center; color: var(--brass); font-size: 20px; }

.room-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 22px; }
.room-meta span { font-size: 13px; padding: 5px 10px 4px; border-radius: 4px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-dim); }
.room-meta b { color: var(--ink); font-weight: 400; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 0 0 28px; }
.gallery figure { margin: 0; background: var(--panel-lo); border: 1px solid var(--line-brass); border-radius: var(--radius); overflow: hidden; }
.gallery img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: top; cursor: zoom-in; }
.gallery figcaption { padding: 7px 8px 8px; font-size: 12px; line-height: 1.35; color: var(--ink-dim); text-align: center; }
.gallery figcaption b { display: block; color: var(--ink); font-weight: 400; font-size: 12.5px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: start; margin-bottom: 12px; }
.split--left { grid-template-columns: 260px minmax(0, 1fr); }
.split__art { width: 100%; filter: drop-shadow(0 12px 24px rgba(0,0,0,.5)); }

.bar { position: relative; height: 10px; border-radius: 5px; background: var(--panel-lo); border: 1px solid var(--line); overflow: hidden; min-width: 80px; }
.bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8f5429, #d29541); border-radius: 5px; }

/* ---- home --------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  margin: -40px -48px 40px; padding: 70px 48px 56px;
  text-align: center;
  background:
    linear-gradient(180deg, transparent 62%, var(--void)),
    url('/assets/img/art/bg-home.webp') center 20% / cover;
  border-bottom: 1px solid var(--line-brass);
}
.home .article { max-width: 940px; }
.hero__logo { width: min(620px, 92%); margin: 0 auto !important; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); }
.hero__tagline { margin: 18px auto 0; max-width: 640px; font: 600 23px/1.5 var(--serif); color: var(--parchment-ink); }
.hero__sub { margin: 10px auto 0; max-width: 620px; color: var(--parchment-ink); font-size: 15.5px; opacity: .85; }
.hero__cta { display: flex; justify-content: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 11px 22px 10px; border-radius: 5px; text-decoration: none;
  font: 18px/1 var(--display); color: var(--wood-dark);
  background: linear-gradient(180deg, #f6d98c, #c99440 55%, #a8772f);
  border: 1px solid #6e4c1c; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 3px 0 #3a2710;
}
.btn--ghost { background: rgba(43,29,16,.85); color: var(--brass-lit); border-color: var(--brass); box-shadow: 0 3px 0 #120c07; }
.btn:hover { filter: brightness(1.08); }
.classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 28px; }
.class-card { text-align: center; padding: 18px 14px 16px; background: linear-gradient(180deg, var(--panel-hi), var(--panel)); border: 1px solid var(--line-brass); border-radius: var(--radius); text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
.class-card:hover { transform: translateY(-2px); border-color: var(--brass); }
.class-card img { height: 200px; width: auto; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); }
.class-card .class-card__name { margin: 10px 0 2px !important; font: 22px/1.3 var(--display); color: var(--brass-lit); }
.class-card p { margin: 0; font-size: 14px; color: var(--ink-dim); }

/* ---- pager & footer ----------------------------------------------------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 64px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.pager__link { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border: 1px solid var(--line-brass); border-radius: var(--radius); text-decoration: none; background: var(--panel-lo); }
.pager__link:hover { border-color: var(--brass); background: var(--panel); }
.pager__link--next { text-align: right; grid-column: 2; }
.pager__dir { font-size: 12.5px; color: var(--ink-faint); }
.pager__title { font: 18px/1.3 var(--display); color: var(--brass-lit); }
.footer { max-width: var(--content-w); margin: 40px auto 0; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-faint); }

/* ---- search ------------------------------------------------------------- */
.search { position: fixed; inset: 0; z-index: 60; background: rgba(10, 7, 5, 0.72); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.search[hidden] { display: none; }
.search__panel { width: min(680px, 100%); max-height: 75vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--brass-dim); border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: hidden; }
.search__field { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-brass); color: var(--brass); }
.search__field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 17px var(--sans); }
.search__results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.search__results a { display: block; padding: 10px 12px; border-radius: 5px; text-decoration: none; color: var(--ink-soft); }
.search__results a[aria-selected='true'], .search__results a:hover { background: rgba(184, 134, 59, 0.16); }
.search__page { font-size: 12px; color: var(--brass); text-transform: uppercase; letter-spacing: .05em; }
.search__head { display: block; font: 16px/1.35 var(--display); color: var(--brass-lit); }
.search__snip { display: block; font-size: 13.5px; line-height: 1.5; color: var(--ink-dim); margin-top: 2px; }
.search__snip mark { background: rgba(243, 220, 154, 0.25); color: var(--ink); border-radius: 2px; padding: 0 1px; }
.search__empty { padding: 22px 12px; text-align: center; color: var(--ink-faint); }

/* ---- zoomable picture (the skill tree), as the game's popup zooms -------- */
.zoomer { margin: 8px 0 30px; }
.zoomer__view {
  position: relative; overflow: hidden; touch-action: none; cursor: grab;
  border: 2px solid var(--brass-dim); border-radius: var(--radius);
  box-shadow: 0 0 0 4px var(--wood-dark), 0 18px 40px rgba(0, 0, 0, 0.55);
  background: var(--panel-lo);
}
.zoomer__view.is-dragging { cursor: grabbing; }
.zoomer__img { display: block; width: 100%; height: auto; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.zoomer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.zoomer__bar button {
  min-width: 38px; height: 34px; padding: 0 12px;
  font: 17px/1 var(--display); color: var(--brass-lit); cursor: pointer;
  background: linear-gradient(180deg, #3a2a1b, #2a1e13); border: 1px solid var(--brass-dim); border-radius: 5px;
}
.zoomer__bar button:hover { border-color: var(--brass); color: #fff3cf; }
.zoomer__level { min-width: 52px; text-align: center; font: 14px var(--sans); color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.zoomer__hint { margin-left: auto; font-size: 13px; color: var(--ink-faint); }
.zoomer figcaption { margin-top: 10px; font-size: 13.5px; color: var(--ink-faint); text-align: center; }
.zoomer:fullscreen { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0; padding: 16px; background: var(--void); }
.zoomer:fullscreen .zoomer__view { width: min(100%, calc((100vh - 90px) * 1.40625)); }
.zoomer:fullscreen .zoomer__bar { width: min(100%, calc((100vh - 90px) * 1.40625)); }
.zoomer:fullscreen figcaption { display: none; }
@media (max-width: 900px) { .zoomer__hint { width: 100%; margin-left: 0; } }

/* ---- lightbox ----------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(8, 6, 4, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 90px); border: 2px solid var(--brass-dim); border-radius: 6px; }
.lightbox__cap { color: var(--ink-dim); font-size: 14px; margin: 12px 0 0; text-align: center; }

/* ---- responsive --------------------------------------------------------- */
@media (max-width: 1240px) {
  .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .aside { display: none; }
}
@media (max-width: 900px) {
  :root { --topbar-h: 56px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar__menu { display: flex; }
  .topbar__tag { display: none; }
  .search-trigger { min-width: 0; width: 40px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .shell { display: block; }
  .sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0; z-index: 40;
    width: min(320px, 86vw); height: auto;
    background: var(--panel-lo); border-right: 1px solid var(--line-brass);
    transform: translateX(-102%); transition: transform .2s ease;
  }
  .sidebar.is-open { transform: none; box-shadow: 20px 0 50px rgba(0,0,0,.6); }
  .scrim { position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 35; background: rgba(0,0,0,.5); }
  .main { padding: 28px 16px 0; }
  .hero { margin: -28px -16px 32px; padding: 48px 16px 40px; }
  .page-title, .article h1 { font-size: 34px; }
  .article h2 { font-size: 25px; margin-top: 44px; }
  .anchor { display: none; }
  .cards--3, .cards--2, .duo, .classes, .split, .split--left { grid-template-columns: 1fr; }
  .split__art { max-width: 260px; margin: 0 auto; display: block; }
  .pager { grid-template-columns: 1fr; }
  .pager__link--next { grid-column: 1; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-top: 1px solid var(--line); padding-bottom: 2px; }
  .facts dd { border-top: 0; padding-top: 2px; }
  .flow__arrow { display: none; }
  .class-card img { height: 160px; }
}
@media (max-width: 480px) {
  .topbar__play { padding: 9px 12px 8px; font-size: 16px; }
  .topbar__logo { width: 104px; }
  .hero__tagline { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
