/* =====================================================================
   Dead Ledger - occult art-deco noir.
   Ink-black paper, gilt edges, rank metals, hero colour bleeding through.
   ===================================================================== */
:root {
  --ink-0: #0a0908;
  --ink-1: #110f0d;
  --ink-2: #181512;
  --ink-3: #211d18;
  --ink-4: #2c2620;
  --line: #3d3329;
  --line-soft: #29231d;
  --paper: #efe4cc;
  --paper-2: #d8cbb0;
  --muted: #9e9078;
  --dim: #6f6453;
  --gold: #d9b56a;
  --gold-hi: #f6dd9a;
  --gold-lo: #8a6a2c;
  --oxblood: #7c2424;
  --win: #8fcf9f;
  --loss: #d6806e;
  --warn: #e7bb5f;
  --err: #e27b69;

  --t-ash: #8b857b;
  --t-bronze: #d08e57;
  --t-silver: #cfd5db;
  --t-gold: #e8c26a;
  --t-jade: #62c9a1;
  --t-amethyst: #b897ee;
  --t-radiant: #fff0bd;

  --display: "Forum", "Times New Roman", serif;
  --caps: "Marcellus SC", "Forum", serif;
  --flavor: "Cormorant Garamond", Georgia, serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;

  --gutter: max(16px, calc((100vw - 1280px) / 2));
  --ease: cubic-bezier(.2, .8, .2, 1);
  --hero-rgb: 217, 181, 106;
  --tc: var(--gold);
  --amber: #e5a143;
  --sapphire: #5f8fd6;
  --slot-weapon: #d88a3a;
  --slot-vitality: #78b452;
  --slot-spirit: #a874dc;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; scroll-padding-top: 84px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink-0);
  color: var(--paper);
  font: 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Deco fan pattern, fading out down the page. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 50% 100%, transparent 0 17px, rgba(217, 181, 106, .05) 18px 19px, transparent 20px 26px, rgba(217, 181, 106, .04) 27px 28px, transparent 29px) 0 0 / 64px 32px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .35) 35%, transparent 75%);
  mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .35) 35%, transparent 75%);
}
/* Film grain + vignette over everything. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .55  0 0 0 0 .5  0 0 0 0 .42  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .22; mix-blend-mode: overlay;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: var(--gold); text-decoration-color: rgba(217, 181, 106, .35); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: .01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.fine { font-size: 12.5px; color: var(--dim); margin: 10px 0 0; line-height: 1.5; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.center { text-align: center; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }

.eyebrow {
  font-family: var(--caps); font-size: 12.5px; letter-spacing: .28em; color: var(--gold);
  display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; transform: rotate(45deg);
  border: 1px solid var(--gold); background: linear-gradient(135deg, var(--gold) 0 50%, transparent 50%);
}
.h-small {
  font-family: var(--caps); font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--paper-2); margin: 0 0 12px; display: flex; align-items: center; gap: 12px;
}
.h-small::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.flavor {
  font-family: var(--flavor); font-style: italic; font-weight: 500; font-size: 19px;
  color: var(--paper-2); margin: 6px 0 14px; letter-spacing: .01em;
}

/* --------------------------------------------------------------- buttons */
.btn-gold {
  position: relative; border: 0; border-radius: 2px; padding: 10px 22px;
  font-family: var(--caps); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: #1d160a;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, #b48b3d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 6px 18px -8px rgba(217, 181, 106, .7);
  transition: transform .15s var(--ease), filter .15s;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
}
.btn-gold:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-gold:active { transform: translateY(0); }
.btn-ghost {
  background: rgba(0, 0, 0, .25); border: 1px solid var(--line); color: var(--gold); border-radius: 2px;
  padding: 9px 16px; font-family: var(--caps); letter-spacing: .16em; text-transform: uppercase; font-size: 12.5px;
  transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--gold-lo); background: rgba(217, 181, 106, .06); }
