/* Once Human notes: one stylesheet for every page.
   Colours are tokens on :root; dark mode redefines them. Components are grouped by page type. */

:root {
  color-scheme: light;
  --bg: #f3f0e8;
  --surface: #fffdf8;
  --surface-2: #ece6da;
  --text: #1d2126;
  --muted: #5b6370;
  --line: #d6cebd;
  --focus: #0b7d74;
  --c-core: #0b7d74;
  --c-season: #a86f00;
  --c-paid: #b8296a;
  --c-cosmetic: #6c48cf;
  --c-eternaland: #2766b5;
  --c-event: #437f16;
  --c-warband: #b8521a;
  --c-frost: #1f78b8;
  --c-surge: #7a4fd0;
  --c-water: #0b7fa3;
  --c-food: #b83a2e;
  --shadow: 0 1px 2px rgba(30, 25, 15, .06), 0 4px 16px rgba(30, 25, 15, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1216;
    --surface: #171b21;
    --surface-2: #20262e;
    --text: #e5e8ec;
    --muted: #9aa3ae;
    --line: #2c343e;
    --focus: #4fd1c5;
    --c-core: #3fc8bb;
    --c-season: #f1b53b;
    --c-paid: #f06aa6;
    --c-cosmetic: #a78bfa;
    --c-eternaland: #5fa8ff;
    --c-event: #8ccf55;
    --c-warband: #f08a4a;
    --c-frost: #6cbcf2;
    --c-surge: #b896ff;
    --c-water: #4cc3e6;
    --c-food: #ff8a76;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1216;
  --surface: #171b21;
  --surface-2: #20262e;
  --text: #e5e8ec;
  --muted: #9aa3ae;
  --line: #2c343e;
  --focus: #4fd1c5;
  --c-core: #3fc8bb;
  --c-season: #f1b53b;
  --c-paid: #f06aa6;
  --c-cosmetic: #a78bfa;
  --c-eternaland: #5fa8ff;
  --c-event: #8ccf55;
  --c-warband: #f08a4a;
  --c-frost: #6cbcf2;
  --c-surge: #b896ff;
  --c-water: #4cc3e6;
  --c-food: #ff8a76;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--focus); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: Oxanium, system-ui, sans-serif; line-height: 1.15; margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.muted { color: var(--muted); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1em; height: 1em; flex: none; }
.eyebrow {
  margin: 0;
  font: 600 12px/1.3 Oxanium, system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede { max-width: 66ch; color: var(--muted); margin: 0 0 14px; }
section { margin: 0 0 44px; }
h2 { font-size: 25px; margin-bottom: 8px; }
.sec-lede { color: var(--muted); margin: 0 0 16px; max-width: 72ch; }
.link-btn { border: 0; background: none; color: var(--focus); cursor: pointer; padding: 6px 4px; font-size: 13.5px; text-decoration: underline; }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 30px 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 10px; min-height: 54px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font: 700 16px Oxanium, system-ui, sans-serif; margin-right: auto; white-space: nowrap; }
.brand .ic { width: 22px; height: 22px; color: var(--c-core); }
@media (max-width: 460px) { .brand span { display: none; } }
.menus { display: flex; gap: 4px; }
.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 8px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.menu summary:hover, .menu[open] summary { background: var(--surface-2); }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 250px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px;
}
/* On phones a menu near the left edge would open off screen: span the bar instead. */
@media (max-width: 560px) {
  .menu { position: static; }
  .menu-list { left: 16px; right: 16px; min-width: 0; max-width: none; top: calc(100% + 2px); }
}
.menu-list a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.menu-list a:hover, .menu-list a[aria-current="page"] { background: var(--surface-2); }
.menu-list a .coin-sm { flex: none; }
.menu-list small { display: block; color: var(--muted); font-size: 12px; }
.theme-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 6px 11px; cursor: pointer; font-size: 13px; flex: none;
}
.theme-btn .ic { width: 16px; height: 16px; }
@media (max-width: 560px) { .theme-btn span { display: none; } }

