/* Generated by tools/frontend/make_words.py from tools/frontend/langs/*.json; edit those, not this file. */
@font-face { font-family: PxKo; src: url("/_a/galmuri9-ko.38ca98fc04.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: PxBKo; src: url("/_a/galmuri11b-ko.c8d12079db.woff2") format("woff2"); font-display: swap; }
html:lang(ko) { --w-gamePrefix: "게임 "; --w-dataPrefix: " · 데이터 "; --w-health: "체력"; --w-attack: "공격력"; --w-attackSpeed: "공격 속도"; --w-range: "공격 사거리"; --w-moveSpeed: "이동 속도"; --w-imprintSlots: "각인 칸"; --w-skillPrefix: "스킬 · "; --w-promotes: "전직"; --w-absorbGives: "흡수 시 얻는 각인"; --w-twoStarsAtAbsorbLv: "★★ 흡수 LV "; --w-threeStarsAtAbsorbLv: "· ★★★ 흡수 LV "; --w-factionsPrefix: "진영: "; --w-locked: "잠김"; --w-itemFrom: "획득처: "; --w-adds: "추가: "; --w-addsToThe: " ("; --w-addsCard: " 카드)"; --w-ofPlayers: " (플레이어 달성률)"; --w-valuesPrefix: "수치: "; --w-unlock: "해금"; --w-bosses: "보스"; --w-enemies: "적"; --w-originite: "기원석"; --w-easyTenWaves: "쉬움 · 10웨이브"; --w-normalTwentyWaves: "보통 · 20웨이브"; --w-hardThirtyWaves: "어려움 · 30웨이브"; --w-whoGetsIt: "적용 대상"; --w-members: "구성원"; --w-differentTypes: "서로 다른 종류"; --w-unlockPrefix: "해금: "; --w-onThisWiki: "위키 둘러보기"; --w-unitLevel: "LV"; --w-front: "전열"; --w-tower: "사격탑"; --w-back: "후열"; --w-cores: "코어"; --w-items: "아이템"; --w-clearTime: "클리어 시간"; --w-lives: "남은 목숨"; --w-bestUnit: "최고 유닛"; --w-damage: "준 피해량"; --w-taken: "받은 피해량"; --w-healing: "치유량"; --f-name: 20px/24px PxKo, var(--sans); --f-h2: 24px/36px PxBKo, var(--sans); --f-h1: 36px/48px PxBKo, var(--sans); }
@font-face { font-family: PxZhTw; src: url("/_a/cubic11-zh-tw.8f376f9e05.woff2") format("woff2"); font-display: swap; }
html:lang(zh-TW) { --w-gamePrefix: "遊戲 "; --w-dataPrefix: " · 資料 "; --w-health: "生命"; --w-attack: "攻擊"; --w-attackSpeed: "攻擊速度"; --w-range: "攻擊範圍"; --w-moveSpeed: "移動速度"; --w-imprintSlots: "刻印欄"; --w-skillPrefix: "技能 · "; --w-promotes: "轉職"; --w-absorbGives: "吸收後獲得"; --w-twoStarsAtAbsorbLv: "★★ 吸收 LV "; --w-threeStarsAtAbsorbLv: "· ★★★ 吸收 LV "; --w-factionsPrefix: "陣營："; --w-locked: "鎖定"; --w-itemFrom: "來源："; --w-adds: "加入"; --w-addsToThe: "（"; --w-addsCard: " 卡）"; --w-ofPlayers: " 的玩家已解鎖"; --w-valuesPrefix: "數值 "; --w-unlock: "解鎖"; --w-bosses: "首領"; --w-enemies: "敵人"; --w-originite: "Originite"; --w-easyTenWaves: "簡單 · 10 波"; --w-normalTwentyWaves: "普通 · 20 波"; --w-hardThirtyWaves: "困難 · 30 波"; --w-whoGetsIt: "適用對象"; --w-members: "成員"; --w-differentTypes: "不同種類"; --w-unlockPrefix: "解鎖："; --w-onThisWiki: "Wiki 內容"; --w-unitLevel: "LV"; --w-front: "前排"; --w-tower: "射擊塔"; --w-back: "後排"; --w-cores: "核心"; --w-items: "物品"; --w-clearTime: "通關時間"; --w-lives: "剩餘生命數"; --w-bestUnit: "最佳單位"; --w-damage: "造成傷害"; --w-taken: "承受傷害"; --w-healing: "治療量"; --f-name: 24px/28px PxZhTw, var(--sans); --f-h2: 24px/36px PxZhTw, var(--sans); --f-h1: 36px/48px PxZhTw, var(--sans); }

/* Pixel fonts are bitmap designs: Px sits on a 10px grid, PxB on a 12px grid. Use whole multiples only (Px 20/30/40, PxB 24/36/48). */
@font-face { font-family: Px; src: url("/_a/galmuri9.576a0cf7c4.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: PxB; src: url("/_a/galmuri11b.49e7774d9f.woff2") format("woff2"); font-display: swap; }

:root {
  /* Sampled from the game's slot machine, unit panel and promotion card; grade colours from the in-run Rarity tooltip. */
  --void: #151217;
  --bg: #211a24;
  --panel: #34303e;
  --panel-hi: #554a58;
  --panel-lo: #2d2734;
  --well: #1e1a21;
  --rope: #786868;
  --ink: #ece5d8;
  --ink-dim: #b5abba;
  --gold: #e8c468;
  --paper: #d7d1af;
  --paper-line: #b9ae88;
  --paper-ink: #33291d;
  --paper-dim: #6b5b40;
  --normal: #f6f5f3;
  --advanced: #a4cda1;
  --rare: #86a3e7;
  --legendary: #c67929;
  --prism: #c9a0e8;
  --prism-bow: linear-gradient(90deg, #e6c84f, #8fd08a, #86a3e7, #c9a0e8); /* the game writes Prism in a rainbow */
  /* Off-palette tones the shell and cards use. */
  --chrome: #1a151c; /* top bar and footer */
  --brand: #f6e3ea;
  --heading: #fff6dc;
  --ink-hi: #fff;
  --ink-off: #857c8b; /* placeholders, sidebar entries without a page yet */
  --ink-faint: #6b6272;
  --gold-hi: #fff1c4;
  --paper-hi: #efe9c6;
  --paper-link: #7a3f12;
  --star: #a0672a;
  --no: #d88a8a;
  --essence: #a9cdf5; --essence-hi: #d8ecff; --essence-lo: #8db7ea; /* the Shop currency and its crystal */
  --originite: #f0b6d8; /* the upgrade currency */
  --tone-red: #d9675b; --tone-teal: #7cc6c0; /* achievement tab tones beside the grade colours */
  --hero-bg: #2e2431;
  --scrim: rgb(21 18 23 / .7);
  --drop: rgb(21 18 23 / .5); /* under the search results */
  --drop-menu: rgb(0 0 0 / .4); /* under the filter menus */
  --well-shade: rgb(51 41 29 / .28);
  --paper-tint: rgb(51 41 29 / .08);
  --hero-fade: linear-gradient(to top, var(--bg) 0, rgb(33 26 36 / .9) 50%, rgb(33 26 36 / .15) 100%);
  --px: 4px; /* one frame pixel */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Type scale. Pixel faces carry names, numbers and headings; everything else is --sans in three sizes. */
  --f-name: 20px/24px Px, var(--sans);
  --f-h2: 24px/36px PxB, var(--sans);
  --f-h1: 36px/48px PxB, var(--sans);
  --f-body: 16px/24px var(--sans);
  --f-small: 14px/20px var(--sans);
  --f-label: 12px/16px var(--sans);
  /* Spacing steps: 4, 8, 12, 16, 24, 32, 48. */
  /* Stat icons for CSS masks. A mask image is fetched with CORS and the asset host sends no CORS header, so /_a/ URLs
     never show as masks; these four stay inline. Source files: i-hp, i-atk, i-aspd, i-range in assets.json. */
  --i-hp: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAAOElEQVR4nGP8//8/AwMDA5hgYGBghNJwPgsSB1kCzmdCE8AARCmA2YsNMMJMwKYILIZsBbIiOBsAgGEIEJNR2/UAAAAASUVORK5CYII=");
  --i-atk: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAN0lEQVR4nGP8//8/Aw4AlmDCJ4lLAbKRjCAFyAIokiCCBYsEXBJmBZyDLglTgNMb6I6E6UTRAACBmwsN4XIhnAAAAABJRU5ErkJggg==");
  --i-aspd: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAANUlEQVR4nGP8////fwYGBkYGCEBmMzAhCcIAnA2SxKYLrACmE6sCdGNBEnA2SBKrBDZjUdgAzDwPC1uyQqwAAAAASUVORK5CYII=");
  --i-range: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAPklEQVR4nGP8//8/AxTAGVDACCJYkCTBAkgALAZSAJPEZsJ/JiyCKCahK8AAMDfgcihYAcx+nI6EOwiLexgArdQNGexxrb0AAAAASUVORK5CYII=");
  --bar: 64px; /* the top bar's height: everything that sticks or scrolls to an anchor clears it */
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font: var(--f-body); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 16px); }
body { margin: 0; min-height: 100vh; }
img { image-rendering: pixelated; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: var(--px) solid var(--gold); outline-offset: var(--px); }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 40; background: var(--paper); color: var(--paper-ink); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* Nine-slice frames redrawn from the game's UI at 4 screen px per frame pixel.
   The inset background sits behind each frame because cards land on fractional pixels and the slices would otherwise show hairline seams. */
.card { border: 0 solid transparent; border-image: url("https://img.slotbound.net/s_0i2d502f0h3m2a/paper.7baa686fb9.png") 10 fill / 40px; background: linear-gradient(var(--paper), var(--paper)) center / calc(100% - 16px) calc(100% - 16px) no-repeat; image-rendering: pixelated; }

/* Buttons: the only framed dark elements. One set of states for all of them. */
.btn { display: inline-block; font: var(--f-name); line-height: 20px; color: var(--ink); text-decoration: none; white-space: nowrap; border: 16px solid transparent; border-image: url("https://img.slotbound.net/s_0i2d502f0h3m2a/well.fcea2705de.png") 4 fill / 16px; background: linear-gradient(var(--well), var(--well)) center / calc(100% - 16px) calc(100% - 16px) no-repeat border-box; image-rendering: pixelated; }
.btn:hover { color: var(--ink-hi); filter: brightness(1.35); }
.btn:active { transform: translateY(var(--px)); }
.btn-paper { border: 0; border-image: none; padding: 12px 16px; background: var(--paper); color: var(--paper-ink); clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px); }
.btn-paper:hover { color: var(--paper-ink); background: var(--paper-hi); filter: none; }

/* Top bar: stays on screen on every page and every width. It holds what a reader reaches for most (search), the brand as the way home,
   the game version the data matches and the store button. Sections live in the sidebar only. */
.bar { position: sticky; top: 0; z-index: 20; height: var(--bar); display: flex; align-items: center; gap: 24px; padding: 0 32px 0 24px; background: var(--chrome); border-bottom: var(--px) solid var(--void); }
.brand { flex: none; display: flex; align-items: center; gap: 12px; font: 24px/24px PxB, var(--sans); color: var(--brand); text-decoration: none; white-space: nowrap; }
.brand span, .foot-brand span { color: var(--gold); }
.brand:hover { color: var(--ink-hi); }
.find { position: relative; }
.bar-find { flex: 1 1 0; max-width: 560px; }
.find input { width: 100%; height: 40px; padding: 0 12px; font: var(--f-small); color: var(--ink); background: var(--well); border: var(--px) solid var(--panel-hi); border-radius: 0; -webkit-appearance: none; appearance: none; }
.find input::placeholder { color: var(--ink-off); }
.find input:focus-visible { outline-offset: 0; }
/* The key that jumps to the box; it leaves while the box is in use. */
.find kbd { position: absolute; right: 10px; top: 10px; width: 20px; font: var(--f-label); line-height: 20px; text-align: center; color: var(--ink-dim); background: var(--panel-lo); pointer-events: none; }
.find input:focus + kbd, .find input:not(:placeholder-shown) + kbd { display: none; }
.search-out:empty { display: none; }
.search-out { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); max-height: min(60vh, 480px); overflow-y: auto; background: var(--panel); border: var(--px) solid var(--panel-hi); box-shadow: 0 8px 0 var(--drop); text-align: left; }
.search-out a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; font: var(--f-small); color: var(--ink); text-decoration: none; }
.search-out a:hover, .search-out a:focus-visible { background: var(--panel-hi); }
.search-out small { font: var(--f-label); line-height: 20px; color: var(--ink-dim); white-space: nowrap; }
.search-out .none { padding: 8px 12px; font: var(--f-small); color: var(--ink-dim); }
.bar-ver { margin-left: auto; font: var(--f-small); color: var(--ink-dim); text-decoration: none; white-space: nowrap; }
.bar-ver b { color: var(--ink); }
/* Labels every page repeats. */
.bar-ver b::before { content: var(--w-gamePrefix, "Game "); font-weight: 400; color: var(--ink-dim); } .bar-ver span::before { content: var(--w-dataPrefix, " · data "); }
.bar-ver:hover, .bar-ver:hover b { color: var(--gold); }
.bar-buy { flex: none; }
.bar-icon { flex: none; width: 44px; height: 44px; margin-left: auto; padding: 10px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.bar-icon:hover { color: var(--gold); }
.menu-link, .bar-icon { display: none; }
/* Discord: an icon beside the store button and quieter than it. When the bar is too narrow for the store button, it moves into the Menu drawer. */
.bar-discord, .side-discord { flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 10px; color: var(--ink-dim); text-decoration: none; }
.bar-discord:hover, .side-discord:hover { color: var(--gold); }
.side-discord { display: none; }
.bar-discord span, .side-discord span { font: var(--f-small); }
/* Language menu: shown only on pages that exist in two or more languages; the same quiet weight as Discord. */
.lang-pick { position: relative; flex: none; }
.lang-pick summary { display: flex; align-items: center; gap: 8px; height: 44px; padding: 10px; color: var(--ink-dim); cursor: pointer; list-style: none; }
.lang-pick summary::-webkit-details-marker { display: none; }
.lang-pick summary:hover, .lang-pick[open] summary { color: var(--gold); }
.lang-pick summary span { font: var(--f-small); }
.lang-menu { position: absolute; z-index: 20; right: 0; top: calc(100% + 4px); min-width: 160px; display: grid; padding: 4px;
  background: var(--panel); border: var(--px) solid var(--rope); box-shadow: 0 8px 0 var(--drop-menu); }
.lang-menu a { padding: 8px 12px; font: var(--f-small); color: var(--ink); text-decoration: none; white-space: nowrap; }
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--panel-hi); outline: 0; }
.lang-menu a[aria-current] { color: var(--gold); }
.lang-offer { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1120px; margin: 0 auto 16px; padding: 8px 12px; background: var(--panel-lo); }
.lang-offer a { font: var(--f-small); color: var(--gold); }
.lang-offer button { padding: 4px 8px; font: var(--f-small); color: var(--ink-dim); background: none; border: 0; cursor: pointer; }