.btn-ghost.wide { display: block; width: 100%; margin-top: 16px; padding: 12px; }
.icon-btn { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.spinning svg { animation: spin 1s linear infinite; }
.icon-btn:disabled { opacity: .7; cursor: progress; }

/* ------------------------------------------------------------- atmosphere */
.atmos { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.smoke { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; will-change: transform; }
.smoke.a { width: 60vw; height: 50vh; left: -15vw; top: 8vh; background: radial-gradient(circle, rgba(124, 36, 36, .55), transparent 70%); animation: drift-a 48s ease-in-out infinite alternate; }
.smoke.b { width: 55vw; height: 55vh; right: -18vw; top: 40vh; background: radial-gradient(circle, rgba(217, 181, 106, .22), transparent 70%); animation: drift-b 60s ease-in-out infinite alternate; }
.smoke.c { width: 40vw; height: 40vh; left: 30vw; top: -18vh; background: radial-gradient(circle, rgba(var(--hero-rgb), .25), transparent 70%); animation: drift-a 70s ease-in-out infinite alternate-reverse; }
@keyframes drift-a { to { transform: translate(14vw, 8vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vw, -10vh) scale(1.1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px var(--gutter);
  background: linear-gradient(180deg, rgba(10, 9, 8, .96), rgba(10, 9, 8, .82));
  backdrop-filter: blur(10px) saturate(1.2);
  transition: box-shadow .3s;
}
.topbar::after { /* stepped deco rule */
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; pointer-events: none;
  background:
    linear-gradient(90deg, transparent, var(--gold-lo) 20%, var(--gold) 50%, var(--gold-lo) 80%, transparent) 0 0 / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 30%, rgba(217, 181, 106, .35) 50%, transparent 70%) 0 4px / 100% 1px no-repeat;
}
body.scrolled .topbar { box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .8); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.brand-mark { width: 36px; height: 36px; }
.bm-o { fill: var(--ink-0); stroke: url(#m-gold); stroke-width: 2; }
.bm-i { fill: none; stroke: var(--gold-lo); stroke-width: 1; }
.bm-eye { fill: none; stroke: url(#m-gold); stroke-width: 1.6; }
.bm-pupil { fill: var(--gold); transform-origin: 20px 20px; }
.brand:hover .bm-pupil { animation: blink 1.2s ease-in-out; }
@keyframes blink { 45%, 55% { transform: scaleY(.1); } }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text span { font-family: var(--caps); font-size: 11px; letter-spacing: .5em; color: var(--muted); }
.brand-text em {
  font-style: normal; font-family: var(--display); font-size: 25px; letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.jump { display: flex; gap: 2px; }
.jump a {
  background: none; border: 0; color: var(--muted); padding: 8px 12px; text-decoration: none;
  font-family: var(--caps); font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; position: relative;
}
.jump a::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; background: var(--gold);
  transform: translateX(-50%) rotate(45deg) scale(0); transition: transform .2s var(--ease);
}
.jump a:hover, .jump a.active { color: var(--paper); }
.jump a:hover::after, .jump a.active::after { transform: translateX(-50%) rotate(45deg) scale(1); }
.jump a.active { color: var(--gold); }

.lookup { position: relative; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 240px; max-width: 460px; margin-left: auto; }
.lk-icon { position: absolute; left: 12px; width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.6; pointer-events: none; }
.lookup input {
  flex: 1; min-width: 0; height: 42px; padding: 0 12px 0 38px;
  background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: 2px; color: var(--paper);
  transition: border-color .2s, box-shadow .2s;
}
.lookup input::placeholder { color: var(--dim); }
.lookup input:focus { outline: none; border-color: var(--gold-lo); box-shadow: 0 0 0 3px rgba(217, 181, 106, .12); }
.lookup .btn-gold { height: 42px; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 3px; padding: 5px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .7);
  animation: rise .2s var(--ease);
}
.search-results button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: 0; padding: 7px 9px; border-radius: 2px; color: var(--paper);
}
.search-results button:hover { background: rgba(217, 181, 106, .08); }
.search-results img { width: 30px; height: 30px; border-radius: 2px; border: 1px solid var(--line); }
.sr-id { margin-left: auto; color: var(--dim); font-family: var(--cond); font-size: 13px; }

.status { position: relative; z-index: 1; max-width: 1280px; margin: 18px auto 0; padding: 0 16px; min-height: 22px; color: var(--muted); font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.status:not(:empty)::before { content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: currentColor; flex: none; }
.status.ok { color: var(--win); }
.status.warn { color: var(--warn); }
.status.error { color: var(--err); }

/* ----------------------------------------------------------------- layout */
main { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 14px 16px 60px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.panel {
  position: relative; padding: 28px;
  background:
    linear-gradient(180deg, rgba(33, 29, 24, .92), rgba(17, 15, 13, .94)) padding-box,
    linear-gradient(150deg, var(--gold-lo), rgba(61, 51, 41, .6) 22%, rgba(61, 51, 41, .3) 50%, rgba(61, 51, 41, .6) 78%, var(--gold-lo)) border-box;
  border: 1px solid transparent; border-radius: 3px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 240, 200, .04);
}
.panel::before { /* gilt corner brackets */
  --c: rgba(217, 181, 106, .55);
  content: ""; position: absolute; inset: 7px; pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left / 18px 1px, linear-gradient(var(--c), var(--c)) top left / 1px 18px,
    linear-gradient(var(--c), var(--c)) top right / 18px 1px, linear-gradient(var(--c), var(--c)) top right / 1px 18px,
    linear-gradient(var(--c), var(--c)) bottom left / 18px 1px, linear-gradient(var(--c), var(--c)) bottom left / 1px 18px,
    linear-gradient(var(--c), var(--c)) bottom right / 18px 1px, linear-gradient(var(--c), var(--c)) bottom right / 1px 18px;
  background-repeat: no-repeat;
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.orn-title { display: flex; flex-direction: column; gap: 4px; }
.orn-title h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1; }
.controls { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 2px; background: rgba(0, 0, 0, .35); padding: 3px; }
.seg button {
  background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 1px;
  font-family: var(--caps); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; transition: color .2s, background .2s;
}
.seg button:hover { color: var(--paper); }
.seg button[aria-pressed="true"] { color: #1d160a; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.toggle { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.tg-track { width: 38px; height: 20px; border: 1px solid var(--line); border-radius: 2px; background: rgba(0, 0, 0, .4); position: relative; transition: border-color .2s; }
.tg-knob { position: absolute; top: 4px; left: 5px; width: 10px; height: 10px; transform: rotate(45deg); background: var(--dim); transition: left .25s var(--ease), background .2s; }
.toggle input:checked + .tg-track { border-color: var(--gold-lo); }
.toggle input:checked + .tg-track .tg-knob { left: 22px; background: var(--gold); }
.toggle input:focus-visible + .tg-track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ----------------------------------------------------------------- loader */
.loader { display: grid; place-items: center; gap: 14px; padding: 90px 0; text-align: center; }
.loader[hidden] { display: none; }
.loader svg { width: 150px; height: 150px; }
.loader p { font-family: var(--flavor); font-style: italic; font-size: 20px; color: var(--muted); margin: 0; }
.ld-ring { fill: none; stroke: var(--line); stroke-dasharray: 2 6; }
.ld-dia { fill: none; stroke: url(#m-gold); stroke-width: 1.5; }
.ld-eye { fill: none; stroke: var(--gold); stroke-width: 2; }
.ld-dot { fill: var(--gold); }
.ld-spin { transform-origin: 100px 100px; animation: spin 6s linear infinite; }
.ld-spin.rev { animation-duration: 9s; animation-direction: reverse; }

/* ---------------------------------------------------------------- emblems */
.emblem { display: inline-block; vertical-align: middle; overflow: visible; flex: none; }
.emblem .em-core { opacity: .16; }
.emblem .em-num { font-family: var(--display); letter-spacing: .02em; }
.emblem.big { filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .7)) drop-shadow(0 0 18px color-mix(in srgb, var(--tc) 35%, transparent)); }
.emblem.t-radiant { filter: drop-shadow(0 0 10px rgba(255, 220, 130, .55)); }
.emblem.t-radiant.big { filter: drop-shadow(0 0 26px rgba(255, 220, 130, .8)); }
.em-halo { transform-origin: 60px 60px; animation: spin 24s linear infinite; }
.t-ash { --tc: var(--t-ash); }
.t-bronze { --tc: var(--t-bronze); }
.t-silver { --tc: var(--t-silver); }
.t-gold { --tc: var(--t-gold); }
.t-jade { --tc: var(--t-jade); }
.t-amethyst { --tc: var(--t-amethyst); }
.t-radiant { --tc: var(--t-radiant); }

/* Grade seals: little gilt lozenges. */
.seal { display: inline-grid; place-items: center; width: 30px; height: 30px; position: relative; vertical-align: middle; flex: none; }
.seal::before {
  content: ""; position: absolute; inset: 5px; transform: rotate(45deg);
  border: 1.5px solid var(--sc); background: color-mix(in srgb, var(--sc) 14%, var(--ink-1));
  box-shadow: 0 0 0 2px var(--ink-1), 0 0 0 3px color-mix(in srgb, var(--sc) 35%, transparent);
}
.seal span { position: relative; font-family: var(--cond); font-weight: 700; font-size: 13px; color: var(--sc); letter-spacing: .02em; }
.seal.g-Sp::before { box-shadow: 0 0 0 2px var(--ink-1), 0 0 10px rgba(255, 230, 150, .7); }
.g-Sp { --sc: var(--t-radiant); }
.g-S { --sc: var(--t-gold); }
.g-A { --sc: var(--t-jade); }
.g-B { --sc: var(--t-silver); }
.g-C { --sc: var(--t-bronze); }
.g-D { --sc: var(--t-ash); }

/* ---------------------------------------------------------------- dossier */
.dossier { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .9fr) minmax(0, 1fr); gap: 26px 36px; align-items: center; }
.dz-id { display: flex; flex-direction: column; gap: 18px; }
.who { display: flex; gap: 18px; align-items: center; }
.avatar-frame {
  width: 92px; height: 92px; flex: none; padding: 4px; position: relative;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo) 50%, var(--gold));
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
}
.avatar-frame img, .avatar-frame:empty::after {
  content: ""; display: block; width: 100%; height: 100%; object-fit: cover; background: var(--ink-2);
  clip-path: polygon(11px 0, calc(100% - 11px) 0, 100% 11px, 100% calc(100% - 11px), calc(100% - 11px) 100%, 11px 100%, 0 calc(100% - 11px), 0 11px);
}
.who h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.02; overflow-wrap: anywhere; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
.who-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.arch { font-size: 13px; color: var(--muted); font-family: var(--caps); letter-spacing: .12em; margin-top: 4px; }
.arch b { color: var(--gold); font-weight: 400; }
.arch span { color: var(--dim); }
.plaques { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.plaques.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0 22px; }
.plaques > div {
  position: relative; padding: 10px 12px 9px; background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .15));
  border: 1px solid var(--line-soft); border-top-color: var(--line); border-radius: 2px;
}
.plaques > div::after { content: ""; position: absolute; top: -1px; left: 12px; width: 16px; height: 1px; background: var(--gold); }
.plaques dt { font-family: var(--caps); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plaques dd { margin: 3px 0 0; font-family: var(--display); font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.plaques dd small { font-size: 14px; color: var(--dim); }
.best-n { font-size: 20px; }

.dz-medal { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.medallion { width: min(100%, 270px); height: auto; overflow: visible; }
.md-rays line { stroke: var(--gold-lo); stroke-width: 1.2; }
.md-rays { transform-origin: 120px 120px; animation: spin 120s linear infinite; }
.md-track { fill: none; stroke: rgba(0, 0, 0, .6); stroke-width: 7; }
.md-prog { fill: none; stroke: url(#m-gold); stroke-width: 7; stroke-linecap: butt; stroke-dashoffset: var(--off); animation: ring-in 1.6s var(--ease) both; filter: drop-shadow(0 0 6px rgba(217, 181, 106, .5)); }
@keyframes ring-in { from { stroke-dashoffset: var(--full); } }
.md-dia { fill: url(#core-glow); stroke: url(#m-gold); stroke-width: 2.5; }
.md-dia-in { fill: none; stroke: var(--gold-lo); stroke-width: 1; }
.md-arc { font-family: var(--caps); font-size: 11px; letter-spacing: .32em; fill: var(--gold); text-transform: uppercase; }
.md-arc.dim { fill: var(--muted); font-family: var(--cond); letter-spacing: .2em; font-size: 11.5px; }
.md-num { font-family: var(--display); font-size: 62px; fill: url(#m-gold); }
.medal-cap { font-size: 13px; color: var(--muted); text-align: center; }
.medal-cap b { color: var(--paper); font-weight: 600; font-variant-numeric: tabular-nums; }

.dz-sigil { display: flex; flex-direction: column; align-items: center; }
.sigil { width: min(100%, 330px); height: auto; overflow: visible; }
.sigil.small { width: min(100%, 290px); display: block; margin: 0 auto; }
.sg-frame { fill: rgba(0, 0, 0, .25); stroke: var(--line); }
.sg-ticks line { stroke: var(--line); stroke-width: 1; }
.sg-ring { fill: none; stroke: var(--line-soft); stroke-width: 1; }
.sg-avg { fill: none; stroke: var(--gold-lo); stroke-width: 1.2; stroke-dasharray: 3 3; }
.sg-axis { stroke: var(--line-soft); stroke-width: 1; }
.sg-shape {
  fill: rgba(var(--hero-rgb), .22); stroke: var(--gold); stroke-width: 1.8; stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(217, 181, 106, .45));
  transform-origin: 150px 150px; animation: sigil-in 1.2s var(--ease) both;
}
@keyframes sigil-in { from { transform: scale(.2) rotate(-40deg); opacity: 0; } }
.sg-dot { fill: var(--gold-hi); }
.sg-label { font-family: var(--caps); font-size: 11px; letter-spacing: .12em; fill: var(--paper-2); text-transform: uppercase; }
.sg-label.off { fill: var(--dim); }
.sg-val { font-family: var(--cond); font-size: 12px; letter-spacing: .04em; fill: var(--gold); }
.sigil-cap { font-size: 12px; color: var(--dim); text-align: center; max-width: 280px; margin-top: 2px; }

.dz-cats { grid-column: 1 / 3; }
.dz-grades { grid-column: 3; align-self: stretch; display: flex; flex-direction: column; }
.cats { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cats li { display: grid; grid-template-columns: 140px 1fr 64px 40px; align-items: center; gap: 12px; font-size: 14px; }
.cats.compact li { grid-template-columns: 116px 1fr 52px; gap: 10px; font-size: 13.5px; }
.cat-name { color: var(--paper-2); }
.cat-bar {
  height: 9px; position: relative;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 3px, transparent 3px 6px), rgba(0, 0, 0, .45);
  border: 1px solid var(--line-soft);
}
.cat-bar > span {
  position: absolute; inset: 0 auto 0 0; width: var(--w);
  background: linear-gradient(90deg, var(--gold-lo), var(--gold) 80%, var(--gold-hi));
  box-shadow: 0 0 10px rgba(217, 181, 106, .35);
  animation: bar-in 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms);
}
.cat-bar > span::after { content: ""; position: absolute; right: -4px; top: 50%; width: 7px; height: 7px; transform: translateY(-50%) rotate(45deg); background: var(--gold-hi); }
@keyframes bar-in { from { width: 0; } }
.cat-val { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--cond); font-size: 15px; font-weight: 600; }
.cat-pct { text-align: right; color: var(--dim); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.grade-hist { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; min-height: 170px; }
.gh-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.gh-n { font-family: var(--cond); font-weight: 600; font-size: 14px; color: var(--sc); }
.gh-bar { flex: 1; width: 100%; max-width: 30px; position: relative; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-soft); }
.gh-bar > span {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--h);
  background: linear-gradient(0deg, color-mix(in srgb, var(--sc) 35%, transparent), var(--sc));
  animation: col-in 1.1s var(--ease) both;
}
@keyframes col-in { from { height: 0; } }

/* -------------------------------------------------------------- spotlight */
.spotlight {
  position: relative; overflow: hidden; min-height: 420px; border-radius: 3px;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: stretch;
  background: radial-gradient(ellipse at 75% 40%, rgba(var(--hero-rgb), .28), transparent 65%), var(--ink-1);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), inset 0 0 120px rgba(0, 0, 0, .7);
}
.spotlight[hidden] { display: none; }
.spotlight::after { content: ""; position: absolute; inset: 10px; pointer-events: none; z-index: 3; border: 1px solid rgba(217, 181, 106, .28); }
.sp-bg { position: absolute; inset: 0; background-size: cover; background-position: right center; opacity: .75; animation: bg-in 1.4s var(--ease) both; }
.sp-veil { position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink-1) 22%, rgba(17, 15, 13, .75) 48%, rgba(17, 15, 13, .1) 75%), linear-gradient(0deg, rgba(10, 9, 8, .8), transparent 40%); }
.sp-content { position: relative; z-index: 2; padding: 40px 0 36px 44px; display: flex; flex-direction: column; align-items: flex-start; }
.nameplate {
  width: min(100%, 420px); height: 110px; margin: 10px 0 6px;
  background: linear-gradient(180deg, #fffaf0, var(--tc) 55%, color-mix(in srgb, var(--tc) 55%, #000));
  -webkit-mask: var(--name) left center / contain no-repeat; mask: var(--name) left center / contain no-repeat;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6));
}
.nameplate.text { -webkit-mask: none; mask: none; background: none; height: auto; font-family: var(--display); font-size: 64px; line-height: 1; color: var(--tc); }
.sp-title { font-family: var(--caps); font-size: 14px; letter-spacing: .28em; text-transform: uppercase; color: var(--tc); display: flex; gap: 12px; align-items: center; }
.sp-title .dot { font-size: 9px; color: var(--gold-lo); }
.ladder { display: flex; gap: 3px; width: 100%; }
.lad-seg { flex: 1; height: 6px; position: relative; background: rgba(0, 0, 0, .55); border: 1px solid var(--line-soft); overflow: hidden; }
.lad-seg > span { position: absolute; inset: 0 auto 0 0; background: var(--tc); }
.lad-seg.full > span { background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 70%, #000), var(--tc)); }
.ladder.lg { max-width: 460px; gap: 4px; }
.ladder.lg .lad-seg { height: 10px; transform: skewX(-20deg); }
.ladder.lg .lad-seg.full { box-shadow: 0 0 8px color-mix(in srgb, var(--tc) 45%, transparent); }
.lad-roman { display: flex; gap: 4px; width: 100%; max-width: 460px; margin-top: 5px; }
.lad-roman span { flex: 1; text-align: center; font-family: var(--display); font-size: 12px; color: var(--dim); }
.lad-roman span.on { color: var(--tc); }
.sp-next, .hp-next { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.sp-next b, .hp-next b { color: var(--paper); font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-stats { display: flex; gap: 28px; margin: 20px 0 24px; flex-wrap: wrap; }
.sp-stats dt { font-family: var(--caps); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.sp-stats dd { margin: 2px 0 0; font-family: var(--display); font-size: 28px; line-height: 1.1; display: flex; align-items: center; min-height: 31px; }
.sp-portrait { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; padding-top: 30px; }
.sp-arch {
  width: min(78%, 330px); aspect-ratio: 280 / 380; position: relative; overflow: hidden;
  border-radius: 180px 180px 0 0; border: 1px solid rgba(217, 181, 106, .5); border-bottom: 0;
  background: radial-gradient(circle at 50% 30%, rgba(var(--hero-rgb), .45), transparent 70%), rgba(0, 0, 0, .3);
  box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .35), inset 0 0 0 7px rgba(217, 181, 106, .25), 0 0 60px rgba(var(--hero-rgb), .25);
}
.sp-arch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; -webkit-mask: linear-gradient(180deg, #000 70%, transparent); mask: linear-gradient(180deg, #000 70%, transparent); }
.sp-emblem { position: absolute; left: 2%; bottom: 30px; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* --------------------------------------------------------------- pursuits */
.pursuits { display: flex; flex-direction: column; gap: 12px; }
.pursuits[hidden] { display: none; }
.pursuit-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.pursuit-head .fine { margin: 0; }
.pursuit-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pursuit {
  text-decoration: none;
  display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px 14px; color: var(--paper);
  background: linear-gradient(110deg, rgba(var(--hero-rgb), .16), rgba(17, 15, 13, .9) 55%);
  border: 1px solid var(--line); border-radius: 2px; position: relative; overflow: hidden;
  transition: border-color .25s, transform .25s var(--ease);
}
.pursuit::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--tc); }
.pursuit:hover { border-color: color-mix(in srgb, var(--tc) 55%, var(--line)); transform: translateY(-2px); }
.pr-portrait { position: relative; width: 56px; height: 56px; flex: none; }
.pr-portrait img { position: absolute; inset: 7px; width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--ink-2); }
.pr-ring { position: absolute; inset: 0; width: 56px; height: 56px; }
.pr-track { fill: none; stroke: rgba(0, 0, 0, .6); stroke-width: 4; }
.pr-fill { fill: none; stroke: var(--tc); stroke-width: 4; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--tc) 60%, transparent)); }
.pr-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pr-name { font-family: var(--display); font-size: 20px; line-height: 1.1; }
.pr-step { font-family: var(--caps); font-size: 11.5px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-step b { color: var(--tc); font-weight: 400; }
.pr-step i { font-style: normal; color: var(--dim); }
.pr-need { font-size: 12.5px; color: var(--paper-2); font-variant-numeric: tabular-nums; }
.pr-next { opacity: .9; }

/* ------------------------------------------------------------ hero cards */
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 18px; perspective: 1200px; }
.tcard {
  text-decoration: none;
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 30%;
  position: relative; display: flex; flex-direction: column; padding: 0; text-align: left; color: var(--paper);
  aspect-ratio: 5 / 8; border: 0; border-radius: 6px; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, rgba(var(--hero-rgb), .35), var(--ink-1) 62%);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .35s var(--ease), box-shadow .35s, filter .3s;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .7);
}
.tcard:hover { transition: transform .08s linear, box-shadow .35s, filter .3s; box-shadow: 0 28px 50px -20px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .7), 0 0 34px -8px color-mix(in srgb, var(--tc) 60%, transparent); }
.tc-art { position: absolute; inset: 0 0 34% 0; overflow: hidden; z-index: 0; }
.tc-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 12%; transition: opacity .45s, transform .6s var(--ease); }
.tc-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, var(--ink-1) 98%); }
.tc-gloat { opacity: 0; transform: scale(1.06); }
.tcard:hover .tc-art img:first-child { opacity: 0; }
.tcard:hover .tc-gloat { opacity: 1; transform: scale(1); }
.tcard:not(:has(.tc-gloat)):hover .tc-art img:first-child { opacity: 1; transform: scale(1.05); }
.tc-frame { /* double gilt frame with stepped corners */
  position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--tc) 60%, transparent);
  box-shadow: inset 0 0 0 4px rgba(10, 9, 8, .85), inset 0 0 0 5px color-mix(in srgb, var(--tc) 35%, transparent);
}
.tc-frame::before, .tc-frame::after { content: ""; position: absolute; width: 22px; height: 22px; border: 1px solid var(--tc); opacity: .9; }
.tc-frame::before { top: 9px; left: 9px; border-right: 0; border-bottom: 0; }
.tc-frame::after { bottom: 9px; right: 9px; border-left: 0; border-top: 0; }
.tc-sheen {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 245, 220, .22), transparent 45%);
  mix-blend-mode: soft-light;
}
.tcard:hover .tc-sheen { opacity: 1; }
.tc-foil { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: none; }
.tcard.maxed .tc-foil {
  display: block; mix-blend-mode: color-dodge; opacity: .35;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 200, 120, .6) 35%, rgba(180, 140, 255, .5) 45%, rgba(120, 230, 200, .5) 55%, transparent 70%) 0 0 / 250% 250%;
  animation: foil 6s linear infinite;
}
@keyframes foil { to { background-position: 250% 250%; } }
.tc-emblem { position: absolute; top: 10px; right: 8px; z-index: 4; }
.tc-body { position: relative; z-index: 4; margin-top: auto; padding: 0 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.tc-name { font-family: var(--display); font-size: 25px; line-height: 1; text-shadow: 0 2px 10px rgba(0, 0, 0, .9); }
.tc-title { font-family: var(--caps); font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--tc); margin-bottom: 7px; }
.tc-sub { font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.tc-foot {
  display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line-soft); font-family: var(--cond); font-size: 13px; color: var(--paper-2); letter-spacing: .02em;
}
.tcard.unplayed { filter: grayscale(1) brightness(.6); }
.tcard.unplayed:hover { filter: grayscale(.4) brightness(.85); }
.tcard.unplayed .tc-title { color: var(--dim); }
.hero-grid.intro .tcard { animation: deal .7s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes deal { from { opacity: 0; transform: translateY(28px) rotateX(18deg) scale(.96); } }

/* ----------------------------------------------------------------- ledger */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.ledger { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 14px; }
.ledger th {
  font-family: var(--caps); font-weight: 400; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 4px 12px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.ledger th.num { text-align: right; }
.ledger th.center { text-align: center; }
.ledger td { padding: 7px 12px; white-space: nowrap; background: rgba(0, 0, 0, .28); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.ledger td:first-child { border-left: 3px solid var(--rc); border-radius: 2px 0 0 2px; }
.ledger td:last-child { border-right: 1px solid var(--line-soft); }
.ledger tbody tr { cursor: pointer; }
.ledger tbody tr:hover td { background: rgba(217, 181, 106, .06); }
.row-win { --rc: var(--win); }
.row-loss { --rc: var(--oxblood); }
.row-void td { opacity: .5; }
.ledger .when { color: var(--muted); font-size: 13px; }
.ledger .mode { color: var(--paper-2); font-size: 13px; }
.ledger .res { font-family: var(--caps); letter-spacing: .14em; font-size: 12px; text-transform: uppercase; }
.row-win .res { color: var(--win); }
.row-loss .res { color: var(--loss); }
.ledger .kda { font-family: var(--cond); font-size: 15px; font-weight: 600; }
.ledger .kda i { font-style: normal; color: var(--dim); margin: 0 3px; font-weight: 400; }
.ledger .pts { font-family: var(--display); font-size: 19px; color: var(--gold); }
.ledger sup { font-family: var(--body); font-size: 11px; color: var(--muted); margin-left: 2px; }
.ledger .void { color: var(--dim); font-family: var(--body); font-size: 12px; }
.ledger .empty { text-align: center; color: var(--muted); padding: 30px; font-family: var(--flavor); font-style: italic; font-size: 18px; }
.ledger.compact td { padding: 5px 10px; }
.hero-chip { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.hero-chip img { width: 30px; height: 30px; object-fit: cover; border-radius: 50%; border: 1px solid rgba(var(--hero-rgb), .8); box-shadow: 0 0 10px -2px rgba(var(--hero-rgb), .7); background: var(--ink-2); }

/* ------------------------------------------------------------- milestones */
.milestones { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 14px 0 0; }
.milestones li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.milestones b { display: block; font-family: var(--caps); font-weight: 400; letter-spacing: .1em; color: var(--tc); font-size: 11.5px; }

/* --------------------------------------------------------------- ceremony */
.ceremony {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(var(--hero-rgb), .32), transparent 55%), rgba(6, 5, 4, .96);
  backdrop-filter: blur(8px);
  animation: fade .5s ease both;
}
.ceremony[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.cer-rays {
  position: absolute; left: 50%; top: 42%; width: 160vmax; height: 160vmax; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--tc) 11%, transparent) 0 3deg, transparent 3deg 12deg);
  -webkit-mask: radial-gradient(circle, #000 0, transparent 45%); mask: radial-gradient(circle, #000 0, transparent 45%);
  animation: rays 40s linear infinite;
}
@keyframes rays { to { transform: translate(-50%, -50%) rotate(360deg); } }
.cer-card { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 520px; }
.cer-emblem { animation: crest-in 1s var(--ease) both; margin-bottom: 18px; }
.cer-emblem .emblem { max-width: 60vw; height: auto; }
.cer-emblem.acct .medallion { width: 240px; }
@keyframes crest-in { 0% { opacity: 0; transform: scale(.3) rotate(-30deg); } 60% { opacity: 1; transform: scale(1.08) rotate(4deg); } 100% { transform: none; } }
.cer-card .eyebrow { animation: rise .6s .4s var(--ease) both; }
.cer-title {
  font-size: clamp(48px, 8vw, 84px); line-height: 1; animation: rise .7s .5s var(--ease) both;
  background: linear-gradient(180deg, #fffaf0, var(--tc) 60%, color-mix(in srgb, var(--tc) 50%, #000)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cer-sub { font-family: var(--caps); letter-spacing: .3em; text-transform: uppercase; color: var(--tc); animation: rise .7s .6s var(--ease) both; }
.cer-sub span { font-size: 9px; color: var(--gold-lo); margin: 0 8px; }
.cer-card .flavor { animation: rise .7s .7s var(--ease) both; font-size: 22px; }
.cer-card .btn-gold { margin-top: 8px; animation: rise .7s .85s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ------------------------------------------------------------------ codex */
.codex summary { list-style: none; cursor: pointer; display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.codex summary::-webkit-details-marker { display: none; }
.sum-hint { color: var(--muted); font-family: var(--flavor); font-style: italic; font-size: 18px; margin-bottom: 2px; }
.sum-icon { margin-left: auto; width: 34px; height: 34px; border: 1px solid var(--line); position: relative; transform: rotate(45deg); transition: transform .35s var(--ease), border-color .2s; }
.sum-icon::before, .sum-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--gold); transform: translate(-50%, -50%) rotate(-45deg); }
.sum-icon::after { transform: translate(-50%, -50%) rotate(45deg); transition: opacity .2s; }
.codex details[open] .sum-icon { transform: rotate(225deg); border-color: var(--gold-lo); }
.codex details[open] .sum-icon::after { opacity: 0; }
.codex summary:hover .sum-icon { border-color: var(--gold-lo); }
.codex-ladder { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin: 30px 0 26px; padding: 22px 10px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); position: relative; }
.codex-ladder::before { content: ""; position: absolute; left: 5%; right: 5%; top: 54px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-lo), transparent); }
.cl-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.cl-step b { font-family: var(--caps); font-weight: 400; font-size: 11.5px; letter-spacing: .1em; color: var(--paper-2); margin-top: 6px; }
.cl-step span { font-family: var(--cond); font-size: 14px; font-weight: 600; }
.cl-step small { font-size: 11px; color: var(--dim); }
.cl-step .emblem { transition: transform .3s var(--ease); }
.cl-step:hover .emblem { transform: scale(1.15) translateY(-4px); }
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 44px; }
.rules-grid p { color: var(--paper-2); margin: 0 0 14px; }
.rules-grid .h-small { margin-top: 10px; }
.mini { border-collapse: collapse; width: 100%; font-size: 14px; margin-bottom: 6px; }
.mini th { text-align: left; font-family: var(--caps); font-weight: 400; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.mini th.num { text-align: right; }
.mini td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); }
.mini tr:hover td { background: rgba(217, 181, 106, .04); }
.grade-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 4px; }
.grade-key span { display: inline-flex; align-items: center; gap: 4px; font-family: var(--cond); font-size: 14px; color: var(--paper-2); }

