/* Generated by tools/frontend/make_words.py from tools/frontend/langs/*.json; edit those, not this file. */
@font-face { font-family: PxJa; src: url("/_a/galmuri9-ja.fb99ffe69a.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: PxJa11; src: url("/_a/galmuri11-ja.a8abbe44d9.woff2") format("woff2"); font-display: swap; }
html:lang(ja) { --w-gamePrefix: "ゲーム "; --w-dataPrefix: " · データ "; --w-moreGuides: "その他の攻略"; --w-health: "HP"; --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: "回復量"; --w-dpsOther: "もう一方の転職先"; --w-evReport: "プレイヤー報告"; --w-evDps: "DPS"; --w-evTank: "タンク"; --w-evHealer: "ヒーラー"; --w-cycleHard: "ハード"; --f-name: 20px/24px PxJa, var(--sans); --f-h2: 24px/36px PxJa11, var(--sans); --f-h1: 36px/48px PxJa11, var(--sans); }
@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-moreGuides: "더 많은 공략"; --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: "치유량"; --w-dpsOther: "다른 선택"; --w-evReport: "플레이어 보고"; --w-evDps: "DPS"; --w-evTank: "탱커"; --w-evHealer: "힐러"; --w-cycleHard: "어려움"; --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-moreGuides: "更多攻略"; --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: "治療量"; --w-dpsOther: "另一條路線"; --w-evReport: "玩家回報"; --w-evDps: "傷害"; --w-evTank: "坦克"; --w-evHealer: "治療"; --w-cycleHard: "困難"; --f-name: 24px/28px PxZhTw, var(--sans); --f-h2: 24px/36px PxZhTw, var(--sans); --f-h1: 36px/48px PxZhTw, var(--sans); }
@font-face { font-family: PxZh; src: url("/_a/cubic11-zh.2b612c166c.woff2") format("woff2"); font-display: swap; }
html:lang(zh-CN) { --w-gamePrefix: "游戏 "; --w-dataPrefix: " · 数据 "; --w-moreGuides: "更多攻略"; --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: "治疗量"; --w-dpsOther: "另一条路线"; --w-evReport: "玩家报告"; --w-evDps: "伤害"; --w-evTank: "坦克"; --w-evHealer: "治疗"; --w-cycleHard: "困难"; --f-name: 24px/28px PxZh, var(--sans); --f-h2: 24px/36px PxZh, var(--sans); --f-h1: 36px/48px PxZh, 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;
  --paper-edge: #3b3226; /* the edge a paper button stands on */
  --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: #a097a6; /* 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);
  --gold-wash: #4a4243;  /* 12% gold over panel: a highlighted table row; written out because the engine's contrast check reads no color-mix() */
  --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)); }