/* Sidebar sits flush against the left edge; the article and its list of contents are centred in what is left. */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); align-items: start; }
.col { min-width: 0; }
#main { padding: 24px 32px 0; }
.page { max-width: 1120px; margin: 0 auto; }
.page.has-rail { max-width: 1416px; display: grid; grid-template-columns: minmax(0, 1120px) 256px; gap: 40px; align-items: start; }

.side { position: sticky; top: var(--bar); height: calc(100vh - var(--bar)); overflow: hidden auto; padding: 16px 16px 32px 24px; background: var(--panel); border-right: var(--px) solid var(--panel-hi); box-shadow: var(--px) 0 0 var(--void); scrollbar-width: thin; scrollbar-color: var(--panel-hi) transparent; }
.side-box + .side-box { margin-top: 20px; padding-top: 16px; border-top: var(--px) solid var(--panel-lo); }
.side-h { font: var(--f-label); font-weight: 700; letter-spacing: .08em; color: var(--gold); margin-bottom: 4px; }
.side li { display: flex; align-items: center; gap: 8px; margin: 0 -8px; }
.side li > a, .side li > span { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 8px; font: var(--f-small); text-decoration: none; color: var(--ink); }
.side li > span { color: var(--ink-off); }
.side li > span .nav-ico { opacity: .45; }
/* Families sit under Units two to a row, on every page: the sidebar never changes shape, only the marked row moves. */
.side li.sub { display: block; margin: 0 -8px 4px 4px; padding-left: 8px; border-left: var(--px) solid var(--panel-lo); }
.side li.sub ul { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 4px; }
.side li.sub li { margin: 0; }
.side li.sub li > a, .side li.sub li > span { gap: 6px; padding: 0 4px; }
.side li.sub .nav-ico { flex-basis: 28px; }
.nav-ico { flex: 0 0 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.nav-ico i { width: 8px; height: 8px; background: var(--panel-hi); }
.side li > b { min-width: 32px; margin-right: 8px; padding: 2px 6px; font: var(--f-label); font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; color: var(--ink-dim); background: var(--panel-lo); }
.side li > span + b { color: var(--ink-faint); }
.side li > a:hover { background: var(--panel-hi); }
.side li:has(> a[aria-current]) { background: var(--paper); clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px); }
.side li > a[aria-current] { font-weight: 700; color: var(--paper-ink); background: none; }
.side li > a[aria-current] + b { color: var(--paper-ink); background: var(--paper-line); }
.side-close, .rail-close, .scrim, .toc-tab { display: none; }

