/* Generated by tools/build-wiki.py from tools/wikigen/components/ — edit the component, not this file. */
/* ---- base ---- */
body.wiki {
  max-width: none;
  padding: 0;
  font-weight: 400;
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 44px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
  box-sizing: border-box;
}
.page { min-width: 0; padding: 24px 0 72px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border: 4px solid var(--line); }
.skip:focus { left: 8px; }
body.wiki :focus-visible { outline: 4px solid var(--accent); outline-offset: 2px; }
code { font: inherit; background: rgba(42, 38, 34, 0.08); padding: 0 4px; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; }
table.plain.md { min-width: 0; }
/* Sprites are pixel art everywhere on the wiki; a browser that smooths them on the
   way up turns them into mush. */
body.wiki img { image-rendering: pixelated; }
/* Anchors land below the sticky top bar rather than under it. */
html { scroll-padding-top: 92px; }
body.wiki h2 { margin-top: 36px; }
body.wiki h3 { font-size: 20px; margin: 24px 0 8px; }
.count { color: var(--muted); font-weight: 400; }

@media (max-width: 1100px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  body.wiki { font-size: 18px; }
  .shell { padding: 0 16px; }
  .page { padding: 16px 0 96px; }
  html { scroll-padding-top: 76px; }
}

/* ---- icons ---- */
.px-icon { fill: currentColor; display: block; }
.px-icon.up { transform: rotate(90deg); }
.app-icon { display: inline-block; flex: none; vertical-align: middle; image-rendering: pixelated; }

/* ---- top_bar ---- */
.wiki-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--parchment);
  border-bottom: 4px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.bar-in {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 28px;
  box-sizing: border-box;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
  width: 236px;
}
.brand img { border-radius: 8px; image-rendering: auto; }
.brand .w, .brand .m { font: 400 32px/1 "Jersey 20", "Pixel Operator", Georgia, serif; }
.brand .m { color: var(--muted); }
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 460px;
  height: 44px;
  padding: 0 8px 0 12px;
  box-sizing: border-box;
  font: inherit;
  font-size: 18px;
  color: var(--muted);
  background: #fff;
  border: 4px solid var(--line);
  border-radius: 0;
  cursor: text;
  text-align: left;
}
.search-box span { flex: 1; }
.search-box:hover { background: #fffdf7; }
kbd {
  font: inherit;
  font-size: 15px;
  min-width: 22px;
  padding: 0 6px;
  border: 2px solid var(--rule);
  color: var(--muted);
  text-align: center;
  line-height: 22px;
}
.get-app {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  box-sizing: border-box;
  background: var(--line);
  color: var(--parchment);
  font-weight: 700;
  text-decoration: none;
  border: 4px solid var(--line);
}
.get-app:hover { background: var(--parchment); color: var(--ink); }
/* Square, ink-bordered, 44 points: the size a thumb can find without looking. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  padding: 0;
  border: 4px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 0;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--parchment-deep); }
.menu-btn, .search-toggle, .wiki-bar .back { display: none; }

@media (max-width: 1100px) {
  .menu-btn { display: inline-flex; }
  .brand { width: auto; }
}
@media (max-width: 860px) {
  .bar-in { gap: 10px; padding: 8px 16px; }
  .wiki-bar .back { display: inline-flex; }
  .brand img { display: none; }
  .brand .w, .brand .m { font-size: 28px; }
  .search-box, .get-app { display: none; }
  .search-toggle { display: inline-flex; margin-left: auto; }
  .menu-btn { order: 10; }
}

/* ---- side_nav ---- */
.side {
  position: sticky;
  top: 72px;
  align-self: start;
  max-height: calc(100vh - 72px);
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
  padding: 20px 8px 40px 0;
  box-sizing: border-box;
  scrollbar-width: thin;
}
.side-top { display: none; }
.side-group { margin-bottom: 18px; }
.side-label {
  margin: 0 0 4px 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 2px 10px;
  border-left: 4px solid transparent;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
}
.side li a:hover { background: rgba(255, 255, 255, 0.5); }
.side li a[aria-current] { background: var(--parchment-deep); border-left-color: var(--line); font-weight: 700; }
.side li a .app-icon { width: 24px; height: 24px; object-fit: contain; color: var(--muted); }
.side li a[aria-current] .app-icon { color: var(--ink); }

@media (max-width: 1100px) {
  .side {
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 86vw);
    max-height: none;
    padding: calc(12px + env(safe-area-inset-top)) 12px calc(24px + env(safe-area-inset-bottom));
    background: var(--parchment);
    border-right: 4px solid var(--line);
    transform: translateX(-105%);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    visibility: hidden;
  }
  .side.open { transform: none; visibility: visible; }
  .side-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 12px 10px;
    font: 400 28px/1 "Jersey 20", "Pixel Operator", Georgia, serif;
  }
  .side li a { min-height: 44px; }
  .side-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(26, 23, 20, 0.45);
  }
}
@media (prefers-reduced-motion: reduce) {
  .side { transition: none; }
}