/* Presses snap down and spring back fast. */
.btn { transition: transform 100ms cubic-bezier(.23, 1, .32, 1), filter 100ms cubic-bezier(.23, 1, .32, 1); }
/* Paper: the well button's frame redrawn in parchment (faded sepia outline, a lit top row, a shaded bottom row) standing on a 4px sepia edge; a press sinks it onto that edge. */
.btn-paper { color: var(--paper-ink); border-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'><path fill='%236b5b40' d='M2 0h8v1h-8zM1 1h1v1h-1zM10 1h1v1h-1zM0 2h1v1h-1zM11 2h1v1h-1zM0 3h1v1h-1zM11 3h1v1h-1zM0 4h1v1h-1zM11 4h1v1h-1zM0 5h1v1h-1zM11 5h1v1h-1zM0 6h1v1h-1zM11 6h1v1h-1zM0 7h1v1h-1zM11 7h1v1h-1zM0 8h1v1h-1zM11 8h1v1h-1zM0 9h1v1h-1zM11 9h1v1h-1zM1 10h1v1h-1zM10 10h1v1h-1zM2 11h8v1h-8z'/><path fill='%23efe9c6' d='M2 1h8v1h-8z'/><path fill='%23d7d1af' d='M1 2h10v1h-10zM1 3h10v1h-10zM1 4h10v1h-10zM1 5h10v1h-10zM1 6h10v1h-10zM1 7h10v1h-10zM1 8h10v1h-10zM1 9h10v1h-10z'/><path fill='%23b9ae88' d='M2 10h8v1h-8z'/></svg>") 4 fill / 16px; background: linear-gradient(var(--paper), var(--paper)) center / calc(100% - 16px) calc(100% - 16px) no-repeat border-box; filter: drop-shadow(0 var(--px) 0 var(--paper-edge)); }
.btn-paper:hover { color: var(--paper-ink); filter: brightness(1.06) drop-shadow(0 var(--px) 0 var(--paper-edge)); }
.btn-paper:active { filter: drop-shadow(0 0 0 var(--paper-edge)); }
/* A store or community button leads with that service's own mark. */
.btn .ico { vertical-align: top; margin-right: 8px; }

/* Headings break into even lines; paragraphs avoid a lone last word. */
h1, h2, h3 { text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }

/* 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 img { flex: none; image-rendering: pixelated; }
.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); }
/* The bar's paper buttons are 44px tall: a thinner border lets the 16px frame overlap the padding. */
.bar .btn-paper { border-width: 12px; padding-inline: 4px; }
.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 in the Menu drawer: when the bar is too narrow for the Steam and Discord buttons, Discord moves there. */
.side-discord { flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 10px; color: var(--ink-dim); text-decoration: none; }
.side-discord:hover { color: var(--gold); }
/* Steam and Discord in the bar: two paper buttons of one width, each the service's mark and its name; the full name ("Get it on Steam") is the label and tooltip. */
.bar-mark { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; width: 140px; height: 44px; }
.bar .bar-mark { border-width: 10px; padding: 0; }
.bar-mark .ico { margin: 0; }
.side-discord { display: none; }
.bar-mark .ico, .side-discord .ico { width: 24px; height: 24px; }
/* Bookmark: a paper button beside Discord on wide bars; under 1280px, where the sidebar is the Menu drawer, it sits at the drawer's top beside Discord. A tap swaps its word for the keys or steps that bookmark the site. */
.bar-save { cursor: pointer; }
.bar-save[hidden], .side-save[hidden] { display: none; }
.side-save { display: none; align-items: center; gap: 8px; min-height: 44px; max-width: calc(100% - 120px); padding: 10px; border: 0; background: none; color: var(--gold); font: inherit; text-align: left; cursor: pointer; }
.side-save .ico { flex: none; width: 24px; height: 24px; }
/* 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[hidden] { display: none; }
.lang-offer { position: absolute; z-index: 19; top: calc(var(--bar) + 12px); display: flex; align-items: center; background: var(--paper); color: var(--paper-ink); box-shadow: 0 8px 0 var(--drop-menu); animation: offer-in .2s ease-out both; }
.lang-offer::before { content: ""; position: absolute; top: -8px; left: var(--notch, 24px); border: 8px solid transparent; border-top: 0; border-bottom-color: var(--paper); }
.lang-offer a { display: flex; align-items: center; gap: 8px; padding: 12px 4px 12px 16px; font: var(--f-name); color: var(--paper-ink); text-decoration: none; }
.lang-offer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.lang-offer button { align-self: stretch; padding: 0 16px 0 12px; font: var(--f-name); color: var(--paper-dim); background: none; border: 0; cursor: pointer; }
.lang-offer button:hover { color: var(--paper-ink); }
@keyframes offer-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .lang-offer { animation: none; } }
@media (max-width: 639px) { .lang-offer { left: 12px; right: 12px; } .lang-offer a { flex: 1; } }

/* 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: 12px 16px 12px 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: 8px; padding-top: 8px; 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, .side-row > a, .side-row > span { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 8px; font: var(--f-small); text-decoration: none; color: var(--ink); }
.side li > span, .side-row > span { color: var(--ink-off); }
.side li > span .nav-ico, .side-row > span .nav-ico { opacity: .45; }
/* Category pages stay visible; sublists (unit classes, stages, extra guides) fold into an exclusive accordion. */
.side li.side-group, .side li.side-more-item { display: block; position: relative; }
/* Counts sit in one right-hand column of equal badges; a fold arrow sits just left of that column. */
.side-row { display: flex; align-items: center; gap: 8px; }
.side-fold { display: block; }
.side-tog, .side-more-sum { display: flex; align-items: center; cursor: pointer; list-style: none; }
.side-tog::-webkit-details-marker, .side-more-sum::-webkit-details-marker { display: none; }
.side-tog { position: absolute; top: 0; right: 48px; width: 28px; height: 32px; justify-content: center; color: var(--ink-dim); }
.side-tog:hover { background: var(--panel-hi); color: var(--gold); }
.side-tog:focus-visible, .side-more-sum:focus-visible { outline-offset: calc(var(--px) * -1); }
.side-more-sum { gap: 8px; min-height: 32px; padding: 0 0 0 8px; font: var(--f-small); color: var(--ink-dim); }
.side-more-sum:hover { background: var(--panel-hi); color: var(--ink); }
.side-more-sum:hover .nav-ico i, .side-fold[open] > .side-more-sum .nav-ico i { background: var(--gold); }
.side-more-label { flex: 1; min-width: 0; }
.side-more-label::before { content: var(--w-moreGuides, "More guides"); }
/* Stepped pixel triangle, rows 10-6-2 so the tip reads as a point: points right when closed, down when open. */
.side-tog::before, .side-more-sum::after { content: ""; flex: none; width: 10px; height: 6px; background: currentColor;
  clip-path: polygon(0 0, 10px 0, 10px 2px, 8px 2px, 8px 4px, 6px 4px, 6px 6px, 4px 6px, 4px 4px, 2px 4px, 2px 2px, 0 2px); transform: rotate(-90deg); }
.side-more-sum::after { margin-left: auto; background: var(--ink-dim); }
.side-more-sum:hover::after, .side-fold[open] > .side-more-sum::after { background: var(--gold); }
.side-fold[open] > .side-tog { color: var(--gold); }
.side-fold[open] > .side-more-sum { color: var(--ink); }
.side-fold[open] > .side-tog::before, .side-fold[open] > .side-more-sum::after { transform: none; }
.side-sub { margin: 4px 0 4px 12px; padding-left: 8px; border-left: var(--px) solid var(--panel-lo); }
.side-sub li { margin: 0; }
.side-sub li > a, .side-sub li > span { gap: 8px; padding: 0 8px 0 4px; white-space: nowrap; }
.nav-ico { flex: 0 0 36px; height: 32px; display: flex; align-items: center; justify-content: center; }
.nav-ico i { width: 8px; height: 8px; background: var(--panel-hi); }
.side li > b, .side-row > b, .side-more-sum > b { flex: none; width: 40px; margin-right: 8px; padding: 2px 0; font: var(--f-label); font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; color: var(--ink-dim); background: var(--panel-lo); }
.side-row > b { margin-left: 20px; }
.side-more-sum > b { order: 1; margin-left: 1px; }
.side li > span + b, .side-row > span + b { color: var(--ink-faint); }
.side li:has(> a:hover), .side-row:has(> a:hover) { background: var(--panel-hi); }
.side li:has(> a[aria-current]), .side-row: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], .side-row > a[aria-current] { font-weight: 700; color: var(--paper-ink); background: none; }
.side li > a[aria-current] + b, .side-row > a[aria-current] + b { color: var(--paper-ink); background: var(--paper-line); }
.side-group:has(> .side-row > a[aria-current]) .side-tog { color: var(--paper-ink); }
.side-group:has(> .side-row > a[aria-current]) .side-tog:hover { background: none; color: var(--paper-link); }
.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); }

/* Footer edges match the page column on every width: 1120px by default, 1416px when the page shows a rail at 1552px+. */
.foot { margin-top: 64px; padding: 32px; border-top: var(--px) solid var(--void); background: var(--chrome); }
.foot-in { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 32px; font: var(--f-small); color: var(--ink-dim); }
@media (min-width: 1552px) { .col:has(> #main > .page.has-rail) > .foot > .foot-in { max-width: 1416px; } }
.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; border-left: 6px solid transparent; background: var(--gold) padding-box; 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; padding: 16px 16px 32px 24px; 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 { padding: 24px 16px; }
  .foot-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); 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: 1439px) { .bar-ver { display: none; } }
@media (max-width: 1279px) { .bar-save { display: none; } .js .side-save:not([hidden]) { display: flex; position: absolute; top: 16px; left: 16px; } }
@media (max-width: 1023px) { .js .side-save:not([hidden]) { left: 60px; } }
@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); }
/* Share belongs to the page, so it sits at the right end of the title's first line: centred on that line, its right edge on the article's. A long title wraps before it. */
.h1-row { display: flex; align-items: flex-start; gap: 16px; }
.h1-row h1 { flex: 1; min-width: 0; }
.share { flex: none; display: flex; align-items: center; gap: 6px; margin-top: 4px; border-width: 10px; padding: 0 4px; cursor: pointer; }
.share svg { flex: none; }
.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); color: var(--paper-ink); }
.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. */
.s-hp :is(dt, th)::before { content: var(--w-health, "Health"); } .s-atk :is(dt, th)::before { content: var(--w-attack, "Attack"); } .s-aspd :is(dt, th)::before { content: var(--w-attackSpeed, "Attack speed"); }
.s-range :is(dt, th)::before { content: var(--w-range, "Range"); } .s-move :is(dt, th)::before { content: var(--w-moveSpeed, "Move speed"); } .s-slots :is(dt, th)::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-head .grade-more { margin-top: 8px; }
.grade-more a { color: var(--gold); font-weight: 700; }
.grade-more a::after { content: " ›"; }
.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); }
  .share { margin-top: -2px; }
  .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; }
}