/* List of contents: no frame, it belongs to the article. */
.rail { position: sticky; top: calc(var(--bar) + 24px); }
.rail-box { max-height: calc(100vh - var(--bar) - 48px); overflow: hidden auto; padding: 0 8px 0 16px; border-left: var(--px) solid var(--panel); scrollbar-width: thin; scrollbar-color: var(--panel-hi) transparent; }
.rail .side-h { margin-bottom: 12px; }
.rail .side-h-next { margin-top: 24px; padding-top: 16px; border-top: var(--px) solid var(--panel-hi); }
.toc-guide { margin: 0; padding: 0; list-style: none; }
.toc-guide a { display: block; margin-left: -20px; padding: 6px 0 6px 16px; border-left: var(--px) solid transparent; font: var(--f-small); color: var(--ink-dim); text-decoration: none; }
.toc-guide a:hover { color: var(--ink); }
.toc-guide a > b { float: right; margin-left: 8px; font: var(--f-label); font-weight: 400; color: var(--ink-dim); line-height: 20px; }
.toc > li + li { margin-top: 4px; }
.toc a { text-decoration: none; }
.toc > li > a { display: flex; align-items: center; min-height: 36px; margin-left: -20px; padding-left: 16px; border-left: var(--px) solid transparent; font: var(--f-name); color: var(--ink); }
.toc > li > a:hover { color: var(--g); }
.toc > li > a > b { margin-left: auto; font: var(--f-label); font-weight: 400; color: var(--ink-dim); }
.toc ol { padding: 4px 0 12px; }
/* With JS only the group being read is open; the rest fold to one line each. */
.js .toc > li:not(.open) > ol { display: none; }
.toc ol a { display: flex; align-items: center; gap: 10px; min-height: 36px; margin-left: -20px; padding-left: 16px; border-left: var(--px) solid transparent; font: var(--f-small); color: var(--ink-dim); }
/* Sprites at 2x; the few that are taller than the row lose the top of a wing or a hat. */
.toc-ico { flex: 0 0 32px; height: 32px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.toc-ico img { flex: none; max-width: none; }
.toc-flat .toc-ico { margin-right: 10px; align-items: center; }
.toc ol a:hover { color: var(--ink); }
/* The part being read: a gold edge on the line of contents. */
.toc ol a.is-here, .toc > li > a.is-here, .toc-guide a.is-here { color: var(--ink); border-left-color: var(--gold); }

.foot { margin-top: 64px; border-top: var(--px) solid var(--void); background: var(--chrome); }
.foot-in { max-width: 1416px; margin: 0 auto; padding: 32px; display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 32px; font: var(--f-small); color: var(--ink-dim); }
.foot-about p { max-width: 60ch; }
.foot-brand { font: var(--f-h2); color: var(--brand); margin-bottom: 8px; }
.foot-h { font: var(--f-name); color: var(--gold); margin-bottom: 8px; }
.foot li { padding: 4px 0; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { color: var(--gold); text-decoration: underline; }
.foot li > span { color: var(--ink-off); }

/* Grade colour marker. */
[class*="g-"] > i, .grade-head h2 > i { display: inline-block; width: 12px; height: 12px; margin-right: 8px; background: var(--g); box-shadow: 0 0 0 var(--px) var(--void); vertical-align: 1px; }
/* The game writes Prism in a rainbow. */
.g-prism > i, .g-prism .grade-head h2 > i, .g-prism .grade-head::after { background: var(--prism-bow); }
.g-normal { --g: var(--normal); } .g-advanced { --g: var(--advanced); } .g-rare { --g: var(--rare); } .g-legendary { --g: var(--legendary); } .g-prism { --g: var(--prism); } .g-special { --g: var(--gold); }
/* Entries without a grade (enemies, stages): the plain panel edge, so no grade colour is borrowed. */
.g-plain { --g: var(--panel-hi); }

/* No room for the list of contents: it becomes a drawer on the right, opened from a small tab of ticks on the right edge. */
@media (max-width: 1551px) {
  .page.has-rail { max-width: 1120px; grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .js .rail { display: block; position: fixed; z-index: 30; inset: 0 0 0 auto; width: min(288px, 86vw); padding: 16px 12px 16px 8px; background: var(--panel); border-left: var(--px) solid var(--panel-hi); transform: translateX(105%); visibility: hidden; }
  .js.toc-open .rail { transform: none; visibility: visible; }
  .js .rail-box { max-height: calc(100vh - 96px); border-left: 0; }
  .js .rail-close { display: block; margin: 0 0 16px auto; cursor: pointer; font-family: Px, var(--sans); }
  .js .toc-tab { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; position: fixed; z-index: 20; right: 0; top: 38vh; padding: 12px 0; border: 0; background: none; pointer-events: none; cursor: pointer; }
  .toc-tab i { display: block; width: 10px; height: 4px; background: var(--ink-dim); opacity: .55; transition: width .12s ease-out; pointer-events: auto; }
  .toc-tab i.on { width: 20px; background: var(--gold); opacity: 1; }
  .toc-tab:hover i, .toc-tab:focus-visible i { opacity: 1; }
  .js.toc-open .scrim, .js.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; width: 100%; border: 0; padding: 0; background: var(--scrim); cursor: pointer; }
}
/* Sidebar becomes a drawer. Without JS it stays in the page, after the article. */
@media (max-width: 1279px) {
  .bar { gap: 16px; padding: 0 16px; }
  .bar-ver { display: none; }
  .menu-link { display: block; flex: none; }
  .bar-buy { margin-left: auto; }
  .app { display: flex; flex-direction: column; }
  .col { width: 100%; }
  #main { padding: 16px 16px 0; }
  .side { position: static; height: auto; order: 2; border-right: 0; box-shadow: none; border-top: var(--px) solid var(--panel-hi); }
  .js .side { position: fixed; z-index: 30; inset: 0 auto 0 0; width: min(304px, 86vw); height: auto; border-top: 0; border-right: var(--px) solid var(--panel-hi); transform: translateX(-105%); visibility: hidden; }
  .js.nav-open .side { transform: none; visibility: visible; }
  .js .side-close { display: block; margin: 0 0 4px auto; cursor: pointer; font-family: Px, var(--sans); }
  .foot-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 24px 16px; gap: 24px 16px; }
  .foot-about { grid-column: 1 / -1; }
}
/* Drawers animate only after the first tap, so nothing slides during page load. */
.anim .side, .anim .rail { transition: transform .18s ease-out, visibility 0s .18s; }
.anim.nav-open .side, .anim.toc-open .rail { transition: transform .18s ease-out; }
/* Narrow bars: the store button goes first, then the search box folds into a button that opens it under the bar. */
@media (max-width: 1023px) { .bar-buy { display: none; } .bar-find { margin-left: auto; } }
@media (max-width: 1023px) { .bar-discord { display: none; } .js .side-discord { display: flex; position: absolute; top: 16px; left: 16px; } }
@media (max-width: 719px) {
  .bar { gap: 8px; }
  .js .bar-icon { display: block; }
  .bar-find { display: none; position: absolute; left: 0; right: 0; top: 100%; max-width: none; margin: 0; padding: 8px 16px; background: var(--chrome); border-bottom: var(--px) solid var(--void); }
  .find-open .bar-find { display: block; }
  .bar-find kbd { display: none; }
  .bar-find .search-out { left: 16px; right: 16px; top: calc(100% - 4px); }
}
@media (max-width: 480px) { .brand { font: 20px/24px Px, var(--sans); gap: 8px; } .lang-pick summary span { display: none; } }
@media (max-width: 389px) {
  .bar { padding-inline: 8px; gap: 4px; }
  .menu-link { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) { .anim .side, .anim .rail, .toc-tab i { transition: none; } .btn:active { transform: none; } }

.crumbs { font: var(--f-small); color: var(--ink-dim); margin-bottom: 8px; }
.crumbs i { font-style: normal; margin: 0 4px; }
.crumbs a { color: var(--ink-dim); } .crumbs a:hover { color: var(--ink); }
.crumbs:has(.share) { position: relative; padding-right: 48px; }
.share { position: absolute; right: 0; top: -10px; width: 40px; height: 40px; padding: 10px; border: 0; background: none; color: var(--ink-dim); cursor: pointer; }
.share:hover, .share[aria-expanded="true"] { color: var(--gold); }
.share-menu { position: absolute; z-index: 10; right: 0; top: calc(100% + 12px); min-width: 160px; display: grid; padding: 4px;
  background: var(--panel); border: var(--px) solid var(--rope); box-shadow: 0 8px 0 var(--drop-menu); }
.crumbs .share-menu > * { padding: 8px 12px; font: var(--f-small); color: var(--ink); text-align: left; text-decoration: none; white-space: nowrap; background: none; border: 0; cursor: pointer; }
.crumbs .share-menu > :hover, .crumbs .share-menu > :focus-visible { background: var(--panel-hi); outline: 0; }
.doc h1 { font: var(--f-h1); color: var(--heading); }
.lead { margin-top: 12px; color: var(--ink); }
/* Plain figures, no frame: they are not clickable. */
.facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 16px; }
.facts > div + div { padding-left: 32px; border-left: var(--px) solid var(--panel); }
.facts dt { font: var(--f-label); color: var(--ink-dim); }
.facts dd { font: var(--f-name); color: var(--ink); }
.facts dd a { display: inline-block; padding: 10px 8px; margin: -10px -8px; color: var(--ink); }
:where(.doc-head, .block-text, .faction):has(> .facts) { container-type: inline-size; }
@container (max-width: 720px) {
  .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .facts > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts > div:nth-child(even) { padding-left: 16px; }
}

.grade { margin-top: 48px; scroll-margin-top: 16px; }
.grade-head { padding-bottom: 12px; margin-bottom: 20px; border-bottom: var(--px) solid var(--panel-hi); position: relative; }
.grade-head::after { content: ""; position: absolute; left: 0; bottom: calc(var(--px) * -1); width: 96px; height: var(--px); background: var(--g); }
.grade-head h2 { font: var(--f-h2); color: var(--ink); }
.grade-head p { font: var(--f-small); color: var(--ink-dim); }

/* Promotion tree: 1 star | 2 stars | 3 stars. Connectors sit 68px below each card's top edge. */
.tree { --gap: 48px; --y: 68px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 16px; align-items: stretch; }
.pos-base { grid-area: 1 / 1 / 3 / 2; align-self: start; }
.pos-a2 { grid-area: 1 / 2; } .pos-a3 { grid-area: 1 / 3; }
.pos-b2 { grid-area: 2 / 2; } .pos-b3 { grid-area: 2 / 3; }
.card { position: relative; padding: 32px 32px 36px; color: var(--paper-ink); scroll-margin-top: 16px; }
.pos-base::after, .pos-a2::before, .pos-a2::after, .pos-b2::before, .pos-a3::before, .pos-b3::before { content: ""; position: absolute; background: var(--rope); pointer-events: none; }
.pos-base::after { left: 100%; top: var(--y); width: calc(var(--gap) / 2); height: var(--px); }
.pos-a2::before, .pos-b2::before { right: 100%; top: var(--y); width: calc(var(--gap) / 2); height: var(--px); }
.pos-a3::before, .pos-b3::before { right: 100%; top: var(--y); width: var(--gap); height: var(--px); }
.pos-a2::after { right: calc(100% + var(--gap) / 2 - var(--px)); top: var(--y); width: var(--px); height: calc(100% + 16px + var(--px)); }

.card-top { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.well { flex: 0 0 96px; height: 76px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; background: radial-gradient(closest-side, var(--well-shade) 0 99%, transparent) 50% 100% / 64px 12px no-repeat; }
.well img { display: block; max-width: none; }
.card-id { min-width: 0; }
.card h3 { font: var(--f-name); display: inline-block; border: var(--px) solid var(--paper-line); padding: 4px 8px; }
.card h3 a { color: var(--paper-ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.stars { font: 20px/20px Px, var(--sans); color: var(--star); margin-top: 4px; letter-spacing: 2px; }
.role { font: var(--f-small); color: var(--paper-dim); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 8px; margin-top: 16px; padding-top: 12px; border-top: var(--px) solid var(--paper-line); }
.stats dt { font: var(--f-label); color: var(--paper-dim); white-space: nowrap; }
/* Labels every card repeats live here, not in the page text (page-content/README.md, tier 5). */
.s-hp dt::before { content: var(--w-health, "Health"); } .s-atk dt::before { content: var(--w-attack, "Attack"); } .s-aspd dt::before { content: var(--w-attackSpeed, "Attack speed"); }
.s-range dt::before { content: var(--w-range, "Range"); } .s-move dt::before { content: var(--w-moveSpeed, "Move speed"); } .s-slots dt::before { content: var(--w-imprintSlots, "Imprint slots"); }
.ability small::before { content: var(--w-skillPrefix, "Skill · "); }
.stats dd { font: var(--f-name); display: flex; align-items: center; gap: 6px; }
.stats dd::before { content: ""; flex: none; width: 16px; height: 16px; background: var(--paper-dim); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; image-rendering: pixelated; }
.s-hp { --m: var(--i-hp); } .s-atk { --m: var(--i-atk); }
.s-aspd { --m: var(--i-aspd); } .s-range { --m: var(--i-range); }
.s-move dd::before, .s-slots dd::before { display: none; }

.ability { margin-top: 12px; padding-top: 12px; border-top: var(--px) solid var(--paper-line); }
.ability h4 { font: var(--f-name); }
.ability small { font: var(--f-label); color: var(--paper-dim); margin-left: 4px; white-space: nowrap; }
.ability p { font: var(--f-small); margin-top: 4px; }
.awake-note { font: var(--f-small); color: var(--ink-dim); margin-top: 12px; }
.grade-note { margin-top: 24px; padding: 20px 24px; background: var(--panel); border-left: 4px solid var(--g); }
.grade-note h3 { font: var(--f-name); color: var(--ink); margin-bottom: 8px; }
.grade-note * + h3 { margin-top: 24px; }
/* A grade's promotion levels and the imprint it gives when absorbed; every grade repeats the labels, so they are CSS. */
.grade-facts { margin-top: 8px; font: var(--f-small); color: var(--ink-dim); }
.grade-facts > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 4px 0; }
.grade-facts dd { color: var(--ink); }
.grade-facts a { color: var(--ink); font-weight: 700; }
.gf-promote dt::before { content: var(--w-promotes, "Promotes"); } .gf-imprint dt::before { content: var(--w-absorbGives, "Absorb gives"); }
.gf-2::before { content: var(--w-twoStarsAtAbsorbLv, "★★ at Absorb LV "); color: var(--ink-dim); } .gf-3::before { content: var(--w-threeStarsAtAbsorbLv, "· ★★★ at Absorb LV "); color: var(--ink-dim); }
.fam-fac::before { content: var(--w-factionsPrefix, "Factions: "); }
.awake-part { margin-top: 80px; padding-top: 32px; border-top: 4px solid var(--panel-hi); }
.awake-part > .block { margin-top: 16px; }
.awake h3 { font: var(--f-name); color: var(--ink); margin-top: 32px; scroll-margin-top: 16px; }
/* One card per option. Cards do not open, so no frame; the sprites of the classes that roll it link to their cards. */
.aw-cards { margin: 12px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.aw { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--panel); box-shadow: inset 0 var(--px) 0 var(--gold); }
.aw h4 { font: var(--f-name); color: var(--ink); }
.aw p { font: var(--f-small); color: var(--ink-dim); }
.aw .aw-who { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font: var(--f-label); }
.aw-who span { margin-right: 4px; }
.aw-who a { display: flex; align-items: flex-end; justify-content: center; width: 48px; height: 48px; overflow: hidden; background: var(--well); border: var(--px) solid var(--panel-hi); }
.aw-who a:hover, .aw-who a:focus-visible { border-color: var(--gold); outline: none; }
.aw-who img { flex: none; max-width: none; image-rendering: pixelated; }  /* fixed box, feet on the floor, as in the rail */
@media (max-width: 999px) { .aw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .aw-cards { grid-template-columns: minmax(0, 1fr); } }
.from { margin-top: 12px; padding-top: 10px; border-top: var(--px) solid var(--paper-line); font: var(--f-label); color: var(--paper-dim); }
.from a { color: var(--paper-link); font-weight: 700; padding: 8px 4px; margin: -8px -4px; }  /* a finger-sized target without moving the text */
.card:target { filter: drop-shadow(0 0 0 var(--gold)) drop-shadow(4px 0 0 var(--gold)) drop-shadow(-4px 0 0 var(--gold)) drop-shadow(0 4px 0 var(--gold)) drop-shadow(0 -4px 0 var(--gold)); }

.doc-foot { margin-top: 48px; font: var(--f-small); color: var(--ink-dim); }

/* Medium: 2 stars | 3 stars side by side, the 1 star card above them. No connectors; each card says where it comes from. */
@media (max-width: 999px) {
  .doc h1 { font: var(--f-h2); }
  .tree { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .pos-base { grid-area: 1 / 1; } .pos-a2 { grid-area: 2 / 1; } .pos-a3 { grid-area: 2 / 2; } .pos-b2 { grid-area: 3 / 1; } .pos-b3 { grid-area: 3 / 2; }
  .pos-base::after, .pos-a2::before, .pos-a2::after, .pos-b2::before, .pos-a3::before, .pos-b3::before { display: none; }
  .card { padding: 28px 28px 32px; }
}
/* Narrow: one column, later stars indented under their source. */
@media (max-width: 639px) {
  .tree { grid-template-columns: minmax(0, 1fr); }
  .tree > .card { grid-area: auto; }
  .grade-note { padding: 16px; }
}

/* Shared blocks for list, article and home pages. */
.block { margin-top: 48px; scroll-margin-top: 16px; }
.block > h2 { font: var(--f-h2); color: var(--ink); padding-bottom: 12px; margin-bottom: 16px; border-bottom: var(--px) solid var(--panel-hi); }
.note { font: var(--f-small); color: var(--ink-dim); margin-bottom: 12px; }

.table-wrap { overflow-x: auto; margin-top: 24px; border: var(--px) solid var(--panel-hi); background: var(--panel); }
.block .table-wrap { margin-top: 0; }
.data { width: 100%; border-collapse: collapse; font: var(--f-small); }
.data th, .data td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: var(--px) solid var(--panel-lo); }
.data tbody tr:last-child > * { border-bottom: 0; }
.data thead th { font: var(--f-label); font-weight: 400; color: var(--ink-dim); background: var(--panel-lo); white-space: nowrap; }
.data tbody th { font: var(--f-name); font-weight: 400; color: var(--ink); white-space: nowrap; }
.data tbody th a { color: inherit; text-decoration: none; }
.data tbody th a:hover { color: var(--g); }
.status { display: inline-block; padding: 2px 8px; font: var(--f-label); line-height: 20px; font-weight: 700; white-space: nowrap; color: var(--void); background: var(--ink-dim); }
.st-yes { background: var(--advanced); } .st-planned { background: var(--gold); } .st-no { background: var(--no); }

.shot { margin: 24px 0 0; }
.shot img { display: block; width: 100%; height: auto; image-rendering: auto; border: var(--px) solid var(--panel-hi); }
.shot figcaption { margin-top: 8px; font: var(--f-small); color: var(--ink-dim); }
.shot img[role="button"] { cursor: zoom-in; }
.zoom { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 72px 16px 16px; border: 0; background: none; cursor: zoom-out; }
.zoom[open] { display: grid; }
.zoom::backdrop { background: rgb(21 18 23 / .92); }
.zoom img { margin: auto; max-width: min(100%, 1280px); max-height: 100%; width: auto; height: auto; border: var(--px) solid var(--panel-hi); }
/* Phones: a fitted screenshot is no bigger than the one in the page, so it opens at full size and the reader pans across it. */
@media (max-width: 719px) { .zoom { overflow: auto; } .zoom img { max-width: none; max-height: none; width: 1280px; } }
.zoom-x { position: fixed; top: 16px; right: 16px; cursor: pointer; font-family: Px, var(--sans); }

.prose p + p, .prose ul, .prose ul + p, .prose p + .shot { margin-top: 12px; }
.prose ul { list-style: square; padding-left: 20px; }
.prose li + li { margin-top: 6px; }
.prose ol { list-style: decimal; padding-left: 24px; margin-top: 12px; }
.prose h3 { font: var(--f-name); color: var(--ink); margin-top: 24px; }
.prose h3 + p, .prose h3 + ul, .prose h3 + ol, .prose h3 + .table-wrap { margin-top: 8px; }
.prose p + .table-wrap, .prose .table-wrap + p { margin-top: 12px; }
/* Keys and file paths: set off by a tint, no frame (only clickable things are framed). */
.prose kbd, .prose code { font: var(--f-small); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; padding: 0 4px; background: var(--panel-lo); color: var(--ink); overflow-wrap: anywhere; }
.log-entry { margin-top: 24px; }
.log-entry h3 { margin-top: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.log-entry time { font: var(--f-small); color: var(--ink-dim); }
.prose li::marker { color: var(--gold); }
/* Keys look like keys: a cap in the well colour with a darker lower edge. No frame: they do not click. */
.prose kbd { display: inline-block; min-width: 24px; padding: 0 6px 4px; line-height: 20px; text-align: center; background: var(--well); box-shadow: inset 0 calc(var(--px) * -1) 0 var(--panel-hi); }
.fold > summary { padding: 8px 12px; color: var(--ink); background: var(--panel); border: var(--px) solid var(--panel-hi); font: var(--f-body); cursor: pointer; }
.fold > summary:hover, .fold > summary:focus-visible, .fold[open] > summary { border-color: var(--gold); }
.fold > summary::marker { color: var(--gold); }
.faq { display: grid; align-items: start; gap: 8px; }
.faq summary { font-weight: 700; }
.faq summary + * { padding: 8px 16px; }
#quest-list .fold { margin-top: 8px; }
#quest-list summary h3 { display: inline; }
.toc-flat > li + li { margin-top: 4px; }
.toc.toc-flat > li > a { font: var(--f-small); color: var(--ink-dim); padding: 4px 0 4px 16px; margin-left: -20px; border-left: var(--px) solid transparent; }
.toc.toc-flat > li > a:hover { color: var(--ink); }
.toc.toc-flat > li > a.is-here { color: var(--ink); border-left-color: var(--gold); }

/* Filter buttons: /units grade filter and the chips on list pages. */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 48px; }
.filters-h, .filters-n { font: var(--f-small); color: var(--ink-dim); }
.filters-h { margin-right: 4px; } .filters-n { margin-left: 8px; }
.filters .btn { cursor: pointer; font-size: 20px; padding: 0; }
.filters .btn[aria-pressed="true"] { border: 0; border-image: none; padding: 16px; background: var(--paper); color: var(--paper-ink); filter: none;
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px); }
.filters + .grade { margin-top: 32px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.from strong { color: var(--paper-ink); }
.is-empty { display: none; }


/* List pages: the rules under the header, the tool bar, one card per entity, and the detail card a click opens. */
.rules dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-top: 16px; }
.rules dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: var(--px) solid var(--panel); }
.rules dt { font: var(--f-small); font-weight: 700; color: var(--ink); }
.rules dd { font: var(--f-small); color: var(--ink-dim); }

.list-tools { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
.tools-n { grid-column: 1 / -1; }
.tool-search input { width: 100%; height: 52px; padding: 0 12px; font: var(--f-small); color: var(--ink); background: var(--well); border: var(--px) solid var(--panel-hi); border-radius: 0; -webkit-appearance: none; appearance: none; }
.tool-search input::placeholder { color: var(--ink-off); }
.tool-search input:hover, .pick-btn:hover { border-color: var(--rope); }
.pick { position: relative; }
.pick-btn { position: relative; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 40px 0 12px; font: var(--f-small); color: var(--ink); cursor: pointer;
  background: var(--well); border: var(--px) solid var(--panel-hi); border-radius: 0; }
.pick-btn span { color: var(--ink-dim); }
.pick-btn b { font-weight: 400; }
/* A pixel arrow; it turns over while the menu is open. */
.pick-btn::after { content: ""; position: absolute; right: 16px; top: 22px; width: 12px; height: 8px; background: var(--ink-dim);
  clip-path: polygon(0 0, 100% 0, 100% 25%, 83% 25%, 83% 50%, 67% 50%, 67% 75%, 33% 75%, 33% 50%, 17% 50%, 17% 25%, 0 25%); }
.pick-btn[aria-expanded="true"]::after { transform: scaleY(-1); }
.pick.is-set .pick-btn { border-color: var(--gold); }
.pick.is-set .pick-btn b { color: var(--gold); }
.pick-menu { position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; min-width: 100%; display: grid; padding: 4px;
  background: var(--panel); border: var(--px) solid var(--rope); box-shadow: 0 8px 0 var(--drop-menu); }
.pick-menu button { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; font: var(--f-small); color: var(--ink); text-align: left; white-space: nowrap;
  background: none; border: 0; cursor: pointer; }
.pick-menu button::before { content: ""; flex: none; width: 8px; height: 8px; }
.pick-menu button[aria-checked="true"] { color: var(--gold); }
.pick-menu button[aria-checked="true"]::before { background: var(--gold); }
.pick-menu button:hover, .pick-menu button:focus-visible { background: var(--panel-hi); outline: 0; }
.pick-menu small { margin-left: auto; padding-left: 16px; font: var(--f-label); color: var(--ink-dim); }
.tools-n { font: var(--f-small); color: var(--ink-dim); min-height: 20px; }
.list-tools ~ .grade:first-of-type { margin-top: 16px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.it { position: relative; scroll-margin-top: 16px; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "ico head cost" "text text text" "more more more"; gap: 12px 12px; align-content: start; padding: 12px;
  background: var(--panel); box-shadow: inset 0 var(--px) 0 var(--g); }
.it.no-ico { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head cost" "text text" "more more"; }
/* A card that opens a detail card: the name is the link and covers the whole card, which takes the frame. */
.it.can-open { border: var(--px) solid var(--panel-hi); }
.it.can-open:hover { border-color: var(--g); }
.it-open { color: inherit; text-decoration: none; }
.it-open::after { content: ""; position: absolute; inset: 0; }
/* Other links on an openable card (bosses, pool entries) sit above the card-wide link. */
.it a:not(.it-open) { position: relative; z-index: 1; }
.it-open:focus-visible { outline: none; }
.it.can-open:focus-within { outline: var(--px) solid var(--gold); outline-offset: 2px; }
.it-ico { grid-area: ico; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; background: var(--well); }
.it-ico img { display: block; max-width: none; transition: transform .12s; }
.it.can-open:hover .it-ico img { transform: translateY(calc(var(--px) * -1)); }
.it-head { grid-area: head; align-self: center; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.it h3 { flex: 1 0 100%; font: var(--f-name); }
.it-tag { font: var(--f-label); color: var(--ink-dim); padding: 2px 6px; background: var(--panel-lo); }
/* Labels every card would repeat stay out of the page text. */
.it-locked { color: var(--gold); }
.it-locked::before { content: var(--w-locked, "Locked"); }
.it-cost { grid-area: cost; align-self: start; display: flex; align-items: center; gap: 6px; font: var(--f-name); color: var(--essence); }
.it-cost::before, .sheet-cost::before { content: ""; width: 12px; height: 20px; background: linear-gradient(90deg, var(--essence-hi) 50%, var(--essence-lo) 50%);
  clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0 70%, 0 30%); }
.it-from, .it-values, .odds, .it-rate, .it-stats { grid-area: more; font: var(--f-small); color: var(--ink-dim); }
.it-from::before { content: var(--w-itemFrom, "From "); }
.it-from a { display: inline-flex; align-items: center; gap: 8px; }
/* Small links inside cards and sheets get a taller tap area without moving the text. */
.it-pool a, .it-from a, .st-facts a, .sheet-facts a { padding: 10px 0; margin: -10px 0; }
.it-pool a, .st-facts a, .sheet-facts a { display: inline-block; }
.sheet a { color: var(--paper-ink); }
.it-from img { image-rendering: pixelated; }
.it-stats { display: flex; gap: 16px; color: var(--ink); }
.it-stats > span { display: inline-flex; align-items: center; gap: 6px; }
.it-stats > span::before { content: ""; width: 16px; height: 16px; background: var(--ink-dim); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.st-hp { --m: var(--i-hp); } .st-atk { --m: var(--i-atk); }
/* An upgrade that adds one core, item, Fate Stone or trait to its pool; the group's intro says which pool. */
.it-pool { grid-area: more; font: var(--f-small); color: var(--ink-dim); }
.it-pool::before { content: var(--w-adds, "Adds "); }
.it-pool[data-to]::after { content: var(--w-addsToThe, " to the ") attr(data-to) var(--w-addsCard, " card"); }  /* which of the three Stone cards */
/* Originite, the upgrade currency. */
.it[data-cur="originite"] .it-cost { color: var(--originite); }
.it[data-cur="originite"] .it-cost::before { width: 17px; height: 16px; background: url("https://img.slotbound.net/s_0i2d502f0h3m2a/n-upgrades.564e1dd339.png"); clip-path: none; image-rendering: pixelated; }  /* the game's Originite crystal, n-upgrades.png */
/* Share of Steam players who have it; the label is the same on every card. */
.it-rate { color: var(--ink); }
.it-rate::after { content: var(--w-ofPlayers, " of players"); color: var(--ink-dim); }
.it-values::before { content: var(--w-valuesPrefix, "Values "); color: var(--ink-dim); }
.it-values { color: var(--ink); }
/* Odds: the number is the text, the unit grade is the colour of its square (key under the toolbar). */
.odds, .legend { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.odd { display: inline-flex; align-items: center; gap: 6px; font: var(--f-small); color: var(--ink); }
.odd::before { content: ""; width: 8px; height: 8px; background: var(--g); }
.legend { margin: 0 0 16px; }
.legend-k { font: var(--f-label); color: var(--ink-dim); }
.it-text { grid-area: text; font: var(--f-small); color: var(--ink); }
/* /stages: one wide card per stage. Its facts are page text; the labels are the same on every stage. */
.cards.cards-wide { grid-template-columns: minmax(0, 1fr); }  /* beats the two-column .cards under 1000px */
.st-facts, .st-tabs, .st-waves { grid-column: 1 / -1; }
.st-facts > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: var(--px) solid var(--panel-hi); font: var(--f-small); }
.st-facts dt { color: var(--ink-dim); }
.st-facts a { color: var(--ink); }
.st-unlock dt::before { content: var(--w-unlock, "Unlock"); } .st-bosses dt::before { content: var(--w-bosses, "Bosses"); } .st-enemies dt::before { content: var(--w-enemies, "Enemies"); } .st-ore dt::before { content: var(--w-originite, "Originite"); }
.st-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.st-tab { min-width: 96px; height: 40px; padding: 0 12px; font: var(--f-small); color: var(--ink); cursor: pointer; background: var(--panel-lo); border: var(--px) solid var(--panel-hi); border-radius: 0; }
.st-tab:hover { border-color: var(--rope); }
.st-tab[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
.st-tab[data-d="0"]::before { content: var(--w-easyTenWaves, "Easy · 10 waves"); } .st-tab[data-d="1"]::before { content: var(--w-normalTwentyWaves, "Normal · 20 waves"); } .st-tab[data-d="2"]::before { content: var(--w-hardThirtyWaves, "Hard · 30 waves"); }
.st-levels > div { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 8px 12px; font: var(--f-small); background: var(--panel-lo); border-top: var(--px) solid var(--panel); }
.st-levels dt { font: var(--f-name); color: var(--ink-dim); }

.sheet { width: min(600px, calc(100% - 32px)); max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow: auto; padding: 32px 36px 36px; color: var(--paper-ink);
  border: 0 solid transparent; border-image: url("https://img.slotbound.net/s_0i2d502f0h3m2a/paper.7baa686fb9.png") 10 fill / 40px; background: linear-gradient(var(--paper), var(--paper)) center / calc(100% - 16px) calc(100% - 16px) no-repeat; }
/* Written out: before Safari 17.4, Chrome 122 and Firefox 120, ::backdrop did not inherit custom properties (color-token allows it). */
.sheet::backdrop { background: rgb(21 18 23 / .72); }
.sheet[open] { animation: sheet-in .16s ease-out; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(8px); } }
.sheet-top { display: grid; grid-template-columns: 72px minmax(0, 1fr) 40px; gap: 16px; align-items: center; }
/* The name and close button stay in view while a long sheet scrolls. */
.sheet-top { position: sticky; z-index: 1; top: -32px; margin-top: -16px; padding: 16px 0 8px; background: var(--paper); }
.sheet-top:not(:has(.it-ico)) { grid-template-columns: minmax(0, 1fr) 40px; }
.sheet-top .it-ico { grid-area: auto; }
.sheet-name { font: var(--f-name); }
.sheet-kind { margin-top: 4px; font: var(--f-small); color: var(--paper-dim); }
.sheet-kind::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--g); box-shadow: 0 0 0 2px var(--paper-ink); vertical-align: 1px; }
.sheet-x { align-self: start; width: 40px; height: 40px; padding: 0; cursor: pointer; background: none; border: var(--px) solid var(--paper-line); }
.sheet-x::before { content: "×"; font: 24px/1 PxB, var(--sans); color: var(--paper-ink); }
.sheet-x:hover { border-color: var(--paper-ink); }
.sheet-levels { margin-top: 24px; }
.sheet-levels > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: var(--px) solid var(--paper-line); }
.sheet-levels dt { font: var(--f-name); color: var(--paper-dim); }
.sheet-levels dd { font: var(--f-small); }
/* One fact per row: a long value (a skill, an unlock chain) wraps in its own row instead of squeezing a column beside it. */
.sheet-facts { margin-top: 16px; }
.sheet-facts > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: var(--px) solid var(--paper-line); }
.sheet-facts dt { font: var(--f-label); color: var(--paper-dim); padding-top: 2px; }
.sheet-bar { display: flex; height: 12px; margin-top: 24px; box-shadow: 0 0 0 2px var(--paper-ink); }
.sheet-bar > span { min-width: 2px; background: var(--g); }
.sheet-odds { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; }
.sheet-odds .odd { color: var(--paper-ink); }
.sheet-odds .odd::before { box-shadow: 0 0 0 2px var(--paper-ink); }
.sheet-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 24px; }
.sheet-stats > div { padding: 8px 12px; background: var(--paper-tint); }
.sheet-stats dt { font: var(--f-label); color: var(--paper-dim); }
.sheet-stats dd { font: var(--f-name); }
.sheet-facts dd { font: var(--f-small); }
.tag { display: inline-block; padding: 0 6px; font: var(--f-label); line-height: 18px; font-weight: 700; color: var(--void); background: var(--gold); text-decoration: none; }
.tag:hover { color: var(--void); background: var(--gold-hi); }
@media (max-width: 999px) {
  .rules dl { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .rules dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .list-tools { grid-template-columns: minmax(0, 1fr); }
  /* On phones the detail card comes up from the bottom edge. */
  .sheet { width: 100%; max-width: none; margin: auto 0 0; max-height: 88vh; max-height: 88dvh; padding: 28px 24px 32px; }
  .sheet-top { top: -28px; }
  .tool-search input, .find input { font: var(--f-body); }  /* under 16px, iOS zooms into a field on focus */
  .sheet[open] { animation-name: sheet-up; animation-duration: .2s; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } .it-ico img { transition: none; } }


/* /stages: the campaign in order. Each card carries its number, its bosses' sprites at the top right and the Originite crystal. */
.cards-wide { counter-reset: stage; }
.cards-wide > .it { counter-increment: stage; }
.cards-wide .it h3::before { content: counter(stage) ". "; color: var(--ink-dim); }
.st-art { grid-area: cost; display: flex; align-items: flex-end; gap: 8px; min-height: 48px; }
.st-art img { display: block; image-rendering: pixelated; }
.st-ore dd { display: flex; align-items: center; gap: 8px; color: var(--originite); }
.st-ore dd::before { content: ""; width: 17px; height: 16px; background: url("https://img.slotbound.net/s_0i2d502f0h3m2a/n-upgrades.564e1dd339.png"); image-rendering: pixelated; }
@media (max-width: 639px) { .st-art { grid-area: text; } }

.stage-waves details + details { margin-top: 8px; }
.stage-waves td div + div { margin-top: 4px; }
.stage-boss { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; font: var(--f-small); vertical-align: middle; }
.stage-boss img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; }

