/* ==========================================================================
   SRPG Guides: dark wiki theme (v2)
   Game8-style information density: top bar, game tab bar, main column +
   right sidebar, bordered link tables, square icon grids, compact tables.
   Dark by default; a light palette is provided under [data-theme="light"].
   ========================================================================== */

:root {
  --font: 'Noto Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --bg: #100d16;
  --panel: #17131f;
  --panel-2: #1d1827;
  --panel-3: #261f33;
  --line: #2d2639;
  --line-2: #3d344f;
  --text: #ebe8f2;
  --text-2: #c8c2d6;
  --muted: #958ca8;
  --accent: #b9a3e3;
  --accent-ink: #1c1330;
  --accent-soft: rgba(185, 163, 227, 0.16);
  --link: #a9b6ff;
  --link-hover: #d3d9ff;
  --good: #4cc38a;
  --bad: #ef6b6b;
  --warn: #e7b84a;

  --path-cai: #5fa8f0;
  --path-dietrich: #a585ec;
  --path-theodora: #e4b443;
  --path-leda: #f07fb3;

  --tier-s: #e5534b;
  --tier-ap: #ef7d3c;
  --tier-a: #e6a83a;
  --tier-b: #46b07a;
  --tier-c: #3f8fd6;
  --tier-d: #7a828e;
  --tier-lord: #c99b3d;

  --radius: 6px;
  color-scheme: dark;
}
[data-theme='light'] {
  --bg: #f4f2f8;
  --panel: #ffffff;
  --panel-2: #f7f7f8;
  --panel-3: #eceef1;
  --line: #dfe2e6;
  --line-2: #cbd0d6;
  --text: #1b1e22;
  --text-2: #3b4148;
  --muted: #646b75;
  --accent: #5e4594;
  --accent-soft: rgba(94, 69, 148, 0.12);
  --link: #4b3aa8;
  --link-hover: #2f2275;
  color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- Top bar ---------- */
.hdr { background: #0b0910; border-bottom: 1px solid var(--line); }
[data-theme='light'] .hdr { background: #33244a; }
.hdr__in { max-width: 1240px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.logo:hover { color: #fff; text-decoration: none; }
.logo img { width: 34px; height: 34px; object-fit: contain; }
.logo__mark { width: 28px; height: 28px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 13px; font-weight: 900; }
.hdr__search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 6px; background: #1a1522; border: 1px solid #2e2639; color: #958ca8; font-size: 14px; }
.hdr__nav { display: flex; gap: 2px; margin-left: auto; }
.hdr__nav a { color: #c4c8ce; font-size: 14px; font-weight: 600; padding: 6px 10px; border-radius: 6px; }
.hdr__nav a:hover, .hdr__nav a[aria-current] { color: #fff; background: #1f2329; text-decoration: none; }
.hdr__btn { width: 36px; height: 36px; border-radius: 6px; border: 1px solid #2e2639; background: #1a1522; color: #c8c2d6; display: grid; place-items: center; }

/* ---------- Game bar ---------- */
.gamebar { background: var(--panel); border-bottom: 1px solid var(--line); }
.gamebar__in { max-width: 1240px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 14px; }
.gamebar__title { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--text); font-weight: 700; font-size: 15px; white-space: nowrap; }
.gamebar__title:hover { color: var(--text); text-decoration: none; }
.cover { width: 34px; height: 34px; border-radius: 4px; background: linear-gradient(135deg, #b8402f, #3b1a26); flex: none; }
.gamebar__tabs { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; margin-left: 8px; }
.gamebar__tabs a { padding: 16px 12px 14px; font-size: 14px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.gamebar__tabs a:hover { color: var(--text); text-decoration: none; }
.gamebar__tabs a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Page layout ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 16px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.wrap--full { grid-template-columns: minmax(0, 1fr); }
.main { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px 40px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.crumbs span + span::before, .crumbs a + span::before, .crumbs a + a::before { content: '›'; margin-right: 6px; color: var(--line-2); }
.title { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.meta b { color: var(--text-2); font-weight: 600; }
.lede { color: var(--text-2); margin-bottom: 16px; }

/* Section headings (Game8-style rule under the heading) */
.sec { font-size: 20px; font-weight: 800; padding: 0 0 10px; margin: 44px 0 20px; border-bottom: 2px solid var(--accent); display: flex; align-items: center; gap: 8px; }
.sec::before { content: ''; width: 4px; height: 18px; border-radius: 2px; background: var(--accent); }
.sub { font-size: 16px; font-weight: 700; margin: 22px 0 10px; padding-left: 10px; border-left: 3px solid var(--line-2); }

/* Contents box */
.contents { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); margin: 0 0 18px; }
.contents__head { padding: 8px 12px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.contents ol { margin: 0; padding: 8px 12px 10px 32px; columns: 2; column-gap: 28px; font-size: 14px; }
.contents li { padding: 2px 0; break-inside: avoid; }

/* Bordered link table (the Game8 workhorse) */
.lt { display: grid; border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: 0 0 22px; }
.lt--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lt--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lt--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lt > a, .lt > span { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; background: var(--panel); }
.lt > a:hover { background: var(--panel-2); text-decoration: none; }
.lt .ic { width: 28px; height: 28px; border-radius: 4px; flex: none; background: var(--panel-3); display: grid; place-items: center; color: var(--accent); font-size: 12px; font-weight: 800; }
.lt__head { grid-column: 1 / -1; background: var(--panel-3) !important; color: var(--text) !important; font-size: 13px !important; text-transform: uppercase; letter-spacing: 0.04em; }

/* Square icon grid (characters, classes) */
.ig { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; margin: 0 0 22px; }
.ig a { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); color: var(--text); font-size: 13px; font-weight: 600; text-align: center; position: relative; }
.ig a:hover { border-color: var(--accent); text-decoration: none; }
.ig small { color: var(--muted); font-size: 11px; font-weight: 500; }
.ig--1 { grid-template-columns: minmax(92px, 150px); margin: 0; }
.face { width: 60px; height: 60px; border-radius: 4px; display: grid; place-items: center; font-weight: 800; font-size: 22px; color: #fff; background: linear-gradient(160deg, var(--c, #59606b), #1a1d22); box-shadow: inset 0 -3px 0 var(--c, #59606b); }
.face--lg { width: 120px; height: 120px; font-size: 44px; border-radius: 6px; }
.face--sm { width: 32px; height: 32px; font-size: 13px; }
.ig .tb { position: absolute; top: 4px; right: 4px; }
.spoiler .face, .spoiler .nm { filter: blur(5px); }

/* Badges & chips */
.tb { display: inline-grid; place-items: center; min-width: 24px; height: 20px; padding: 0 5px; border-radius: 3px; font-size: 12px; font-weight: 800; color: #fff; background: var(--t, var(--tier-d)); }
.t-S { --t: var(--tier-s); } .t-Ap { --t: var(--tier-ap); } .t-A { --t: var(--tier-a); } .t-B { --t: var(--tier-b); } .t-C { --t: var(--tier-c); } .t-D { --t: var(--tier-d); } .t-L { --t: var(--tier-lord); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
/* A table cell must stay a table cell, or its borders break out of the row. Chips inside it wrap inline instead. */
td.chips, th.chips { display: table-cell; }
td.chips > .chip, th.chips > .chip, td.chips > a, td.chips > span { margin: 2px 5px 2px 0; vertical-align: middle; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 3px; font-size: 12px; font-weight: 700; background: var(--panel-3); color: var(--text-2); border: 1px solid var(--line-2); white-space: nowrap; }
.chip--p { border-color: var(--p); color: var(--p); background: color-mix(in srgb, var(--p) 12%, transparent); }
.chip--q { opacity: 0.5; border-style: dashed; }
.p-cai { --p: var(--path-cai); } .p-dietrich { --p: var(--path-dietrich); } .p-theodora { --p: var(--path-theodora); } .p-leda { --p: var(--path-leda); }
.chip--good { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, transparent); background: color-mix(in srgb, var(--good) 10%, transparent); }
.chip--bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.status { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); }

/* Data tables */
.tw { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--radius); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { padding: 11px 14px; line-height: 1.55; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.t tr > *:last-child { border-right: none; }
table.t tbody tr:last-child > * { border-bottom: none; }
table.t thead th { background: var(--panel-3); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); white-space: nowrap; }
table.t th[scope='row'] { background: var(--panel-2); font-weight: 700; white-space: nowrap; }
table.t td.n, table.t th.n { text-align: center; font-family: var(--mono); }
table.t .fx td { color: var(--muted); font-size: 13px; padding-top: 4px; background: var(--panel-2); }

/* Info box (character / class top box) */
.infobox { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); padding: 20px; margin: 4px 0 24px; }
.infobox dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); margin: 0; font-size: 14px; border-top: 1px solid var(--line); }
.infobox dt, .infobox dd { margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.infobox dt { color: var(--muted); font-weight: 600; background: var(--panel-3); }

/* Verdict / callouts */
.box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); padding: 16px 20px; margin: 0 0 22px; line-height: 1.65; }
.box--accent { border-left: 4px solid var(--accent); }
.box--warn { border-left: 4px solid var(--warn); }
.box__t { font-weight: 800; font-size: 14px; margin-bottom: 4px; }

/* Build cards */
.build { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 22px; overflow: hidden; }
.build__h { display: flex; align-items: center; gap: 12px; padding: 13px 18px; background: var(--panel-3); font-weight: 800; }
.build__b { padding: 18px 20px 20px; }
.build__b p { line-height: 1.7; margin-bottom: 12px !important; }
.build__b ul li { margin: 5px 0; }
.cpath { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 2px 0 18px; }
.cpath a { display: flex; flex-direction: column; padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--panel); color: var(--text); font-weight: 700; font-size: 13px; line-height: 1.25; }
.cpath a small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.cpath i { color: var(--muted); font-style: normal; }
.cpath i.cp-or { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Growth bars */
.bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; }
.bar { display: grid; grid-template-columns: 34px minmax(0, 1fr) 70px; gap: 8px; align-items: center; font-size: 13px; }
.bar b { color: var(--text-2); }
.bar__t { height: 8px; border-radius: 4px; background: var(--panel-3); position: relative; overflow: hidden; }
.bar__f { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 4px; }
.bar__m { position: absolute; top: 0; bottom: 0; background: var(--good); opacity: 0.8; }
.bar__v { font-family: var(--mono); text-align: right; }
.bar__v em { color: var(--good); font-style: normal; font-size: 11px; }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin: 0 0 10px; overflow-x: auto; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 14px; color: var(--muted); font: 600 14px var(--font); }
.tabs button[aria-selected='true'] { color: var(--accent); border-bottom-color: var(--accent); }

/* Review */
.score { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); padding: 16px; margin: 0 0 16px; }
.score__n { width: 130px; height: 130px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; text-align: center; font-weight: 900; font-size: 52px; line-height: 1; }
.score__n small { display: block; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; }
.pc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.pc ul { margin: 0; padding-left: 18px; font-size: 14px; }
.pc__h { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.pc__good { border-top: 3px solid var(--good); }
.pc__bad { border-top: 3px solid var(--bad); }
.meter { height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }

/* Tier list */
.tier { display: grid; grid-template-columns: 70px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 6px; }
.tier__l { display: grid; place-items: center; font-size: 26px; font-weight: 900; color: #fff; background: var(--t); }
.tier__u { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--panel-2); }
.tier__u a { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 72px; color: var(--text); font-size: 12px; font-weight: 600; text-align: center; }
.tier__u .face { width: 52px; height: 52px; font-size: 18px; }

/* Filter bar */
.fbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); margin: 0 0 12px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; }
.seg button { background: var(--panel); color: var(--text-2); border: none; padding: 5px 10px; font: 600 13px var(--font); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); }
.inp { height: 32px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--panel); color: var(--text); padding: 0 10px; font: 14px var(--font); }

/* Sidebar */
.side { display: flex; flex-direction: column; gap: 14px; }
.widget { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.widget__h { padding: 9px 12px; font-weight: 800; font-size: 14px; border-bottom: 2px solid var(--accent); }
.rank { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rank li { counter-increment: r; display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.rank li:last-child { border-bottom: none; }
.rank li::before { content: counter(r); flex: none; width: 22px; height: 22px; border-radius: 3px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.rank li:nth-child(n + 4)::before { background: var(--panel-3); color: var(--text-2); }
.wlist { list-style: none; margin: 0; padding: 0; }
.wlist li { padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.wlist li:last-child { border-bottom: none; }
.wlist small { display: block; color: var(--muted); font-size: 12px; }

/* Footer */
.foot a { color: var(--muted); }

/* Responsive */
@media (max-width: 980px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .hdr__nav { display: none; }
  .lt--3, .lt--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contents ol { columns: 1; }
  .bars { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .main { padding: 18px 16px 26px; }
  .infobox { grid-template-columns: minmax(0, 1fr); }
  .infobox dl { grid-template-columns: 100px minmax(0, 1fr); }
  .score { grid-template-columns: minmax(0, 1fr); }
  .pc { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   WordPress additions
   ========================================================================== */
.screen-reader-text, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; font-weight: 700; }
.skip-link:focus { top: 10px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* Header bits */
.logo img { width: 34px; height: 34px; object-fit: contain; }
.hdr__search { cursor: pointer; text-align: left; font: inherit; font-size: 14px; }
.hdr__search kbd { margin-left: auto; font: 600 11px var(--mono); border: 1px solid #3a4049; border-radius: 4px; padding: 0 5px; color: #8f96a0; }
.hdr__btn { cursor: pointer; }
.hdr__nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.hdr__nav li a { display: block; }
.hdr__menu-btn { display: none; }
.cover { background: linear-gradient(135deg, var(--accent-c, #b8402f), #1a0f14); }
.cover--img { overflow: hidden; }
.cover--img img { width: 100%; height: 100%; object-fit: cover; }
.status--ok { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.chip--off { opacity: 0.45; text-decoration: line-through; }

/* Mobile nav drawer */
.drawer { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 90; background: var(--panel); border-right: 1px solid var(--line); padding: 16px; transform: translateX(-102%); transition: transform 0.2s; overflow: auto; }
.drawer[data-open="true"] { transform: none; }
.drawer ul { list-style: none; margin: 0 0 14px; padding: 0; }
.drawer a { display: block; padding: 8px 6px; color: var(--text); font-weight: 600; border-bottom: 1px solid var(--line); }
.drawer h2 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 14px 0 4px; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 80; }
.scrim[hidden] { display: none; }
@media (max-width: 980px) {
  .hdr__menu-btn { display: grid; }
  .hdr__search span { display: none; }
  .hdr__search { flex: 0 0 auto; width: 36px; justify-content: center; padding: 0; margin-left: auto; }
  .hdr__search kbd { display: none; }
}

/* Faces with images */
.face--img { padding: 0; overflow: hidden; background: var(--panel-3); }
.face--img img { width: 100%; height: 100%; object-fit: cover; }
.spoilers-on .spoiler .face, .spoilers-on .spoiler .nm { filter: none; }
.spoiler-name { filter: blur(5px); }
.spoilers-on .spoiler-name { filter: none; }

/* Key art */
.keyart { position: relative; height: 240px; border-radius: 6px; margin: 0 0 14px; overflow: hidden; background: linear-gradient(110deg, #2a1220 0%, color-mix(in srgb, var(--accent-c, #b8402f) 70%, #000) 50%, var(--accent-c, #b8402f) 100%); }
.keyart img { width: 100%; height: 100%; object-fit: cover; }

/* Review score on hub */
.rv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); padding: 14px; margin: 0 0 12px; }
.rv__n { width: 110px; height: 110px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; text-align: center; font-weight: 900; font-size: 36px; line-height: 1.05; }
.rv__n small { display: block; font-size: 11px; letter-spacing: 0.06em; }
.sub-s { display: grid; grid-template-columns: 170px minmax(0, 1fr) 60px; gap: 12px; align-items: center; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pathtabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin: 0 0 16px; }
.pathtabs a { padding: 8px 10px; border: 1px solid var(--line); border-top: 3px solid var(--p); border-radius: 4px; background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 14px; }
.pathtabs a[aria-current] { background: color-mix(in srgb, var(--p) 14%, var(--panel-2)); border-color: var(--p); }

/* Learnset colour keys */
.k-art { color: var(--link); } .k-sp { color: #c79bff; } .k-ab { color: var(--warn); }
.k-art a, .k-sp a, .k-ab a { color: inherit; }
.ls tr.boon th { color: var(--good); } .ls tr.bane th { color: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.pos { color: var(--good); } .neg { color: var(--bad); }
.tree { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.tree a, .tree span { padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 14px; }
.tree [aria-current] { border-color: var(--accent); color: var(--accent); }
.tree i { color: var(--muted); font-style: normal; border: 0; background: none; padding: 0; }

/* Recruitment matrix */
td.cell { text-align: center; font-size: 13px; }
.cell-auto { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); font-weight: 700; }
.cell-recruit { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); font-weight: 700; }
/* Recruit cells take their path colour (Games → path settings). */
.cell-recruit[style*="--pc"] { background: color-mix(in srgb, var(--pc) 20%, transparent); color: color-mix(in srgb, var(--pc) 60%, #fff); }
[data-theme='light'] .cell-recruit[style*="--pc"] { color: color-mix(in srgb, var(--pc) 80%, #000); }
.cell-none { color: var(--muted); }

/* Filters, tabs, buttons */
[data-item][hidden], [data-group][hidden] { display: none !important; }
.fcount { margin-left: auto; font-size: 13px; color: var(--muted); }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]::after { content: " \2195"; opacity: 0.4; }
th[aria-sort="ascending"]::after { content: " \2191"; opacity: 1; }
th[aria-sort="descending"]::after { content: " \2193"; opacity: 1; }
.tabpanel[hidden] { display: none; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text-2); font: 600 13px var(--font); cursor: pointer; }
.btn:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Entry content (WordPress editor output) */
.entry { font-size: 15.5px; line-height: 1.75; color: var(--text-2); }
.entry > * { max-width: 100%; }
.entry h2 { font-size: 20px; font-weight: 800; color: var(--text); padding: 0 0 8px; margin: 30px 0 14px; border-bottom: 2px solid var(--accent); }
.entry h3 { font-size: 16px; font-weight: 700; color: var(--text); margin: 22px 0 10px; padding-left: 10px; border-left: 3px solid var(--line-2); }
.entry h4 { font-size: 15px; color: var(--text); margin: 18px 0 8px; }
.entry ul, .entry ol { padding-left: 22px; margin: 0 0 14px; }
.entry li { margin: 6px 0; }
.entry img { height: auto; border-radius: 4px; }
.entry figure { margin: 0 0 16px; }
.entry figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }
.entry blockquote { margin: 0 0 16px; padding: 10px 16px; border-left: 4px solid var(--accent); background: var(--panel-2); color: var(--text); }
.entry table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 16px; }
.entry th, .entry td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.entry th { background: var(--panel-3); }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.entry .wp-block-table { overflow-x: auto; }
.entry pre, .entry code { font-family: var(--mono); background: var(--panel-3); border-radius: 4px; }
.entry pre { padding: 12px; overflow-x: auto; }
.entry code { padding: 1px 5px; font-size: 0.92em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 16px 10px 0; }
.alignright { float: right; margin: 0 0 10px 16px; }
.wp-caption-text { font-size: 13px; color: var(--muted); }

/* Archive / post lists */
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plist img { width: 120px; height: 80px; object-fit: cover; border-radius: 4px; }
.plist h2 { font-size: 17px; margin: 0 0 4px; }
.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; }
.pagination .current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin: 0 0 22px; }
.gtile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel-2); color: var(--text); }
.gtile:hover { border-color: var(--accent); text-decoration: none; }
.gtile__art { aspect-ratio: 3 / 4; display: flex; align-items: flex-end; padding: 10px; font-weight: 800; font-size: 15px; color: #fff; line-height: 1.2; position: relative; background: linear-gradient(160deg, var(--accent-c, #b8402f), #120c10); overflow: hidden; }
.gtile__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gtile__art span { position: relative; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.gtile__b { padding: 8px 10px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }

/* Search dialog */
.sdlg { width: min(640px, calc(100vw - 24px)); max-height: min(72vh, 640px); padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--text); margin-top: 10vh; }
.sdlg::backdrop { background: rgba(0, 0, 0, 0.6); }
.sdlg__in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sdlg__in input { flex: 1; border: 0; background: none; color: var(--text); font: 16px var(--font); outline: none; }
.sdlg ul { list-style: none; margin: 0; padding: 6px; max-height: calc(min(72vh, 640px) - 60px); overflow: auto; }
.sdlg li a { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 4px; color: var(--text); }
.sdlg li a[aria-selected="true"], .sdlg li a:hover { background: var(--panel-3); text-decoration: none; }
.sdlg li small { color: var(--muted); }
.sdlg li .k { margin-left: auto; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.sdlg .empty { padding: 10px; color: var(--muted); font-size: 14px; }

/* Hover preview card */
.pcard { position: absolute; z-index: 95; width: 280px; padding: 10px 12px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55); font-size: 13px; pointer-events: none; }
.pcard__k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 800; }
.pcard__t { font-weight: 800; font-size: 15px; margin: 2px 0; color: var(--text); }
.pcard p { margin: 4px 0 0; color: var(--text-2); }

/* Map */
.mapapp { display: grid; grid-template-columns: 260px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: 0 0 16px; height: min(78vh, 720px); }
.mp { background: var(--panel-2); border-right: 1px solid var(--line); padding: 10px; font-size: 13px; overflow: auto; }
.mp h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 12px 0 4px; }
.mcat { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; width: 100%; padding: 4px 6px; border: none; background: none; color: var(--text); font: 600 13px var(--font); text-align: left; border-radius: 4px; cursor: pointer; }
.mcat:hover { background: var(--panel-3); }
.mcat[aria-pressed="false"] { opacity: 0.4; }
.mdot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 800; background: var(--c); box-shadow: 0 0 0 2px var(--bg); }
.mcnt { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.mcanvas { background: #173246; min-height: 300px; }
.mpin { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 10px var(--font); background: var(--c); box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, 0.6); }
.mpin.is-done { opacity: 0.4; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); }
.leaflet-popup-content { margin: 10px 12px; font: 13px/1.5 var(--font); min-width: 210px; }
.leaflet-container a { color: var(--link); }
.mlabel { background: rgba(10, 11, 13, 0.85); color: #fff; border: 0; box-shadow: none; font: 600 11px var(--font); }
.mlabel::before { display: none; }
@media (max-width: 760px) {
  .mapapp { grid-template-columns: minmax(0, 1fr); grid-template-rows: 60vh auto; height: auto; }
  .mp { order: 2; border-right: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .rv, .sub-s { grid-template-columns: minmax(0, 1fr); }
  .plist li { grid-template-columns: minmax(0, 1fr); }
}

/* Featured games (homepage placements) */
.feat { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin: 0 0 22px; }
.feat__card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel-2); }
.feat__art { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(160deg, var(--accent), #120c10); overflow: hidden; }
.feat__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feat__label { position: absolute; top: 10px; left: 10px; padding: 2px 8px; border-radius: 3px; background: rgba(10, 8, 14, 0.8); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.feat__b { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.feat__t { font-size: 17px; font-weight: 800; line-height: 1.3; }
.feat__t a { color: var(--text); }
.feat__m { font-size: 12.5px; color: var(--muted); }
.feat__d { font-size: 14px; color: var(--text-2); margin: 0; line-height: 1.6; }
.feat__cta { align-self: flex-start; margin-top: auto; }
.feat__card--empty { align-items: center; justify-content: center; gap: 10px; min-height: 200px; padding: 24px; text-align: center; border-style: dashed; color: var(--muted); font-weight: 600; }
.feat__card--empty:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.feat__plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed currentColor; font-size: 24px; line-height: 1; }

/* News */
.ngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin: 0 0 24px; }
.ncard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel-2); }
.ncard__art { display: block; aspect-ratio: 16 / 9; background: linear-gradient(160deg, var(--accent), #120c10); overflow: hidden; }
.ncard__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ncard__b { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.ncard__t { font-size: 16.5px; font-weight: 800; line-height: 1.35; }
.ncard__t a { color: var(--text); }
.ncard__x { font-size: 14px; color: var(--text-2); margin: 0; line-height: 1.6; }
.ncard__m { margin-top: auto; font-size: 12.5px; color: var(--muted); }
.ncard--lead { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); margin: 0 0 24px; }
.ncard--lead .ncard__art { aspect-ratio: auto; min-height: 280px; }
.ncard--lead .ncard__b { padding: 24px 26px; justify-content: center; }
.ncard--lead .ncard__t { font-size: 24px; }
.ncard--lead .ncard__x { font-size: 15px; }
.news__filter { margin: 0 0 24px; gap: 8px; }
.news__filter .chip { padding: 4px 12px; font-size: 13px; }
.chip--on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.news__chips { margin-bottom: 4px; gap: 6px; }
.news__title { font-size: 32px; line-height: 1.25; margin-bottom: 12px; }
.news__dek { font-size: 17px; color: var(--text-2); line-height: 1.6; margin: 0 0 16px; }
.news__hero { margin: 4px 0 28px; }
.news__hero img { width: 100%; height: auto; border-radius: 6px; display: block; }
.news__hero figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.news__body { font-size: 16.5px; line-height: 1.8; }
.news__body p { margin-bottom: 20px; }
.news__tags { margin: 28px 0 0; gap: 8px; align-items: center; }
.news__author { display: flex; gap: 16px; align-items: flex-start; margin: 32px 0 0; padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.news__author img { border-radius: 50%; flex: none; }
.news__author-n { font-weight: 800; margin-bottom: 4px; }
.news__author p { margin: 0; font-size: 14px; color: var(--text-2); }
.news__pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0 0; }
.news__pn a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--text); font-weight: 700; }
.news__pn a:hover { border-color: var(--accent); text-decoration: none; }
.news__pn small { color: var(--muted); font-weight: 600; font-size: 12px; }
.news__pn-next { text-align: right; }
@media (max-width: 760px) {
  .ncard--lead { grid-template-columns: minmax(0, 1fr); }
  .ncard--lead .ncard__art { min-height: 200px; }
  .news__title { font-size: 26px; }
  .news__pn { grid-template-columns: minmax(0, 1fr); }
}

/* Footer */
.foot { border-top: 1px solid var(--line); background: #0b0910; color: var(--muted); font-size: 14px; margin-top: 40px; }
.foot__in { max-width: 1240px; margin: 0 auto; padding: 36px 16px 28px; display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 28px 40px; }
.foot__name { font-weight: 800; font-size: 17px; color: var(--text); }
.foot__brand p { margin: 8px 0 0; max-width: 360px; line-height: 1.6; }
.foot__h { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); margin: 0 0 12px; }
.foot__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot__col a { color: var(--muted); }
.foot__col a:hover { color: var(--text); text-decoration: none; }
.foot__bar { border-top: 1px solid var(--line); max-width: 1240px; margin: 0 auto; padding: 16px; font-size: 13px; }
@media (max-width: 640px) {
  .foot__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-top: 28px; }
  .foot__brand { grid-column: 1 / -1; }
}

/* Main navigation */
.hdr__nav .nav { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; }
.hdr__nav .nav > li { position: relative; display: flex; align-items: center; }
.hdr__nav .nav a { display: block; white-space: nowrap; }
.nav__more { display: grid; place-items: center; width: 22px; height: 28px; margin-left: -6px; border: 0; background: none; color: #c4c8ce; cursor: pointer; border-radius: 4px; }
.nav__more:hover { color: #fff; }
.hdr__nav .nav__sub { position: absolute; top: 100%; left: 0; min-width: 190px; list-style: none; margin: 6px 0 0; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); display: none; z-index: 60; }
.hdr__nav .nav__sub::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.hdr__nav .nav__has:hover > .nav__sub, .hdr__nav .nav__has:focus-within > .nav__sub, .hdr__nav .nav__has.is-open > .nav__sub { display: block; }
.hdr__nav .nav__sub a { color: var(--text); padding: 8px 10px; border-radius: 6px; }
.hdr__nav .nav__sub a:hover { background: var(--panel-2); }
/* Drawer: same menu, children indented under Games */
.drawer .nav { list-style: none; margin: 0 0 14px; padding: 0; }
.drawer .nav__sub { list-style: none; margin: 0; padding: 0 0 0 14px; }
.drawer .nav__sub a { font-weight: 500; color: var(--text-2); }
.drawer a[aria-current] { color: var(--accent); }
@media (max-width: 1140px) and (min-width: 981px) {
  .hdr__nav .nav a { padding: 6px 7px; font-size: 13px; }
  .hdr__search { max-width: 300px; }
}

/* Featured game: price and stores */
.feat__price { font-size: 14px; color: var(--text); margin: 0 0 10px; }
.feat__price span, .feat__buy > span { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.feat__buy { margin: 0 0 12px; }
.feat__stores { display: flex; flex-wrap: wrap; gap: 6px; }
.feat__stores .btn { font-size: 13px; padding: 5px 10px; }

/* Homepage hero */
.hero { position: relative; overflow: hidden; border-radius: 10px; margin: 0 0 28px; min-height: 300px; display: flex; align-items: flex-end;
  background:
    radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--accent) 55%, transparent) 0%, transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(80, 60, 160, 0.55) 0%, transparent 65%),
    linear-gradient(160deg, #1d1428 0%, #0d0a13 100%);
  border: 1px solid var(--line); }
.hero::before { content: ''; position: absolute; inset: 0; opacity: 0.18; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(180deg, transparent 0%, #000 45%, transparent 100%); }
.hero--img::before { display: none; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero--img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 8, 14, 0.92) 0%, rgba(10, 8, 14, 0.55) 45%, rgba(10, 8, 14, 0.1) 100%); }
.hero__b { position: relative; z-index: 1; padding: 36px 36px 32px; max-width: 680px; }
.hero__t { font-size: 34px; line-height: 1.15; font-weight: 800; color: #fff; margin: 0 0 12px; }
.hero__x { font-size: 16.5px; line-height: 1.6; color: #e6e1ef; margin: 0 0 18px; }
@media (max-width: 640px) {
  .hero { min-height: 260px; border-radius: 8px; }
  .hero__b { padding: 24px 20px 22px; }
  .hero__t { font-size: 26px; }
  .hero__x { font-size: 15px; }
}

/* Map placing mode */
.mplace { margin: 0 0 16px; }
.mplace p { margin: 0 0 10px; }
.mplace__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mplace__row select { min-width: 260px; }
.mplace__msg { font-size: 13px; color: var(--text-2); }

/* Contact form */
.cform { max-width: 640px; margin: 8px 0 24px; }
.cform__row { margin: 0 0 14px; }
.cform__row label { display: block; font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.cform__row .inp { width: 100%; height: 38px; }
.cform__row textarea.inp { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.cform__note { font-size: 13px; margin: 0 0 14px; }
.cform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform__ok { border-left: 3px solid #2a8f5a; max-width: 640px; }
.cform__err { border-left: 3px solid #e5534b; max-width: 640px; }
.cform__ok p, .cform__err p { margin: 0; }

/* Hero buttons: Tactical RPGs and Turn-Based RPGs side by side */
.hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.hero__ctas .btn { min-width: 160px; justify-content: center; padding: 9px 16px; font-size: 14px; }
.hero__ctas .btn:not(.btn--accent) { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.35); color: #fff; }