/* Quick-view cards (25-quick-card.js): a unit's class-page card, or a core's /cores card, inside a detail sheet. */
/* Beats the plain sheet's two columns for a sheet without a list icon (45-list.css). */
.sheet.unit-sheet .sheet-top { grid-template-columns: 96px minmax(0, 1fr) 40px; }
.unit-sheet .sheet-kind { margin-top: 4px; }
.unit-sheet .stats { margin-top: 12px; }
.unit-choice { margin-top: 12px; padding-top: 10px; border-top: var(--px) solid var(--paper-line); font: var(--f-small); }
.unit-choice a, .unit-sheet .from a { color: var(--paper-link); font-weight: 700; }
.quick-more { margin-top: 24px; }
.quick-text { margin-top: 16px; font: var(--f-small); }
.sheet .quick-more .btn { color: var(--ink); }  /* .sheet a would draw the dark button's label in paper ink */
/* Compare on request (25-quick-card.js compare version): from the second unit card on, an offer with the unit seen before;
   taken, the two units as one table, a row per number so the values line up. */
.cmp-offer { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 8px 12px; cursor: pointer; text-align: left;
  font: var(--f-body); color: var(--paper-ink); background: var(--paper-hi); border: 2px dashed var(--paper-link); }
.cmp-offer:hover { border-style: solid; }
.cmp-offer img { flex: none; width: auto; height: 40px; image-rendering: pixelated; }
.cmp-offer b { color: var(--paper-link); }
.sheet.cmp-sheet { width: min(760px, calc(100% - 32px)); }
.cmp-sheet .sheet-top { grid-template-columns: minmax(0, 1fr) 40px; }
.cmp-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cmp-table :is(th, td) { padding: 8px 8px; text-align: left; vertical-align: middle; border-top: var(--px) solid var(--paper-line); font: var(--f-small); }
.cmp-table thead :is(th, td) { border-top: 0; vertical-align: bottom; }
.cmp-table thead th { font: var(--f-name); }
.cmp-table thead .cmp-sprite { display: flex; align-items: flex-end; justify-content: flex-start; height: 64px; margin-bottom: 4px; }
.cmp-table thead img { display: block; width: auto; max-height: 64px; image-rendering: pixelated; }
.cmp-table thead .cmp-name, .cmp-table thead .stars { display: block; }
.cmp-table tbody th { width: 30%; color: var(--paper-dim); font: var(--f-label); white-space: nowrap; }
.cmp-table tbody td { font: var(--f-name); }
.cmp-table tbody .cmp-skill td, .cmp-table tbody .cmp-from td { font: var(--f-small); }
.cmp-table .cmp-skill td { vertical-align: top; }
.cmp-table .cmp-skill b { display: block; font: var(--f-name); }
.cmp-table .cmp-skill small { font: var(--f-label); color: var(--paper-dim); }
.cmp-table .cmp-skill small::before { content: var(--w-skillPrefix, "Skill · "); }
/* The higher value in ink on a light wash: the game draws red for "no" and green is the Advanced grade, so neither marks "more". */
.cmp-table td.hi { background: var(--paper-hi); }
.cmp-table td.hi::after { content: " ▲"; font: var(--f-label); color: var(--paper-dim); }
.cmp-table .cmp-from a { color: var(--paper-link); font-weight: 700; }
@media (max-width: 599.98px) {
  .cmp-table thead td, .cmp-table tbody th { width: 64px; padding-left: 0; white-space: normal; }
  .cmp-table .cmp-skill b { font: var(--f-small); font-weight: 700; }
}