/* Home, the unit grids, the data-page header line and guide part, group markers. Split from 40-pages.css; joined after it in name order. */
/* Home. Every link is art with a short name; a block covers one kind of data and has one way on to the full list.
   The game's key art runs the full width of the column behind the heading and fades into the page. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.hero { margin: -24px -32px 0; padding: 0 32px; background: var(--hero-fade), var(--hero-bg) url("https://img.slotbound.net/s_0i2d502f0h3m2a/hero.5ae0fe6080.jpg") 50% 0 / cover no-repeat; image-rendering: pixelated; }
.hero-in { max-width: 1120px; margin: 0 auto; padding: 152px 0 8px; }
.hero h1 { font: var(--f-h1); color: var(--brand); text-shadow: 0 4px 0 var(--void); }
.hero .lead { max-width: 760px; }
.hero-find { max-width: 640px; margin-top: 24px; }
.hero-find input { height: 56px; padding: 0 16px; font: var(--f-body); border-color: var(--rope); }
.hero-find input:focus { border-color: var(--gold); }
.hero-more { display: flex; gap: 16px; margin-left: 8px; font: var(--f-small); }
.home > .block:first-child { margin-top: 32px; }
/* A heading with the way on to the full list at its right end. */
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font: var(--f-small); }
.block > .row-head { padding-bottom: 12px; margin-bottom: 16px; border-bottom: var(--px) solid var(--panel-hi); }
.row-head h2 { font: var(--f-h2); color: var(--ink); } .row-head h3 { font: var(--f-name); font-weight: 400; color: var(--gold); }
.row-all { white-space: nowrap; } .row-all::after { content: " ›"; }
.unit-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.unit-grid.seven { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ut-ico.pick { height: 72px; align-items: center; }
.ut-name.big { font: var(--f-name); font-weight: 400; }
.idx:active, .unit-tile a:active, .stage:active, .pick-card:active, .news:active { transform: translateY(var(--px)); }
.news { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; padding: 16px 24px; text-decoration: none; color: var(--ink); background: var(--panel); border: var(--px) solid var(--panel-hi); }
.news:hover { color: var(--ink); border-color: var(--gold); }
.news-date { font: var(--f-name); }
.news-go { font: var(--f-small); color: var(--gold); white-space: nowrap; } .news-go::after { content: " ›"; }
/* Three lists side by side, eight entries each. The panel is not a link, so it has no frame. */
.panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panel { padding: 16px 16px 8px; background: var(--panel); }
.panel .row-head { margin-bottom: 8px; }
.icon-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.icon-grid a { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; padding: 8px 2px; font: var(--f-label); text-align: center; text-decoration: none; color: var(--ink-dim); overflow-wrap: anywhere; }
.icon-grid a:hover { color: var(--ink); background: var(--panel-hi); }
.ig-ico { height: 64px; display: flex; align-items: center; justify-content: center; }
.stage-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; counter-reset: stage; }
.stage { counter-increment: stage; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; padding: 12px 8px; text-align: center; text-decoration: none; color: var(--ink); background: var(--panel); border: var(--px) solid var(--panel-hi); }
.stage:hover { color: var(--ink); border-color: var(--gold); }
.stage-art { height: 72px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.stage-art img { flex: none; max-width: none; }
.stage-name { font: var(--f-name); } .stage-name::before { content: counter(stage) ". "; color: var(--ink-dim); }
.stage-bosses { font: var(--f-label); color: var(--ink-dim); }
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pick-card { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; height: 100%; padding: 16px 20px; text-decoration: none; color: var(--ink); background: var(--panel); border: var(--px) solid var(--panel-hi); border-left-color: var(--gold); }
.pick-card:hover { color: var(--ink); border-color: var(--gold); }
.pick-title { font: var(--f-name); }
.pick-page { font: var(--f-label); color: var(--ink-dim); } .pick-page::after { content: attr(data-page); }
.home .facts { margin-top: 24px; }
.home .facts dd a { text-decoration: none; } .home .facts dd a:hover { color: var(--gold); }
/* The index of guides (/guides): one shelf per data page, its icon and name on top, then one row per guide section.
   The shelf does not click, so it has no frame; the name and every row do, so they light up under the pointer as sidebar rows do. */
.guide-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.guide-cols > div { padding: 4px 4px 8px; background: var(--panel); box-shadow: inset 0 var(--px) 0 var(--panel-hi); }
.guide-cols .idx-h { font: var(--f-name); font-weight: 400; margin: 0 0 4px; border-bottom: var(--px) solid var(--panel-lo); }
.guide-cols .idx-h a { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 12px 4px 4px; color: var(--gold); text-decoration: none; }
.guide-cols .idx-h a:hover { color: var(--gold-hi); background: var(--panel-hi); }
.guide-cols .idx-h .nav-ico { flex-basis: 40px; height: 40px; }
.guide-cols ul { list-style: none; padding: 0; margin: 0; }
.guide-cols li a { display: flex; align-items: flex-start; gap: 12px; padding: 8px 12px; font: var(--f-small); color: var(--ink); text-decoration: none; }
/* A pixel arrow in front of each row: the row is a way into the page. */
.guide-cols li a::before { content: ""; flex: none; width: 4px; height: 8px; background: var(--ink-dim); clip-path: polygon(0 0, 100% 50%, 0 100%); margin-top: 6px; }
.guide-cols li a:hover { color: var(--ink-hi); background: var(--panel-hi); }
.guide-cols li a:hover::before { background: var(--gold); }
@media (max-width: 639px) { .guide-cols li a { padding: 12px; } }

@media (max-width: 1279px) { .hero { margin: -16px -16px 0; padding: 0 16px; } .hero-in { padding-top: 136px; } }
@media (max-width: 999px) {
  .grid, .pick-grid, .guide-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unit-grid.six, .stage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .unit-grid.seven { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .icon-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .block > h2, .row-head h2 { font: var(--f-name); }
}
@media (max-width: 639px) {
  .grid, .pick-grid, .guide-cols { grid-template-columns: minmax(0, 1fr); }
  .unit-grid.six, .unit-grid.seven, .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .icon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .news { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font: var(--f-h2); }
}
@media (max-width: 480px) { .hero { background-image: var(--hero-fade), url("https://img.slotbound.net/s_0i2d502f0h3m2a/hero-m.20ffd82af4.jpg"); background-size: auto, 100% auto; } .hero-in { padding-top: 120px; } }
@media (max-width: 389px) {
  .stage-grid { grid-template-columns: minmax(0, 1fr); }
  .stage { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; text-align: left; }
  .stage-art { grid-row: span 2; align-items: center; }
  .stage-name { align-self: end; }
  .stage-bosses { align-self: start; }
}

/* Unit grid on /units and /factions: each tile is a link to the unit's card on its family page. */
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); align-items: stretch; gap: 8px; margin: 0; padding: 0; list-style: none; }
.unit-tile[hidden] { display: none; }
.unit-tile a { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; padding: 12px 8px; text-align: center; text-decoration: none; color: var(--ink); background: var(--panel); border: var(--px) solid var(--panel-hi); }
.unit-tile a:hover { border-color: var(--g); }
.ut-ico { height: 88px; display: flex; align-items: flex-end; justify-content: center; }
.ut-ico img { display: block; max-width: none; image-rendering: pixelated; }
.ut-name { font: var(--f-small); font-weight: 700; }
.ut-meta { font: var(--f-label); color: var(--ink-dim); }
/* Grade and family on every tile: a label, so it comes from the attribute rather than the page text. */
.ut-meta::after { content: attr(data-meta); }
.ut-stars { font: var(--f-label); color: var(--ink-dim); letter-spacing: 2px; }
.unit-tile a:hover .ut-ico img { transform: translateY(calc(var(--px) * -1)); }
.ut-meta > i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--g); }
.g-prism .ut-meta > i { background: var(--prism-bow); }
.grade.is-empty { display: none; }
.grade-head h2 a { color: inherit; text-decoration: none; } .grade-head h2 a:hover { text-decoration: underline; }
.faction h2 img { display: inline-block; vertical-align: -4px; margin-right: 12px; image-rendering: pixelated; }
.faction-when { margin-top: 8px; }
.faction .facts { margin: 16px 0; }
.faction-unlock { font: var(--f-small); color: var(--ink-dim); margin: 16px 0; }
/* Labels every faction repeats. */
.ff-who dt::before { content: var(--w-whoGetsIt, "Who gets it"); } .ff-members dt::before { content: var(--w-members, "Members"); } .ff-classes::before { content: var(--w-differentTypes, "Different types"); }
.faction-unlock::before { content: var(--w-unlockPrefix, "Unlock: "); }
.faction .unit-grid { margin-top: 16px; }