/* ------------------------------------------------------ view toggle + stats */
.topbar .view-toggle { margin-left: 8px; }
.view-toggle button { white-space: nowrap; }
.h-note { font-family: var(--body); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--dim); order: 2; }
.flavor.voice { font-size: 22px; color: var(--paper); position: relative; padding-left: 2px; text-shadow: 0 2px 14px rgba(0, 0, 0, .8); }

.stat-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stat-table th {
  font-family: var(--caps); font-weight: 400; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.stat-table th.num { text-align: right; }
.stat-table td { padding: 6px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; color: var(--paper-2); }
.stat-table tr:hover td { background: rgba(217, 181, 106, .04); }
.stat-table td.num { font-family: var(--cond); font-size: 15px; color: var(--muted); }
.stat-table td.strong { color: var(--paper); font-weight: 600; font-size: 16px; }
.stat-table.compact td { padding: 5px 8px; }
.stat-table .vs-h { min-width: 130px; }
.vs { display: inline-flex; align-items: center; gap: 8px; width: 100%; min-width: 120px; }
.vs-bar { position: relative; flex: 1; height: 6px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line-soft); }
.vs-bar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--gold-lo); }
.vs-bar > span { position: absolute; top: 0; bottom: 0; }
.vs.up .vs-bar > span { background: linear-gradient(90deg, rgba(143, 207, 159, .4), var(--win)); }
.vs.down .vs-bar > span { background: linear-gradient(270deg, rgba(214, 128, 110, .4), var(--loss)); }
.vs b { font-family: var(--cond); font-weight: 600; font-size: 13px; width: 44px; text-align: right; }
.vs.up b { color: var(--win); }
.vs.down b { color: var(--loss); }
.vs.none { color: var(--dim); }