/* 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); }

/* A screenshot sits under the text it shows, never beside it: a side column squeezes text and tables. */
.shot { margin: 24px 0 0; max-width: 880px; }
.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); }
/* /units: two rows (grade, faction) whose labels share one column, so the buttons line up in every language. */
.filters-wrap { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 12px 8px; margin-top: 48px; }
.filters-wrap .filters { display: contents; }
.filters-b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters-wrap .fac-line { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 599px) { .filters-wrap { grid-template-columns: minmax(0, 1fr); gap: 8px; } .filters-wrap .filters-b + .filters-h, .filters-fac .filters-h { margin-top: 8px; } }
.filters-wrap + .grade { margin-top: 32px; }
/* Faction row on /units: icon buttons; the chosen one's tiers and links show in the line under it. */
/* The well frame is 16px a side on text buttons; 12px here leaves room for the 28px icon in a button as tall as theirs. */
.filters .fac-btn { display: grid; place-items: center; width: 60px; height: 52px; border-width: 12px; border-image-width: 12px; }
.filters .fac-btn[aria-pressed="true"] { padding: 0; }
.fac-btn img, .fac-line img { image-rendering: pixelated; }
.fac-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 12px; padding: 12px 16px; background: var(--panel); font: var(--f-small); color: var(--ink-dim); }
.fac-line b { color: var(--ink); }
.fac-line a { color: var(--gold); font-weight: 700; }
.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); }
.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; }
/* The at-a-glance table above the factions: each name links down to its faction. */
.faction-glance .data th a { display: inline-flex; align-items: center; gap: 8px; font: var(--f-name); color: var(--ink); text-decoration: none; white-space: nowrap; }
.faction-glance .data th a:hover { color: var(--gold); }
.faction-glance .data th img { image-rendering: pixelated; }
/* The way back up from a faction to the table, beside the calculator link; the faction just jumped to gets a gold heading. */
.faction-calc-link { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.glance-back { color: var(--ink-dim); }
.glance-back::before { content: "↑ "; }
.faction:target > h2 { color: var(--gold); }
@media (max-width: 999px) {
  /* Five columns do not fit beside the sidebar: each faction becomes a block, its name and then its facts under their labels. */
  .faction-glance .data.stack thead { display: none; }
  .faction-glance .data.stack, .faction-glance .data.stack tbody { display: block; }
  .faction-glance .data.stack tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .faction-glance .data.stack th { grid-column: 1 / -1; }
  .faction-glance .data.stack td { display: block; min-width: 0; }
  .faction-glance .data.stack td::before { content: attr(data-label); display: block; font: var(--f-label); color: var(--ink-dim); }
}
@media (max-width: 639px) {
  /* Three members a row on phones: two a row made each faction several screens tall. */
  .faction .unit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .faction .unit-tile a { padding: 8px 4px; }
  /* Each faction of the glance table is one block: its name, then the four facts two by two. */
  .faction-glance .data.stack tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faction-glance .data.stack th { grid-column: 1 / -1; }
  /* Phones: two factions a row, each a small card with its four facts one under another. */
  .faction-glance .data.stack tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .faction-glance .data.stack tr { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .faction-glance .data.stack th, .faction-glance .data.stack td { padding: 4px 8px; }
  .faction-glance .data.stack th a { font: var(--f-small); font-weight: 700; white-space: normal; }
}

/* 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 the guide sections. */
.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.wide { max-width: none; }
@media (min-width: 1280px) {
  .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .faq > details:only-child { grid-column: 1 / -1; }
}
.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; }



/* Faction calculator on /factions (26-faction-calc.js) and the ways to it: the card under the header, the first
   line of the contents rail, a link under each faction. */
.calc-cta { display: flex; align-items: center; gap: 16px; margin-top: 24px; padding: 16px 20px; background: var(--panel); border: var(--px) solid var(--gold); color: var(--ink-dim); text-decoration: none; font: var(--f-small); }
.calc-cta img { flex: none; image-rendering: pixelated; }
.calc-cta b { display: block; font: var(--f-name); color: var(--gold); }
.calc-cta:hover { background: var(--panel-hi); }
.toc.toc-flat > li.toc-calc > a { color: var(--gold); }
.toc.toc-flat > li.toc-calc > a.is-here { color: var(--gold); background: var(--gold-wash); }
.toc-calc img { image-rendering: pixelated; }
.faction-calc-link { margin-top: 12px; font: var(--f-small); }
.faction-calc-link a { color: var(--gold); font-weight: 700; }

.faction-calc { margin-top: 48px; padding: 24px; background: var(--panel); scroll-margin-top: 16px; }
.fc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fc-title { font: var(--f-name); color: var(--gold); }
.fc-clear { cursor: pointer; }
.fc-note, .fc-empty, .fc-next, .fc-lim-note, .fc-unlock, .fc-more-h { font: var(--f-small); color: var(--ink-dim); }
.fc-note { margin-top: 8px; }

/* The team row: limit buttons, then one well per place; places past the limit get a red edge, as the game's machine turns red. */
.fc-team { margin-top: 16px; padding: 12px; background: var(--panel-lo); }
.fc-lim { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.fc-lim-h { font: var(--f-label); color: var(--ink-dim); }
.fc-lim-b { width: 32px; height: 32px; cursor: pointer; font: var(--f-label); color: var(--ink); background: var(--well); border: var(--px) solid var(--panel-hi); }
.fc-lim-b[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.fc-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 12px; }
.fc-count { min-width: 48px; font: var(--f-name); color: var(--gold); }
.fc-count.is-over { color: var(--no); }
.fc-slot { display: grid; place-items: center; width: 56px; height: 56px; padding: 0; background: var(--well); border: var(--px) dashed var(--panel-hi); }
.fc-slot-u { border-style: solid; cursor: pointer; }
.fc-slot-u:hover { border-color: var(--g); }
.fc-slot.is-over { border-color: var(--no); }
.fc-over { margin-top: 8px; font: var(--f-small); color: var(--no); }
.fc-over[hidden] { display: none; }

.fc-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 16px; }
.fc-empty { grid-column: 1 / -1; padding: 12px 0; }
.fc-f { padding: 12px; background: var(--panel-lo); }
.fc-fh { display: flex; align-items: center; gap: 8px; }
.fc-fh img, .fc-chip img, .fc-u img, .fc-slot img { image-rendering: pixelated; }
.fc-n { margin-left: auto; font: var(--f-label); color: var(--gold); }
.fc-unlock { margin-top: 4px; }
.fc-tiers { margin: 8px 0 0; padding: 0; list-style: none; font: var(--f-small); color: var(--ink-dim); }
.fc-tiers li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; padding: 4px 0; }
.fc-tiers li.is-on { color: var(--ink); }
.fc-tiers li.is-on .fc-k { color: var(--gold); }
.fc-k { font-weight: 700; }
.fc-next { margin-top: 4px; }
.fc-more-h { margin-top: 12px; cursor: pointer; }
.fc-more { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

.fc-sum { position: sticky; top: var(--bar); z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px -24px 0; padding: 8px 24px; background: var(--panel); border-bottom: var(--px) solid var(--panel-hi); }
.fc-sum .fc-count { min-width: 0; font: var(--f-label); }
.fc-chip { display: inline-flex; align-items: center; gap: 4px; font: var(--f-label); color: var(--ink-dim); }
.fc-chip.is-on { color: var(--gold); }
.fc-cls { margin-top: 16px; font: var(--f-label); color: var(--ink-dim); }
.fc-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.fc-u { display: grid; place-items: center; width: 56px; height: 56px; padding: 0; cursor: pointer; background: var(--well); border: var(--px) solid var(--panel-hi); }
.fc-u:hover { border-color: var(--g); }
.fc-u[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-wash); }
.lineup-calc { margin-top: 12px; font: var(--f-small); }
.lineup-calc a { color: var(--gold); font-weight: 700; }
.toc > li.toc-calc { margin-top: 8px; padding-top: 8px; border-top: var(--px) solid var(--panel-hi); }

/* /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; background: var(--panel); scroll-margin-top: 16px; }
/* Each update is a drawer: the summary row (version, date, one line) stays visible, the changes open on a click. */
.upd-head { display: grid; grid-template-columns: 176px minmax(0, 1fr) 16px; gap: 8px 24px; padding: 16px 24px; cursor: pointer; list-style: none; }
.upd-head::-webkit-details-marker { display: none; }
.upd-head::after { content: "▸"; color: var(--gold); justify-self: end; font-size: 20px; line-height: 1; }
.upd-d[open] > .upd-head::after { content: "▾"; }
.upd-head:hover .upd-sum { color: var(--gold); }
.upd-body { padding: 0 24px 16px calc(176px + 48px); }
/* 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 { display: block; 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 { 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. */
.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-head { grid-template-columns: minmax(0, 1fr) 16px; padding: 12px 16px; }
  .upd-meta { grid-column: 1; }
  .upd-sum { grid-column: 1; }
  .upd-head::after { grid-column: 2; grid-row: 1; }
  .upd-body { padding: 0 16px 12px; }
  .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); }

.prose ol.steps + p { margin-top: 12px; }

/* Site pages (about, contact, privacy, terms): plain text, lighter section heads. */
.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); } }

/* Keep a condition beside its consequence, including punctuation that belongs to the sentence. */
.prose-doc :is(#crashes, #other-fixes) ul {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px; padding: 0; list-style: none;
}
.prose-doc :is(#crashes, #other-fixes) 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;
}

