/* Valdarian site — built on the Valdarian design system (one theme, Dark). */
:root {
  color-scheme: dark;
  --surface-0: #070505; --surface-1: #0c0908; --surface-2: #140f0b; --surface-3: #19140f; --surface-select: #211811;
  --line-panel: #3a2b1e; --line-card: #332619; --line-card-hi: #443420; --line-rule: #2b1a0e; --line-rule-strong: #6b3f1d; --line-dashed: #53391c; --gold-tab-line: #b4750b; --steel: #3d3a37;
  --parchment: #f6e2ae; --parchment-bright: #fff1d0; --ink: #ead9b0; --ink-soft: #c5b086; --ink-muted: #948465; --ink-faint: #8f7e54; --ink-label: #a3a3a3; --ink-number: #ffffff;
  --gold: #ffc56e; --gold-label: #d6bc7a; --gold-tab: #efd982; --gold-value: #fbbf24;
  --ember: #e98937; --ember-glow: #f39647; --ember-edge: #c46420; --crimson: #6c2115; --crimson-deep: #2f0b0a; --on-crimson: #f1e6d2;
  --stat-strength: #f87171; --stat-agility: #4ade80; --stat-intuition: #60a5fa; --stat-endurance: #fb923c; --stat-intellect: #c084fc; --stat-wisdom: #facc15;
  --r-common: #b9b2a5; --r-uncommon: #4ade80; --r-rare: #60a5fa; --r-epic: #c084fc; --r-legendary: #fbbf24; --r-mythic: #f87171;
  --bonus: #40b56a;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px;
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 10px; --radius-xl: 14px; --radius-pill: 9999px;
  --glow-ember: 0 0 12px rgba(243, 150, 71, 0.55); --glow-gold: 0 0 18px rgba(242, 198, 96, 0.35); --panel-drop: 0 18px 44px rgba(0, 0, 0, 0.65);
  --font-display: "Cinzel", "Cormorant SC", Georgia, serif;
  --font-serif: "Cormorant Garamond", ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1240px;
  --top-h: 72px;
}
* { box-sizing: border-box; }
html { background: var(--surface-0); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); }
body { margin: 0; background: var(--surface-0); color: var(--ink); font: 400 17px/1.65 var(--font-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-label); }
a:hover { color: var(--gold); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; color: var(--parchment); letter-spacing: 0.03em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.08; }
h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.12; }
h3 { font-size: 19px; line-height: 1.3; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 700px) { .wrap { padding-left: 28px; padding-right: 28px; } }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 60; background: var(--surface-1); color: var(--parchment); padding: 8px 14px; border-radius: var(--radius-md); }
.skip:focus { left: 8px; }
.staging { position: relative; z-index: 31; background: repeating-linear-gradient(45deg, #3a1a0e 0 12px, #2a120a 12px 24px); color: var(--gold); text-align: center; font: 700 11px/1 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; padding: 7px; }
.eyebrow { font: 600 12px/1.4 var(--font-sans); letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 10px; }
.eyebrow.ember { color: var(--ember-glow); }
.lead { max-width: 62ch; font-size: 19px; color: var(--ink); margin-top: 14px; }
.muted { color: var(--ink-muted); }
.stack { display: flex; flex-direction: column; gap: var(--space-8); padding-bottom: 64px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(9, 7, 6, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(58, 43, 30, 0.9); transition: background 0.25s, border-color 0.25s; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--crimson) 15%, var(--ember-glow) 40%, var(--gold) 50%, var(--ember-glow) 60%, var(--crimson) 85%, transparent); opacity: 0.6; }
.top-home:not(.scrolled) { background: linear-gradient(180deg, rgba(7, 5, 5, 0.85), rgba(7, 5, 5, 0)); backdrop-filter: none; -webkit-backdrop-filter: none; border-color: transparent; }
.top-home:not(.scrolled)::after { opacity: 0; }
.top-home { margin-bottom: calc(-1 * var(--top-h)); }
.top-row { display: flex; align-items: center; gap: var(--space-6); height: var(--top-h); }
.brand { flex: none; }
.brand img { height: 44px; width: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8)); }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.nav a { position: relative; padding: 10px 14px; text-decoration: none; color: var(--ink-soft); font: 600 14px/18px var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.nav a:hover { color: var(--parchment); }
.nav a[aria-current="page"] { color: var(--gold-tab); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--ember-glow), transparent); box-shadow: var(--glow-ember); }
.top-actions { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; }
.langs { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-pill); background: rgba(7, 5, 5, 0.7); border: 1px solid var(--line-panel); }
.langs a { min-width: 38px; height: 28px; display: grid; place-items: center; padding: 0 8px; border-radius: var(--radius-pill); text-decoration: none; color: var(--ink-muted); font: 700 12px/1 var(--font-sans); letter-spacing: 0.06em; }
.langs a:hover { color: var(--ink); }
.langs a[aria-current="true"] { background: linear-gradient(180deg, var(--surface-select), var(--surface-2)); color: var(--parchment-bright); box-shadow: inset 0 0 0 1px var(--line-card-hi), inset 0 -2px 0 var(--ember-edge); }
.m-menu { display: none; position: relative; }
.m-menu summary { list-style: none; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; border-radius: var(--radius-md); border: 1px solid var(--line-panel); background: rgba(7, 5, 5, 0.7); cursor: pointer; }
.m-menu summary::-webkit-details-marker { display: none; }
.m-menu summary span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--parchment); transition: transform 0.2s, opacity 0.2s; }
.m-menu[open] summary span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.m-menu[open] summary span:nth-child(2) { opacity: 0; }
.m-menu[open] summary span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.m-panel { position: fixed; left: 0; right: 0; top: var(--m-top, 72px); bottom: 0; z-index: 40; overflow-y: auto; padding: 24px 20px calc(32px + env(safe-area-inset-bottom, 0px)); background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(108, 33, 21, 0.4), transparent 70%), rgba(7, 5, 5, 0.98); display: flex; flex-direction: column; gap: 24px; }
.m-panel nav:first-child { display: flex; flex-direction: column; }
.m-panel nav:first-child a { padding: 14px 4px; border-bottom: 1px solid var(--line-rule); text-decoration: none; color: var(--parchment); font: 600 22px/1.2 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; }
.m-panel nav:first-child a[aria-current="page"] { color: var(--gold); }
.m-panel .langs { align-self: flex-start; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 42px; padding: 0 var(--space-6); border-radius: var(--radius-pill); border: 1px solid var(--line-panel); background: var(--surface-1); color: var(--ink-soft); font: 600 14px/1.2 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; text-align: center; cursor: pointer; box-shadow: inset 0 0 0 1px var(--surface-0); transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s; }
.btn:hover { border-color: var(--ember-edge); color: var(--parchment); }
.btn-crimson { border-color: var(--ember-edge); color: var(--on-crimson); background: radial-gradient(ellipse 60% 90% at 50% 120%, rgba(243, 150, 71, 0.6), rgba(243, 150, 71, 0) 70%), linear-gradient(180deg, #8a2a19, var(--crimson-deep)); box-shadow: 0 0 0 1px var(--surface-0), var(--glow-ember); }
.btn-crimson:hover { color: #fff; box-shadow: 0 0 0 1px var(--surface-0), 0 0 22px rgba(243, 150, 71, 0.75); transform: translateY(-1px); }
.btn-ghost { background: rgba(12, 9, 8, 0.55); border-color: rgba(214, 188, 122, 0.45); color: var(--parchment); backdrop-filter: blur(4px); }
.btn-ghost:hover { border-color: var(--gold); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 var(--space-4); font-size: 12px; }
.btn-lg { min-height: 52px; padding: 12px var(--space-8); font-size: 15px; letter-spacing: 0.14em; }
.btn-xl { min-height: 58px; padding: 14px 40px; font-size: 16px; letter-spacing: 0.16em; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.actions.center { justify-content: center; }
.more { font: 600 14px/1 var(--font-sans); color: var(--gold-label); text-decoration: none; white-space: nowrap; }
.more:hover { color: var(--gold); }

/* ---------- crumbs & heads ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: var(--space-6); font: 500 13px/1.4 var(--font-sans); color: var(--ink-muted); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.page-head { padding-top: var(--space-6); padding-bottom: var(--space-8); }
.entry-head { display: flex; gap: var(--space-6); align-items: center; }
.nf { padding-block: 96px; }

/* ---------- home hero ---------- */
.hero2 { position: relative; min-height: min(100svh, 980px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; padding-top: calc(var(--top-h) + 24px); }
.hero2-bg { position: absolute; inset: 0; z-index: -2; }
.hero2-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; filter: brightness(1.18) saturate(1.1); transform: scale(1.06); animation: drift 26s ease-in-out infinite alternate; }
.hero2::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 70% 55% at 50% 42%, rgba(7, 5, 5, 0.1), rgba(7, 5, 5, 0.6) 75%), linear-gradient(180deg, rgba(7, 5, 5, 0.5) 0%, rgba(7, 5, 5, 0.05) 30%, rgba(7, 5, 5, 0.5) 72%, var(--surface-0) 100%); }
@keyframes drift { from { transform: scale(1.06) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }
.hero2-in { text-align: center; display: flex; flex-direction: column; align-items: center; padding-bottom: 44px; }
.hero2-logo { width: min(440px, 74vw); height: auto; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 40px rgba(243, 150, 71, 0.18)); margin-bottom: 18px; }
.hero2-logo.is-wide { width: min(620px, 88vw); }
.hero2 h1 { font-size: clamp(30px, 4.6vw, 60px); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; max-width: 18ch; text-shadow: 0 3px 24px rgba(0, 0, 0, 0.95); background: linear-gradient(180deg, #fff6dc 30%, #f2c672 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero2-lead { max-width: 58ch; margin-top: 18px; font-size: clamp(16px, 1.6vw, 20px); color: var(--ink); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95); }
.embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.embers i { position: absolute; bottom: -10px; left: var(--x); width: 3px; height: 3px; border-radius: 50%; background: #ffb46a; box-shadow: 0 0 8px 2px rgba(243, 150, 71, 0.8); opacity: 0; animation: rise var(--d) linear var(--s) infinite; }
@keyframes rise { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 10% { opacity: 0.9; } 100% { transform: translate3d(40px, -90vh, 0); opacity: 0; } }
.hero2 > .wrap { width: 100%; }
.hero-stats { margin: 0 auto; max-width: 1040px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid rgba(214, 188, 122, 0.22); border-radius: var(--radius-xl); background: linear-gradient(180deg, rgba(20, 15, 11, 0.82), rgba(7, 5, 5, 0.9)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--panel-drop); overflow: hidden; }
.hero-stats > * { display: flex; flex-direction: column-reverse; align-items: center; padding: 18px 8px; text-decoration: none; border-left: 1px solid rgba(214, 188, 122, 0.14); transition: background 0.2s; }
.hero-stats > :first-child { border-left: 0; }
.hero-stats a:hover { background: rgba(108, 33, 21, 0.35); }
.hero-stats dd { margin: 0; font: 700 clamp(26px, 3vw, 38px)/1 var(--font-display); color: var(--parchment-bright); text-shadow: 0 0 18px rgba(243, 150, 71, 0.35); font-variant-numeric: tabular-nums; }
.hero-stats dt { margin-top: 8px; font: 600 11px/1.2 var(--font-sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.hero-stats-note { text-align: center; color: var(--ink-faint); font-size: 12px; letter-spacing: 0.08em; margin: 10px 0 0; }

/* ---------- sections ---------- */
.sec { position: relative; padding-block: clamp(64px, 9vw, 120px); }
.sec + .sec::before { content: ""; position: absolute; top: 0; left: 50%; width: min(760px, 80%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--line-rule-strong), transparent); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-6); flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head > div { max-width: 760px; }
.sec-head.center { justify-content: center; text-align: center; }
.sec-head.center > div { margin-inline: auto; }
.sec-head h2::after { content: ""; display: block; width: 120px; height: 12px; margin-top: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M0 6h48M72 6h48' stroke='%23b4750b' stroke-width='1'/%3E%3Cpath d='M60 1l5 5-5 5-5-5z' fill='%23f39647'/%3E%3C/svg%3E") no-repeat; }
.sec-head.center h2::after { margin-inline: auto; }
.sec-lead { margin-top: 16px; font-size: 18px; color: var(--ink-soft); max-width: 62ch; }
.sec-head.center .sec-lead { margin-inline: auto; }
.lore { max-width: 72ch; color: var(--ink-soft); font: italic 500 21px/1.55 var(--font-serif); margin: calc(-1 * var(--space-4)) 0 var(--space-8); }

/* showcase tabs */
.show { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.show-tabs { display: flex; flex-direction: column; gap: 4px; }
.show-tabs button { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: var(--radius-lg); border: 1px solid transparent; background: none; cursor: pointer; color: var(--ink-soft); font: 600 16px/1.25 var(--font-display); letter-spacing: 0.04em; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.show-tabs button .n { font: 700 12px/1 var(--font-sans); color: var(--ink-faint); letter-spacing: 0.1em; }
.show-tabs button:hover { color: var(--parchment); background: var(--surface-2); }
.show-tabs button[aria-selected="true"] { color: var(--parchment-bright); border-color: var(--line-card-hi); background: linear-gradient(90deg, rgba(108, 33, 21, 0.55), rgba(20, 15, 11, 0.6)); box-shadow: inset 3px 0 0 var(--ember-glow); }
.show-tabs button[aria-selected="true"] .n { color: var(--ember-glow); }
.show-panel { margin: 0; }
.frame { position: relative; border-radius: var(--radius-xl); padding: 6px; background: linear-gradient(135deg, #6b4a22, #2a1a0d 30%, #5a3a18 60%, #2a1a0d); box-shadow: var(--panel-drop), 0 0 60px rgba(108, 33, 21, 0.35); }
.frame img { border-radius: 10px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.show-panel figcaption { margin-top: 16px; color: var(--ink-soft); font-size: 17px; max-width: 70ch; }
.show-panel figcaption strong { color: var(--parchment); font-family: var(--font-display); font-weight: 600; letter-spacing: 0.04em; margin-right: 6px; }

/* turn steps */
.sec-turn { background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(108, 33, 21, 0.18), transparent 70%); }
.turn { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); counter-reset: s; }
.turn li { position: relative; padding: 28px 22px 24px; border-radius: var(--radius-xl); border: 1px solid var(--line-card); background: linear-gradient(180deg, var(--surface-2), var(--surface-1)); box-shadow: inset 0 1px 0 var(--line-card-hi); }
.turn-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 18px; background: radial-gradient(circle at 50% 40%, var(--crimson), var(--crimson-deep) 75%); border: 1px solid var(--ember-edge); box-shadow: var(--glow-ember); }
.turn-icon img { width: 40px; height: 40px; }
.turn-n { position: absolute; top: 18px; right: 20px; font: 700 40px/1 var(--font-display); color: rgba(214, 188, 122, 0.12); }
.turn h3 { margin-bottom: 8px; }
.turn p { color: var(--ink-soft); font-size: 15px; }

/* class picker */
.sec-classes { background: linear-gradient(180deg, var(--surface-0), rgba(7, 5, 5, 0.6) 25%, rgba(7, 5, 5, 0.75) 75%, var(--surface-0)), var(--bg) center / cover no-repeat; }
.picker-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: var(--space-6); }
.picker-tabs button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: rgba(12, 9, 8, 0.75); cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.picker-tabs button:hover { border-color: var(--ember-edge); transform: translateY(-2px); }
.picker-tabs button[aria-selected="true"] { border-color: var(--ember); background: linear-gradient(180deg, rgba(108, 33, 21, 0.7), rgba(20, 15, 11, 0.85)); box-shadow: var(--glow-ember); }
.pt-name { font: 600 13px/1.2 var(--font-display); letter-spacing: 0.06em; color: var(--parchment); text-align: center; }
.picker-panel { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(24px, 4vw, 48px); border-radius: 18px; border: 1px solid var(--line-panel); background: linear-gradient(135deg, rgba(20, 15, 11, 0.92), rgba(7, 5, 5, 0.92)); box-shadow: var(--panel-drop); }
.pp-emblem { display: grid; place-items: center; }
.ring.ring-hero { width: min(260px, 60vw); height: min(260px, 60vw); border-width: 3px; border-color: var(--ember); box-shadow: 0 0 0 1px var(--surface-0), 0 0 60px rgba(243, 150, 71, 0.35), inset 0 0 40px rgba(0, 0, 0, 0.6); }
.pp-body h3 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 10px; }
.pp-desc { font: italic 500 21px/1.5 var(--font-serif); color: var(--ink); margin-bottom: 18px; }
.pp-body .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; margin-bottom: 18px; }
.pp-specs { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pp-specs li { padding: 12px 14px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: rgba(7, 5, 5, 0.6); display: flex; flex-direction: column; gap: 4px; }
.pp-specs b { font: 600 15px/1.2 var(--font-display); color: var(--gold-tab); letter-spacing: 0.04em; }
.pp-specs span { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }

/* bestiary rail */
.sec-best { background: radial-gradient(ellipse 60% 60% at 70% 40%, rgba(64, 20, 12, 0.35), transparent 70%); }
.best-rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 22vw, 280px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px max(16px, calc((100vw - var(--wrap)) / 2 + 28px)) 24px; scroll-padding-inline: max(16px, calc((100vw - var(--wrap)) / 2 + 28px)); scrollbar-width: thin; scrollbar-color: var(--line-rule-strong) transparent; }
.mcard { scroll-snap-align: start; position: relative; display: flex; flex-direction: column; border-radius: var(--radius-xl); border: 1px solid var(--line-card); overflow: hidden; text-decoration: none; background: radial-gradient(ellipse 80% 55% at 50% 62%, rgba(140, 48, 22, 0.55), transparent 70%), linear-gradient(180deg, #1a120c, #0a0706); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
a.mcard:hover { transform: translateY(-4px); border-color: var(--ember); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(243, 150, 71, 0.25); }
.mc-art { display: block; aspect-ratio: 2 / 3; }
.mc-art img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.8)); transition: transform 0.35s; }
a.mcard:hover .mc-art img { transform: scale(1.04); }
.mc-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 16px; background: linear-gradient(180deg, transparent, rgba(7, 5, 5, 0.92) 45%); display: flex; flex-direction: column; gap: 3px; }
.mc-boss { align-self: flex-start; padding: 2px 8px; border-radius: var(--radius-xs); background: var(--crimson); border: 1px solid var(--ember-edge); font: 700 10px/1.4 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.mc-name { font: 600 19px/1.2 var(--font-display); color: var(--parchment); letter-spacing: 0.03em; }
.mc-meta { font-size: 13px; color: var(--ink-soft); }

/* armory */
.rarity-ladder { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rarity-ladder li { padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); background: color-mix(in srgb, var(--rc) 10%, transparent); color: var(--rc); font: 700 12px/1.3 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; }
.r-common { --rc: var(--r-common); } .r-uncommon { --rc: var(--r-uncommon); } .r-rare { --rc: var(--r-rare); } .r-epic { --rc: var(--r-epic); } .r-legendary { --rc: var(--r-legendary); } .r-mythic { --rc: var(--r-mythic); }
.arm-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.icard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 12px 16px; border-radius: var(--radius-xl); border: 1px solid var(--line-card); background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 62%), linear-gradient(180deg, var(--surface-2), var(--surface-0)); text-decoration: none; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
a.icard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--rc) 70%, transparent); box-shadow: 0 0 26px color-mix(in srgb, var(--rc) 30%, transparent); }
.ic-art { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.ic-art img { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.75)); }
.ic-name { font: 600 15px/1.25 var(--font-display); color: var(--rc); letter-spacing: 0.02em; }
.ic-meta { font-size: 12px; color: var(--ink-muted); }