.bests { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; }
.bests li a {
  display: flex; align-items: center; gap: 12px; padding: 7px 10px; color: inherit; text-decoration: none;
  background: linear-gradient(90deg, rgba(var(--hero-rgb), .14), rgba(0, 0, 0, .25) 60%);
  border: 1px solid var(--line-soft); border-left: 2px solid rgba(var(--hero-rgb), .9); border-radius: 2px;
  transition: border-color .2s, transform .2s var(--ease);
}
.bests li a:hover { border-color: var(--line); transform: translateX(3px); }
.bests img, .bests .b-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: var(--ink-2); border: 1px solid rgba(var(--hero-rgb), .8); }
.b-label { display: flex; flex-direction: column; font-family: var(--caps); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-2); min-width: 0; flex: 1; }
.b-label small { font-family: var(--body); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bests b { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--gold); font-variant-numeric: tabular-nums; }
.stat-table.compact .vs { min-width: 84px; gap: 6px; }
.stat-table.compact .vs-h { min-width: 0; }
.stat-table.compact .vs b { width: 36px; font-size: 12px; }
.stat-table.compact th { padding: 6px 8px; letter-spacing: .1em; }
.ledger .sep { font-style: normal; color: var(--dim); margin: 0 3px; }
.ledger.compact small { color: var(--dim); font-family: var(--body); font-size: 11px; margin-left: 2px; }

/* =====================================================================
   Site pages: shell, charts, overview widgets, hero page, match page.
   ===================================================================== */
#page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
#page:empty { display: none; }
a.btn-ghost, a.btn-gold { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
a.btn-ghost:hover { color: var(--gold-hi); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.h-small.spaced { margin-top: 22px; }
.up { color: var(--win); }
.down { color: var(--loss); }
.loading-line { font-family: var(--flavor); font-style: italic; font-size: 19px; color: var(--muted); margin: 6px 0; animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.select select {
  background: rgba(0, 0, 0, .4); border: 1px solid var(--line); border-radius: 2px; color: var(--paper);
  padding: 7px 30px 7px 10px; font-family: var(--caps); font-size: 12px; letter-spacing: .1em; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.crumb { font-family: var(--caps); font-size: 12px; letter-spacing: .2em; color: var(--muted); text-decoration: none; text-transform: uppercase; margin-bottom: 10px; display: inline-block; }
.crumb:hover { color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 16px; }
.chip {
  font-family: var(--caps); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--paper-2);
  padding: 4px 10px; border: 1px solid rgba(var(--hero-rgb), .55); background: rgba(var(--hero-rgb), .12); border-radius: 2px;
}

/* ------------------------------------------------------------------ charts */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.c-grid { stroke: var(--line-soft); stroke-width: 1; stroke-dasharray: 2 4; }
.c-grid.base { stroke: var(--line); stroke-dasharray: none; }
.c-axis { fill: var(--dim); font-family: var(--cond); font-size: 11.5px; letter-spacing: .04em; }
.c-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(0, 0, 0, .6)); }
.c-line.dashed { stroke-dasharray: 5 4; }
.c-end { filter: drop-shadow(0 0 6px currentColor); }
.c-ref { stroke: var(--tc, var(--gold-lo)); stroke-opacity: .45; stroke-dasharray: 3 5; }
.c-ref.mid { stroke: var(--muted); }
.c-ref-label { fill: var(--tc, var(--gold-lo)); font-family: var(--caps); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.c-ref-label.mid { fill: var(--muted); }
.c-ref.gold, .c-ref-label.gold { --tc: var(--gold); }
.c-mark line { stroke: var(--mk, var(--gold)); stroke-opacity: .16; stroke-width: 1; }
.c-mark:hover line { stroke-opacity: .6; }
.c-mark path { fill: var(--mk, var(--gold)); stroke: var(--ink-1); stroke-width: 1; }
.c-mark.amber { --mk: var(--amber); }
.c-mark.sapphire { --mk: var(--sapphire); }
.c-mark.boss { --mk: #e2655a; }
.c-mark[class*="t-"] { --mk: var(--tc); }
.c-guide { stroke: var(--paper-2); stroke-opacity: 0; stroke-width: 1; stroke-dasharray: 2 3; pointer-events: none; }
.chart.hover .c-guide { stroke-opacity: .5; }
.c-hdots circle { fill: var(--ink-0); stroke-width: 2.4; opacity: 0; pointer-events: none; }
.chart.hover .c-hdots circle { opacity: 1; }
.c-tip {
  position: absolute; top: 8px; z-index: 5; pointer-events: none; min-width: 170px;
  background: rgba(14, 12, 10, .94); border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: 2px;
  padding: 8px 10px; font-size: 12.5px; box-shadow: 0 14px 30px rgba(0, 0, 0, .6); backdrop-filter: blur(4px);
}
.c-tip .tip-h { font-family: var(--caps); font-size: 11px; letter-spacing: .12em; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; white-space: nowrap; }
.c-tip div:not(.tip-h) { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--paper-2); }
.c-tip i, .c-legend i { width: 10px; height: 3px; display: inline-block; flex: none; }
.c-tip b { margin-left: auto; padding-left: 12px; font-family: var(--cond); font-size: 14px; color: var(--paper); }
.c-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.c-legend span { display: inline-flex; align-items: center; gap: 7px; }
.c-legend i { width: 16px; }

.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hb-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "img label val" "img track track";
  align-items: center; gap: 2px 12px; color: inherit; text-decoration: none; padding: 5px 6px; border-radius: 2px; transition: background .2s;
}
.hb-row img { grid-area: img; }
.hb-label { grid-area: label; flex-direction: row !important; align-items: baseline; gap: 8px; }
.hb-track { grid-area: track; }
.hb-val { grid-area: val; }
a.hb-row:hover { background: rgba(var(--hero-rgb), .1); }
.hb-row img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(var(--hero-rgb), .8); background: var(--ink-2); }
.hb-label { display: flex; flex-direction: column; font-size: 14px; line-height: 1.15; min-width: 0; }
.hb-label small { font-size: 11.5px; color: var(--dim); font-family: var(--caps); letter-spacing: .08em; }
.hb-track { height: 7px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line-soft); position: relative; }
.hb-track > span { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--gold); opacity: .85; animation: bar-in 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); box-shadow: 0 0 10px rgba(var(--hero-rgb), .5); }
.hb-val { font-family: var(--cond); font-weight: 600; font-size: 16px; text-align: right; }

.cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; align-items: end; height: 110px; }
.col { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.col-bar { flex: 1; width: 100%; position: relative; background: rgba(0, 0, 0, .3); }
.col-bar > span { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); background: linear-gradient(0deg, var(--gold-lo), var(--gold)); opacity: .7; animation: col-in 1s var(--ease) both; }
.col.top .col-bar > span { opacity: 1; background: linear-gradient(0deg, var(--gold), var(--gold-hi)); box-shadow: 0 0 10px rgba(217, 181, 106, .5); }
.col:hover .col-bar > span { opacity: 1; }
.col-l { font-family: var(--cond); font-size: 10.5px; color: var(--dim); height: 14px; white-space: nowrap; }

.calendar svg { width: 100%; height: auto; display: block; }
.cal { fill: rgba(0, 0, 0, .45); stroke: var(--line-soft); stroke-width: .6; }
.cal.l1 { fill: rgba(217, 181, 106, .25); }
.cal.l2 { fill: rgba(217, 181, 106, .45); }
.cal.l3 { fill: rgba(217, 181, 106, .7); }
.cal.l4 { fill: var(--gold-hi); }
.cal.good { stroke: rgba(143, 207, 159, .8); }
rect.cal:hover { stroke: var(--paper); stroke-width: 1.4; }
.cal-key { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11px; color: var(--dim); margin-top: 6px; }
.cal-key i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.cal-key i.cal { background: rgba(0, 0, 0, .45); border: 1px solid var(--line-soft); }
.cal-key i.l1 { background: rgba(217, 181, 106, .25); }
.cal-key i.l2 { background: rgba(217, 181, 106, .45); }
.cal-key i.l3 { background: rgba(217, 181, 106, .7); }
.cal-key i.l4 { background: var(--gold-hi); }