/* 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; }
}



/* 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); }
/* /guides: each answer card and guide page card carries the sidebar icon of the page it opens; the sprite lifts on hover, as tiles do. */
.icon-cards .ac-h { display: flex; align-items: center; gap: 12px; }
.icon-cards .ac-h .nav-ico, .guide-picks .pick-title .nav-ico { flex: 0 0 48px; height: 48px; background: var(--well); }
.guide-picks .pick-title { display: flex; align-items: center; gap: 12px; }
.icon-cards .ac.can-open:hover .nav-ico img, .guide-picks .pick-card:hover .nav-ico img { transform: translateY(calc(var(--px) * -1)); }
/* /guides contents rail: each index part with its sidebar icon, the short guide after it indented under it. */
.toc.toc-flat > li > a:has(> .nav-ico) { display: flex; align-items: center; gap: 10px; }
.toc-flat .nav-ico { flex: 0 0 32px; height: 32px; }
.toc.toc-flat > li.toc-sub > a { display: flex; align-items: center; }
/* A short guide's line: the index lists' small arrow, centred under the part's icon. */
.toc.toc-flat > li.toc-sub > a::before { content: ""; flex: none; width: 4px; height: 8px; margin: 0 24px 0 14px; background: var(--ink-dim); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.toc.toc-flat > li.toc-sub > a:hover::before { background: var(--ink); }
.toc.toc-flat > li.toc-sub > a.is-here::before { background: var(--gold); }
/* /prism-units: Fate Stones with a Prism share as tiles, the share in large type; a tile opens the stone's card in place. */
.prose ul.stone-shares { padding: 0; list-style: none; margin-top: 16px; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.prose ul.stone-shares li + li { margin-top: 0; }
.stone-shares .ut-ico { height: 64px; }
.st-share { font: var(--f-h2); color: var(--ink); }
/* /prism-units: one block per class: its five Prism units as named wells (1 star, then each branch of 2 and 3 stars), its two
   3-star units as class-page cards with the higher number of each pair marked, then the sentence on the choice. */
.prism-line { margin-top: 24px; padding: 20px 24px 24px; background: var(--panel); scroll-margin-top: calc(var(--bar) + 16px); }
.pl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.prose .pl-head h3 { margin-top: 0; }
.pl-more { flex: none; font: var(--f-small); color: var(--gold); text-decoration: none; }
.pl-more::after { content: " ›"; }
.pl-more:hover { text-decoration: underline; }
.pl-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 16px; }
.pl-tree { display: grid; grid-template-columns: repeat(3, 84px); grid-template-rows: auto auto; gap: 8px 16px; align-items: start; }
.pl-base { grid-area: 1 / 1 / 3 / 2; align-self: center; }
.pl-a2 { grid-area: 1 / 2; } .pl-a3 { grid-area: 1 / 3; } .pl-b2 { grid-area: 2 / 2; } .pl-b3 { grid-area: 2 / 3; }
.pl-u { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); text-align: center; }
.pl-u .tm-well { width: 84px; height: 64px; box-shadow: inset 0 0 0 var(--px) transparent; }
.pl-u:hover .tm-well, .pl-u:focus-visible .tm-well { box-shadow: inset 0 0 0 var(--px) var(--gold); }
.pl-u:hover .tm-well img { transform: translateY(calc(var(--px) * -1)); }
.pl-name { font: var(--f-label); color: var(--ink-dim); }
.pl-u:hover .pl-name { color: var(--ink); }
.pl-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.prose .pl-card { padding: 24px 24px 24px; }
.prose .pl-card p + p { margin-top: 0; }
.prose .pl-cname { font: var(--f-name); }
.prose .pl-cname a { color: var(--paper-ink); }
.pl-card .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.pl-card .stats dd { color: var(--paper-dim); }
.pl-card .stats .hi dd { color: var(--paper-ink); }
.pl-card .stats .hi dd::after { content: "▲"; font: var(--f-label); color: var(--paper-link); }
.prose .pl-skill { margin-top: 12px; padding-top: 10px; border-top: var(--px) solid var(--paper-line); font: var(--f-small); font-weight: 700; color: var(--paper-ink); }
.pl-skill small { font-weight: 400; color: var(--paper-dim); }
.prism-line > p { margin-top: 16px; }
@media (max-width: 1100px) {
  .pl-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .pl-pair { grid-template-columns: minmax(0, 1fr); }
  .pl-tree { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pl-u .tm-well { width: 100%; }
  .pl-head { flex-direction: column; gap: 4px; }
}

/* 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(208px, 1fr)); gap: 8px; }
.tier-note:empty + .tier-entries, .tier-body > .tier-entries:first-child { margin-top: 0; }
/* Each tier card links to its unit or core: the header link covers the card, which takes the frame. */
.tier-entry { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "art name" "art short" "ev ev"; column-gap: 12px; row-gap: 4px; align-content: start; padding: 12px; background: var(--panel); border: var(--px) solid var(--panel-hi); }
.tier-entry:hover { border-color: var(--g, var(--gold)); }
.tier-entry > a { display: contents; color: var(--ink); text-decoration: none; }
.tier-entry .te-ico { grid-area: art; align-self: start; }
.tier-entry .te-name { grid-area: name; align-self: end; }
.tier-entry .te-name::after { content: ""; position: absolute; inset: 0; }
.tier-entry > a:focus-visible { outline: none; }
.tier-entry:focus-within { outline: var(--px) solid var(--gold); outline-offset: 2px; }
.tier-entry: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); }
@media (max-width: 639px) { .tier-row { grid-template-columns: 1fr; gap: 8px; } .tier-name { text-align: left; } }
/* /tier-list damage table: one table, a heading row per grade; with the script, grade tabs show one grade at a time and the level heads re-sort it. */
.dps-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.dps-tabs .st-tab { min-width: 0; color: var(--g); }
.dps-tabs .st-tab[aria-selected="true"] { border-color: var(--gold); background: var(--panel); }
.block.dps > .tiers-intro + .table-wrap { margin-top: 16px; }
.dps.tabbed .dps-g { display: none; }
.dps-g th { font: var(--f-label); color: var(--g); background: var(--panel-lo); }
.dps-table th, .dps-table td { vertical-align: middle; }
.dps-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dps-table td:last-child { white-space: normal; }
.dps-table td a { color: var(--ink-dim); }
.dps-table tbody th a { display: flex; align-items: center; gap: 8px; color: var(--g); }
.dps-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; background: var(--well); }
.dps-ico img { max-width: 32px; max-height: 32px; width: auto; height: auto; }
.dps-sort { padding: 0; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.dps-sort:hover { color: var(--gold); }
.dps-sort[aria-pressed="true"] { color: var(--gold); }
.dps-sort[aria-pressed="true"]::after { content: " ▼"; }
/* Phone: each unit is two lines, name and the two damage numbers, then Health and the other choice with their labels. */
@media (max-width: 639px) {
  .dps-table tr { display: grid; grid-template-columns: minmax(0, 1fr) 64px 72px; align-items: center; }
  .dps-table th, .dps-table td { padding: 8px; border-bottom: 0; }
  .dps-table thead th:nth-child(n+4) { display: none; }
  .dps-table .dps-g th { grid-column: 1 / -1; }
  .dps-table tbody tr:not(.dps-g) { border-bottom: var(--px) solid var(--panel-lo); }
  .dps-table tbody td:nth-child(4) { grid-row: 2; grid-column: 2 / 4; padding-top: 0; color: var(--ink-dim); }
  .dps-table tbody td:nth-child(5) { grid-row: 2; grid-column: 1; padding-top: 0; color: var(--ink-dim); }
  .dps-table tbody td:nth-child(4)::before { content: var(--w-health, "Health") " "; }
  .dps-table tbody td:nth-child(5)::before { content: var(--w-dpsOther, "Other choice") ": "; }
  .dps-table tbody th a { font-size: inherit; }
}
/* A tier card is one line of why plus where it comes from; the full evidence opens in the quick-view card. */
.te-short { grid-area: short; font: var(--f-small); color: var(--ink-dim); }
.te-ev:empty { display: none; }
.te-ev { grid-area: ev; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ev { padding: 0 8px; font: var(--f-label); line-height: 24px; color: var(--ink-dim); background: var(--panel-lo); }
.ev-report::before { content: var(--w-evReport, "Player report"); }
.ev-data { color: var(--ink); font-variant-numeric: tabular-nums; }
.ev-data::before { content: var(--w-evDps, "DPS") " "; color: var(--ink-dim); }
.ev-tank::before { content: var(--w-evTank, "Tank"); }
.ev-healer::before { content: var(--w-evHealer, "Healer"); }
/* Quick-view card on /tier-list: the evidence rows under the card's head. */
.quick-ev { display: grid; gap: 8px; margin: 12px 0 0; padding-bottom: 12px; border-bottom: var(--px) solid var(--paper-line); }
.quick-ev dt { font: var(--f-label); color: var(--paper-dim); }
.quick-ev dd { font: var(--f-small); color: var(--paper-ink); }
.quick-ev a { color: var(--paper-ink); }

/* /endless: medal ladder, 10-wave cycle strip, Host cards, grouped elite traits and the Judgment wave ladder. Non-clickable: no frame or hover. */
.prose .medal-ladder { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; padding: 0; list-style: none; }
.prose .medal-ladder::before { content: ""; position: absolute; left: 16px; right: 16px; top: 50%; height: var(--px); transform: translateY(-50%); background: var(--rope); pointer-events: none; }
.prose .medal { position: relative; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 12px 16px;
  background: color-mix(in srgb, var(--m) 7%, var(--panel)); box-shadow: inset 0 var(--px) 0 var(--m); }
.medal.m-bronze { --m: var(--legendary); } .medal.m-silver { --m: var(--essence); } .medal.m-gold { --m: var(--gold); } .medal.m-abyss { --m: var(--prism); }
.medal-tier { display: flex; align-items: center; gap: 8px; font: var(--f-label); font-weight: 700; color: var(--m); }
.medal-tier::before { content: ""; flex: none; width: 12px; height: 12px; background: var(--m); box-shadow: 0 0 0 var(--px) var(--void); }
.medal-wave { font: var(--f-name); font-weight: 400; color: var(--ink); }

.wave-cycle { margin-top: 16px; }
.prose .cycle-strip { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.prose .cw { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; padding: 8px 4px; text-align: center;
  background: var(--panel); box-shadow: inset 0 var(--px) 0 var(--c, var(--panel-hi)); }
.cw-judge { --c: var(--gold); background: color-mix(in srgb, var(--c) 12%, var(--panel)); }
.cw-boss { --c: var(--tone-red); background: color-mix(in srgb, var(--c) 12%, var(--panel)); }
.cw-n { font: var(--f-name); color: var(--ink); }
.cw-judge .cw-n, .cw-boss .cw-n { color: var(--c); }
.cw-ico { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; }
.cw-ico::before { content: ""; width: 8px; height: 8px; background: var(--panel-hi); }
.cw-judge .cw-ico::before { width: 24px; height: 28px; background: url("https://img.slotbound.net/s_0i2d502f0h3m2a/n-judgment-waves.db64729325.png") center / 24px 28px no-repeat; image-rendering: pixelated; }
.cw-boss .cw-ico::before { width: 17px; height: 16px; background: url("https://img.slotbound.net/s_0i2d502f0h3m2a/n-enemies.de12b65cda.png") center / 17px 16px no-repeat; image-rendering: pixelated; }
.cw-k { font: var(--f-label); color: var(--ink-dim); }
.cw:not(.cw-judge):not(.cw-boss) .cw-k::before { content: var(--w-cycleHard, "Hard"); }
.cw-judge .cw-k, .cw-boss .cw-k { color: var(--c); font-weight: 700; }
.cycle-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; padding: 8px 12px; background: var(--panel-lo); font: var(--f-label); color: var(--ink-dim); }
.cycle-key > span { display: inline-flex; align-items: center; gap: 8px; }
.cycle-key > span::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--c, var(--panel-hi)); }
.cycle-key .ck-judge { --c: var(--gold); color: var(--ink); }
.cycle-key .ck-boss { --c: var(--tone-red); color: var(--ink); }
.wave-cycle + ul { margin-top: 16px; }