/* codex teaser */
.sec-codex { background: linear-gradient(180deg, var(--surface-0), rgba(7, 5, 5, 0.72) 20%, rgba(7, 5, 5, 0.82) 80%, var(--surface-0)), var(--bg) center / cover no-repeat; }
.codex-teaser { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.ct-text h2 { margin-bottom: 4px; }
.ct-total { margin: 22px 0 24px; color: var(--ink-soft); font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; }
.ct-total b { display: block; font: 700 clamp(48px, 6vw, 72px)/1 var(--font-display); color: var(--gold); text-shadow: 0 0 30px rgba(243, 150, 71, 0.35); letter-spacing: 0.02em; text-transform: none; }
.ct-search { display: flex; gap: 8px; margin-bottom: 16px; max-width: 520px; }
.ct-search input { flex: 1; min-width: 0; height: 48px; padding: 0 18px; border-radius: var(--radius-pill); border: 1px solid var(--line-panel); background: rgba(7, 5, 5, 0.8); color: var(--parchment); font: 500 16px/1 var(--font-sans); }
.ct-search input:focus { outline: none; border-color: var(--ember); box-shadow: var(--glow-ember); }
.ct-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ct-cats a { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: rgba(12, 9, 8, 0.82); text-decoration: none; transition: border-color 0.2s, background 0.2s; }
.ct-cats a:hover { border-color: var(--ember-edge); background: rgba(47, 11, 10, 0.85); }
.ct-icon { grid-row: span 2; width: 34px; height: 34px; }
.ct-name { font: 600 14px/1.2 var(--font-display); color: var(--parchment); letter-spacing: 0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-n { font: 700 13px/1.2 var(--font-sans); color: var(--gold); font-variant-numeric: tabular-nums; }

/* news + community */
.news-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.news-grid .sec-head { margin-bottom: 24px; }
.comm { display: flex; flex-direction: column; gap: 10px; }
.comm-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-xl); border: 1px solid var(--line-card); background: linear-gradient(90deg, var(--surface-2), var(--surface-1)); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.comm-card:hover { border-color: var(--ember-edge); transform: translateX(3px); }
.cc-ic { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 40%, var(--crimson), var(--crimson-deep) 75%); border: 1px solid var(--line-card-hi); }
.cc-ic img { width: 32px; height: 32px; }
.comm-card b { display: block; font: 600 17px/1.2 var(--font-display); color: var(--parchment); letter-spacing: 0.04em; }
.comm-card span span { color: var(--ink-soft); font-size: 14px; }
.comm-card .arr { color: var(--ember-glow); font-size: 20px; }