.donut { display: block; overflow: visible; }
.donut-track { stroke: rgba(0, 0, 0, .5); }
.donut circle:not(.donut-track) { transition: stroke-width .2s; }
.donut circle:not(.donut-track):hover { stroke-width: 18; }
.donut-big { font-family: var(--display); font-size: 34px; fill: var(--paper); }
.donut-sub { font-family: var(--caps); font-size: 10px; letter-spacing: .14em; fill: var(--muted); text-transform: uppercase; }
.legend { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; color: var(--paper-2); }
.legend i { width: 9px; height: 9px; transform: rotate(45deg); display: inline-block; }
.legend b { margin-left: auto; font-family: var(--cond); font-weight: 600; }
.spark { width: 100%; height: 30px; display: block; }
.spark path { fill: none; stroke: var(--gold); stroke-width: 1.5; }

/* ---------------------------------------------------------------- overview */
.who-tags { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 6px; }
.rank-line { display: inline-flex; align-items: center; gap: 8px; font-family: var(--caps); font-size: 13px; letter-spacing: .12em; color: var(--paper-2); }
.rank-badge { width: var(--sz); height: var(--sz); display: inline-grid; place-items: center; flex: none; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rc, var(--gold)) 50%, transparent)); }
.rank-badge img { width: 100%; height: 100%; object-fit: contain; }
.rank-badge.none { border: 1px dashed var(--line); transform: rotate(45deg) scale(.72); filter: none; }
.rank-badge.none span { transform: rotate(-45deg); color: var(--dim); font-family: var(--display); }

.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 26px; align-items: start; }
.form-side { display: flex; flex-direction: column; gap: 14px; border-left: 1px solid var(--line-soft); padding-left: 22px; }
.fs-label { display: block; font-family: var(--caps); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.fs-stat { display: flex; flex-direction: column; }
.fs-stat b { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; }
.fs-stat b.w { color: var(--win); }
.fs-stat b.l { color: var(--loss); }
.fs-stat span { font-size: 12.5px; color: var(--muted); }
.fs-stat em { font-style: normal; display: block; font-size: 12px; }
.pips { display: flex; flex-wrap: wrap; gap: 3px 3.5px; }
.pip { width: 9px; height: 9px; transform: rotate(45deg); display: inline-block; border: 1px solid transparent; transition: transform .15s; }
.pip.w { background: var(--win); box-shadow: 0 0 6px rgba(143, 207, 159, .5); }
.pip.l { background: transparent; border-color: var(--loss); }
.pip:hover { transform: rotate(45deg) scale(1.35); }

.ov-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; }
.act-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.act-facts div { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 8px; }
.act-facts b { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; }
.act-facts span { font-size: 12px; color: var(--muted); }
.act-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }

.pool { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: start; }
.pool-donut { display: flex; flex-direction: column; align-items: center; }
.pool-donut .legend { width: 100%; }

.company { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.people li { display: grid; grid-template-columns: 38px minmax(0, 1fr) 150px; align-items: center; gap: 12px; padding: 6px 8px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line-soft); border-radius: 2px; }
.pp-av { width: 38px; height: 38px; border-radius: 2px; overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); }
.pp-av img { width: 100%; height: 100%; object-fit: cover; }
.pp-name { display: flex; flex-direction: column; min-width: 0; }
.pp-name a { color: var(--paper); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-name a:hover { color: var(--gold); }
.pp-name small { font-size: 12px; color: var(--dim); }
.pp-wr { display: flex; align-items: center; gap: 8px; }
.pp-bar { flex: 1; height: 6px; background: rgba(0, 0, 0, .5); position: relative; }
.pp-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--gold-lo); }
.pp-bar > span { position: absolute; inset: 0 auto 0 0; width: var(--w); background: linear-gradient(90deg, var(--gold-lo), var(--gold)); }
.pp-wr b { font-family: var(--cond); font-size: 14px; width: 38px; text-align: right; }

.vs-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vs-card { display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); position: relative; }
.vs-card.best { border-color: var(--gold-lo); background: linear-gradient(180deg, rgba(217, 181, 106, .1), rgba(0, 0, 0, .25)); }
.vs-card.best::after { content: "Stronger"; position: absolute; top: 10px; right: 10px; font-family: var(--caps); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.vc-label { font-family: var(--caps); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.vs-card b { font-family: var(--display); font-weight: 400; font-size: 44px; line-height: 1.05; margin-top: 4px; }
.vc-sub { font-size: 12px; color: var(--dim); }
.vc-bar { height: 6px; background: rgba(0, 0, 0, .5); margin: 10px 0 12px; position: relative; }
.vc-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--gold-lo); }
.vc-bar > span { position: absolute; inset: 0 auto 0 0; width: var(--w); background: linear-gradient(90deg, var(--gold-lo), var(--gold)); animation: bar-in 1s var(--ease) both; }
.vs-card dl { display: flex; gap: 20px; margin: 0; }
.vs-card dt { font-family: var(--caps); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.vs-card dd { margin: 0; font-family: var(--cond); font-size: 18px; font-weight: 600; }

/* ------------------------------------------------------------ items/build */
.item {
  --sc: var(--line); width: var(--sz); height: var(--sz); position: relative; display: inline-grid; place-items: center; flex: none;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--sc) 40%, #111), #0d0c0b 80%);
  border: 1px solid color-mix(in srgb, var(--sc) 75%, transparent); border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6);
}
.item img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8)); }
.item.s-weapon { --sc: var(--slot-weapon); }
.item.s-vitality { --sc: var(--slot-vitality); }
.item.s-spirit { --sc: var(--slot-spirit); }
.item.sold { opacity: .35; filter: grayscale(.8); }
.it-tier { position: absolute; bottom: -1px; right: 1px; font-style: normal; font-size: calc(var(--sz) * .16); color: var(--sc); letter-spacing: -1px; line-height: 1; text-shadow: 0 0 3px #000; }
.build { display: inline-flex; gap: 3px; flex-wrap: nowrap; vertical-align: middle; }
.build .it-tier { display: none; }

.ledger.tight td { padding: 5px 10px; }
.ledger .row-link { color: inherit; text-decoration: none; }
.ledger tbody tr:hover .hero-chip span { color: var(--gold); }
.summary-bar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; margin: 0 0 18px; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, .25); }
.summary-bar div { padding: 10px 14px; border-right: 1px solid var(--line-soft); }
.summary-bar div:last-child { border-right: 0; }
.summary-bar dt { font-family: var(--caps); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.summary-bar dd { margin: 2px 0 0; font-family: var(--display); font-size: 22px; line-height: 1.1; }
.summary-bar dd small { font-size: 13px; color: var(--dim); }

/* ------------------------------------------------------------ heroes page */
.rank-strip { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)) 1.4fr; gap: 6px; align-items: end; padding: 14px 6px 18px; margin-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.rs-step { display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: .35; transition: opacity .2s; }
.rs-step.held { opacity: 1; }
.rs-step b { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1; color: var(--tc); margin-top: 4px; }
.rs-step span { font-family: var(--caps); font-size: 9.5px; letter-spacing: .08em; color: var(--dim); text-transform: uppercase; }
.rs-step .emblem { --tc: inherit; }
.rs-total { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: baseline; padding-left: 12px; border-left: 1px solid var(--line-soft); }
.rs-total b { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--gold); }
.rs-total span { font-size: 12px; color: var(--muted); }
.role-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.role-tabs button {
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line); color: var(--muted); padding: 6px 14px; border-radius: 2px;
  font-family: var(--caps); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; transition: all .2s;
}
.role-tabs button:hover { color: var(--paper); border-color: var(--gold-lo); }
.role-tabs button[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); background: rgba(217, 181, 106, .08); }