/* Header line with the game version and data date. */
.doc-meta { margin-top: 16px; font: var(--f-small); color: var(--ink-dim); }

/* Hand-written part after the data: a clear break, then text beside its screenshot on wide screens. */
.guide-part { margin-top: 80px; padding-top: 32px; border-top: 4px solid var(--panel-hi); }
.part-kicker { font: var(--f-name); color: var(--gold); }
.guide-part > .block:first-of-type { margin-top: 16px; }
.block.has-shot, .block.wide { max-width: none; }
.block.has-shot .shot { margin-top: 0; }
@media (min-width: 1280px) {
  .block.has-shot .block-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 44%); gap: 40px; align-items: start; }
  .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .faq > details:only-child { grid-column: 1 / -1; }
}
@media (max-width: 1279px) { .block.has-shot .shot { margin-top: 24px; } }
.related ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.related a { display: inline-block; padding: 8px 12px; font: var(--f-small); color: var(--ink); text-decoration: none; background: var(--panel); border: var(--px) solid var(--panel-hi); }
.related a:hover { border-color: var(--gold); }

/* Group markers on pages without grades: a sprite (enemies, upgrades) or one colour per achievement tab. */
.grade-head h2 .g-ico { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-right: 12px; vertical-align: middle; overflow: hidden; }
.g-ico img, .toc-ico img { image-rendering: pixelated; }
.g-tab-1 { --g: var(--gold); } .g-tab-2 { --g: var(--prism); } .g-tab-3 { --g: var(--originite); } .g-tab-4 { --g: var(--advanced); }
.g-tab-5 { --g: var(--rare); } .g-tab-6 { --g: var(--tone-red); } .g-tab-7 { --g: var(--legendary); } .g-tab-8 { --g: var(--tone-teal); }
.toc-ico { flex: 0 0 32px; height: 32px; margin-right: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.toc-ico img { max-width: 32px; max-height: 32px; width: auto; height: auto; }


/* /updates: a timeline of cards, newest first. Version and date on the left, the changes on the right; each change carries its type. */
.upd-group .grade-head p a { color: var(--gold); }
.upd-line { position: relative; display: grid; gap: 12px; padding-left: 24px; }
.upd-line::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: var(--px); background: var(--panel-hi); }
.upd { position: relative; display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 8px 24px; padding: 16px 24px; background: var(--panel); scroll-margin-top: 16px; }
/* The timeline marker: a pixel square on the line, gold for the latest update. */
.upd::before { content: ""; position: absolute; left: -24px; top: 24px; width: 12px; height: 12px; background: var(--panel-hi); box-shadow: 0 0 0 var(--px) var(--bg); }
.upd.is-latest { box-shadow: inset 0 var(--px) 0 var(--gold); }
.upd.is-latest::before { background: var(--gold); }
.upd:target { outline: var(--px) solid var(--gold); }
.upd-kicker { font: var(--f-label); font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.upd-meta h3 { font: var(--f-name); }
.upd-meta h3 a { color: var(--ink); }
.upd-meta h3 a:hover { color: var(--gold); }
.upd-meta time { display: block; margin-top: 4px; font: var(--f-small); color: var(--ink-dim); }
.upd-sum { font-weight: 700; color: var(--ink); }
.upd-list { margin-top: 12px; display: grid; gap: 8px; }
.upd-list li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: baseline; font: var(--f-small); }
/* Change types, coloured from the game's grade palette. The type word and the 'On this wiki' label repeat on every card,
   so they come from CSS content, not the page text (page-content/README.md, tier 5 labels). */