.prose .host-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; padding: 0; list-style: none; }
.prose .host-card { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 12px 16px; background: var(--panel); box-shadow: inset 0 var(--px) 0 var(--panel-hi); }
.host-name { font: var(--f-name); color: var(--ink); }
.host-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.htag { display: inline-block; padding: 4px 8px; font: var(--f-label); font-weight: 700; background: var(--panel-lo); color: var(--tc, var(--ink)); box-shadow: inset var(--px) 0 0 var(--tc, var(--panel-hi)); }
.htag.ht-bad { --tc: var(--no); }
.htag.ht-good { --tc: var(--tone-teal); }
.htag.ht-bonus { --tc: var(--originite); }
.prose .host-card > .host-tip { margin-top: 0; font: var(--f-small); color: var(--ink-dim); }

.elite-groups { display: grid; gap: 24px; margin-top: 16px; }
.elite-group { --eg: var(--panel-hi); }
.elite-group.eg-tank { --eg: var(--tone-teal); }
.elite-group.eg-threat { --eg: var(--tone-red); }
.elite-group.eg-twist { --eg: var(--gold); }
.elite-group-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 8px; font: var(--f-small); font-weight: 700; color: var(--ink); }
.elite-group-h::before { content: ""; flex: none; width: 12px; height: 12px; background: var(--eg); box-shadow: 0 0 0 var(--px) var(--void); }
.elite-group-h span { font: var(--f-label); font-weight: 400; color: var(--ink-dim); }
.prose .elite-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.prose .el-card { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 12px; background: var(--panel); box-shadow: inset var(--px) 0 0 var(--eg); }
.el-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.el-name { font: var(--f-name); color: var(--ink); }
.el-hp { flex: none; padding: 4px 8px; font: var(--f-label); font-weight: 700; color: var(--ink); background: var(--panel-lo); }
.el-hp.is-hi { color: var(--no); }
.el-hp.is-none { color: var(--ink-off); font-weight: 400; }
.prose .el-card > .el-text { margin-top: 0; font: var(--f-small); color: var(--ink-dim); }