/* --------------------------------------------------------------- hero page */
.hero-page, .match-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.hp-banner, .mp-banner {
  position: relative; overflow: hidden; border-radius: 3px; border: 1px solid var(--line); min-height: 520px;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  background: radial-gradient(ellipse at 72% 45%, rgba(var(--hero-rgb), .35), transparent 62%), var(--ink-1);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), inset 0 0 140px rgba(0, 0, 0, .75);
}
.hp-banner::after, .mp-banner::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(217, 181, 106, .25); pointer-events: none; z-index: 3; }
.hp-bg { position: absolute; inset: 0; background-size: cover; background-position: right center; opacity: .85; animation: bg-in 1.4s var(--ease) both; }
@keyframes bg-in { from { opacity: 0; transform: scale(1.04); } }
.hp-veil { position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink-1) 18%, rgba(17, 15, 13, .78) 45%, rgba(17, 15, 13, .15) 75%), linear-gradient(0deg, rgba(10, 9, 8, .9), transparent 45%); }
.hp-content { position: relative; z-index: 2; padding: 34px 0 34px 44px; display: flex; flex-direction: column; align-items: flex-start; }
.cx { letter-spacing: 2px; color: var(--gold-lo); margin-left: 4px; }
.hp-name { width: min(100%, 520px); height: 130px; margin: 8px 0 2px; }
.hp-name.text { font-size: 76px; }
.hp-role { font-family: var(--caps); font-size: 14px; letter-spacing: .14em; color: var(--paper-2); margin: 0 0 10px; text-transform: uppercase; }
.hp-rank { display: flex; align-items: center; gap: 18px; width: 100%; max-width: 560px; margin: 6px 0 12px; }
.hp-rank-text { flex: 1; min-width: 0; }
.hp-rank .sp-title { margin-bottom: 8px; }
.hp-rank .ladder.lg, .hp-rank .lad-roman { max-width: none; }
.hp-next { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.hp-quick { display: flex; gap: 28px; margin: 6px 0 0; flex-wrap: wrap; }
.hp-quick dt { font-family: var(--caps); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hp-quick dd { margin: 2px 0 0; font-family: var(--display); font-size: 28px; line-height: 1.1; display: flex; align-items: center; min-height: 31px; }
.hp-portrait { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; padding-top: 40px; }
.hp-arch {
  width: min(84%, 380px); aspect-ratio: 280 / 400; position: relative; overflow: hidden;
  border-radius: 200px 200px 0 0; border: 1px solid rgba(217, 181, 106, .55); border-bottom: 0;
  background: radial-gradient(circle at 50% 30%, rgba(var(--hero-rgb), .55), transparent 70%), rgba(0, 0, 0, .3);
  box-shadow: inset 0 0 0 7px rgba(0, 0, 0, .35), inset 0 0 0 8px rgba(217, 181, 106, .25), 0 0 80px rgba(var(--hero-rgb), .35);
}
.hp-arch::before { /* sunburst behind the portrait */
  content: ""; position: absolute; inset: -20%; z-index: 0;
  background: repeating-conic-gradient(from 0deg at 50% 60%, rgba(255, 240, 200, .07) 0 3deg, transparent 3deg 10deg);
}
.hp-arch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; z-index: 1; -webkit-mask: linear-gradient(180deg, #000 72%, transparent); mask: linear-gradient(180deg, #000 72%, transparent); }

.abilities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.abilities li {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px;
  background: linear-gradient(135deg, rgba(var(--hero-rgb), .16), rgba(0, 0, 0, .3) 60%); border: 1px solid var(--line); border-radius: 2px;
  animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 80ms);
}
.ab-key { position: absolute; top: 8px; right: 10px; font-family: var(--display); font-size: 22px; color: rgba(var(--hero-rgb), .8); }
.ab-icon {
  width: 64px; height: 64px; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle, rgba(var(--hero-rgb), .45), rgba(0, 0, 0, .6) 70%);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.ab-icon::after { content: ""; position: absolute; inset: 0; clip-path: inherit; box-shadow: inset 0 0 0 2px var(--gold); border: 2px solid var(--gold); }
.ab-icon img { width: 58%; height: 58%; object-fit: contain; filter: brightness(0) invert(.95) drop-shadow(0 0 4px rgba(var(--hero-rgb), .9)); }
.ab-text { display: flex; flex-direction: column; min-width: 0; }
.ab-text b { font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.1; }
.ab-text small { font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 3px; }
.ab-tip {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 10; padding: 10px 12px; font-size: 13px; line-height: 1.45;
  background: rgba(14, 12, 10, .97); border: 1px solid var(--line); border-top: 2px solid rgb(var(--hero-rgb)); color: var(--paper-2);
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 16px 30px rgba(0, 0, 0, .6);
}
.abilities li:hover .ab-tip { opacity: 1; transform: none; }

.hp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; }
.hp-style .sigil { margin-bottom: 4px; }
.meta-compare { margin-top: 18px; }
.mc-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.mc-legend i { width: 14px; height: 6px; display: inline-block; margin-right: 6px; vertical-align: middle; }
.mc-legend i.you { background: rgb(var(--hero-rgb)); }
.mc-legend i.them { background: var(--muted); opacity: .6; }
.mc-row { display: grid; grid-template-columns: 96px 1fr 84px; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.mc-label { font-size: 13px; color: var(--paper-2); }
.mc-bars { display: flex; flex-direction: column; gap: 3px; }
.mc-bars span { height: 6px; width: var(--w); border-radius: 0 2px 2px 0; animation: bar-in 1s var(--ease) both; }
.mc-you { background: rgb(var(--hero-rgb)); box-shadow: 0 0 8px rgba(var(--hero-rgb), .6); }
.mc-them { background: var(--muted); opacity: .45; }
.mc-vals { display: flex; flex-direction: column; text-align: right; line-height: 1.15; }
.mc-vals b { font-family: var(--cond); font-size: 15px; }
.mc-vals small { font-size: 11.5px; color: var(--dim); }

.core-build { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 16px; margin-bottom: 22px; background: linear-gradient(90deg, rgba(var(--hero-rgb), .14), rgba(0, 0, 0, .25)); border: 1px solid var(--line); border-left: 3px solid rgb(var(--hero-rgb)); }
.cb-label { display: flex; flex-direction: column; font-family: var(--caps); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); min-width: 150px; }
.cb-label small { font-family: var(--body); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--dim); }
.cb-items { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cb-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 78px; text-align: center; }
.cb-item small { font-size: 11.5px; line-height: 1.2; color: var(--paper-2); }
.cb-item em { font-style: normal; font-family: var(--cond); font-size: 12px; color: var(--dim); }
.cb-arrow { font-style: normal; color: var(--gold-lo); font-size: 22px; margin-top: -30px; }
.ars-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ars-col .h-small { color: var(--sc); }
.ars-col.s-weapon { --sc: var(--slot-weapon); }
.ars-col.s-vitality { --sc: var(--slot-vitality); }
.ars-col.s-spirit { --sc: var(--slot-spirit); }
.ars-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ars-list li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 2px; }
.ars-list li:hover { background: rgba(255, 255, 255, .03); }
.ars-name { display: flex; flex-direction: column; font-size: 14px; line-height: 1.2; min-width: 0; }
.ars-name small { font-size: 11.5px; color: var(--dim); }
.ars-wr { font-family: var(--cond); font-weight: 600; font-size: 15px; }

.hp-lore .hp-playstyle { font-family: var(--flavor); font-style: italic; font-size: 20px; color: var(--paper); margin: 0 0 14px; line-height: 1.4; }
.lore-text { max-height: 340px; overflow-y: auto; padding-right: 8px; color: var(--paper-2); font-size: 14.5px; line-height: 1.7; }
.lore-text p { margin: 0 0 12px; }
.lore-text p:first-child::first-letter { float: left; font-family: var(--display); font-size: 58px; line-height: .85; margin: 4px 10px 0 0; color: rgb(var(--hero-rgb)); text-shadow: 0 0 20px rgba(var(--hero-rgb), .5); }
.bests.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* -------------------------------------------------------------- match page */
.mp-banner { min-height: 360px; }
.match-page.won .mp-banner { --res: var(--win); }
.match-page.lost .mp-banner { --res: var(--loss); }
.mp-content { position: relative; z-index: 2; padding: 34px 0 30px 44px; display: flex; flex-direction: column; align-items: flex-start; }
.mp-result {
  font-size: clamp(56px, 8vw, 104px); line-height: .95; margin: 6px 0 4px; letter-spacing: .04em; text-transform: uppercase;
  background: linear-gradient(180deg, #fffaf0, var(--res) 65%, color-mix(in srgb, var(--res) 45%, #000)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, .7));
}
.mp-when { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.mp-me { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px 16px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-left: 3px solid var(--res); }
.mp-me .hero-chip img { width: 40px; height: 40px; }
.mp-me .hero-chip span { font-family: var(--display); font-size: 22px; }
.mp-kda { font-family: var(--cond); font-weight: 600; font-size: 22px; }
.mp-kda i, .scoreboard .kda i { font-style: normal; color: var(--dim); margin: 0 3px; font-weight: 400; }
.mp-souls { font-family: var(--cond); font-size: 16px; color: var(--gold); }
.mp-pts { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 20px; color: var(--gold); }
.mp-score { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 30px 30px 30px 0; }
.mp-vs { font-family: var(--flavor); font-style: italic; font-size: 24px; color: var(--muted); }
.mp-team {
  display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 150px; padding: 16px 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--team) 20%, transparent), rgba(0, 0, 0, .55)); border: 1px solid color-mix(in srgb, var(--team) 55%, transparent); border-radius: 2px;
}
.mp-team.amber, .board.amber { --team: var(--amber); }
.mp-team.sapphire, .board.sapphire { --team: var(--sapphire); }
.mp-team.winner { box-shadow: 0 0 30px -6px var(--team); }
.mpt-name { font-family: var(--caps); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--team); }
.mpt-name small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .14em; }
.mp-team b { font-family: var(--display); font-weight: 400; font-size: 50px; line-height: 1.05; }
.mpt-sub { font-size: 12px; color: var(--muted); }
.mpt-rank { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--paper-2); }

.board { margin-bottom: 22px; }
.board-head { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-left: 3px solid var(--team); background: linear-gradient(90deg, color-mix(in srgb, var(--team) 18%, transparent), transparent 70%); margin-bottom: 4px; }
.bh-name { font-family: var(--caps); letter-spacing: .22em; text-transform: uppercase; color: var(--team); font-size: 14px; }
.bh-win, .bh-loss, .bh-you { font-family: var(--caps); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 2px 8px; border: 1px solid; }
.bh-win { color: var(--win); }
.bh-loss { color: var(--loss); }
.bh-you { color: var(--gold); margin-left: auto; }
.scoreboard { width: 100%; border-collapse: collapse; font-size: 14px; }
.scoreboard th { font-family: var(--caps); font-weight: 400; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.scoreboard th.num { text-align: right; }
.scoreboard td { padding: 6px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.scoreboard td.num { font-family: var(--cond); font-size: 15px; }
.scoreboard td.strong { color: var(--gold); font-weight: 600; }
.scoreboard tr.me td { background: linear-gradient(90deg, rgba(217, 181, 106, .14), rgba(217, 181, 106, .03)); }
.scoreboard tr.me td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.sb-player { display: flex; align-items: center; gap: 10px; }
.sb-player img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(var(--hero-rgb), .9); box-shadow: 0 0 10px -2px rgba(var(--hero-rgb), .8); background: var(--ink-2); }
.sb-player > span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.sb-player b { font-weight: 500; }
.sb-player small a, .sb-player small { color: var(--dim); text-decoration: none; font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.sb-player small a:hover { color: var(--gold); }
.mvp { font-family: var(--cond); font-weight: 700; font-size: 11px; padding: 1px 6px; border-radius: 2px; letter-spacing: .06em; }
.mvp.m1 { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1d160a; }
.mvp.m2 { border: 1px solid var(--t-silver); color: var(--t-silver); }
.mvp.m3 { border: 1px solid var(--t-bronze); color: var(--t-bronze); }
.dmg-cell { position: relative; display: inline-block; min-width: 70px; padding-bottom: 4px; }
.dmg-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: var(--w); background: rgb(var(--hero-rgb)); }

.timeline { position: relative; height: calc(var(--lanes) * 40px + 34px); margin: 8px 0 18px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--line-soft) calc(10% - 1px) 10%); }
.tl-tick { position: absolute; bottom: -20px; transform: translateX(-50%); font-family: var(--cond); font-size: 11px; color: var(--dim); }
.tl-item { position: absolute; bottom: calc(var(--lane) * 40px + 6px); transform: translateX(-50%); transition: transform .15s; }
.tl-item:hover { transform: translateX(-50%) scale(1.25); z-index: 2; }
.build-final { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; }
.build-final .build { flex-wrap: wrap; }

.share { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; margin-bottom: 10px; }
.share-l { font-size: 13px; color: var(--paper-2); }
.share-bar { display: flex; height: 26px; border: 1px solid var(--line); background: rgba(0, 0, 0, .4); overflow: hidden; }
.share-bar > span { width: var(--w); background: linear-gradient(180deg, rgba(var(--hero-rgb), .85), rgba(var(--hero-rgb), .5)); border-right: 1px solid var(--ink-0); display: grid; place-items: center; position: relative; animation: bar-in 1s var(--ease) both; }
.share-bar > span.me { box-shadow: inset 0 0 0 2px var(--gold-hi); z-index: 1; }
.share-bar img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.accolades { display: flex; flex-wrap: wrap; gap: 8px; }
.accolade { display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--line); border-top: 2px solid var(--gold); background: rgba(0, 0, 0, .3); }
.accolade b { font-family: var(--caps); font-weight: 400; font-size: 12px; letter-spacing: .1em; color: var(--paper); }
.accolade small { font-family: var(--cond); font-size: 13px; color: var(--gold); }