/* final call to action */
.cta2 { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding-block: clamp(96px, 14vw, 180px); }
.cta2-bg { position: absolute; inset: 0; z-index: -1; }
.cta2-bg img { width: 100%; height: 100%; object-fit: cover; }
.cta2::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--surface-0), rgba(7, 5, 5, 0.45) 35%, rgba(7, 5, 5, 0.55) 65%, var(--surface-0)); }
.cta2 h2 { font-size: clamp(36px, 6vw, 72px); text-transform: uppercase; letter-spacing: 0.06em; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.9); }
.cta2 p { margin: 16px auto 32px; max-width: 52ch; color: var(--ink); font-size: 19px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); }

/* ---------- shared cards (inner pages) ---------- */
.shots-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.shots-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.shot { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.shot img { border-radius: var(--radius-lg); border: 1px solid var(--line-card); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.shot figcaption { color: var(--ink-soft); font-size: 15px; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-3); }
.class-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px; border-radius: var(--radius-xl); border: 1px solid var(--line-card); background: linear-gradient(180deg, var(--surface-2), var(--surface-1)); box-shadow: inset 0 1px 0 var(--line-card-hi); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
a.class-card:hover { border-color: var(--ember-edge); transform: translateY(-2px); }
.cc-body { display: flex; flex-direction: column; min-width: 0; }
.cc-name { font: 600 20px/1.25 var(--font-display); color: var(--parchment); }
.cc-role { font-size: 14px; color: var(--ink-soft); }
.cc-meta { font-size: 13px; color: var(--ink-faint); }
.ring { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--steel); background: radial-gradient(circle at 50% 42%, var(--crimson), var(--crimson-deep) 75%); box-shadow: 0 0 0 1px var(--surface-0); }
.ring img { width: 62%; height: 62%; object-fit: contain; }
.ring-xl { width: 136px; height: 136px; box-shadow: 0 0 0 1px var(--surface-0), 0 0 40px rgba(243, 150, 71, 0.35); border-color: var(--ember); }
.ring-sm { width: 32px; height: 32px; border-width: 1px; }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
@media (min-width: 1000px) {
  .zone-grid-feature { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .zone-grid-feature > :first-child { grid-column: span 2; grid-row: span 2; }
  .zone-grid-feature > :first-child .zc-img { aspect-ratio: auto; flex: 1; }
  .zone-grid-feature > :first-child .zc-name { font-size: 26px; }
}
.zone-card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius-xl); border: 1px solid var(--line-card); background: var(--surface-2); overflow: hidden; text-decoration: none; min-width: 0; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
a.zone-card:hover { border-color: var(--ember-edge); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6); }
.zc-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-0); }
.zc-empty { display: block; background: radial-gradient(circle at 50% 120%, rgba(108, 33, 21, 0.35), rgba(0, 0, 0, 0) 60%), repeating-linear-gradient(60deg, rgba(83, 57, 28, 0.25) 0 1px, transparent 1px 14px), var(--surface-0); }
.zc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.zc-name { font: 600 18px/1.3 var(--font-display); color: var(--parchment); }
.zc-meta { font-size: 13px; color: var(--ink-soft); }
.zc-soon { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.04em; }
.is-pending { cursor: default; }
span.zone-card { opacity: 0.85; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-4); }
.post-grid.one { grid-template-columns: minmax(0, 1fr); }
.post-card { display: flex; flex-direction: column; border-radius: var(--radius-xl); border: 1px solid var(--line-card); background: var(--surface-2); overflow: hidden; text-decoration: none; transition: border-color 0.2s; }
.post-card:hover { border-color: var(--ember-edge); }
.pc-img { aspect-ratio: 2.37 / 1; object-fit: cover; width: 100%; }
.pc-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.pc-body time { font: 700 12px/1 var(--font-sans); color: var(--gold); letter-spacing: 0.06em; }
.pc-title { font: 600 22px/1.25 var(--font-display); color: var(--parchment); }
.pc-text { color: var(--ink-soft); font-size: 15px; }
.post { max-width: 820px; padding-bottom: 64px; }
.post-hero { border-radius: var(--radius-xl); border: 1px solid var(--line-card); margin-bottom: var(--space-6); width: 100%; aspect-ratio: 2.37 / 1; object-fit: cover; }
.post-body { display: flex; flex-direction: column; gap: 18px; font-size: 18px; color: var(--ink); margin-bottom: var(--space-8); }
.prose-sections { display: flex; flex-direction: column; gap: 72px; padding-bottom: 72px; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature.flip .feature-text { order: 2; }
.feature-text { display: flex; flex-direction: column; gap: 16px; }
.feature-text p { color: var(--ink); font-size: 18px; max-width: 58ch; }
.feature-art img { border-radius: var(--radius-xl); border: 1px solid var(--line-card-hi); box-shadow: var(--panel-drop), 0 0 50px rgba(108, 33, 21, 0.3); }

/* panels, tables, entries */
.panel { position: relative; background: var(--surface-1); border: 1px solid var(--line-panel); border-radius: var(--radius-xl); box-shadow: inset 0 0 0 1px var(--surface-0), var(--panel-drop); padding: 18px; min-width: 0; }
.panel.glow::before { content: ""; position: absolute; left: var(--space-4); right: var(--space-4); top: -2px; height: 4px; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--crimson), var(--ember-glow) 25%, var(--gold) 50%, var(--ember-glow) 75%, var(--crimson)); box-shadow: var(--glow-ember); }
.panel-title { font: 600 15px/18px var(--font-display); letter-spacing: 0.08em; margin: 0 0 var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--line-rule-strong); }
.section-label { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-3); font: 600 14px/16px var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-label); }
.section-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-rule-strong), transparent); }
.table-wrap { overflow-x: auto; border-radius: var(--radius-xl); border: 1px solid var(--line-panel); background: var(--surface-1); }
table.db { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
table.db th { text-align: left; padding: 11px 14px; font: 700 11px/14px var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-label); background: var(--surface-3); border-bottom: 1px solid var(--line-rule-strong); white-space: nowrap; }
table.db td { padding: 10px 14px; border-bottom: 1px solid var(--line-rule); color: var(--ink); }
table.db tr:last-child td { border-bottom: 0; }
table.db tbody tr:hover td { background: rgba(108, 33, 21, 0.15); }
table.db .num { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-number); }
.ent { font: 600 15px/1.3 var(--font-display); color: var(--parchment); text-decoration: none; letter-spacing: 0.02em; }
a.ent:hover { color: var(--gold); text-decoration: underline; text-decoration-color: var(--ember-edge); text-underline-offset: 3px; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-8); align-items: start; padding-bottom: 72px; }
.entry-main { display: flex; flex-direction: column; gap: var(--space-8); min-width: 0; }
.entry-main p { max-width: 70ch; }
.entry-aside { display: flex; flex-direction: column; gap: var(--space-4); position: sticky; top: calc(var(--top-h) + 16px); }
.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: 46% 1fr; gap: var(--space-3); padding: 9px 0; border-bottom: 1px solid var(--line-rule); font-size: 14px; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--ink-label); font: 700 11px/20px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; }
.facts dd { margin: 0; color: var(--ink); font-weight: 600; }
.stats { display: flex; flex-direction: column; }
.stat { display: grid; grid-template-columns: minmax(0, 1fr) 2em minmax(80px, 1.4fr); gap: var(--space-3); align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-rule); }
.stat:last-child { border-bottom: 0; }
.stat .sn { font: 700 13px/16px var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--c); }
.stat .sv { font: 700 17px/20px var(--font-sans); color: var(--ink-number); text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: var(--radius-pill); background: var(--surface-0); box-shadow: inset 0 0 0 1px var(--line-card); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%), var(--c); box-shadow: 0 0 6px var(--c); }
.stat-str { --c: var(--stat-strength); } .stat-agi { --c: var(--stat-agility); } .stat-int { --c: var(--stat-intuition); }
.stat-end { --c: var(--stat-endurance); } .stat-inte { --c: var(--stat-intellect); } .stat-wis { --c: var(--stat-wisdom); }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.spec { padding: 16px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-2); box-shadow: inset 0 1px 0 var(--line-card-hi); }
.spec h3 { margin-bottom: 6px; }
.spec p { color: var(--ink-soft); font-size: 15px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 8px; height: 8px; transform: rotate(45deg); border-radius: 2px; }
.ticks.plus li::before { background: var(--bonus); }
.ticks.minus li::before { background: var(--ember-edge); }
.bonus { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bonus li { padding: 4px 10px; border-radius: var(--radius-xs); border: 1px solid var(--line-card-hi); background: var(--surface-0); font: 700 13px/1.4 var(--font-sans); color: var(--gold-value); }
.sib { display: flex; flex-direction: column; }
.sib-link { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-rule); text-decoration: none; font: 600 15px/1.3 var(--font-display); color: var(--parchment); }
.sib-link:last-child { border-bottom: 0; }
.sib-link:hover { color: var(--gold); }
.sib-link .lvl { margin-left: auto; font: 700 12px/1 var(--font-sans); color: var(--gold); }
.map { margin: 0; border-radius: var(--radius-xl); border: 1px solid var(--line-panel); overflow: hidden; background: radial-gradient(ellipse 70% 60% at 50% 60%, var(--surface-2), var(--surface-0)); }
.map img { width: 100%; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pcard { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-2); text-decoration: none; }
a.pcard:hover { border-color: var(--ember-edge); }
.pc-face { width: 56px; height: 56px; border-radius: var(--radius-md); object-fit: cover; object-position: 50% 8%; background: radial-gradient(circle at 50% 40%, #2a1c12, #0c0807); }
.pcard b { display: block; font: 600 15px/1.25 var(--font-display); color: var(--parchment); letter-spacing: 0.02em; }
.pcard i { font: 500 12px/1.3 var(--font-sans); color: var(--ink-muted); font-style: normal; }
.pcard:not(:has(img)) { grid-template-columns: minmax(0, 1fr); padding-left: 12px; }
.entry-main .doc-list a { color: var(--parchment); }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pills li { padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-card-hi); background: var(--surface-2); font: 600 14px/1.3 var(--font-display); color: var(--parchment); }

/* ---------- codex ---------- */
.codex-hero { position: relative; padding: 40px 0 36px; background: linear-gradient(180deg, rgba(7, 5, 5, 0.55), var(--surface-0)), var(--bg) center 30% / cover no-repeat; border-bottom: 1px solid var(--line-rule); }
.cx-snap { margin-top: 14px; color: var(--ink-faint); font-size: 13px; }
.codex { padding-top: 20px; padding-bottom: 72px; }
.cx-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: var(--line-rule-strong) transparent; }
.cx-cat { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line-card); background: var(--surface-1); text-decoration: none; color: var(--ink-soft); font: 600 13px/1 var(--font-display); letter-spacing: 0.06em; transition: border-color 0.2s, background 0.2s, color 0.2s; }
.cx-cat img { width: 22px; height: 22px; }
.cx-cat b { font: 700 12px/1 var(--font-sans); color: var(--ink-faint); }
.cx-cat:hover { border-color: var(--ember-edge); color: var(--parchment); }
.cx-cat[aria-current="true"] { border-color: var(--ember); background: linear-gradient(180deg, rgba(108, 33, 21, 0.75), rgba(47, 11, 10, 0.85)); color: var(--parchment-bright); box-shadow: var(--glow-ember); }
.cx-cat[aria-current="true"] b { color: var(--gold); }
.cx-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 16px; }
.cx-search { flex: 1 1 280px; position: relative; }
.cx-search input { width: 100%; height: 46px; padding: 0 16px 0 42px; border-radius: var(--radius-pill); border: 1px solid var(--line-panel); background: var(--surface-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23948465' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") 16px 50% no-repeat; color: var(--parchment); font: 500 16px/1 var(--font-sans); }
.cx-search input:focus { outline: none; border-color: var(--ember); box-shadow: var(--glow-ember); }
.cx-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-filter select { height: 46px; padding: 0 36px 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-panel); background: var(--surface-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23d6bc7a' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") calc(100% - 14px) 50% no-repeat; color: var(--ink); font: 500 14px/1 var(--font-sans); appearance: none; -webkit-appearance: none; max-width: 240px; }
.cx-count { margin-left: auto; color: var(--ink-muted); font-size: 13px; }
.cx-body { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.cx-list { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 24px); overflow-y: auto; border-radius: var(--radius-xl); border: 1px solid var(--line-panel); background: var(--surface-1); padding: 6px; scrollbar-width: thin; scrollbar-color: var(--line-rule-strong) transparent; }
.cx-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px; padding: 7px 10px 7px 7px; border-radius: var(--radius-lg); text-decoration: none; border: 1px solid transparent; }
.cx-row:hover { background: var(--surface-2); }
.cx-row.on { background: linear-gradient(90deg, rgba(108, 33, 21, 0.6), rgba(20, 15, 11, 0.6)); border-color: var(--line-card-hi); box-shadow: inset 3px 0 0 var(--ember-glow); }
.cx-thumb { width: 48px; height: 48px; object-fit: contain; border-radius: var(--radius-md); background: radial-gradient(circle at 50% 40%, #2a1c12, #0c0807); border: 1px solid var(--line-card); }
.cx-thumb.is-art { object-fit: cover; object-position: 50% 8%; }
.sprite { display: block; background-repeat: no-repeat; }
.cx-hero-img.sprite { width: min(240px, 80%); aspect-ratio: 1; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75)); }
.cx-chip-img.sprite { flex: none; }
.cx-note { padding: 10px 14px; border-left: 3px solid var(--ember-edge); background: rgba(108, 33, 21, 0.18); border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--ink-soft); font-size: 14px; }
.cx-thumb.is-icon, .cx-chip-img.is-icon { padding: 8px; opacity: 0.8; }
.cx-rt { display: flex; flex-direction: column; min-width: 0; }
.cx-name { font: 600 15px/1.25 var(--font-display); color: var(--parchment); letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-name[class*="r-"]:not(.r-common) { color: var(--rc); }
.cx-sub { font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-sub b { color: var(--ember-glow); font-weight: 700; }
.codex.searching .cx-filters { display: none; }
.cx-none, .cx-empty { padding: 24px; color: var(--ink-muted); text-align: center; }
.cx-detail { min-width: 0; outline: none; }
.cx-back { display: none; }
.cx-card { --accent: var(--ember); display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr); gap: 0; border-radius: 18px; border: 1px solid var(--line-panel); background: var(--surface-1); overflow: hidden; box-shadow: var(--panel-drop); }
.cx-card[class*="r-"] { --accent: var(--rc); }
.cx-card.no-visual { grid-template-columns: minmax(0, 1fr); background: radial-gradient(ellipse 60% 120% at 100% 0%, rgba(108, 33, 21, 0.28), transparent 60%), var(--surface-1); }
.cx-eyebrow { display: flex; align-items: center; gap: 8px; }
.cx-eyebrow img { width: 22px; height: 22px; }
.cx-visual { position: relative; display: grid; place-items: center; min-height: 320px; padding: 24px; background: radial-gradient(ellipse 70% 60% at 50% 55%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%), linear-gradient(180deg, #1a120c, #0a0706); border-right: 1px solid var(--line-panel); }
.cx-visual.has-art { padding: 12px 12px 0; align-items: end; }
.cx-visual.is-items .cx-hero-art { width: min(340px, 90%); }
.cx-hero-art { width: 100%; max-height: 520px; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.8)); }
.cx-hero-img { width: min(240px, 80%); aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75)); image-rendering: auto; }
.cx-hero-img.wide { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-lg); }
.cx-hero-img.is-icon { width: 120px; opacity: 0.7; }
.cx-info { padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cx-title { font-size: clamp(26px, 3vw, 38px); }
.cx-title[class*="r-"]:not(.r-common) { color: var(--rc); text-shadow: 0 0 24px color-mix(in srgb, var(--rc) 35%, transparent); }
.cx-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-tags span { padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line-card-hi); background: var(--surface-2); font: 600 12px/1.3 var(--font-sans); color: var(--ink-soft); letter-spacing: 0.04em; }
.cx-desc { font: italic 500 20px/1.5 var(--font-serif); color: var(--ink); }
.cx-facts { margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cx-facts > div { padding: 10px 12px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-0); }
.cx-facts dt { font: 700 10px/1.3 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-label); }
.cx-facts dd { margin: 4px 0 0; font: 700 16px/1.3 var(--font-sans); color: var(--ink-number); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cx-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cx-rel { margin-top: 20px; padding: 20px; border-radius: var(--radius-xl); border: 1px solid var(--line-panel); background: var(--surface-1); }
.cx-rel-group + .cx-rel-group { margin-top: 18px; }
.cx-rel-group h4 { font: 600 14px/1.2 var(--font-display); letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 10px; }
.cx-rel-group h4 b { color: var(--gold); font-family: var(--font-sans); font-size: 12px; margin-left: 4px; }
.cx-chips { display: flex; flex-wrap: wrap; gap: 6px; color: var(--ink-muted); font-size: 14px; }
.cx-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: var(--radius-pill); border: 1px solid var(--line-card); background: var(--surface-2); text-decoration: none; color: var(--parchment); font: 600 13px/1.2 var(--font-display); letter-spacing: 0.02em; cursor: pointer; transition: border-color 0.2s; }
.cx-chip:hover { border-color: var(--ember-edge); color: var(--gold); }
.cx-chip.more { padding: 6px 14px; color: var(--gold); }
.cx-chip-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #120c08; }
.cx-chip-img.is-art { object-position: 50% 10%; }
/* ---------- interactive land map ---------- */
.vmap { --vm-zone: 214, 188, 122; }
.vm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.vm-layers { display: flex; flex-wrap: wrap; gap: 6px; }
.vm-layer { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line-card); background: var(--surface-0); color: var(--ink-muted); font: 600 13px/1 var(--font-sans); cursor: pointer; }
.vm-layer b { color: var(--ink-faint); font-weight: 700; }
.vm-layer.on { color: var(--parchment); border-color: var(--line-card-hi); background: var(--surface-2); } .vm-layer.on b { color: var(--gold); }
.vm-layer:not(.on) .vm-dot { opacity: 0.35; }
.vm-dot { width: 10px; height: 10px; border-radius: 50%; background: rgb(var(--vm-zone)); }
.vm-dot.l-z { border-radius: 2px; background: none; border: 1.5px dashed rgb(var(--vm-zone)); } .vm-dot.l-n { background: #38bdf8; } .vm-dot.l-p { background: #4ade80; } .vm-dot.l-r { background: #fb923c; border-radius: 2px; transform: rotate(45deg) scale(0.8); }
.vm-zoom { display: flex; gap: 4px; }
.vm-zoom button { width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--line-card-hi); background: var(--surface-1); color: var(--parchment); font: 700 18px/1 var(--font-sans); cursor: pointer; }
.vm-zoom button:hover { border-color: var(--ember-edge); color: var(--gold); }
.vm-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.vm-view { position: relative; width: 100%; max-height: 78vh; margin: 0 auto; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--line-panel); background: #0b0f14; touch-action: pan-y; }
.vm-view.zoomed { cursor: grab; touch-action: none; } .vm-view.zoomed:active { cursor: grabbing; }
.vm-pan { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.vm-pan img, .vm-pan svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; }
.vm-pan img { object-fit: fill; }
.vm-pan svg { overflow: visible; --k: 1; }
.vm-zone { cursor: pointer; outline: none; }
.vm-zone rect { fill: rgba(var(--vm-zone), 0.05); stroke: rgba(var(--vm-zone), 0.55); stroke-width: calc(var(--u) * 0.18 / var(--k)); stroke-dasharray: calc(var(--u) * 0.9 / var(--k)) calc(var(--u) * 0.5 / var(--k)); vector-effect: none; transition: fill 0.15s; }
.vm-zone text { fill: #fff1d0; font: 600 calc(var(--u) * 1.1px / var(--k)) var(--font-sans); text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: rgba(8, 6, 5, 0.9); stroke-width: calc(var(--u) * 0.45px / var(--k)); stroke-linejoin: round; pointer-events: none; opacity: 0.92; }
.vm-zone.small text { opacity: 0; }
.vm-pan svg[style*="--k: 2"] .vm-zone.small text, .vm-view.zoomed .vm-zone.small text { opacity: 0.92; }
.vm-zone:hover rect, .vm-zone:focus-visible rect, .vm-zone.hl rect { fill: rgba(var(--vm-zone), 0.2); stroke: rgb(var(--vm-zone)); stroke-dasharray: none; }
.vm-zone:hover text, .vm-zone.hl text, .vm-zone.on text { opacity: 1 !important; }
.vm-zone.on rect { fill: rgba(233, 137, 55, 0.26); stroke: var(--ember-glow); stroke-dasharray: none; stroke-width: calc(var(--u) * 0.3 / var(--k)); }
.vm-zone.safe { --vm-zone: 74, 222, 128; } .vm-zone.city { --vm-zone: 96, 165, 250; } .vm-zone.r-boss { --vm-zone: 248, 113, 113; } .vm-zone.r-miniboss { --vm-zone: 251, 146, 60; } .vm-zone.r-treasure { --vm-zone: 250, 204, 21; }
.vm-zone .vm-rn { fill: var(--gold); font-weight: 800; }
.vm-pin { cursor: pointer; outline: none; }
.vm-pin > circle:first-child, .vm-pin .in, .vm-pin path, .vm-res rect { transform: scale(calc(var(--u) / var(--k))); transform-origin: 0 0; }
.vm-pin > circle:first-child { fill: rgba(8, 6, 5, 0.75); stroke: var(--pc); stroke-width: 0.28; }
.vm-pin .in { fill: var(--pc); } .vm-pin path { fill: none; stroke: var(--pc); stroke-width: 0.28; stroke-linecap: round; stroke-linejoin: round; }
.vm-pin.npc { --pc: #38bdf8; } .vm-pin.path { --pc: #4ade80; } .vm-pin.entry { --pc: #fbbf24; }
.vm-pin:hover > circle:first-child, .vm-pin:focus-visible > circle:first-child { fill: var(--pc); } .vm-pin:hover .in, .vm-pin:hover path { fill: #0b0806; stroke: #0b0806; }
.vm-res rect { fill: var(--rcol); stroke: rgba(8, 6, 5, 0.85); stroke-width: 0.14; opacity: 0.95; }
.vm-res.t-M, .vm-tag.t-M { --rcol: #cbd5e1; } .vm-res.t-W, .vm-tag.t-W { --rcol: #b98a52; } .vm-res.t-F, .vm-tag.t-F { --rcol: #c084fc; }
.vm-tip { position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 14px)); margin: 0; padding: 5px 10px; border-radius: var(--radius-md); background: rgba(10, 7, 6, 0.94); border: 1px solid var(--line-card-hi); color: var(--parchment); font: 600 13px/1.3 var(--font-sans); white-space: nowrap; pointer-events: none; }
.vm-side { padding: 14px 14px 16px; border-radius: var(--radius-lg); border: 1px solid var(--line-panel); background: var(--surface-1); max-height: 78vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-rule-strong) transparent; }
.vm-side h3 { margin: 0 0 8px; font: 600 18px/1.25 var(--font-display); color: var(--parchment); letter-spacing: 0.02em; } .vm-side h3 b, .vm-side h4 b { color: var(--gold); font: 700 13px/1 var(--font-sans); margin-left: 4px; }
.vm-side h3 a { color: inherit; } .vm-side h4 { margin: 14px 0 6px; font: 700 11px/1.2 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-label); }
.vm-hint, .vm-meta, .vm-none, .vm-dng { margin: 0 0 8px; color: var(--ink-muted); font-size: 13px; line-height: 1.5; } .vm-dng { color: var(--gold-label); }
.vm-zlist, .vm-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.vm-zrow { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: var(--radius-md); border: 1px solid transparent; background: none; color: var(--ink); font: 500 14px/1.3 var(--font-sans); text-align: left; cursor: pointer; }
.vm-zrow:hover { background: var(--surface-2); border-color: var(--line-card); color: var(--parchment); } .vm-zrow:disabled { opacity: 0.55; cursor: default; }
.vm-zrow span { flex: 1; min-width: 0; } .vm-zrow b { color: var(--gold); font-size: 12px; } .vm-zrow em { font-style: normal; font-size: 11px; color: #4ade80; }
.vm-no { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 50%; border: 1px solid var(--ember-edge); color: var(--gold); font: 700 11px/1 var(--font-sans); font-style: normal; }
.vm-links a { display: block; padding: 5px 9px; border-radius: var(--radius-md); color: var(--gold-label); text-decoration: none; font-size: 14px; } .vm-links a:hover { background: var(--surface-2); color: var(--gold); }
.vm-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.vm-tag { display: inline-block; padding: 3px 9px; border-radius: var(--radius-pill); border: 1px solid var(--line-card-hi); background: var(--surface-2); font: 600 12px/1.3 var(--font-sans); color: var(--ink); white-space: nowrap; }
.vm-tag.safe { color: #4ade80; border-color: rgba(74, 222, 128, 0.45); } .vm-tag.pvp { color: #f87171; border-color: rgba(248, 113, 113, 0.4); }
.vm-tag.r-boss { color: #f87171; border-color: rgba(248, 113, 113, 0.45); } .vm-tag.r-miniboss { color: #fb923c; border-color: rgba(251, 146, 60, 0.45); } .vm-tag.r-treasure { color: #facc15; border-color: rgba(250, 204, 21, 0.45); }
.vm-tag[class*="t-"] { color: var(--rcol); }
.vm-back { margin: 0 0 10px; padding: 5px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line-card-hi); background: none; color: var(--ink-soft); font: 600 12.5px/1 var(--font-sans); cursor: pointer; } .vm-back:hover { color: var(--gold); border-color: var(--ember-edge); }
.vmap-host { margin-bottom: 28px; } .vmap-box > .map { margin: 0; }
.vm-table td:first-child { white-space: nowrap; } .vm-table td { vertical-align: top; }
.cx-mapblock { margin-top: 16px; } .cx-stage.is-world.has-map .cx-visual { display: none; }
/* codex detail: stage + blocks */
.cx-stage { --accent: var(--ember); position: relative; display: grid; grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr); border-radius: 18px; border: 1px solid var(--line-panel); overflow: hidden; box-shadow: var(--panel-drop);
  background: radial-gradient(ellipse 55% 75% at 22% 55%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%), linear-gradient(180deg, #120d0a, #0a0706); }
.cx-stage[class*="r-"] { --accent: var(--rc); }
.cx-stage.no-visual .cx-visual { min-height: 200px; }
.cx-stage .cx-visual { border: 0; background: none; min-height: 340px; }
.cx-stage.is-world { grid-template-columns: minmax(0, 1fr); }
.cx-stage.is-world .cx-visual { min-height: 0; padding: 14px 14px 0; }
.cx-stage.is-world .cx-hero-img.wide { aspect-ratio: 16 / 8; }
.cx-corner { position: absolute; width: 18px; height: 18px; border: 0 solid color-mix(in srgb, var(--gold-label) 70%, transparent); pointer-events: none; z-index: 2; }
.cx-corner.tl { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; } .cx-corner.tr { top: 10px; right: 10px; border-top-width: 1px; border-right-width: 1px; }
.cx-corner.bl { bottom: 10px; left: 10px; border-bottom-width: 1px; border-left-width: 1px; } .cx-corner.br { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }
.cx-cap { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; justify-content: center; gap: 12px; min-width: 0; }
.cx-en { margin: -6px 0 0; font: 500 13px/1.3 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--ink-faint); letter-spacing: 0.02em; }
.cx-tags span.rc { color: var(--rc); border-color: color-mix(in srgb, var(--rc) 55%, transparent); background: color-mix(in srgb, var(--rc) 10%, transparent); }
.cx-tags span.cls { color: #8ec5ff; border-color: rgba(96, 165, 250, 0.45); background: rgba(96, 165, 250, 0.1); }
.cx-tags span.lvl { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 9%, transparent); }
.cx-detail > .cx-note { margin: 14px 0 0; }
.cx-blocks { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.cx-block { min-width: 0; padding: 16px 18px 18px; border-radius: var(--radius-xl); border: 1px solid var(--line-panel); background: var(--surface-1); }
.cx-block.wide, .cx-block.b-stats, .cx-block.b-big, .cx-block.b-bars { grid-column: 1 / -1; }
.cx-block.b-big + .cx-block.b-bars { margin-top: -14px; border-top: 0; border-radius: 0 0 var(--radius-xl) var(--radius-xl); padding-top: 4px; }
.cx-block.b-big:has(+ .b-bars) { border-bottom: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding-bottom: 12px; }
.cx-block > h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 700 12px/1.2 var(--font-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-label); }
.cx-block > h3::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ember-glow); box-shadow: 0 0 8px var(--ember); }
.cx-ico { width: 22px; height: 22px; flex: none; }
.cx-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.cx-tile { --c: var(--ink-number); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 70%), var(--surface-0); text-align: center; }
.cx-tile b { font: 700 22px/1 var(--font-sans); color: var(--c); font-variant-numeric: tabular-nums; }
.cx-tile span { font: 700 10px/1.25 var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-label); overflow-wrap: anywhere; }
.cx-tile.s0 { --c: #f87171; } .cx-tile.s1 { --c: #4ade80; } .cx-tile.s2 { --c: #38bdf8; } .cx-tile.s3 { --c: #fb923c; } .cx-tile.s4 { --c: #60a5fa; } .cx-tile.s5 { --c: #c084fc; }
.cx-bigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.cx-bigt { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; row-gap: 2px; padding: 12px 14px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-0); }
.cx-bigt span { font: 700 10px/1.2 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-label); }
.cx-bigt b { grid-column: 1 / -1; font: 700 26px/1.1 var(--font-sans); color: var(--ink-number); font-variant-numeric: tabular-nums; }
.cx-bigt.k-hp b { color: #f87171; text-shadow: 0 0 18px rgba(248, 113, 113, 0.35); } .cx-bigt.k-mana b, .cx-bigt.k-res_MANA b { color: #60a5fa; } .cx-bigt.k-armor b { color: var(--gold); } .cx-bigt.k-magicResist b { color: #c084fc; }
.cx-bigt.k-res_RAGE b, .cx-bigt.k-res_ADRENALINE b { color: #f87171; } .cx-bigt.k-res_ENERGY b { color: #facc15; } .cx-bigt.k-res_CHARGE b { color: #38bdf8; }
.cx-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.cx-bars > div { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: baseline; }
.cx-bars span { font: 600 12px/1.2 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.cx-bars b { font: 700 14px/1 var(--font-sans); color: var(--ink-number); font-variant-numeric: tabular-nums; }
.cx-bars i, .cx-weights i { grid-column: 1 / -1; display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.cx-bars u, .cx-weights u { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--ember-edge), var(--ember-glow)); }
.cx-kv { margin: 0; display: flex; flex-direction: column; }
.cx-kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line-rule); }
.cx-kv > div:last-child { border-bottom: 0; padding-bottom: 0; } .cx-kv > div:first-child { padding-top: 0; }
.cx-kv dt { font: 600 12px/1.3 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.cx-kv dd { margin: 0; text-align: right; font: 700 14px/1.35 var(--font-sans); color: var(--ink-number); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rc { color: var(--rc) !important; }
.cx-link { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-label); text-decoration: none; font-weight: 600; vertical-align: middle; }
.cx-link:hover span { color: var(--gold); text-decoration: underline; }
.cx-link-img { width: 26px; height: 26px; flex: none; border-radius: 6px; object-fit: cover; background: #120c08; border: 1px solid var(--line-card); }
.cx-link-img.is-art { object-position: 50% 10%; } .cx-link-img.is-icon { padding: 3px; }
.cx-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cx-rowlink { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-0); color: var(--ink); text-decoration: none; min-width: 0; }
a.cx-rowlink:hover { border-color: var(--ember-edge); }
.cx-rowlink b { color: var(--parchment); font-weight: 600; } .cx-rowlink i { font-style: normal; color: var(--ink-muted); }
.cx-rowlink em { margin-left: auto; padding-left: 12px; font: 700 13px/1 var(--font-sans); font-style: normal; color: var(--gold); white-space: nowrap; }
.cx-rowlink i[class*="r-"] { color: var(--rc); font-size: 12px; }
.cx-qty { min-width: 34px; font: 700 14px/1 var(--font-sans); color: var(--gold); font-variant-numeric: tabular-nums; }
.cx-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cx-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line-card-hi); background: var(--surface-2); font: 600 12.5px/1.35 var(--font-sans); color: var(--ink); }
.cx-pill i { font-style: normal; font-weight: 500; color: var(--ink-muted); }
.cx-pill.rc { border-color: color-mix(in srgb, var(--rc) 55%, transparent); background: color-mix(in srgb, var(--rc) 10%, transparent); }
.cx-pills > .cx-link { padding: 4px 12px 4px 4px; border-radius: var(--radius-pill); border: 1px solid var(--line-card); background: var(--surface-0); }
.cx-lead { margin: 0 0 12px; color: var(--ink); font-size: 15.5px; line-height: 1.6; }
.cx-fine { margin: 12px 0 0; color: var(--ink-faint); font-size: 13px; line-height: 1.5; }
.cx-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 10px; }
.cx-result > .cx-link { font: 600 18px/1.2 var(--font-display); letter-spacing: 0.02em; }
.cx-result > .cx-link .cx-link-img { width: 44px; height: 44px; border-radius: 8px; }
.cx-block.b-result .cx-result { margin-bottom: 0; }
.cx-tablewrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: var(--line-rule-strong) transparent; }
.cx-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.cx-table th { padding: 8px 10px; text-align: left; font: 700 10.5px/1.25 var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-label); border-bottom: 1px solid var(--line-rule-strong); white-space: nowrap; }
.cx-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-rule); color: var(--ink); white-space: nowrap; }
.cx-table tr:last-child td { border-bottom: 0; }
.cx-table td:first-child, .cx-table th:first-child { padding-left: 0; }
.cx-table.wide th { white-space: normal; min-width: 62px; vertical-align: bottom; }
.cx-table tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.cx-effects, .cx-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cx-effects li, .cx-steps li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-0); }
.cx-eff { display: inline-flex; align-items: center; gap: 8px; min-width: 170px; } .cx-eff b { color: var(--parchment); font: 600 15px/1.2 var(--font-display); letter-spacing: 0.02em; }
.cx-steps { counter-reset: st; } .cx-steps li { counter-increment: st; }
.cx-steps li::before { content: counter(st); width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--ember-edge); color: var(--gold); font: 700 13px/1 var(--font-sans); background: rgba(108, 33, 21, 0.35); }
.cx-step-a { min-width: 190px; }
.cx-tier + .cx-tier { margin-top: 16px; }
.cx-tier h4 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; font: 600 15px/1.2 var(--font-display); letter-spacing: 0.06em; color: var(--parchment); }
.cx-tier h4 small { font: 600 12px/1 var(--font-sans); color: var(--ink-muted); letter-spacing: 0; }
.cx-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.cx-node { padding: 10px 12px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-0); border-left: 3px solid color-mix(in srgb, var(--accent, var(--ember)) 70%, transparent); }
.cx-node.trig { border-left-color: var(--gold); }
.cx-node b { color: var(--parchment); font-size: 14.5px; } .cx-node p { margin: 4px 0 6px; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); } .cx-node small { color: var(--ink-faint); font-size: 12px; }
.cx-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; } .cx-chain > b { font: 600 17px/1.2 var(--font-display); color: var(--parchment); }
.cx-prevnext { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cx-prevnext > div:not(:empty) { padding: 10px 12px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-0); display: flex; flex-direction: column; gap: 4px; }
.cx-prevnext .nx { text-align: right; align-items: flex-end; } .cx-prevnext small { color: var(--ink-faint); font-size: 12px; }
.cx-chest h4 { font: 600 19px/1.2 var(--font-display); color: var(--rc); margin: 0 0 4px; } .cx-chest p { margin: 0 0 10px; color: var(--ink-soft); font-size: 14.5px; }
.cx-chest h5 { margin: 14px 0 8px; font: 700 11px/1.2 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-label); }
.cx-chest-w { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.cx-weights { display: flex; flex-direction: column; gap: 8px; }
.cx-weights > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13.5px; } .cx-weights b { color: var(--ink-number); font-variant-numeric: tabular-nums; }
.cx-weights .rc u { background: var(--rc); }
.cx-calc { display: flex; flex-direction: column; gap: 12px; }
.cx-calc-lv { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-0); }
.cx-calc-lv span { font: 700 11px/1 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-label); }
.cx-calc-lv input { width: 100%; accent-color: var(--ember-glow); height: 28px; }
.cx-calc-lv output { min-width: 44px; padding: 6px 0; text-align: center; border-radius: var(--radius-md); border: 1px solid var(--line-card-hi); font: 700 16px/1 var(--font-sans); color: var(--gold); font-variant-numeric: tabular-nums; }
.cx-calc-rar { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-calc-rar button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; padding: 7px 14px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-0); color: var(--rc); font: 700 13.5px/1.2 var(--font-sans); cursor: pointer; }
.cx-calc-rar button small { font: 500 11px/1 var(--font-sans); color: var(--ink-faint); }
.cx-calc-rar button.on { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--rc) 25%, transparent); }
.cx-calc-rar button:disabled { opacity: 0.38; cursor: not-allowed; }
.cx-calc-out { display: flex; flex-direction: column; gap: 10px; }
.cx-calc-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 2px 0 0; color: var(--ink-muted); font-size: 13.5px; } .cx-calc-meta b { color: var(--gold); }
.cx-detail > .cx-facts { margin-top: 16px; }
.codex noscript ul { columns: 2; }