/* ---------- Page head, breadcrumbs, footer ---------- */
.crumbs { font-size: 13px; color: var(--muted); padding: 16px 0 0; }
.crumbs a { color: var(--muted); }
.page-head { padding: 18px 0 22px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(30px, 5vw, 44px); margin: 10px 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text);
}
.tag.accent { background: color-mix(in srgb, var(--cc) 16%, var(--surface)); color: var(--text); border: 1px solid color-mix(in srgb, var(--cc) 45%, var(--line)); }
.tag.status { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-weight: 500; }
footer.site-foot { color: var(--muted); font-size: 13px; padding: 20px 0 40px; border-top: 1px solid var(--line); margin-top: 20px; }

/* ---------- Coins, glyphs, chips (shared) ---------- */
.coin-sm { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 20%, var(--surface)); color: var(--cc); }
.coin-sm svg { width: 15px; height: 15px; }
.coin-md { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 16%, var(--surface)); border: 1.5px solid var(--cc); color: var(--cc); }
.coin-md svg { width: 23px; height: 23px; }
.coin-lg { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 16%, var(--surface)); border: 1.5px solid var(--cc); color: var(--cc); }
.coin-lg svg { width: 28px; height: 28px; }
.glyph-sm { width: 24px; height: 24px; flex: none; display: grid; place-items: center; color: var(--muted); }
.glyph-sm svg { width: 16px; height: 16px; }
.glyph-lg { width: 52px; height: 52px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.glyph-lg svg { width: 26px; height: 26px; }
.chip {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 5px 11px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--cc, var(--text)); background: color-mix(in srgb, var(--cc, var(--text)) 15%, var(--surface)); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cc); }
.chip .count { color: var(--muted); font-size: 12px; }
.chip .rar { color: var(--muted); }
.step, .mini {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  border-radius: 999px; padding: 3px 11px 3px 3px; font-size: 13.5px; line-height: 1.3; text-align: left;
}
button.step, button.mini { cursor: pointer; }
.cur-step, .mini.cur-chip { border-color: color-mix(in srgb, var(--cc) 60%, var(--line)); background: color-mix(in srgb, var(--cc) 10%, var(--surface)); }
button.step:hover, button.mini:hover { border-color: var(--cc, var(--muted)); }
.mini { font-size: 12.5px; padding: 2px 9px 2px 2px; }
.mini .coin-sm { width: 20px; height: 20px; }
.mini .coin-sm svg { width: 12px; height: 12px; }
.flag { padding: 8px 11px; border-radius: 8px; font-size: 13.5px; margin: 10px 0 0; }
.flag.warn { background: color-mix(in srgb, var(--c-paid) 11%, var(--surface)); border-left: 3px solid var(--c-paid); }
.flag.thin, .flag.test { background: color-mix(in srgb, var(--c-season) 11%, var(--surface)); border-left: 3px solid var(--c-season); }
.flag.key, .flag.tip { background: color-mix(in srgb, var(--c-core) 11%, var(--surface)); border-left: 3px solid var(--c-core); }
.flag.info { background: color-mix(in srgb, var(--c-eternaland) 10%, var(--surface)); border-left: 3px solid var(--c-eternaland); }

/* ---------- Hub ---------- */
.hub-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.hub-tools input {
  flex: 1 1 240px; max-width: 360px; min-width: 0;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 14px;
}
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.card {
  display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--cc); transform: translateY(-1px); }