/* ------------------------------------------------------- site responsive */
@media (max-width: 1100px) {
  .ov-grid, .hp-grid { grid-template-columns: minmax(0, 1fr); }
  .abilities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary-bar div:nth-child(4) { border-right: 0; }
  .summary-bar div:nth-child(n + 5) { border-top: 1px solid var(--line-soft); }
  .rank-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 14px; }
  .rs-total { grid-column: 1 / -1; border-left: 0; padding-left: 0; grid-template-columns: auto 1fr auto 1fr; }
  .hide-md { display: none; }
}
@media (max-width: 820px) {
  .hp-banner, .mp-banner { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hp-portrait { position: absolute; inset: 0 0 auto auto; width: 56%; height: 100%; opacity: .45; padding: 0; }
  .hp-content, .mp-content { padding: 28px 22px; }
  .mp-score { padding: 0 22px 26px; justify-content: flex-start; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-side { border-left: 0; padding-left: 0; flex-direction: row; flex-wrap: wrap; gap: 18px; }
  .ars-grid, .company { grid-template-columns: minmax(0, 1fr); }
  .pool { grid-template-columns: minmax(0, 1fr); }
  .act-cols { grid-template-columns: minmax(0, 1fr); }
  .bests.two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .abilities { grid-template-columns: minmax(0, 1fr); }
  .hp-name { height: 84px; }
  .hp-quick { gap: 18px; }
  .hp-quick dd { font-size: 22px; }
  .hp-rank .emblem { width: 72px; height: 72px; }
  .people li { grid-template-columns: 34px minmax(0, 1fr) 100px; }
  .summary-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-bar div { border-right: 0; border-top: 1px solid var(--line-soft); }
  .mp-team { min-width: 0; flex: 1; padding: 12px; }
  .mp-team b { font-size: 36px; }
  .act-facts b { font-size: 22px; }
  .rank-strip .emblem { width: 36px; height: 36px; }
  .share { grid-template-columns: 1fr; gap: 4px; }
  .cb-item { width: 64px; }
}

/* ------------------------------------------------------------ compare page */
:root { --rival: #7cc3f0; }
.compare-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.cmp-duel { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); gap: 18px; align-items: stretch; }
.cmp-card {
  --side: var(--gold); position: relative; overflow: hidden; border: 1px solid color-mix(in srgb, var(--side) 55%, var(--line)); border-radius: 3px;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--hero-rgb), .3), transparent 70%), var(--ink-1);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .7), 0 0 40px -18px var(--side);
}
.cmp-card.b { --side: var(--rival); }
.cc-bg { position: absolute; inset: 0; background-size: cover; background-position: right center; opacity: .35; }
.cmp-card.b .cc-bg { background-position: left center; transform: scaleX(-1); }
.cmp-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 15, 13, .2), var(--ink-1) 85%); }
.cc-body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 26px 20px 20px; }
.cc-body .avatar-frame { width: 96px; height: 96px; background: linear-gradient(135deg, #fff, var(--side) 50%, color-mix(in srgb, var(--side) 40%, #000)); }
.cc-body h2 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.05; overflow-wrap: anywhere; }
.cc-body h2 a { color: var(--paper); text-decoration: none; }
.cc-body h2 a:hover { color: var(--side); }
.cc-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.cc-level { display: flex; flex-direction: column; align-items: center; margin: 4px 0; }
.cc-level span { font-family: var(--caps); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.cc-level b { font-family: var(--display); font-weight: 400; font-size: 58px; line-height: 1; color: var(--side); text-shadow: 0 0 24px color-mix(in srgb, var(--side) 45%, transparent); }
.cc-top { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-soft); }
.cc-top span { display: flex; flex-direction: column; line-height: 1.2; }
.cc-top small { font-family: var(--caps); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cc-top b { font-family: var(--display); font-weight: 400; font-size: 19px; }
.cc-top em { font-style: normal; font-size: 12px; color: var(--dim); }
.cc-mini { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.cc-mini b { font-family: var(--cond); font-size: 16px; color: var(--paper); }
.cmp-vs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; position: relative; }
.cmp-vs::before {
  content: ""; position: absolute; width: 120px; height: 120px; transform: rotate(45deg);
  border: 1px solid var(--gold-lo); box-shadow: inset 0 0 0 6px var(--ink-1), inset 0 0 0 7px rgba(217, 181, 106, .3);
  background: radial-gradient(circle, #2b251c, #120f0c);
}
.cmp-vs > * { position: relative; }
.vs-word { font-family: var(--flavor); font-style: italic; font-size: 30px; color: var(--paper-2); line-height: 1; }
.vs-score { font-family: var(--display); font-size: 34px; line-height: 1; display: flex; gap: 6px; align-items: baseline; }
.vs-score b { font-weight: 400; }
.vs-score b.a { color: var(--gold); }
.vs-score b.b { color: var(--rival); }
.vs-score i { font-style: normal; color: var(--dim); font-size: 22px; }
.vs-cap { font-family: var(--caps); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.tape { display: grid; gap: 4px; }
.tape-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 190px minmax(0, 1fr) 74px; align-items: center; gap: 12px; padding: 5px 4px; border-bottom: 1px solid var(--line-soft); animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.tape-row:hover { background: rgba(255, 255, 255, .02); }
.tl { text-align: center; font-family: var(--caps); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-2); }
.tl small { display: block; font-family: var(--body); font-size: 10.5px; letter-spacing: 0; text-transform: none; color: var(--dim); }
.tv { font-family: var(--cond); font-weight: 600; font-size: 17px; color: var(--muted); }
.tv.a { text-align: right; }
.tv.win.a { color: var(--gold); }
.tv.win.b { color: var(--rival); }
.tb { height: 10px; display: flex; background: rgba(0, 0, 0, .35); }
.tb.a { justify-content: flex-end; }
.tb > span { width: var(--w); height: 100%; opacity: .35; animation: bar-in 1s var(--ease) both; }
.tb.a > span { background: linear-gradient(270deg, var(--gold), var(--gold-lo)); }
.tb.b > span { background: linear-gradient(90deg, var(--rival), color-mix(in srgb, var(--rival) 45%, #000)); }
.tb.win > span { opacity: 1; box-shadow: 0 0 10px color-mix(in srgb, currentColor 40%, transparent); }
.tb.a.win > span { box-shadow: 0 0 10px rgba(217, 181, 106, .5); }
.tb.b.win > span { box-shadow: 0 0 10px rgba(124, 195, 240, .5); }

.sg-shape.b { fill: rgba(124, 195, 240, .16); stroke: var(--rival); filter: drop-shadow(0 0 8px rgba(124, 195, 240, .4)); }
.sigil.duo .sg-shape.a { fill: rgba(217, 181, 106, .18); }
.sg-dot.b { fill: var(--rival); }
.sg-val.b { fill: var(--rival); }
.duo-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 13px; color: var(--paper-2); margin-top: 6px; }
.duo-legend i { display: inline-block; width: 16px; height: 3px; margin-right: 8px; vertical-align: middle; }
.duo-legend .a i { background: var(--gold); }
.duo-legend .b i { background: var(--rival); }
.duo-legend b { font-weight: 400; color: var(--gold); font-family: var(--caps); letter-spacing: .08em; }
.duo-legend .b b { color: var(--rival); }

.shared { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.shared a { display: grid; grid-template-columns: 70px minmax(0, 1fr) 54px minmax(0, 1fr) 46px; align-items: center; gap: 10px; padding: 5px 8px; color: inherit; text-decoration: none; background: rgba(0, 0, 0, .22); border: 1px solid var(--line-soft); }
.shared a:hover { border-color: var(--line); }
.sh-when { font-size: 12px; color: var(--dim); }
.sh-rel { font-family: var(--caps); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.sh-rel.with { color: var(--win); }
.sh-rel.against { color: var(--loss); }
.sh-res { font-family: var(--cond); font-weight: 600; text-align: right; }

.shared-heroes { display: grid; gap: 6px; }
.shh-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1fr); align-items: center; gap: 14px; padding: 6px 10px; border: 1px solid var(--line-soft); background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(var(--hero-rgb), .14), rgba(0, 0, 0, .25)); }
.shh-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--paper); text-decoration: none; }
.shh-hero img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(var(--hero-rgb), .9); box-shadow: 0 0 14px -2px rgba(var(--hero-rgb), .8); }
.shh-hero b { font-family: var(--display); font-weight: 400; font-size: 17px; }
.shh-hero:hover b { color: var(--gold); }
.sh-side { display: flex; align-items: center; gap: 10px; opacity: .65; transition: opacity .2s; }
.sh-side.a { flex-direction: row-reverse; text-align: right; }
.sh-side span { display: flex; flex-direction: column; line-height: 1.2; }
.sh-side b { font-family: var(--caps); font-weight: 400; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.sh-side.a b { color: var(--gold); }
.sh-side.b b { color: var(--rival); }
.sh-side small { font-size: 12px; color: var(--muted); }
.lead-a .sh-side.a, .lead-b .sh-side.b { opacity: 1; }

.cmp-find { display: flex; gap: 8px; max-width: 560px; }
.cmp-find input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: 2px; color: var(--paper); }
.cmp-find input:focus { outline: none; border-color: var(--gold-lo); }
.cmp-hits { margin-top: 12px; }
.cmp-mates { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.cmp-mate { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; color: inherit; text-decoration: none; background: rgba(0, 0, 0, .25); border: 1px solid var(--line-soft); transition: border-color .2s, transform .2s var(--ease); }
.cmp-mate:hover { border-color: var(--rival); transform: translateY(-2px); }
.cmp-mate b { font-weight: 500; }
.cmp-go, .pp-cmp { font-size: 18px; color: var(--rival); text-decoration: none; }
.people li { grid-template-columns: 38px minmax(0, 1fr) 150px 22px; }
.pp-cmp { opacity: .55; transition: opacity .2s; text-align: center; }
.pp-cmp:hover { opacity: 1; }

@media (max-width: 820px) {
  .cmp-duel { grid-template-columns: minmax(0, 1fr); }
  .cmp-vs { padding: 26px 0; }
  .tape-row { grid-template-columns: 54px minmax(0, 1fr) 110px minmax(0, 1fr) 54px; gap: 8px; }
  .tl { font-size: 10.5px; letter-spacing: .06em; }
  .shh-row { grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr); gap: 8px; }
  .sh-side .emblem { display: none; }
}
@media (max-width: 640px) {
  .people li { grid-template-columns: 34px minmax(0, 1fr) 100px 18px; }
  .tv { font-size: 14px; }
  .shared a { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) 40px; }
  .sh-when { display: none; }
  .sh-side small { font-size: 11px; }
}