.chg::after { content: attr(data-l); }
.upd-pages::before { content: var(--w-onThisWiki, "On this wiki"); margin-right: 4px; }
.chg { display: inline-block; text-align: center; padding: 0 6px; font: var(--f-label); line-height: 20px; font-weight: 700; color: var(--void); background: var(--g); }
.chg-new { --g: var(--gold); } .chg-balance { --g: var(--rare); } .chg-change { --g: var(--prism); } .chg-fix { --g: var(--advanced); }
.upd-pages { margin-top: 12px; padding-top: 12px; border-top: var(--px) solid var(--panel-lo); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: var(--f-label); color: var(--ink-dim); }
/* Older history folds away; the summary is a button, so it takes the frame. */
.upd-fold > summary { display: inline-block; margin-bottom: 16px; padding: 8px 12px; font: var(--f-small); color: var(--ink); background: var(--panel); border: var(--px) solid var(--panel-hi); cursor: pointer; list-style: none; }
.upd-fold > summary::-webkit-details-marker { display: none; }
.upd-fold > summary::before { content: "▸ "; color: var(--gold); }
.upd-fold[open] > summary::before { content: "▾ "; }
.upd-fold > summary:hover { border-color: var(--gold); }
.toc ol a > b { margin-left: auto; padding-right: 8px; font: var(--f-label); font-weight: 400; color: var(--ink-dim); }
@media (max-width: 639px) {
  .upd { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; }
  .upd::before { top: 16px; }
  .upd-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .upd-list li .chg { justify-self: start; }
}