.card h3 { font-size: 18px; margin-bottom: 4px; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.card .tags { gap: 5px; }
.card .tag { font-size: 11.5px; padding: 2px 8px; }
.empty-note { color: var(--muted); font-style: italic; }

/* ---------- Build page ---------- */
.build-layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1080px) { .build-layout { grid-template-columns: 220px minmax(0, 1fr); } }
.toc { font-size: 14px; }
@media (min-width: 1080px) { .toc { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 90px); overflow: auto; } }
.toc details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.toc summary { cursor: pointer; font: 600 12px Oxanium, system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 8px 0 0; padding: 0; }
.toc li a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--text); text-decoration: none; border-left: 2px solid transparent; }
.toc li a:hover { background: var(--surface-2); }
.toc li a.active { border-left-color: var(--cc, var(--focus)); background: var(--surface-2); font-weight: 600; }
.build h2 { scroll-margin-top: 72px; }
.build section { margin-bottom: 38px; }
.build h3 { font-size: 17px; margin: 18px 0 8px; }
.build p { margin: 0 0 10px; max-width: 78ch; }
.build ul, .build ol { margin: 0 0 12px; padding-left: 20px; max-width: 78ch; }
.build li { margin: 4px 0; }
.build blockquote {
  margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--cc, var(--line));
  background: var(--surface); border-radius: 0 10px 10px 0; max-width: 78ch;
}
.build blockquote p { margin: 0; }
.build blockquote cite { display: block; margin-top: 6px; font-size: 12.5px; font-style: normal; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; margin: 0 0 16px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.facts dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.loadout { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.slot { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.slot.key { border-color: var(--cc); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 40%, transparent); }
.slot-head { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.slot-head .ic { width: 17px; height: 17px; }
.slot.key .slot-head { color: var(--cc); }
.slot-item { font-weight: 700; margin: 5px 0 2px !important; }
.slot-detail { color: var(--muted); font-size: 13.5px; margin: 0 0 4px !important; }
.slot-mod, .slot-alt { font-size: 13.5px; margin: 3px 0 0 !important; }
.slot-mod span, .slot-alt span { display: inline-block; min-width: 30px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 4px; }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 0 0 14px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font: 600 11.5px Oxanium, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.build .flag { max-width: 78ch; margin: 0 0 12px; }
.refs-list { padding-left: 18px; margin: 0 0 14px; }
.refs-list li { margin: 4px 0; }

/* ---------- Map page ---------- */
.hero-map { padding-bottom: 22px; }
.coins { display: flex; flex-wrap: wrap; gap: 8px; }
.coin-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid color-mix(in srgb, var(--cc) 45%, var(--line));
  background: color-mix(in srgb, var(--cc) 8%, var(--surface));
  color: var(--text); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font-size: 13.5px;
}
.filters { display: grid; gap: 10px; margin-bottom: 14px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-label { font: 600 11.5px/1 Oxanium, system-ui, sans-serif; color: var(--muted); width: 58px; text-transform: uppercase; letter-spacing: .1em; }
.search-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search-row input {
  flex: 1 1 220px; max-width: 340px; min-width: 0;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 7px 11px; font: inherit; font-size: 14px;
}
.map-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1080px) { .map-layout { grid-template-columns: minmax(0, 1fr) 350px; } }
.map-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); min-width: 0; }
.map-hint { font-size: 12.5px; color: var(--muted); padding: 10px 14px 0; margin: 0; }
@media (min-width: 760px) { .map-hint { display: none; } }
.map-scroll { overflow-x: auto; padding: 6px 12px 14px; }
.flow { display: block; width: 100%; height: auto; min-width: 700px; }
.flow .col-head { font: 600 11px Oxanium, system-ui, sans-serif; letter-spacing: .12em; fill: var(--muted); }
.flow .col-sub { font: 11px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; fill: var(--muted); }
.flow .empty { font-size: 14px; fill: var(--muted); }
.flow .node { cursor: pointer; transition: opacity .15s; outline: none; }
.flow .node text { font: 12.5px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; fill: var(--text); pointer-events: none; }
.flow .box { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.flow .side .box { fill: var(--surface-2); stroke: var(--surface-2); }
.flow .side .ic { color: var(--muted); }
.flow .item .box { stroke: var(--cc); stroke-width: 1.4; }
.flow .item .coin { fill: var(--cc); fill-opacity: .17; }
.flow .item .ic { color: var(--cc); }
.flow .pip { fill: var(--cc); }
.flow .pip-ic { color: var(--cc); }
.flow .withdrawn text { text-decoration: line-through; }
.flow .more { fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.flow .side:hover .more, .flow .side.sel .more { stroke: var(--text); }
.flow .node:hover .box { stroke: var(--text); }
.flow .node:focus-visible .box { stroke: var(--focus); stroke-width: 2.6; }
.flow .node.sel .box { stroke-width: 2.6; }
.flow .side.sel .box { stroke: var(--text); stroke-width: 1.6; }
.flow .edge { fill: none; stroke: var(--cc); stroke-width: 1.5; stroke-opacity: .3; transition: stroke-opacity .15s; }
.flow.active .edge { stroke-opacity: .06; }
.flow.active .edge.on { stroke-opacity: .95; stroke-width: 2.3; }
.flow.active .node { opacity: .3; }
.flow.active .node.on { opacity: 1; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 18px; }
@media (min-width: 1080px) { .panel { position: sticky; top: 70px; max-height: calc(100vh - 86px); overflow: auto; } }
.p-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.p-cat { margin: 0 0 3px; font: 600 11.5px/1.2 Oxanium, system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--cc, var(--muted)); }
.panel h3 { font-size: 23px; }
.panel h4 { font: 600 11.5px/1.2 Oxanium, system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.panel ul { margin: 0; padding-left: 18px; }
.panel li { margin: 4px 0; }
.panel p { margin: 0 0 8px; }
.rarity-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13.5px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.badge .rar { color: var(--cc, var(--muted)); }
.p-refs { font-size: 12.5px; color: var(--muted); margin-top: 16px !important; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.panel ul.ex { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.panel ul.ex li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; margin: 0; padding: 7px 10px; font-size: 13.5px; }
.panel ul.ex li + li { border-top: 1px solid var(--line); }
.panel ul.ex li:nth-child(even) { background: var(--surface-2); }
.panel ul.ex strong { color: var(--focus); font-weight: 600; }
.to-map { display: inline-block; margin-top: 14px; }
@media (min-width: 1080px) { .to-map { display: none; } }
.routes { display: grid; gap: 14px; }
@media (min-width: 900px) { .routes { grid-template-columns: 1fr 1fr; } }
.route { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.route h3 { font-size: 16.5px; margin-bottom: 10px; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chain .join { color: var(--muted); font-size: 14px; padding: 0 1px; }
.route .note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.tiers { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.tier h3 { font-size: 17px; display: flex; gap: 8px; align-items: center; }
.tier h3 .rar { color: var(--muted); }
.tier p { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.mini-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.callout {
  margin-top: 14px; padding: 14px 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--c-core) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c-core) 35%, var(--line));
}
.callout p { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 680px; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap th { font: 600 11.5px Oxanium, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: var(--surface-2); }
.table-wrap td .rar { color: var(--cc); }
.table-wrap td.rarity { white-space: nowrap; }
.table-wrap td.cat { color: var(--cc); font-weight: 600; white-space: nowrap; }
.name-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.name-btn:hover { color: var(--focus); }

/* ---------- Flow diagram (assets/flowchart.js) ---------- */
.fc { margin: 0 0 16px; }
.fc-hint { font-size: 12.5px; color: var(--muted); margin: 0 0 6px !important; }
@media (min-width: 900px) { .fc-hint { display: none; } }
.fc-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.fc-grid {
  position: relative; display: grid; column-gap: 46px; padding: 14px 16px 16px;
  grid-template-columns: repeat(var(--cols), minmax(150px, 1fr));
  min-width: calc(var(--cols) * 150px + (var(--cols) - 1) * 46px + 32px);
}
.fc-edges { position: absolute; left: 0; top: 0; pointer-events: none; }
.fc-col { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; }
.fc .fc-head { font: 600 11px Oxanium, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.fc-nodes { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.fc-node {
  display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--cc, var(--line));
  color: var(--text); text-decoration: none; font-size: 13px; line-height: 1.35; cursor: default;
  transition: opacity .15s, box-shadow .15s;
}
a.fc-node { cursor: pointer; }
.fc-node.plain { --cc: var(--muted); } /* untoned boxes must not inherit the page accent */
a.fc-node .fc-label { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 35%, transparent); text-underline-offset: 2px; }
.fc-node .fc-ic { width: 18px; height: 18px; margin-top: 1px; color: var(--cc, var(--muted)); }
.fc-label { display: block; font-weight: 700; }
.fc-note { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.fc-edge path { fill: none; stroke: var(--cc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .55; transition: opacity .15s; }
.fc.tracing .fc-node:not(.on) { opacity: .28; }
.fc.tracing .fc-node.on { box-shadow: 0 0 0 1px var(--cc, var(--line)); }
.fc.tracing .fc-edge path { opacity: .08; }
.fc.tracing .fc-edge.on path { opacity: 1; stroke-width: 2.2; }
.fc figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; max-width: 78ch; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

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