/* ---------------------------------------------------------------- welcome */
body[data-page="welcome"] .jump, body[data-page="welcome"] .topbar .view-toggle,
body[data-page="welcome"] .topbar .lookup, body[data-page="welcome"] #refresh { display: none; }
body[data-page="welcome"] #share { margin-left: auto; }
.welcome { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 0 10px; }
.wl-mark { width: 190px; height: 190px; margin-bottom: 6px; animation: crest-in 1.1s var(--ease) both; }
.wl-mark svg { width: 100%; height: 100%; overflow: visible; }
.wl-rays line { stroke: var(--gold-lo); stroke-width: 1.4; }
.wl-rays { transform-origin: 100px 100px; animation: spin 140s linear infinite; }
.wl-o { fill: var(--ink-0); stroke: url(#m-gold); stroke-width: 3; filter: drop-shadow(0 0 20px rgba(217, 181, 106, .35)); }
.wl-i { fill: none; stroke: var(--gold-lo); stroke-width: 1; }
.wl-eye { fill: none; stroke: url(#m-gold); stroke-width: 2.5; }
.wl-pupil { fill: var(--gold); transform-origin: 100px 100px; animation: blink 6s ease-in-out infinite 2s; }
.wl-title { font-size: clamp(44px, 8vw, 92px); line-height: 1; margin: 10px 0 4px; text-transform: uppercase; letter-spacing: .08em; }
.wl-title span { color: var(--paper); }
.wl-title em {
  font-style: normal; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.welcome > .flavor { font-size: 22px; margin-bottom: 26px; }
.wl-find { display: flex; gap: 10px; width: min(100%, 620px); }
.wl-find input {
  flex: 1; min-width: 0; height: 52px; padding: 0 16px; font-size: 16px;
  background: rgba(0, 0, 0, .55); border: 1px solid var(--gold-lo); border-radius: 2px; color: var(--paper);
  box-shadow: 0 0 0 4px rgba(217, 181, 106, .06), 0 20px 40px -20px rgba(0, 0, 0, .9);
}
.wl-find input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217, 181, 106, .16); }
.wl-find .btn-gold { height: 52px; padding: 0 26px; }
.wl-hits { width: min(100%, 620px); margin-top: 12px; text-align: left; }
.wl-help { width: min(100%, 620px); margin-top: 14px; text-align: left; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, .25); padding: 10px 16px; }
.wl-help summary { cursor: pointer; font-family: var(--caps); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.wl-help ul { margin: 12px 0 6px; padding-left: 18px; color: var(--paper-2); font-size: 14px; display: grid; gap: 6px; }
.wl-help b { color: var(--paper); font-weight: 500; }
.wl-recent { width: min(100%, 880px); margin-top: 30px; text-align: left; }
.wl-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: 100%; margin-top: 44px; }
.wl-features > div {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px 18px;
  border: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(33, 29, 24, .8), rgba(17, 15, 13, .8));
  animation: rise .7s var(--ease) both;
}
.wl-features > div:nth-child(2) { animation-delay: .08s; }
.wl-features > div:nth-child(3) { animation-delay: .16s; }
.wl-features > div:nth-child(4) { animation-delay: .24s; }
.wl-features b { font-family: var(--display); font-weight: 400; font-size: 21px; margin-top: 4px; }
.wl-features span { font-size: 13px; color: var(--muted); line-height: 1.45; }
@media (max-width: 820px) { .wl-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .wl-find { flex-direction: column; }
  .wl-mark { width: 140px; height: 140px; }
  .welcome > .flavor { font-size: 19px; }
}

/* ------------------------------------------------------------- account slot */
.me-slot { display: flex; align-items: center; gap: 8px; }
.me-slot:empty { display: none; }
.me-slot .signin { height: 42px; gap: 8px; padding: 0 14px; white-space: nowrap; }
.me-slot .signin svg, .wl-steam svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.me-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 4px; text-decoration: none; color: var(--paper);
  border: 1px solid var(--gold-lo); border-radius: 2px; background: rgba(217, 181, 106, .08); max-width: 210px;
}
.me-chip img { width: 32px; height: 32px; border-radius: 2px; }
.me-chip span { font-family: var(--caps); font-size: 12px; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chip:hover { border-color: var(--gold); }
.me-out { font-size: 12px; color: var(--muted); text-decoration: none; }
.me-out:hover { color: var(--gold); }
.wl-steam { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 34px; font-size: 14px; margin-bottom: 6px; }
.wl-or { font-family: var(--flavor); font-style: italic; color: var(--muted); font-size: 17px; margin: 6px 0 14px; }

/* ------------------------------------------------------------- ladders page */
.ladder-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.hero-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-pick a {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; position: relative;
  border: 1px solid var(--line); background: var(--ink-2); opacity: .55; transition: opacity .2s, transform .2s var(--ease), box-shadow .2s;
  text-decoration: none; color: var(--paper); font-size: 10px;
}
.hero-pick a.played { opacity: .85; }
.hero-pick a:hover { opacity: 1; transform: translateY(-2px); }
.hero-pick a.on { opacity: 1; border-color: rgb(var(--hero-rgb)); box-shadow: 0 0 0 2px var(--ink-0), 0 0 0 3px rgb(var(--hero-rgb)), 0 0 18px rgba(var(--hero-rgb), .6); }
.hero-pick img { width: 100%; height: 100%; object-fit: cover; }
.hero-pick .hp-all { --hero-rgb: 217, 181, 106; border-radius: 2px; width: 64px; font-family: var(--caps); letter-spacing: .14em; font-size: 12px; text-transform: uppercase; opacity: .85; }
.hero-pick .hp-all.on { color: var(--gold); }

.stand-top { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; margin-bottom: 6px; }
.stand-rank { display: flex; align-items: center; gap: 14px; }
.stand-rank span, .stand-official { display: flex; flex-direction: column; }
.stand-rank small, .stand-official small { font-family: var(--caps); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.stand-rank b { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.stand-official { padding-left: 26px; border-left: 1px solid var(--line-soft); }
.stand-official b { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; color: var(--gold); }
.stand-official b.dim, .pc-pos.dim { color: var(--dim); font-size: 28px; }
.stand-official span { font-size: 12.5px; color: var(--muted); }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pos-card {
  --pc: var(--muted); display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 12px; position: relative; overflow: hidden;
  border: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(var(--hero-rgb), .08), rgba(0, 0, 0, .3));
}
.pos-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--pc); }
.pos-card.elite { --pc: var(--t-radiant); }
.pos-card.great { --pc: var(--t-gold); }
.pos-card.good { --pc: var(--t-jade); }
.pos-card.low { --pc: var(--t-ash); }
.pc-label { font-family: var(--caps); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pc-pos { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.1; color: var(--paper); }
.pos-card .pc-pos:not(.dim) { animation: rise .5s var(--ease) both; }
.pc-sub { font-size: 12.5px; color: var(--paper-2); font-variant-numeric: tabular-nums; }
.pc-bar { height: 4px; margin-top: 8px; background: rgba(0, 0, 0, .5); position: relative; }
.pc-bar > span { position: absolute; inset: 0 auto 0 0; width: var(--w, 0); background: var(--pc); transition: width 1s var(--ease); box-shadow: 0 0 8px var(--pc); }
.pos-card:has(.pc-pos:not(.dim)):not(.elite):not(.great):not(.good):not(.low) .pc-pos { animation: breathe 1.6s ease-in-out infinite; }

.ladder-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ladder-table th { font-family: var(--caps); font-weight: 400; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.ladder-table th.num { text-align: right; }
.ladder-table td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.ladder-table tr:hover td { background: rgba(217, 181, 106, .04); }
.lt-rank { font-family: var(--cond); font-weight: 600; font-size: 16px; color: var(--muted); width: 56px; }
.lt-name a { color: var(--paper); text-decoration: none; }
.lt-name a:hover { color: var(--gold); }
.ladder-table .hero-chip img { width: 26px; height: 26px; margin-right: -4px; }
.ladder-table tr.me td { background: linear-gradient(90deg, rgba(217, 181, 106, .18), rgba(217, 181, 106, .03)); }
.ladder-table tr.me td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.medal { display: inline-grid; place-items: center; width: 28px; height: 28px; transform: rotate(45deg); font-family: var(--display); font-size: 16px; }
.medal { border: 1.5px solid var(--mc); color: var(--mc); background: color-mix(in srgb, var(--mc) 14%, var(--ink-1)); }
.medal i { font-style: normal; transform: rotate(-45deg); }
.p1 .medal { --mc: var(--t-gold); box-shadow: 0 0 12px rgba(232, 194, 106, .5); }
.p2 .medal { --mc: var(--t-silver); }
.p3 .medal { --mc: var(--t-bronze); }
.podium .lt-name a, .podium .lt-name span { font-family: var(--display); font-size: 18px; }

/* --------------------------------------------------- hero page ladder strip */
.hero-standing { padding: 16px 22px; }
.hs-row { display: flex; align-items: center; gap: 14px 30px; flex-wrap: wrap; }
.hs-label { font-family: var(--caps); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.hs-item { display: flex; flex-direction: column; }
.hs-item small { font-size: 11.5px; color: var(--muted); }
.hs-item b { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.1; }
.hs-item b em { font-style: normal; font-family: var(--body); font-size: 12px; color: var(--muted); margin-left: 4px; }
.hs-item .dim { color: var(--dim); font-size: 16px; }
.hs-row .btn-ghost { margin-left: auto; }

@media (max-width: 640px) {
  .me-slot .signin span, .me-chip span, .me-out { display: none; }
  .me-chip { padding: 0 4px; }
  .stand-official { padding-left: 0; border-left: 0; }
  .hero-pick a { width: 38px; height: 38px; }
  .hs-row .btn-ghost { margin-left: 0; }
}

/* ----------------------------------------------------------------- footer */
.foot { position: relative; z-index: 1; text-align: center; color: var(--dim); font-size: 12.5px; padding: 0 16px 40px; }
.foot svg { width: 120px; height: 12px; fill: none; stroke: var(--gold-lo); }
.foot svg path:last-child { fill: var(--gold-lo); }
.foot p { margin: 8px 0 0; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .topbar .view-toggle { margin-left: auto; }
  .topbar .lookup { margin-left: 0; }
  .dossier { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dz-id, .dz-cats, .dz-grades { grid-column: 1 / -1; }
  .grade-hist { min-height: 120px; }
  .jump { order: 5; flex-basis: 100%; justify-content: space-between; border-top: 1px solid var(--line-soft); padding-top: 6px; margin-top: 2px; }
  .jump a { padding: 6px 4px; }
}
@media (max-width: 960px) {
  .hide-sm { display: none; }
}
@media (max-width: 820px) {
  .spotlight { grid-template-columns: minmax(0, 1fr); }
  .sp-portrait { position: absolute; inset: 0 0 auto auto; width: 52%; height: 100%; opacity: .55; padding: 0; }
  .sp-emblem { display: none; }
  .sp-content { padding: 30px 24px; }
  .rules-grid { grid-template-columns: minmax(0, 1fr); }
  .codex-ladder { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 20px; }
  .codex-ladder::before { display: none; }
  .plaques.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .topbar { gap: 10px; padding-top: 10px; padding-bottom: 10px; position: relative; }
  .brand-text em { font-size: 20px; }
  .lookup { order: 3; max-width: none; flex-basis: 100%; }
  #share { margin-left: auto; }
  .panel { padding: 20px 16px; }
  .dossier { grid-template-columns: minmax(0, 1fr); }
  .dz-medal, .dz-sigil { grid-column: 1 / -1; }
  .plaques { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .who { gap: 14px; }
  .avatar-frame { width: 72px; height: 72px; }
  .cats li { grid-template-columns: 96px 1fr 50px 34px; gap: 8px; font-size: 13px; }
  .cats.compact li { grid-template-columns: 96px 1fr 46px; }
  .hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tc-name { font-size: 19px; }
  .tc-title { font-size: 10px; letter-spacing: .16em; }
  .tc-emblem svg { width: 44px; height: 44px; }
  .tc-foot span:last-child { display: none; }
  .tc-body { padding: 0 10px 10px; }
  .hide-sm { display: none; }
  .ledger { font-size: 13px; }
  .ledger td { padding: 6px 8px; }
  .hide-xs { display: none; }
  .topbar .view-toggle { order: 2; flex-basis: 100%; margin-left: 0; }
  .topbar .view-toggle button { flex: 1; }
  .jump a { font-size: 11px; letter-spacing: .1em; padding: 6px 2px; }
  .nameplate { height: 74px; }
  .sp-stats { gap: 18px; }
  .sp-stats dd { font-size: 22px; }
  .seg button { padding: 6px 9px; font-size: 11px; letter-spacing: .08em; }
  .controls .seg { flex-wrap: wrap; max-width: 100%; }
  .controls { width: 100%; }
  .codex-ladder .emblem { width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