/* Article pages (/platforms, /save-files, /launch-error): answer cards first, as the data block on list pages, then the text. */
.answer-cards { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ac { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--panel); box-shadow: inset 0 var(--px) 0 var(--g, var(--panel-hi)); }
.ac.st-yes { --g: var(--advanced); } .ac.st-planned { --g: var(--gold); } .ac.st-no { --g: var(--no); } .ac.st-unknown { --g: var(--ink-dim); }
.ac-h { font: var(--f-name); color: var(--ink); }
.ac-text { font: var(--f-small); color: var(--ink-dim); }
/* A card that jumps to its section: the title link covers the card, which takes the frame. */
.ac.can-open { border: var(--px) solid var(--panel-hi); }
.ac.can-open:hover { border-color: var(--g, var(--gold)); }
.ac-open { color: inherit; text-decoration: none; }
.ac-open::after { content: ""; position: absolute; inset: 0; }
.ac-open:focus-visible { outline: none; }
.ac.can-open:focus-within { outline: var(--px) solid var(--gold); outline-offset: 2px; }
.ac-code { display: flex; align-items: center; gap: 8px; }
.ac-code code { flex: 1; min-width: 0; padding: 8px 12px; font: var(--f-small); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); background: var(--well); overflow-wrap: anywhere; }
.ac-copy { position: relative; z-index: 1; padding: 8px 12px; font: var(--f-small); color: var(--ink); background: var(--panel-lo); border: var(--px) solid var(--panel-hi); cursor: pointer; }
.ac-copy:hover { border-color: var(--gold); }
.ac-copy.done { color: var(--void); background: var(--advanced); border-color: var(--advanced); }
.answer-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* The name and its status share the top line, and a card with a status takes a faint wash of that colour,
   so a board of statuses (/platforms) reads at a glance. Browsers without color-mix keep the plain panel. */
.ac { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; }
.ac > * { grid-column: 1 / -1; }
.ac > .ac-h { grid-column: 1; }
.ac > p:has(> .status) { grid-column: 2; grid-row: 1; align-self: center; }
.ac.st-yes, .ac.st-planned, .ac.st-no, .ac.st-unknown { background: color-mix(in srgb, var(--g) 7%, var(--panel)); }
/* A path to copy (/save-files) is the page's answer: Copy is its paper button. */
.ac-code code { padding: 12px; }
.ac-copy { align-self: stretch; padding: 0 16px; font: var(--f-name); color: var(--paper-ink); background: var(--paper); border: 0;
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px); }
.ac-copy:hover { background: var(--paper-hi); }
.ac-copy.done { color: var(--void); background: var(--advanced); }

/* System requirements: Windows and Mac side by side. */
.spec-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.spec-pair h3 { margin-top: 0; }
.spec-pair .data tbody th { font: var(--f-small); font-weight: 700; white-space: normal; }

/* Controls: action names wrap on phones so all three columns fit. */
@media (max-width: 639px) { .keys tbody th { white-space: normal; } .keys th, .keys td { padding: 8px; } }

/* The opening wave and launch fixes have an order. Keep the native list and give each action its own row. */
.prose ol.steps { display: grid; gap: 4px; padding: 0 0 0 32px; background: var(--panel-lo); }
.prose .steps > li { margin: 0; padding: 12px 16px; background: var(--panel); }
.prose .steps > li::marker { font: var(--f-name); color: var(--paper); }

/* A screenshot under its text (controls) stays at a readable size instead of the full column. */
.block:not(.has-shot) > .block-body > .shot { max-width: 640px; }
.prose ol.steps + p { margin-top: 12px; }

/* Site pages (about, contact, privacy, terms): plain text, lighter section heads. */
.site-doc .lead, .site-doc .block-text { max-inline-size: 76ch; }
.site-doc .block { margin-top: 32px; }
.site-doc .block > h2 { padding-bottom: 0; margin-bottom: 8px; border-bottom: 0; }

@media (max-width: 389px) {
  #clear-times .data :is(td, th) { padding-inline: 8px; }
}
#wave-5-and-10 .block-text > * + * { margin-top: 24px; }
#wave-5-and-10 .boss-fights { padding: 16px; background: var(--panel); }