/* ---- palette ---- */
.palette {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(26, 23, 20, 0.5);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10vh 16px 16px;
}
.palette-panel {
  width: 100%;
  max-width: 640px;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  background: var(--parchment);
  border: 4px solid var(--line);
  box-shadow: 8px 8px 0 rgba(26, 23, 20, 0.35);
}
.palette-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 16px;
  border-bottom: 4px solid var(--line);
  background: #fff;
}
.palette-input input {
  flex: 1;
  min-width: 0;
  height: 60px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 22px;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.palette-input input::-webkit-search-cancel-button { display: none; }
.palette-input input:focus-visible { outline: none; }
.palette-esc {
  font: inherit;
  font-size: 16px;
  color: var(--muted);
  background: none;
  border: 2px solid var(--rule);
  padding: 2px 8px;
  cursor: pointer;
}
.palette-results, .palette-empty { overflow-y: auto; padding: 8px; }
.palette-results:empty { display: none; }
.palette-results a, .palette-empty a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 4px 10px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
}
.palette-results a img { width: 36px; height: 36px; object-fit: contain; flex: none; }
.palette-results a .app-icon { width: 28px; height: 28px; margin: 0 4px; color: var(--muted); }
.palette-results a .t { display: flex; flex-direction: column; min-width: 0; }
.palette-results a .t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-results a .t small { color: var(--muted); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-results a .k { margin-left: auto; padding-left: 12px; color: var(--muted); font-size: 16px; white-space: nowrap; }
.palette-results a.on, .palette-results a:hover, .palette-empty a:hover { background: var(--parchment-deep); }
.palette-label { margin: 4px 10px 4px; font-size: 16px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.palette-empty .app-icon { color: var(--muted); }
.palette-none { margin: 0; padding: 20px 18px; color: var(--muted); }
@media (max-width: 860px) {
  .palette { padding: 0; background: var(--parchment); }
  .palette-panel { max-width: none; max-height: none; height: 100%; border: 0; box-shadow: none; padding-top: env(safe-area-inset-top); }
  .palette-results a .k { display: none; }
}

/* ---- to_top ---- */
.to-top {
  position: fixed;
  z-index: 30;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 4px solid var(--parchment);
  outline: 4px solid var(--line);
  background: var(--line);
  color: var(--parchment);
  cursor: pointer;
}

/* ---- crumbs ---- */
.crumbs { color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.crumbs .sep { margin: 0 8px; }
@media (max-width: 860px) {
  .crumbs { display: none; }
}

/* ---- seq_bar ---- */
.seq {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  margin-bottom: 24px;
}
.seq .where { color: var(--muted); text-align: center; white-space: nowrap; }
.seq .where a { color: var(--muted); }
.seq .next { text-align: right; }
.seq a { font-weight: 700; color: var(--ink); text-decoration: none; }
.seq a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .seq {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    border-top: 0;
    padding-top: 0;
    font-size: 16px;
  }
  .seq .label { display: none; }
  .seq a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 32px; line-height: 32px; }
}

/* ---- title ---- */
body.wiki main > h1 {
  font: 400 52px/1 "Jersey 20", "Pixel Operator", Georgia, serif;
  margin: 0 0 6px;
}
.sub { color: var(--muted); margin: 0 0 20px; }
@media (max-width: 860px) {
  body.wiki main > h1 { font-size: 40px; }
  .sub { margin-bottom: 12px; }
}

/* ---- jump_row ---- */
.jump { display: none; }
@media (max-width: 860px) {
  .jump {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -16px 16px;
    padding: 0 16px 4px;
    scrollbar-width: none;
  }
  .jump::-webkit-scrollbar { display: none; }
}
.jump a {
  flex: none;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 4px solid var(--line);
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

/* ---- layout ---- */
.entity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
.doc-grid { display: grid; grid-template-columns: minmax(0, 760px); gap: 56px; }
.doc-grid.has-toc { grid-template-columns: minmax(0, 760px) 210px; }
.doc-body { min-width: 0; }
.doc-body > p, .doc-body li { line-height: 1.6; }
.doc-body h2 {
  font: 400 34px/1.1 "Jersey 20", "Pixel Operator", Georgia, serif;
  margin: 44px 0 12px;
}
.doc-body h3 { font-size: 21px; margin: 28px 0 8px; }
.doc-body ul, .doc-body ol { padding-left: 24px; margin: 0 0 18px; }
.doc-body li { margin-bottom: 6px; }
@media (max-width: 1280px) {
  .doc-grid.has-toc { grid-template-columns: minmax(0, 760px); }
}
@media (max-width: 860px) {
  .entity { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .doc-body h2 { font-size: 30px; margin-top: 36px; }
}

/* ---- toc ---- */
.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 17px;
  line-height: 1.3;
}
.toc-label { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.toc li a {
  display: block;
  padding: 5px 0 5px 12px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
.toc li a:hover { color: var(--ink); }
.toc li a.on { color: var(--ink); border-left-color: var(--line); font-weight: 700; }
@media (max-width: 1280px) {
  .toc { display: none; }
}

/* ---- infobox ---- */
.infobox {
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  position: sticky;
  top: 92px;
}
.ib-name {
  background: var(--line);
  color: var(--parchment);
  font: 400 30px/1 "Jersey 20", "Pixel Operator", Georgia, serif;
  padding: 10px 14px 8px;
  text-align: center;
}
.ib-art {
  background: var(--parchment-deep);
  border-bottom: 4px solid var(--line);
  display: flex;
  justify-content: center;
  padding: 12px;
}
.ib-art img { width: 240px; height: 240px; object-fit: contain; }
.infobox.wide .ib-art { padding: 0; }
.infobox.wide .ib-art img { width: 100%; height: auto; }
.infobox table { width: 100%; border-collapse: collapse; line-height: 1.35; table-layout: fixed; }
.infobox col.k { width: 118px; }
.infobox .chip { white-space: normal; }
.infobox th, .infobox td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px;
  border-bottom: 2px solid var(--rule);
}
.infobox tr:last-child th, .infobox tr:last-child td { border-bottom: 0; }
.infobox th { color: var(--muted); font-weight: 400; }
.infobox td { font-weight: 700; }

@media (max-width: 860px) {
  .infobox { order: -1; position: static; }
  .infobox .ib-name { display: none; }
  .ib-art { padding: 8px; }
  .ib-art img { width: 168px; height: 168px; }
  .infobox table, .infobox tbody { display: block; }
  .infobox colgroup { display: none; }
  .infobox tbody { display: grid; grid-template-columns: 1fr 1fr; }
  .infobox tr { display: flex; flex-direction: column; border-bottom: 2px solid var(--rule); }
  .infobox tr:nth-child(odd):not(.wide) { border-right: 2px solid var(--rule); }
  .infobox tr.wide { grid-column: 1 / -1; border-right: 0; }
  .infobox th, .infobox td { border: 0; padding: 0 12px; }
  .infobox th { padding-top: 8px; font-size: 15px; }
  .infobox td { padding-bottom: 8px; }
}

/* ---- chip ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 0 2px;
  margin: 0 2px 6px 0;
  border: 2px solid var(--rule);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.2;
}
.chip:hover { border-color: var(--line); background: #fff; }
.chip img { object-fit: contain; }
.chips { line-height: 2; }
@media (max-width: 860px) {
  .chip { min-height: 40px; padding: 0 10px 0 4px; font-size: 17px; }
}

/* ---- trait ---- */
.trait {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: baseline;
}
.trait .dot { width: 12px; height: 12px; }

/* ---- tag ---- */
.tag {
  display: inline-block;
  padding: 2px 6px 0;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--ink);
}
.tag-event { background: #f28c28; }
.tag-special { background: #6b3fa0; color: var(--parchment); }
.tag-muted { background: var(--parchment-deep); }

/* ---- currency ---- */
.money { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.money img { width: 16px; height: 16px; }

/* ---- prose ---- */
.lead { font-size: 22px; line-height: 1.5; }
.lore {
  margin: 20px 0;
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--line);
  color: var(--muted);
}
.callout {
  margin: 20px 0;
  padding: 12px 16px 12px 16px;
  border: 4px solid var(--line);
  border-left-width: 12px;
  background: rgba(255, 255, 255, 0.55);
}
.callout p { margin: 0; }
.callout-label { display: block; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.callout.tip { border-left-color: #7fb061; }
.callout.good-to-know { border-left-color: #008ea5; }
.callout.heads-up { border-left-color: #f5a100; }
.meta-line { color: var(--muted); font-size: 17px; margin: -8px 0 20px; }
@media (max-width: 860px) {
  .lead { font-size: 19px; }
}

/* ---- data_table ---- */
body.wiki .plain-wrap { overflow-x: auto; }
body.wiki table.plain tbody th {
  font-weight: 400;
  border-bottom: 2px solid var(--rule);
  white-space: nowrap;
}
.plain .short { display: none; }
.cell-art { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.cell-art img { width: 40px; height: 40px; object-fit: contain; }
tr:target { background: var(--parchment-deep); }
.plain .bonus { color: var(--muted); font-weight: 400; font-size: 0.85em; }
@media (max-width: 860px) {
  .plain .long { display: none; }
  .plain .short { display: inline; }
  table.plain th, table.plain td { padding: 10px 8px; }
  /* Five short columns fit a phone: no scroll, and no 620px floor from /hunts' tables. */
  body.wiki table.plain.damage { min-width: 0; }
  table.plain.damage th, table.plain.damage td { padding: 10px 4px; }
}

/* ---- chain ---- */
.chain {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  margin: 8px 0 20px;
}
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 116px;
  box-sizing: border-box;
  padding: 10px 6px;
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  color: var(--ink);
}
.stage img { width: 84px; height: 84px; object-fit: contain; }
.stage .name { font-weight: 700; text-align: center; line-height: 1.2; }
.stage .rarity { color: var(--muted); font-size: 16px; }
.stage.r-epic { background: var(--parchment-deep); }
.stage:hover { background: #fff; }
/* The hero whose page this is, inked in: you are here. */
.stage.here { background: var(--line); color: var(--parchment); }
.stage.here .rarity { color: var(--parchment); }
.evolve {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.2;
}
.evolve span::after { content: "›"; display: block; color: var(--ink); font-weight: 700; font-size: 22px; }
@media (max-width: 860px) {
  .chain { flex-direction: column; }
  .stage { flex-direction: row; width: auto; gap: 12px; padding: 6px 12px 6px 6px; }
  .stage img { width: 56px; height: 56px; }
  .stage .rarity { margin-left: auto; }
  .evolve { width: auto; justify-content: flex-start; gap: 8px; padding: 4px 0 4px 24px; }
  .evolve span::after { display: inline-block; margin-left: 8px; transform: rotate(90deg); font-size: 18px; }
}

/* ---- week_list ---- */
.week-list { border-top: 4px solid var(--line); }
.week-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 6px 8px;
  border-bottom: 2px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
}
.week-row:hover { background: #fff; }
.week-row.boss { background: var(--parchment-deep); }
.week-row img { object-fit: contain; }
.week-row .who { display: block; }
@media (max-width: 860px) {
  .week-row { grid-template-columns: 56px 1fr; }
  .week-row .trait { grid-column: 2; }
}

/* ---- navbox ---- */
.navbox {
  margin-top: 48px;
  border: 4px solid var(--line);
}
.navbox h2 {
  margin: 0 !important;
  padding: 8px 14px 6px;
  background: var(--line);
  color: var(--parchment);
  font-size: 20px;
}
.navbox h2 a { color: var(--parchment); }
.navbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.navbox-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
  border-right: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
}
.navbox-grid a:hover { background: #fff; }
.navbox-grid a.on { background: var(--parchment-deep); font-weight: 700; }
.navbox-grid img { width: 48px; height: 48px; object-fit: contain; }
@media (max-width: 860px) {
  .navbox-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}

/* ---- tiles ---- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.tile, .scene-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
  font-weight: 700;
}
.tile:hover, .scene-tile:hover { background: #fff; }
.tile img { object-fit: contain; }
.tile .epithet { font-weight: 400; font-size: 16px; max-width: none; white-space: normal; }
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.scene-tile { padding: 0 0 10px; align-items: stretch; }
.scene-tile img { width: 100%; height: auto; border-bottom: 4px solid var(--line); margin-bottom: 6px; }
.scene-tile .epithet { max-width: none; }
@media (max-width: 860px) {
  .tile-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .scene-grid { grid-template-columns: 1fr; }
}

/* ---- home ---- */
.hello {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: center;
  margin: 8px 0 40px;
}
.hello h1 { font: 400 64px/1 "Jersey 20", "Pixel Operator", Georgia, serif; margin: 0 0 12px; }
.hello-line { font-size: 21px; line-height: 1.5; margin: 0 0 22px; }
.hello-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 60px;
  padding: 0 12px 0 16px;
  box-sizing: border-box;
  font: inherit;
  font-size: 20px;
  color: var(--muted);
  background: #fff;
  border: 4px solid var(--line);
  box-shadow: 6px 6px 0 rgba(26, 23, 20, 0.18);
  cursor: text;
  text-align: left;
}
.hello-search span { flex: 1; }
.hello-search:hover { background: #fffdf7; }
.hello-pop { margin: 16px 0 0; font-size: 17px; line-height: 2; }
.hello-pop span { color: var(--muted); margin-right: 4px; }
.hello-pop a {
  display: inline-block;
  margin: 0 6px 0 0;
  padding: 0 10px;
  border: 2px solid var(--rule);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  text-decoration: none;
  line-height: 32px;
}
.hello-pop a:hover { border-color: var(--line); background: #fff; }
.hello-art {
  width: 100%;
  height: auto;
  border: 4px solid var(--line);
  box-sizing: border-box;
}
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 44px 0 14px; }
.sec-head h2 { margin: 0 !important; font: 400 36px/1 "Jersey 20", "Pixel Operator", Georgia, serif; }
.sec-head .more { color: var(--muted); white-space: nowrap; }
.sec-sub { color: var(--muted); margin: -6px 0 14px; }
.home-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; }
.home-two > div { min-width: 0; }
.stack { display: grid; gap: 12px; }
.now-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.now-card2 {
  display: flex;
  flex-direction: column;
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}
.now-card2:hover { background: #fff; }
.now-card2 img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-bottom: 4px solid var(--line); }
.now-txt { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 12px; }
.now-txt b { font-size: 21px; }
.now-txt small { color: var(--muted); font-size: 17px; }
.now-tag { color: var(--accent); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: 1px; }

.now { margin: 8px 0 28px; }
.now h2 { margin-top: 12px; }
.now-grid { display: grid; gap: 14px; }
.now-card {
  border: 4px solid var(--line);
  padding: 14px 16px 8px;
  background: rgba(255, 255, 255, 0.45);
  scroll-margin-top: 90px;
}
.ev-group {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  margin-top: 12px;
}
.ev-label { color: var(--muted); }
.ev-group .chips { margin: 0; }
.big-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.big-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 8px 12px;
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
  font-weight: 700;
  font-size: 20px;
}
.big-tile:hover { background: #fff; }
.big-tile img { width: 84px; height: 84px; object-fit: contain; margin-bottom: 4px; }
.big-tile .epithet { font-size: 16px; font-weight: 400; max-width: none; color: var(--muted); }
@media (max-width: 1100px) {
  .hello { grid-template-columns: 1fr; }
  .hello-art { order: -1; }
}
@media (max-width: 860px) {
  .hello { gap: 18px; margin-bottom: 24px; }
  .hello h1 { font-size: 48px; }
  .hello-line { font-size: 18px; }
  .hello-search { height: 54px; font-size: 18px; }
  .hello-search kbd { display: none; }
  .sec-head { margin-top: 32px; }
  .sec-head h2 { font-size: 30px; }
  .home-two { grid-template-columns: 1fr; }
  .ev-group { grid-template-columns: 1fr; gap: 4px; }
  .big-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .big-tile img { width: 64px; height: 64px; }
}

/* ---- feat_grid ---- */
.feat-grid {
  display: grid;
  /* Four across: every group is eight, so a group is always two clean rows. */
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.feat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  text-align: center;
  line-height: 1.25;
}
.feat:target { background: var(--parchment-deep); }
.feat img { object-fit: contain; }
.feat .name { font-weight: 700; }
.feat .epithet { font-size: 16px; max-width: none; white-space: normal; }
@media (max-width: 860px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- odds ---- */
.odds { border-top: 4px solid var(--line); }
.odds-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 120px 64px;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-bottom: 2px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
}
.odds-row:hover { background: #fff; }
.odds-row img { object-fit: contain; }
.odds-row .name { font-weight: 700; }
.odds-row .note { font-weight: 400; color: var(--muted); font-size: 16px; }
.odds-row .bar { height: 12px; background: var(--parchment-deep); }
.odds-row .bar span { display: block; height: 100%; background: var(--line); }
.odds-row .pct { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .odds-row { grid-template-columns: 40px minmax(0, 1fr) 56px; }
  .odds-row .bar { grid-column: 2 / 4; grid-row: 2; height: 8px; }
}

/* ---- og_card ---- */
.og {
  position: relative;
  width: 1200px;
  height: 630px;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--parchment);
  border: 12px solid var(--line);
  color: var(--ink);
  font: 700 34px/1.3 "Pixel Operator", ui-monospace, monospace;
  text-align: left;
}
.og img { image-rendering: pixelated; }
.og-kicker { font-size: 30px; color: var(--muted); font-weight: 400; }
.og-name { font: 400 104px/0.95 "Jersey 20", "Pixel Operator", Georgia, serif; margin: 8px 0 14px; }
.og-line { font-size: 32px; font-weight: 400; color: var(--muted); }
.og-facts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.og-fact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 2px;
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  font-size: 28px;
}
.og-fact .trait { font-size: 28px; gap: 8px; }
.og-fact .trait .dot { width: 18px; height: 18px; }
.og-tag { display: inline-flex; align-items: center; padding: 6px 12px 2px; font-size: 28px; }
.og-tag-event { background: #f28c28; }
.og-tag-special { background: #6b3fa0; color: var(--parchment); }
.og-tag-ink { background: var(--line); color: var(--parchment); }
.og-tag-muted { background: var(--parchment-deep); }
.og-mark {
  position: absolute;
  right: 36px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  font: 400 40px/1 "Jersey 20", "Pixel Operator", Georgia, serif;
}
.og-mark img { width: 52px; height: 52px; image-rendering: auto; }
/* In the column of words: left-aligned under the facts, set off by a rule. */
.og-mark-stack {
  position: static;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 4px solid var(--rule);
  align-self: stretch;
}
.og-mark b { font-weight: 400; color: var(--muted); }

/* The sprite layout: art at the left on deep parchment, words at the right. */
.og-sprite { display: grid; grid-template-columns: 540px 1fr; }
.og-art {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--parchment-deep);
  border-right: 12px solid var(--line);
}
.og-art img { object-fit: contain; }
/* The words sit in the middle of their column, clear of the mark at its foot. */
.og-words {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 44px;
}

/* The brand card: the icon (a painted app icon, so it scales smooth) and the words,
   one centred group. */
/* The icon's art has its own margin, more on the left of the heroes than the words
   have on their right, so the group sits a little left of centre to look centred. */
.og-brand { display: flex; align-items: center; justify-content: center; gap: 24px; padding-right: 72px; }
.og-brand img { image-rendering: auto; margin-right: 0; }  /* the icon carries its own margin */
.og-brand .og-name { font-size: 160px; margin: 0 0 4px; }
.og-brand .og-line { font-size: 58px; padding-left: 6px; }

/* The scene layout: the expedition's painting fills the card, a band across its foot. */
/* The painting above the band, cropped a little more from the ground than the sky:
   the boss usually towers at the top and the week stands along the bottom. */
.og-scene .og-bg {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: calc(100% - 148px);
  object-fit: cover;
  object-position: center 30%;
  image-rendering: auto;
}
.og-band {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 0 36px 24px 44px;
  background: var(--parchment);
  border-top: 12px solid var(--line);
  height: 148px;
  box-sizing: border-box;
}
.og-band .og-name { font-size: 72px; margin: 0; }
.og-band .og-line { font-size: 28px; }
.og-band .og-kicker { font-size: 26px; padding-top: 18px; }
.og-band .og-mark { position: static; margin-left: auto; align-self: flex-end; }

/* The chain layout: the name, the stages and the mark in one centred column. */
.og-chain {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 44px 34px;
}
.og-chain .og-name { font-size: 92px; margin: 0; text-align: center; }
.og-chain .og-line { text-align: center; margin-top: 6px; }
.og-stages { display: flex; justify-content: center; gap: 24px; }
.og-stages img { object-fit: contain; }
.og-mark-center { position: static; }

/* On the components page the card is shown at half size. */
.og-preview { width: 600px; height: 315px; overflow: hidden; }
.og-preview .og { transform: scale(0.5); transform-origin: 0 0; }

/* ---- cards ---- */
.step-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.step-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 16px 18px;
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}
.step-card:hover { background: #fff; }
.step-card img { width: 72px; height: 72px; object-fit: contain; margin: 0 0 6px; }
.step-card b { font-size: 21px; }
.step-card span:last-child { color: var(--muted); }
.step-n {
  position: absolute;
  top: 12px;
  right: 14px;
  font: 400 34px/1 "Jersey 20", "Pixel Operator", Georgia, serif;
  color: var(--rule);
}
.guide-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.guide-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 6px;
  border-bottom: 2px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.25;
}
.guide-row:hover { background: rgba(255, 255, 255, 0.45); }
.guide-row .app-icon { width: 32px; height: 32px; object-fit: contain; color: var(--ink); }
.guide-row span { display: flex; flex-direction: column; min-width: 0; }
.guide-row small, .see-card small { color: var(--muted); font-size: 17px; }
.summary {
  margin: 4px 0 28px;
  padding: 16px 20px 6px;
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}
.summary-label { margin: 0 0 6px !important; font-size: 16px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.summary ul { margin: 0 0 10px; padding-left: 22px; }
.summary li { margin-bottom: 6px; }
.see-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 8px 0 20px; }
.see-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border: 4px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.25;
  background: rgba(255, 255, 255, 0.35);
}
.see-card:hover { background: #fff; }
.see-card img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.see-card span { display: flex; flex-direction: column; }
@media (max-width: 1100px) {
  .step-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .step-cards { gap: 10px; }
  .step-card { padding: 12px; }
  .step-card img { width: 56px; height: 56px; }
  .step-card b { font-size: 19px; }
  .step-card span:last-child { font-size: 16px; }
  .guide-rows { grid-template-columns: 1fr; }
}

/* ---- faq_list ---- */
.qs { border-top: 2px solid var(--rule); margin-bottom: 8px; }
.q { border-bottom: 2px solid var(--rule); }
.q summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 4px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  line-height: 1.35;
}
.q summary::-webkit-details-marker { display: none; }
.q summary:hover { background: rgba(255, 255, 255, 0.45); }
.q-n { flex: none; min-width: 24px; color: var(--muted); font-weight: 400; }
.q-t { flex: 1; }
.q-mark { flex: none; width: 12px; height: 12px; position: relative; top: 1px; }
.q-mark::before, .q-mark::after { content: ""; position: absolute; background: var(--ink); }
.q-mark::before { left: 0; right: 0; top: 4px; height: 4px; }
.q-mark::after { top: 0; bottom: 0; left: 4px; width: 4px; }
.q[open] .q-mark::after { display: none; }
.q-a { padding: 0 4px 8px 40px; }
.q-a p, .q-a ul { margin: 0 0 12px; }
.q-link { font-size: 16px; }
.q-link a { color: var(--muted); }
@media (max-width: 860px) {
  .q-a { padding-left: 4px; }
}

/* ---- notes ---- */
.note-body p { margin: 0 0 14px; }
.note-body ul { margin: 0 0 14px; padding-left: 22px; }
.note-body li { margin-bottom: 8px; }
.nl { font-weight: 700; }
.note-h { margin: 24px 0 10px; }
.note-cover { display: block; width: 100%; height: auto; margin: 28px 0 14px; border: 4px solid var(--line); }
.note-body > .note-cover:first-child { margin-top: 0; }
.note-sign { margin-top: 20px !important; color: var(--muted); font-style: normal; }
.note-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}
.note-card:hover { background: #fff; }
.note-card b { font-size: 21px; }
.note-meta { color: var(--muted); font-size: 16px; display: flex; gap: 8px; align-items: center; }
.note-first {
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.new {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 1px 6px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- pager ---- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 48px 0 0; }
.pg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border: 4px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.25;
}
.pg:hover { background: #fff; }
.pg small { color: var(--muted); font-size: 16px; }
.pg.next { text-align: right; }
@media (max-width: 860px) {
  .pager { grid-template-columns: 1fr; }
  .pg.next { text-align: left; }
}

/* ---- download ---- */
.dl {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "icon text badges" "icon text discord";
  align-items: center;
  gap: 4px 20px;
  margin: 48px 0 0;
  padding: 20px 24px;
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}
.dl-icon { grid-area: icon; border-radius: 18px; border: 4px solid rgba(0, 0, 0, 0.1); image-rendering: auto; }
.dl-text { grid-area: text; }
.dl h2 { margin: 0 0 4px !important; font: 400 34px/1 "Jersey 20", "Pixel Operator", Georgia, serif; }
.dl p { margin: 0; color: var(--muted); }
.dl-badges { grid-area: badges; display: flex; gap: 10px; align-items: center; }
.dl-badges img { display: block; height: 48px; width: auto; image-rendering: auto; }
.dl-discord { grid-area: discord; justify-self: center; padding: 8px; }
.dl-discord img { display: block; image-rendering: auto; }
@media (max-width: 860px) {
  .dl { grid-template-columns: 1fr; grid-template-areas: "icon" "text" "badges" "discord"; justify-items: center; text-align: center; }
  .dl-badges { flex-direction: column; }
}

/* ---- footer ---- */
.wiki-foot {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 4px solid var(--line);
  color: var(--muted);
  font-size: 17px;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 12px; }
.foot-links a, .wiki-foot a { color: var(--muted); }
.wiki-foot p { margin: 0 0 6px; }

/* ---- guide page ---- */
.faq-intro { color: var(--muted); margin: 48px 0 -20px; padding-top: 20px; border-top: 4px solid var(--line); }
.traits-table td { vertical-align: middle; }
.traits-table .chips { margin: 0; line-height: 1.6; }

/* ---- updates page ---- */
.doc-body .timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.tl-item { margin: 0 0 16px; }
.back-to { margin-top: 20px; }

/* ---- glossary page ---- */
.az { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.az a { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--rule); text-decoration: none; color: var(--ink); font-weight: 700; }
.az a:hover { border-color: var(--line); background: #fff; }
.terms { margin: 0; }
.az-letter { color: var(--muted); }
.term { padding: 12px 0; border-bottom: 2px solid var(--rule); scroll-margin-top: 92px; }
.term:target { background: rgba(255, 255, 255, 0.6); outline: 4px solid var(--accent); outline-offset: 4px; }
.term dt { font-weight: 700; font-size: 21px; margin-bottom: 4px; }
.term dt a { color: var(--ink); text-decoration: none; }
.term dd { margin: 0; }
.term dd p { margin: 0 0 8px; }

/* ---- gallery page ---- */
.gallery-item { margin-bottom: 28px; }
.gallery-item h3 { margin-bottom: 0; }
.gallery-stage { border: 2px dashed var(--rule); padding: 16px; }