@media (max-width: 999px) {
  .prose .cycle-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .prose .elite-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .prose .medal-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .prose .medal-ladder::before { display: none; }
  .prose .host-grid, .prose .elite-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Judgment wave ladder: a data table whose growth column carries a <meter>, so the value stays in the HTML. */
.judge-ladder thead th { white-space: normal; }
.judge-ladder .jl-x { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.jl-bar { flex: none; width: calc(100% - 48px); min-width: 48px; height: 8px; border: 0; background: var(--panel-lo); -webkit-appearance: none; appearance: none; }
.jl-bar::-webkit-meter-bar { height: 8px; border: 0; border-radius: 0; background: var(--panel-lo); }
.jl-bar::-webkit-meter-optimum-value, .jl-bar::-webkit-meter-suboptimum-value, .jl-bar::-webkit-meter-even-less-good-value { border-radius: 0; background: var(--ink-off); }
.jl-bar::-moz-meter-bar { background: var(--ink-off); }
.judge-ladder .jl-hit > * { background: var(--gold-wash); color: var(--ink); }
.judge-ladder .jl-hit th { color: var(--gold); }
.jl-hit .jl-bar::-webkit-meter-optimum-value, .jl-hit .jl-bar::-webkit-meter-suboptimum-value, .jl-hit .jl-bar::-webkit-meter-even-less-good-value { background: var(--gold); }
.jl-hit .jl-bar::-moz-meter-bar { background: var(--gold); }

/* Widgets (DESIGN.md, Widgets; markup from tools/frontend/widgets.py). None of them clicks, so none has a frame or a hover. */

/* Grade ladder: answer cards that name a grade, one row each, with the promotion levels drawn to scale and one square per imprint slot. */
.answer-cards.ladder { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.ladder .ac { grid-template-columns: 216px minmax(0, 1fr) auto; align-items: center; column-gap: 24px; padding: 12px 16px; }
.ladder .ac > * { grid-column: auto; }
.ladder .ac-h { display: flex; align-items: center; gap: 12px; }
.ladder .ac-h::before { content: ""; flex: none; width: 12px; height: 12px; background: var(--g); box-shadow: 0 0 0 var(--px) var(--void); }
.ladder .ac-text { color: var(--ink); }
.lv-scale { display: flex; align-items: center; gap: 16px; }
/* The SVG is drawn at 4px per level; shown at twice that, a whole multiple, so its edges stay crisp. */
.lv-scale svg { display: block; width: auto; height: 24px; }
.lv-track { fill: var(--panel-lo); } .lv-one { fill: var(--g); fill-opacity: .4; } .lv-two { fill: var(--g); } .lv-mark { fill: var(--ink); }
.lv-slots { display: flex; gap: 4px; width: 68px; }
.lv-slots i { width: 8px; height: 8px; background: var(--ink); }
@media (max-width: 999px) { .answer-cards.ladder { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 719px) {
  .ladder .ac { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
}

/* Promotion trees: a class's 1-star unit, then its two branches, each sprite in a well joined by rope, as on the class pages.
   The tree sits above its text, so a row of classes reads as a row of trees. */
.tree-mini { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.tm-rows { display: grid; gap: 8px; position: relative; }
.tm-rows::before { content: ""; position: absolute; left: -12px; top: 44px; bottom: 44px; width: var(--px); background: var(--rope); }
.tm-row { display: flex; align-items: center; gap: 12px; position: relative; }
.tm-row::before { content: ""; position: absolute; left: -12px; top: 50%; width: 12px; height: var(--px); background: var(--rope); }
.tm-row .tm-well + .tm-well::before { content: ""; position: absolute; left: -12px; top: 50%; width: 12px; height: var(--px); background: var(--rope); }
.tm-well { position: relative; display: grid; place-items: end center; width: 84px; height: 88px; padding-bottom: 4px; background: var(--well); }
.tm-well img { max-width: none; image-rendering: pixelated; }
.prose ul.w-trees { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 308px), 1fr)); gap: 4px; padding: 0; list-style: none; }
.prose .w-trees li, .prose .w-tree { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin: 0; padding: 16px; background: var(--panel); }
.prose .w-trees li > div, .prose .w-tree > p { min-width: 0; }
.prose .w-tree { margin-top: 12px; }

/* Icon rows: things a reader checks one by one (what a unit keeps), each beside the sidebar icon of the page that owns it. */
.prose ul.w-icons { display: grid; gap: 4px; padding: 0; list-style: none; }
.prose .w-icons li { display: flex; align-items: flex-start; gap: 16px; margin: 0; padding: 12px 16px; background: var(--panel); }
.prose .w-icons .nav-ico { flex: 0 0 48px; height: 48px; background: var(--well); }
.prose ul.w-icons.grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.prose .w-icons.grid li { align-items: center; }

/* Pinned screenshot: numbered squares on the shot, the same numbers on the notes under it. */
.shot.pinned { counter-reset: pin; }
.pin-box { position: relative; }
.pin { position: absolute; left: var(--x); top: var(--y); display: grid; place-items: center; width: 28px; height: 28px; transform: translate(-50%, -50%);
  background: var(--gold); box-shadow: 0 0 0 var(--px) var(--void); pointer-events: none; }
.pin::after { counter-increment: pin; content: counter(pin); font: var(--f-name); color: var(--void); }
.prose ol.w-pins { display: grid; gap: 4px; margin-top: 12px; padding: 0; list-style: none; counter-reset: note; }
.prose .w-pins li { position: relative; margin: 0; padding: 14px 16px 14px 60px; background: var(--panel); counter-increment: note; }
.prose .w-pins li::before { content: counter(note); position: absolute; left: 16px; top: 12px; display: grid; place-items: center; width: 28px; height: 28px;
  font: var(--f-name); color: var(--void); background: var(--gold); box-shadow: 0 0 0 var(--px) var(--void); }
.prose .w-pins + p { margin-top: 16px; }

/* A screenshot's caption ends its figure; the next paragraph starts a new thought. */
.prose .shot + p, .prose .shot + ul { margin-top: 24px; }

/* Cases: what a rule splits into, side by side, hung from one rope like a promotion tree's branches. The colon after
   a case's name stays in the HTML for crawlers and reads as the line break here. */
.prose ul.w-cases { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px;
  margin-top: 12px; padding: 16px 0 0; list-style: none; }
.prose ul.w-cases::before { content: ""; position: absolute; top: 4px; left: calc(50% / var(--n)); right: calc(50% / var(--n)); height: var(--px); background: var(--rope); }
.prose ul.w-cases::after { content: ""; position: absolute; top: -4px; left: calc(50% - 2px); width: var(--px); height: 8px; background: var(--rope); }
.prose .w-cases > li { position: relative; margin: 0; padding: 16px; background: var(--panel); }
.prose .w-cases > li::before { content: ""; position: absolute; top: -12px; left: calc(50% - 2px); width: var(--px); height: 12px; background: var(--rope); }
.prose .w-case-h { display: block; margin-bottom: 8px; font: var(--f-name); color: var(--heading); }
.prose .w-sep { display: none; }
.prose .w-case-b { display: block; }
.prose .w-case-b::first-letter { text-transform: uppercase; }
.prose .w-cases li > p { margin: 0; }
.prose .w-cases li > p + p { margin-top: 8px; }
@media (max-width: 639px) {
  .prose ul.w-cases { grid-template-columns: minmax(0, 1fr); padding: 0 0 0 16px; }
  .prose ul.w-cases::before { top: 0; bottom: 26px; left: 0; right: auto; width: var(--px); height: auto; }
  .prose ul.w-cases::after { display: none; }
  .prose .w-cases > li::before { top: 24px; left: -16px; width: 16px; height: var(--px); }
}

/* Team: the units of a run as the game's wells. The unit that absorbs stands on gold; a locked one carries the game's
   padlock; an absorbed one leaves an empty, dashed place, as an empty place looks in the faction calculator. */
.w-team { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
/* Wells fit the tallest 1-star sprite, the Cavalry's 68 × 100. */
.tw { position: relative; display: grid; place-items: end center; width: 84px; height: 108px; padding-bottom: 4px; background: var(--well); }
.tw img { max-width: none; image-rendering: pixelated; }
.tw-keep { background: var(--gold-wash); box-shadow: inset 0 calc(-1 * var(--px)) 0 var(--gold); }
.tw-gone { background: none; border: var(--px) dashed var(--panel-hi); }
.tw-gone img { opacity: .3; filter: grayscale(1); }
.tw-padlock { position: absolute; top: 8px; right: 8px; fill: var(--gold); }
.tw-padlock .tw-hole { fill: var(--void); }
/* On phones the sprites drop to exactly half (every sprite width is even), so five wells fit one row and stay crisp. */
@media (max-width: 639px) {
  .tw { width: 48px; height: 58px; padding-bottom: 2px; }
  .tw img { width: calc(var(--w) / 2); height: auto; }
  .tw-padlock { top: 4px; right: 4px; }
}

/* Timeline: moments of one run in order, paper squares on a rope. */
.prose ul.w-timeline { position: relative; display: grid; gap: 4px; margin-top: 12px; padding: 0 0 0 32px; list-style: none; }
.prose ul.w-timeline::before { content: ""; position: absolute; top: 24px; bottom: 24px; left: 8px; width: var(--px); background: var(--rope); }
.prose .w-timeline > li { position: relative; margin: 0; padding: 12px 16px; background: var(--panel); }
.prose .w-timeline > li::before { content: ""; position: absolute; top: 20px; left: -28px; width: 12px; height: 12px; background: var(--paper); }

/* Bars: amounts side by side, each drawn to scale in its currency's colour under its name. */
.prose ul.w-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 4px; margin-top: 12px; padding: 0; list-style: none; }
.prose .w-bars > li { margin: 0; padding: 16px; background: var(--panel); }
.w-bar { display: block; width: max(var(--px), calc(var(--v) * 100%)); height: 8px; margin-bottom: 8px; background: var(--c); }
.u-originite { --c: var(--originite); } .u-essence { --c: var(--essence); } .u-gold { --c: var(--gold); }

/* Waves: one strip per difficulty, a cell per wave; Judgment cells on gold with the Judgment icon, boss cells with the
   enemies icon on a red edge, each numbered by a CSS counter so the numbers stay out of the text. */
.w-waves { display: grid; gap: 28px; margin: 16px 0 36px; }
.wv-row { display: grid; grid-template-columns: 176px repeat(30, minmax(0, 1fr)); gap: 2px; align-items: start; counter-reset: wave; }
.wv-row::before { align-self: center; font: var(--f-label); color: var(--ink-dim); }
.wv-row.d0::before { content: var(--w-easyTenWaves, "Easy · 10 waves"); }
.wv-row.d1::before { content: var(--w-normalTwentyWaves, "Normal · 20 waves"); }
.wv-row.d2::before { content: var(--w-hardThirtyWaves, "Hard · 30 waves"); }
.wv-row i { position: relative; height: 32px; background: var(--panel); counter-increment: wave; }
.wv-row .wv-j { background: var(--gold-wash) url("https://img.slotbound.net/s_0i2d502f0h3m2a/n-judgment-waves.db64729325.png") center / 24px 28px no-repeat; box-shadow: inset 0 calc(-1 * var(--px)) 0 var(--gold); image-rendering: pixelated; }
.wv-row .wv-b { background: var(--panel-lo) url("https://img.slotbound.net/s_0i2d502f0h3m2a/n-enemies.de12b65cda.png") center / 17px 16px no-repeat; box-shadow: inset 0 calc(-1 * var(--px)) 0 var(--tone-red); image-rendering: pixelated; }
.wv-j::after, .wv-b::after { content: counter(wave); position: absolute; top: 36px; left: 50%; transform: translateX(-50%); font: var(--f-label); color: var(--ink-dim); }
@media (max-width: 999px) {
  .w-waves { gap: 24px; margin-bottom: 32px; }
  .wv-row { grid-template-columns: repeat(30, minmax(0, 1fr)); row-gap: 4px; }
  .wv-row::before { grid-column: 1 / -1; }
  .wv-row i { height: 16px; }
  .wv-row .wv-j, .wv-row .wv-b { background-image: none; }
  .wv-j::after, .wv-b::after { top: 18px; }
}

/* Stairs: a cost that rises with each step, drawn to scale. */
.w-stairs { display: flex; align-items: flex-end; gap: 8px; height: 64px; margin: 16px 0 40px; }
.w-stairs i { position: relative; width: 32px; height: var(--h); background: var(--gold); }
.w-stairs i::after { content: attr(data-n); position: absolute; top: calc(100% + 4px); left: 0; right: 0; font: var(--f-label); color: var(--ink-dim); text-align: center; }

/* Paylines: the machine's nine cells and the eight lines that pay. */
.w-paylines { display: block; margin: 16px 0; }
.w-paylines svg { display: block; }
.pl-cell { fill: var(--panel); }
.pl-lines path { fill: none; stroke: var(--gold); stroke-width: 2; }

/* Tiles: class links drawn as the home page's class tiles, inside running text. */
.prose ul.w-tiles { grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 12px; padding: 0; list-style: none; }
.prose .w-tiles > li { margin: 0; }
.w-tiles .ut-ico { height: 104px; }
.w-tiles a { text-decoration: none; }
@media (max-width: 999px) { .prose ul.w-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 479px) { .prose ul.w-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Table of sentences: rows stack on phones, each cell under its column's name. */
.data.stack td { min-width: 160px; }
.data.stack tbody th { white-space: normal; text-wrap: balance; }
@media (max-width: 639px) {
  .data.stack thead { display: none; }
  .data.stack, .data.stack tbody, .data.stack tr, .data.stack th, .data.stack td { display: block; }
  .data.stack td { min-width: 0; }
  .data.stack td::before { content: attr(data-label); display: block; font: var(--f-label); color: var(--ink-dim); }
}

.prose .shot + .table-wrap { margin-top: 24px; }
:lang(ja) .data.stack tbody th { word-break: auto-phrase; }
@media (max-width: 639px) {
  /* On a shot this small a centred pin hides its target; it sits just right of the point instead. */
  .pin { width: 18px; height: 18px; transform: translate(4px, -50%); }
  .pin::after { font: var(--f-label); font-weight: 700; }
}

/* 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-form ::placeholder { color: var(--ink-off); opacity: 1; }
.c-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.c-msg { font: var(--f-small); color: var(--ink-dim); }