@media (max-width: 999px) { .answer-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .spec-pair { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 639px) { .answer-cards, .answer-cards.two { grid-template-columns: minmax(0, 1fr); } }

/* Slot outcomes and promotion paths share the class portraits already used in the sidebar. */
.prose-doc :is(#symbols-and-paylines, #when-units-promote) ul {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 4px; padding: 0; list-style: none;
}
.prose-doc :is(#symbols-and-paylines, #when-units-promote) li {
  position: relative; align-content: center; min-height: 56px; margin: 0; padding: 12px 12px 12px 64px; background: var(--panel);
}
.prose-doc :is(#symbols-and-paylines, #when-units-promote) .nav-ico {
  position: absolute; inset-inline-start: 8px; top: 50%; transform: translateY(-50%); width: 48px; height: 40px; background: var(--well);
}

/* Keep a condition beside its consequence, including punctuation that belongs to the sentence. */
.prose-doc :is(#absorb-mode, #reading-the-card, #what-carries-over, #crashes, #other-fixes, #rewards) ul {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px; padding: 0; list-style: none;
}
.prose-doc :is(#absorb-mode, #reading-the-card, #what-carries-over, #crashes, #other-fixes, #rewards) li,
.prose-doc :is(#consoles, #mac-and-linux) .block-text > p {
  margin: 0; padding: 16px; background: var(--panel);
}
.prose-doc :is(#consoles, #mac-and-linux) .block-text {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 8px;
}

/* The three Judgment waves form a single chronological record. */
.prose-doc #hard-run ul { padding: 0; list-style: none; }
.prose-doc #hard-run li { position: relative; margin: 0; padding: 8px 0 12px 32px; }
.prose-doc #hard-run li::before { content: ""; position: absolute; top: 16px; left: 4px; width: 12px; height: 12px; background: var(--paper); }
.prose-doc #hard-run li:not(:last-child)::after {
  content: ""; position: absolute; top: 28px; bottom: -16px; left: 8px; width: var(--px); background: var(--rope);
}

/* Each save path gets the full width of its copy field, including the longer Mac path. */
.answer-cards:has(.ac-code) .ac { box-shadow: none; }
.answer-cards .ac-code { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; }
.answer-cards .ac-code code { align-content: center; }
@media (min-width: 640px) {
  .answer-cards:has(.ac-code) { grid-template-columns: minmax(0, 1fr); }
  .ac:has(.ac-code) { grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 4px 16px; }
  .ac:has(.ac-code) > .ac-h { grid-row: 1 / 3; }
  .ac:has(.ac-code) > :is(.ac-code, .ac-text) { grid-column: 2; }
}
@media (min-width: 1000px) {
  .prose-doc:has(> #continue-a-run) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .prose-doc:has(> #continue-a-run) > * { grid-column: 1 / -1; }
  .prose-doc:has(> #continue-a-run) > :is(#windows, #mac) { grid-column: span 1; }
}

.prose-doc:has(> :is(#first-wave, #absorb-mode, #when-units-promote, #symbols-and-paylines, #hard-run, #system-requirements, #fix-0x11c7, #continue-a-run)) .block-text > p {
  max-inline-size: 76ch;
}

/* Tier lists (/tier-list): one row per tier, the tier letter in the game's grade colours, each entry its art, name and why. */
.tiers-intro { margin-top: 12px; color: var(--ink-dim); }
.tier-rows { margin-top: 16px; display: grid; gap: 12px; }
.tier-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 16px; background: var(--panel-lo); box-shadow: inset var(--px) 0 0 var(--t, var(--panel-hi)); }
.tier-row.t-s { --t: var(--gold); } .tier-row.t-a { --t: var(--advanced); } .tier-row.t-b { --t: var(--rare); } .tier-row.t-c { --t: var(--ink-dim); }
.tier-name { font: var(--f-h1); color: var(--t, var(--ink)); text-align: center; }
.tier-note { font: var(--f-small); color: var(--ink-dim); }
.tier-entries { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tier-note:empty + .tier-entries, .tier-body > .tier-entries:first-child { margin-top: 0; }
.tier-entry { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--panel); }
.tier-entry > a { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.tier-entry > a:hover .te-name { color: var(--gold); text-decoration: underline; }
.te-ico, .lineup-portrait { flex: none; display: grid; place-items: center; width: 48px; height: 48px; background: var(--well); }
.te-ico img { max-width: 48px; max-height: 48px; width: auto; height: auto; }
.te-name { font: var(--f-name); }
.tier-entry.g-advanced .te-name { color: var(--advanced); } .tier-entry.g-rare .te-name { color: var(--rare); }
.tier-entry.g-legendary .te-name { color: var(--legendary); } .tier-entry.g-prism .te-name { color: var(--prism); }
.te-why { font: var(--f-small); color: var(--ink-dim); }
@media (max-width: 639px) { .tier-row { grid-template-columns: 1fr; gap: 8px; } .tier-name { text-align: left; } }

/* Lineup cards: starting positions beside the final-wave record; the field screenshot opens in the shared viewer. */
.doc:has(.lineup-card) > .answer-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.doc:has(.lineup-card) .ac { padding: 8px 12px; }
.lineup-group .lineup-card { margin-top: 24px; }
.lineup-card > h3 { margin-bottom: 12px; font: var(--f-name); }
.lineup-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px 24px;
  grid-template-areas: "formation run" "gear run" "notes run"; align-items: start; }
.lineup-formation, .lineup-gear { display: grid; gap: 12px; padding: 16px; background: var(--panel-lo); }
.lineup-layout dt { font: var(--f-label); font-weight: 700; color: var(--ink-dim); }
.lineup-formation { grid-area: formation; }
.lineup-formation > div { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 8px; }
.lineup-formation dt { padding-top: 16px; }
.lineup-units { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22ch), 1fr)); gap: 8px; }
.lineup-units > li { background: var(--panel); }
.lineup-lv { display: block; font: var(--f-label); color: var(--ink-dim); }
.lineup-lv::before { content: var(--w-unitLevel, "LV") " "; }
.lineup-imprints { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 4px 8px; font: var(--f-small); }
.lineup-unit { display: flex; gap: 8px; align-items: center; padding-right: 8px; background: var(--panel); color: var(--g); font: var(--f-name); text-decoration: none; }
.lineup-unit:hover, .lineup-gear a:hover { color: var(--gold-hi); text-decoration: underline; }
.lineup-run { grid-area: run; display: grid; gap: 16px; }
.lineup-result { display: grid; grid-template-columns: minmax(max-content, 1.1fr) minmax(max-content, .6fr) minmax(0, 1.3fr); align-items: baseline; gap: 12px 16px;
  padding: 16px; background: var(--paper); color: var(--paper-ink); }
.lineup-result dt { color: var(--paper-dim); }
.lineup-result dd, .lineup-stat strong { font: var(--f-name); }
.lineup-result > div:nth-child(-n+3) dd { margin-top: 4px; }
.lineup-stat { grid-column: 1 / -1; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.lineup-stat dd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font: var(--f-small); }
.lineup-gear { grid-area: gear; }
.lineup-gear ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 8px; margin-top: 4px; }
.lineup-gear a { display: flex; align-items: center; gap: 8px; color: var(--ink); font: var(--f-small); text-decoration: none; }
.lineup-gear img { flex: none; width: 32px; height: 32px; object-fit: scale-down; }
.lineup-notes { grid-area: notes; }
.lineup-run .shot { margin: 0; }
.lineup-front::before { content: var(--w-front, "Front"); }
.lineup-tower::before { content: var(--w-tower, "Tower"); }
.lineup-back::before { content: var(--w-back, "Back"); }
.lineup-cores::before { content: var(--w-cores, "Cores"); }
.lineup-items::before { content: var(--w-items, "Items"); }
.lineup-time::before { content: var(--w-clearTime, "Clear time"); }
.lineup-lives::before { content: var(--w-lives, "Lives"); }
.lineup-best::before { content: var(--w-bestUnit, "Best Unit"); }
.lineup-damage::before { content: var(--w-damage, "Damage"); }
.lineup-taken::before { content: var(--w-taken, "Taken"); }
.lineup-healing::before { content: var(--w-healing, "Healing"); }
@media (max-width: 999px) {
  .lineup-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "formation" "result" "gear" "notes" "shot"; }
  .lineup-run { display: contents; }
  .lineup-result { grid-area: result; }
  .lineup-run .shot { grid-area: shot; }
}
@media (max-width: 639px) {
  .doc:has(.lineup-card) > .answer-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lineup-formation, .lineup-gear, .lineup-result { padding: 12px; }
  .lineup-formation > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .lineup-formation dt { padding-top: 0; }
  .lineup-units { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16ch), 1fr)); }
  .lineup-unit { font: var(--f-small); font-weight: 700; }
  .lineup-gear ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lineup-result { grid-template-columns: max-content max-content minmax(0, 1fr); column-gap: 8px; }
  .lineup-lives, .lineup-lives + dd { text-align: center; }
  .lineup-stat, .lineup-stat dd { grid-template-columns: subgrid; }
  .lineup-stat dd { display: grid; grid-column: span 2; }
  .lineup-stat strong { order: -1; text-align: right; }
}

/* /guides: the guide pages as cards, the beginner guide on a row of its own. */
.prose .guide-picks { margin-top: 12px; padding: 0; list-style: none; }
.guide-picks .start { grid-column: 1 / -1; }
.guide-picks .pick-card { justify-content: flex-start; }
.guide-start { font: var(--f-label); color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; }
.guide-desc { font: var(--f-small); color: var(--ink-dim); }

/* Comments (engine behaviour via data-gf-*): below the page, same width as the article column. */
.comments { max-width: 1120px; margin: 48px auto 0; }
/* From 1552px a rail page is a centred 1416px grid (20-shell.css): line up with its 1120px article column, not the middle. */
@media (min-width: 1552px) { #main:has(> .has-rail) > .comments { max-width: min(1120px, 100% - 296px); margin-left: max(0px, (100% - 1416px) / 2); margin-right: 0; } }
.comments h2 { font: var(--f-h2); padding-bottom: 12px; margin-bottom: 16px; border-bottom: var(--px) solid var(--panel-hi); }
.comments h2 span { display: inline-block; margin-left: 8px; padding: 0 8px; font: var(--f-small); line-height: 24px; vertical-align: 4px; color: var(--ink-dim); background: var(--panel); }
.comments .note { margin-top: 8px; }
.c-list { margin-top: 0; }
/* Outside the list: the engine's script empties the list, so a child would be lost. */
.c-empty { display: none; font: var(--f-small); color: var(--ink-dim); }
.c-list[data-gf-empty] + .c-empty { display: block; }
.c-list[data-gf-off] ~ .c-form { display: none; }
.c-item { padding: 12px 0; border-bottom: var(--px) solid var(--panel-lo); }
.c-meta { font: var(--f-small); color: var(--ink-dim); }
.c-meta b { color: var(--ink); }
.c-owner { display: none; padding: 0 4px; color: var(--void); background: var(--gold); }
[data-gf-owner] > .c-meta .c-owner { display: inline; }
.c-text { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-reply { margin-top: 4px; padding: 4px 0; font: var(--f-small); color: var(--gold); background: none; border: 0; cursor: pointer; }
.c-replies { margin-left: 24px; }
.c-form { display: grid; gap: 8px; margin-top: 16px; }
.c-replying { display: none; font: var(--f-small); color: var(--ink-dim); }
.c-form[data-gf-replying] .c-replying { display: block; }
.c-form input, .c-form textarea { width: 100%; padding: 8px 12px; font: var(--f-body); color: var(--ink); background: var(--well); border: var(--px) solid var(--panel-hi); border-radius: 0; -webkit-appearance: none; appearance: none; }
.c-form textarea { resize: vertical; }
.c-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.c-msg { font: var(--f-small); color: var(--ink-dim); }