/* ---------- document pages (legal, whitepaper, tokenomics, project) ---------- */
.doc-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line-rule); }
.dh-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.doc-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 5, 5, 0.95), rgba(7, 5, 5, 0.7) 55%, rgba(7, 5, 5, 0.4)), linear-gradient(0deg, var(--surface-0), transparent 60%); }
.dh-in h1 { max-width: 22ch; }
.dh-meta { margin-top: 16px; color: var(--ink-muted); font-size: 14px; letter-spacing: 0.04em; }
.doc-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; padding-top: 40px; padding-bottom: 80px; }
.doc-aside { position: sticky; top: calc(var(--top-h) + 20px); display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - var(--top-h) - 40px); overflow-y: auto; scrollbar-width: thin; }
.doc-toc ol { list-style: none; margin: 0; padding: 14px; border-radius: var(--radius-xl); border: 1px solid var(--line-panel); background: var(--surface-1); counter-reset: t; }
.doc-toc li { counter-increment: t; }
.doc-toc a { display: flex; gap: 10px; padding: 7px 8px; border-radius: var(--radius-md); text-decoration: none; color: var(--ink-soft); font-size: 14px; line-height: 1.35; }
.doc-toc a::before { content: counter(t, decimal-leading-zero); font: 700 11px/1.6 var(--font-sans); color: var(--ember-glow); }
.doc-toc a:hover { background: var(--surface-2); color: var(--parchment); }
.doc-aside-links { display: flex; flex-direction: column; gap: 8px; }
.doc-aside-links .btn { justify-content: flex-start; }
.doc { min-width: 0; max-width: 820px; }
.doc.wide { max-width: none; }
.doc-sec { scroll-margin-top: calc(var(--top-h) + 20px); padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line-rule); }
.doc-sec:last-child { border-bottom: 0; }
.doc-sec > h2 { display: flex; align-items: baseline; gap: 14px; font-size: clamp(24px, 3vw, 34px); margin-bottom: 18px; }
.doc-n { font: 700 15px/1 var(--font-sans); color: var(--ember-glow); letter-spacing: 0.06em; }
.doc p, .doc-stack p { color: var(--ink); max-width: 72ch; margin-bottom: 14px; }
.doc strong, .doc b { color: var(--parchment); }
.doc-h { font-size: 20px; margin: 26px 0 10px; }
h3.doc-h { font-size: 20px; } h4.doc-h { font-size: 17px; }
.doc-sub { color: var(--ink-soft) !important; font-size: 17px; }
.doc-text { margin-top: 8px; }
.doc-list { margin: 0 0 16px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.doc-list li { position: relative; padding-left: 22px; color: var(--ink); max-width: 72ch; }
.doc-list li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 7px; height: 7px; transform: rotate(45deg); border-radius: 1px; background: var(--ember-edge); }
.doc-list.num { counter-reset: n; }
.doc-list.num li { counter-increment: n; padding-left: 34px; }
.doc-list.num li::before { content: counter(n); transform: none; width: 24px; height: 24px; top: 1px; left: 0; display: grid; place-items: center; border-radius: 50%; background: var(--crimson); border: 1px solid var(--ember-edge); font: 700 12px/1 var(--font-sans); color: var(--gold); }
.doc-facts { list-style: none; margin: 6px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.doc-facts li { padding: 10px 14px; border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-1); color: var(--ink); font-size: 15px; line-height: 1.45; }
.doc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 10px 0 20px; }
.doc-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.doc-card { padding: 16px 18px; border-radius: var(--radius-xl); border: 1px solid var(--line-card); background: linear-gradient(180deg, var(--surface-2), var(--surface-1)); box-shadow: inset 0 1px 0 var(--line-card-hi); }
.doc-card h3, .doc-card h4, .doc-card h5 { font-size: 17px; margin-bottom: 8px; color: var(--gold-tab); }
.doc-card p { font-size: 15px; color: var(--ink-soft) !important; margin-bottom: 6px; }
.doc-card .doc-list li { font-size: 15px; }
.doc-block { margin-top: 8px; }
.doc table.db { min-width: 0; }
.doc-note { padding: 12px 16px; border-left: 3px solid var(--ember-edge); background: rgba(108, 33, 21, 0.18); border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--ink-soft) !important; font-size: 15px; }
.doc-stack { display: flex; flex-direction: column; padding-top: 40px; padding-bottom: 72px; }
.doc-stack.narrow > * { max-width: 900px; }
.doc-cta { text-align: center; padding: 40px 24px; border-radius: 18px; border: 1px solid var(--line-panel); background: radial-gradient(ellipse 60% 100% at 50% 100%, rgba(108, 33, 21, 0.5), transparent 70%), var(--surface-1); }
.doc-cta p { margin: 12px auto 22px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 18px 0; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--line-panel); background: var(--line-panel); }
.metrics > div { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface-1); }
.metrics b { font: 700 28px/1 var(--font-display); color: var(--parchment-bright); }
.metrics b.small { font: 600 15px/1.4 var(--font-sans); color: var(--ink); }
.metrics span { font: 700 11px/1.3 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.metrics.wide { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.loop { text-align: center; padding: 16px; border-radius: var(--radius-lg); border: 1px solid var(--line-card-hi); background: var(--surface-1); font: 600 16px/1.4 var(--font-display); letter-spacing: 0.12em; color: var(--gold) !important; max-width: none !important; }
.split { display: flex; gap: 3px; margin: 16px 0; border-radius: var(--radius-lg); overflow: hidden; min-height: 52px; }
.split span { display: flex; flex-direction: column; justify-content: center; padding: 8px 12px; font-size: 12px; color: var(--on-crimson); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split b { font: 700 18px/1.1 var(--font-display); color: #fff; }
.split.big { min-height: 72px; }
.split-burn { background: linear-gradient(180deg, #8a2a19, #4a1009); }
.split-dev { background: #3a332c; } .split-mktg { background: #4a4038; } .split-reward { background: linear-gradient(180deg, #b4750b, #6b4508); }
.timeline { list-style: none; margin: 0; padding: 48px 0 24px 0; position: relative; display: flex; flex-direction: column; gap: 22px; max-width: 860px; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 56px; bottom: 30px; width: 2px; background: linear-gradient(180deg, var(--ember-glow), var(--line-rule-strong)); }
.timeline li { position: relative; padding-left: 48px; }
.tl-dot { position: absolute; left: 4px; top: 22px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-0); border: 2px solid var(--line-rule-strong); }
.tl-done .tl-dot { background: var(--ember-edge); border-color: var(--ember); }
.tl-now .tl-dot { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 16px rgba(255, 197, 110, 0.7); }
.tl-card { padding: 20px 22px; border-radius: var(--radius-xl); border: 1px solid var(--line-card); background: linear-gradient(180deg, var(--surface-2), var(--surface-1)); }
.tl-now .tl-card { border-color: var(--ember); box-shadow: var(--glow-ember); }
.tl-meta { font: 600 12px/1.4 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.tl-meta b { color: var(--ember-glow); }
.tl-card h2 { font-size: 24px; margin-bottom: 12px; }
.guide-shot { margin: 0 0 20px; border-radius: var(--radius-xl); padding: 5px; background: linear-gradient(135deg, #6b4a22, #2a1a0d 30%, #5a3a18 60%, #2a1a0d); box-shadow: var(--panel-drop); }
.guide-shot img { border-radius: 9px; width: 100%; }
.center-row.mid { justify-content: center; padding: 28px 0 0; }
.doc .center-row { padding: 0; }
.center-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 0 72px; }
.changelog { padding-top: 40px; padding-bottom: 72px; }
.changelog > * { max-width: 980px; }
.cl-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.cl-lines li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 15px; color: var(--ink); }
.cl-lines .cl-cat { justify-self: start; }
.cl-lines.plain li { grid-template-columns: minmax(0, 1fr); padding-left: 18px; position: relative; }
.cl-lines.plain li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; transform: rotate(45deg); background: var(--ember-edge); }
.c-new { border-color: rgba(74, 222, 128, 0.45) !important; color: #4ade80 !important; } .c-improved { border-color: rgba(96, 165, 250, 0.45) !important; color: #60a5fa !important; } .c-fixed { border-color: rgba(248, 113, 113, 0.45) !important; color: #f87171 !important; } .c-balance { border-color: rgba(251, 191, 36, 0.45) !important; color: #fbbf24 !important; }
.cl-month { margin-bottom: 36px; }
.cl-month h2 { font-size: 24px; margin-bottom: 14px; text-transform: capitalize; }
.cl-entry { padding: 16px 20px; margin-bottom: 10px; border-radius: var(--radius-xl); border: 1px solid var(--line-card); background: var(--surface-1); }
.cl-entry header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.cl-entry time { font: 700 13px/1 var(--font-sans); color: var(--gold); margin-right: 4px; }
.cl-type, .cl-cat { padding: 3px 9px; border-radius: var(--radius-pill); font: 700 11px/1.4 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line-card-hi); color: var(--ink-soft); }
.cl-feature { border-color: rgba(74, 222, 128, 0.5); color: #4ade80; } .cl-fix { border-color: rgba(248, 113, 113, 0.5); color: #f87171; } .cl-improvement { border-color: rgba(96, 165, 250, 0.5); color: #60a5fa; }
.cl-entry .doc-list { margin: 0; gap: 6px; } .cl-entry .doc-list li { font-size: 15px; }
.tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 12px 0 18px; }
.tier { position: relative; padding: 22px 16px 16px; border-radius: var(--radius-xl); border: 1px solid color-mix(in srgb, var(--rc) 50%, transparent); background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 65%), var(--surface-1); text-align: center; }
.tier-gem { display: block; width: 18px; height: 18px; margin: 0 auto 10px; transform: rotate(45deg); background: var(--rc); box-shadow: 0 0 16px var(--rc); border-radius: 3px; }
.tier h3 { color: var(--rc); font-size: 20px; margin-bottom: 12px; }
.tier dl { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tier dt { font: 700 10px/1.3 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.tier dd { margin: 2px 0 0; font: 700 18px/1.2 var(--font-sans); color: var(--ink-number); }
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { border-radius: var(--radius-lg); border: 1px solid var(--line-card); background: var(--surface-1); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 18px; font: 600 16px/1.35 var(--font-display); color: var(--parchment); letter-spacing: 0.02em; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ember-glow); font: 400 22px/1 var(--font-sans); }
.faq details[open] summary::after { content: "−"; }
.faq details > :not(summary) { padding: 0 18px; }
.faq details[open] { border-color: var(--line-card-hi); }
.faq details[open] > :last-child { padding-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.chips span { padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-card-hi); background: var(--surface-2); font: 600 14px/1.3 var(--font-display); color: var(--parchment); }
.chips.mon a, .chips.mon span { text-decoration: none; }
.chips.mon a:hover { border-color: var(--ember-edge); color: var(--gold); }
.chips.mon i { font: 500 12px/1 var(--font-sans); color: var(--ink-muted); margin-left: 4px; }
.chips a { padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-card-hi); background: var(--surface-2); font: 600 14px/1.3 var(--font-display); color: var(--parchment); }
.chips.sev .sev-critical { border-color: #f87171; color: #f87171; } .chips.sev .sev-major { border-color: #fb923c; color: #fb923c; } .chips.sev .sev-minor { border-color: #facc15; color: #facc15; } .chips.sev .sev-cosmetic { border-color: #60a5fa; color: #60a5fa; }
.press-logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.press-logo { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius-xl); border: 1px solid var(--line-card); background: radial-gradient(circle at 50% 40%, #241812, #0a0706); text-decoration: none; }
.press-logo img { height: 120px; width: 100%; object-fit: contain; }
.press-logo span { font-size: 13px; color: var(--ink-soft); }
.press-logo:hover { border-color: var(--ember-edge); }
.press-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.press-shots img { border-radius: var(--radius-lg); border: 1px solid var(--line-card); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.swatches div { display: flex; flex-direction: column; gap: 4px; }
.swatches span { height: 72px; border-radius: var(--radius-lg); border: 1px solid var(--line-card-hi); }
.swatches b { font: 600 14px/1.2 var(--font-display); color: var(--parchment); }
.swatches code { font-size: 13px; color: var(--ink-muted); }
.foot .foot-legal { display: flex; flex-direction: row; gap: 16px; }
.foot-legal a { color: var(--ink-faint); text-decoration: none; }
.foot-legal a:hover { color: var(--gold); }
@media (max-width: 960px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .doc-aside { position: static; max-height: none; }
  .doc-toc ol { columns: 2; column-gap: 8px; }
  .doc-cards.three, .doc-cards.two { grid-template-columns: minmax(0, 1fr); }
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .press-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .press-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .doc-toc ol { columns: 1; }
  .cl-lines li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .split span { font-size: 0; padding: 8px 6px; } .split b { font-size: 15px; }
  .foot-base { flex-direction: column; }
}

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line-panel); background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(108, 33, 21, 0.18), transparent 70%), var(--surface-1); padding-top: 48px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 28px; padding-bottom: 36px; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.foot-brand p { color: var(--ink-soft); font: italic 500 18px/1.4 var(--font-serif); }
.foot nav { display: flex; flex-direction: column; gap: 8px; }
.foot h2 { font: 600 13px/1.2 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-label); margin-bottom: 6px; }
.foot nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; }
.foot nav a:hover { color: var(--gold); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 18px; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-rule); color: var(--ink-faint); font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav a { padding-inline: 10px; letter-spacing: 0.06em; }
  .arm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .codex-teaser { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .nav, .top-actions > .langs, .top-play { display: none; }
  .m-menu { display: block; }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-stats > :nth-child(4) { border-left: 0; }
  .hero-stats > :nth-child(n + 4) { border-top: 1px solid rgba(214, 188, 122, 0.14); }
  .show { grid-template-columns: minmax(0, 1fr); }
  .show-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .show-tabs::-webkit-scrollbar { display: none; }
  .show-tabs button { flex: none; padding: 10px 14px; font-size: 14px; }
  .turn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker-panel { grid-template-columns: minmax(0, 1fr); }
  .pp-emblem { display: none; }
  .news-grid, .entry, .feature, .two { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .feature-text { order: 0; }
  .entry-aside { position: static; order: -1; }
  .specs, .shots-3 { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .cx-body { grid-template-columns: minmax(0, 1fr); }
  .cx-list { position: static; max-height: none; }
  .codex.show-detail .cx-list, .codex.show-detail .cx-tools, .codex.show-detail .cx-cats { display: none; }
  .codex:not(.show-detail) .cx-detail { display: none; }
  .cx-back { display: inline-flex; margin-bottom: 12px; padding: 8px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-panel); background: var(--surface-1); color: var(--gold-label); font: 600 14px/1 var(--font-sans); cursor: pointer; }
  .cx-card { grid-template-columns: minmax(0, 1fr); }
  .cx-stage { grid-template-columns: minmax(0, 1fr); }
  .cx-stage .cx-visual { min-height: 240px; }
  .cx-cap { padding-top: 6px; }
  .cx-visual { border-right: 0; border-bottom: 1px solid var(--line-panel); min-height: 220px; }
  .cx-hero-art { max-height: 360px; }
}
@media (max-width: 640px) {
  :root { --top-h: 62px; }
  .show-panel .frame { width: min(300px, 82%); margin-inline: auto; }
  .guide-shot { width: min(300px, 82%); margin-inline: auto; }
  .show-panel .frame img { aspect-ratio: 480 / 1039; }
  body { font-size: 16px; }
  .brand img { height: 36px; }
  .hero2 { min-height: auto; padding-top: calc(var(--top-h) + 40px); }
  .hero2-in { padding-bottom: 32px; }
  .btn-xl { min-height: 52px; padding: 12px 26px; font-size: 14px; letter-spacing: 0.12em; }
  .actions.center .btn { flex: 1 1 100%; }
  .hero-stats > * { padding: 14px 4px; }
  .hero-stats dt { font-size: 10px; letter-spacing: 0.12em; }
  .picker-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .picker-tabs .ring { width: 48px; height: 48px; }
  .pt-name { font-size: 11px; }
  .pp-body .stats, .pp-specs { grid-template-columns: minmax(0, 1fr); }
  .turn { grid-template-columns: minmax(0, 1fr); }
  .arm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .best-rail { grid-auto-columns: 72vw; }
  .lead, .sec-lead { font-size: 16px; }
  .lore { font-size: 19px; }
  .entry-head { flex-direction: column; align-items: flex-start; }
  .ring-xl { width: 96px; height: 96px; }
  .shots-2 { grid-template-columns: minmax(0, 1fr); }
  .cx-filter select { max-width: 100%; }
  .cx-count { width: 100%; margin-left: 0; }
  .cx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-blocks { grid-template-columns: minmax(0, 1fr); }
  .vm-body { grid-template-columns: minmax(0, 1fr); }
  .vm-side { max-height: none; }
  .vm-table td:first-child { white-space: normal; }
  .cx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cx-tile span { font-size: 9px; letter-spacing: 0.04em; }
  .cx-bars, .cx-chest-w, .cx-prevnext { grid-template-columns: minmax(0, 1fr); }
  .cx-eff, .cx-step-a { min-width: 0; }
  .cx-block { padding: 14px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .embers { display: none; }
}

@media (max-width: 1180px) {
  .vm-body { grid-template-columns: minmax(0, 1fr); }
  .vm-side { max-height: 360px; }
}
@media (max-width: 640px) {
  .vm-side { max-height: none; }
  .vm-layer { padding: 6px 10px; font-size: 12.5px; }
}
