/* Data-dense dashboard, dark-only: Aegis gold accent, Radiant green / Dire red semantics, faint crimson glow behind the header */
:root {
  --bg: #0a0c10;
  --surface: #11151c;
  --surface-2: #161b24;
  --surface-hover: #1c222d;
  --border: #232a36;
  --border-strong: #343e4e;
  --fg: #e8ecf2;
  --fg-muted: #97a3b4;
  --fg-dim: #5f6a7a;
  --accent: #e3b04b;
  --accent-strong: #f4cc6e;
  --accent-ink: #1b1405;
  --accent-soft: rgba(227, 176, 75, .14);
  --crimson: #c9372c;
  --good: #4fd286;
  --good-soft: rgba(79, 210, 134, .13);
  --warn: #e6a23c;
  --warn-soft: rgba(230, 162, 60, .14);
  --bad: #f0544a;
  --bad-soft: rgba(240, 84, 74, .13);
  --me: rgba(227, 176, 75, .09);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --radius: 12px;
  --display: 'Russo One', 'Arial Black', system-ui, sans-serif;
  --body: 'Exo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { background: var(--bg); }
body {
  min-height: 100%;
  color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.55;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(201, 55, 44, .16), transparent 70%),
    radial-gradient(700px 360px at 92% -12%, rgba(227, 176, 75, .10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 520px);
}
[hidden] { display: none !important; }
img { max-width: 100%; }
svg.i { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; text-wrap: balance; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { max-width: 1040px; margin: 0 auto; padding-block: 0 72px; display: flex; flex-direction: column; gap: 28px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-inline: -12px; padding: 12px; margin-top: 10px;
  background: rgba(10, 12, 16, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,.05); border-radius: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: linear-gradient(145deg, var(--crimson), #7d1a14); box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 6px 18px -6px rgba(201,55,44,.7); }
.brand-mark svg { width: 20px; height: 20px; stroke: #fff2d6; fill: none; stroke-width: 2; stroke-linejoin: round; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text small { font-family: var(--body); font-size: 10px; font-weight: 600; letter-spacing: .22em; color: var(--fg-muted); text-transform: uppercase; }
.brand-text span { font-family: var(--display); font-size: 19px; color: var(--accent); letter-spacing: .04em; }
.nav { display: flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.nav a { text-decoration: none; color: var(--fg-muted); padding: 7px 14px; border-radius: 7px; font-weight: 600; font-size: 14px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }
.topbar .updated { margin-left: auto; color: var(--fg-dim); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.topbar .updated::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.topbar .updated:empty::before { display: none; }
.lang-btn { min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); font-weight: 700; font-size: 13px; letter-spacing: .04em; transition: border-color .15s, color .15s; }
.lang-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.key-btn { display: grid; place-items: center; padding: 0 9px; color: var(--fg-muted); }
.key-btn.on { color: var(--good); border-color: var(--good-soft); }
.key-dlg { width: min(440px, calc(100vw - 32px)); padding: 22px; }
.key-dlg .row { flex-wrap: wrap; gap: 8px; }
#keyStatus { color: var(--good); }

/* ---------- search hero ---------- */
.search-box { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 28px; text-align: center; }
.search-box h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.05; background: linear-gradient(180deg, #fff6df, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search-box p { color: var(--fg-muted); max-width: 560px; }
.search-row {
  display: flex; gap: 8px; width: 100%; max-width: 540px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: var(--shadow), 0 0 0 4px rgba(227,176,75,.0); transition: box-shadow .2s, border-color .2s;
}
.search-row { position: relative; }
.history { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 15; padding: 6px; text-align: left; max-height: 380px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); }
.history-head { padding: 6px 10px; }
.history-item { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.history-item:hover { background: var(--surface-hover); }
.history-pick { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: none; background: none; text-align: left; }
.history-pick > img { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.history-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-del { width: 32px; height: 32px; flex-shrink: 0; border: none; border-radius: 6px; background: none; color: var(--fg-muted); font-size: 18px; }
.history-del:hover { background: var(--bad-soft); color: var(--bad); }
.search-row:focus-within { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft); }
.search-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding-left: 12px; color: var(--fg-dim); }
.search-field input { flex: 1; min-width: 0; padding: 10px 0; border: none; background: transparent; color: var(--fg); font-size: 16px; }
.search-field input:focus { outline: none; }
.search-field input::placeholder { color: var(--fg-dim); }
.field {
  width: 100%; min-width: 0; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 22px; border-radius: 10px; border: none; white-space: nowrap;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent)); color: var(--accent-ink);
  font-weight: 700; letter-spacing: .02em; box-shadow: 0 6px 18px -8px rgba(227,176,75,.8), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .12s var(--ease), box-shadow .2s, filter .2s;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 8px 24px -8px rgba(227,176,75,.9), inset 0 1px 0 rgba(255,255,255,.35); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--surface-2); color: var(--fg); border: 1px solid var(--border-strong); box-shadow: none; font-weight: 600; }
.btn.ghost:hover { background: var(--surface-hover); border-color: var(--fg-dim); }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }

.loading { text-align: center; padding: 36px 0; color: var(--fg-muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.spinner { display: inline-block; width: 30px; height: 30px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-msg { padding: 14px 16px; border: 1px solid rgba(240,84,74,.5); background: var(--bad-soft); border-radius: var(--radius); text-align: center; }
.empty { color: var(--fg-muted); padding: 18px; }

/* ---------- surfaces ---------- */
.stack { display: flex; flex-direction: column; gap: 32px; }
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.pad { padding: 18px; }

.profile { display: flex; align-items: center; gap: 18px; padding: 18px 20px; flex-wrap: wrap; position: relative; overflow: hidden; }
.profile::after { content: ''; position: absolute; inset: 0 0 auto auto; width: 320px; height: 100%; background: radial-gradient(260px 140px at 100% 0%, var(--accent-soft), transparent 70%); pointer-events: none; }
.profile > img { width: 68px; height: 68px; border-radius: 12px; box-shadow: 0 0 0 2px var(--accent), 0 8px 20px -8px rgba(0,0,0,.8); }
.profile h2 { font-size: 26px; text-transform: none; letter-spacing: .01em; }
.profile .meta { color: var(--fg-muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.rank-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.profile .wl { margin-left: auto; text-align: right; position: relative; z-index: 1; }
.emblem { position: relative; display: inline-block; width: var(--s); height: var(--s); flex-shrink: 0; vertical-align: middle; }
.emblem img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.profile > .emblem { order: 3; filter: drop-shadow(0 6px 14px rgba(0,0,0,.6)); }
.profile .wl { order: 4; margin-left: 0; }
.profile > div:not(.wl) { flex: 1; min-width: 0; }
.rank-line { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.big { font-family: var(--display); font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }

.period { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; transition: border-color .2s, transform .2s var(--ease); }
.stat:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat .label { display: flex; align-items: center; gap: 7px; }
.stat .label svg { color: var(--accent); width: 15px; height: 15px; }
.stat .value { font-family: var(--display); font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--fg-muted); }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-muted); font-weight: 600; }

.section { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.section-title { font-size: 18px; display: flex; align-items: center; gap: 12px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }
.note { color: var(--fg-muted); font-size: 13px; max-width: 75ch; }
.note:empty { display: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.tabs { display: inline-flex; gap: 2px; flex-wrap: wrap; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.tab { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px; border-radius: 7px; border: none; background: transparent; color: var(--fg-muted); font-size: 13px; font-weight: 600; transition: color .15s, background .15s; }
.tab:hover { color: var(--fg); background: var(--surface-hover); }
.tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 0 0 1px rgba(227,176,75,.45); }
.tab:disabled { opacity: .5; cursor: wait; }
.tab svg { width: 15px; height: 15px; }

/* ---------- issues ---------- */
.issue-list { display: flex; flex-direction: column; gap: 8px; }
.issue { display: flex; align-items: center; gap: 14px; padding: 13px 16px; }
.sev { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--bad-soft); color: var(--bad); }
.sev svg { width: 18px; height: 18px; }
.issue.warn .sev { background: var(--warn-soft); color: var(--warn); }
.issue.good .sev { background: var(--good-soft); color: var(--good); }
.issue.info .sev { background: var(--accent-soft); color: var(--accent); }
.issue .body { flex: 1; min-width: 0; }
.issue .title { font-weight: 700; }
.issue .detail { font-size: 13px; color: var(--fg-muted); }
.issue .val { font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--fg-muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: rgba(255,255,255,.015); }
td { padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-hover); }
tbody tr:last-child td { border-bottom: none; }
th.num, td.num { text-align: right; }
.hero-cell { display: flex; align-items: center; gap: 10px; }
.hero-cell img { width: 44px; height: 25px; border-radius: 5px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.hero-icon { width: 34px; height: 19px; border-radius: 4px; object-fit: cover; vertical-align: middle; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.chip.pos { background: var(--good-soft); color: var(--good); }
.chip.neg { background: var(--bad-soft); color: var(--bad); }
.pos { color: var(--good); } .neg { color: var(--bad); } .muted { color: var(--fg-muted); } .dim { color: var(--fg-dim); }
.posb { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 12px; font-weight: 700; font-family: var(--display); background: var(--accent-soft); color: var(--accent-strong); }
.posb.approx { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--fg-muted); }

/* ---------- matches ---------- */
.matches { display: flex; flex-direction: column; gap: 6px; }
.match {
  position: relative; display: grid; grid-template-columns: 84px 28px minmax(0, 1fr) 96px 80px 64px 16px; align-items: center; gap: 14px;
  padding: 10px 16px; text-align: left; width: 100%; font-variant-numeric: tabular-nums; overflow: hidden;
  background: linear-gradient(90deg, var(--good-soft), transparent 38%), linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: border-color .15s, transform .15s var(--ease);
}
.match.loss { background: linear-gradient(90deg, var(--bad-soft), transparent 38%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.match:hover { border-color: var(--border-strong); transform: translateX(3px); }
.match .hero-cell img { width: 56px; height: 32px; }
.res { display: flex; flex-direction: column; line-height: 1.15; }
.res b { font-family: var(--display); font-weight: 400; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.res.win b { color: var(--good); } .res.loss b { color: var(--bad); }
.res small { font-size: 11px; color: var(--fg-dim); }
.kda { font-weight: 600; }
.kda .d { color: var(--bad); }
.match .gpm { color: var(--accent); font-size: 13px; font-weight: 600; }
.match .dur { color: var(--fg-muted); font-size: 13px; display: flex; align-items: center; gap: 5px; }
.match .dur svg { width: 13px; height: 13px; }
.match .chev { color: var(--fg-dim); width: 16px; height: 16px; }
.parsed-dot { position: absolute; top: 8px; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- positions ---------- */
.pos-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pos-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; text-align: left; color: inherit; transition: border-color .2s, transform .2s var(--ease); }
.pos-card:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--accent); }
.pos-card:disabled { cursor: default; opacity: .7; }
#posFilter { align-self: flex-start; }
.pos-card.best { border-color: rgba(79,210,134,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 0 0 3px var(--good-soft); }
.pos-top { display: flex; align-items: center; gap: 12px; }
.ring { --p: 0; --c: var(--fg-dim); width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--border) 0); }
.ring span { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--display); font-size: 14px; font-variant-numeric: tabular-nums; }
.pos-name { display: flex; flex-direction: column; line-height: 1.2; }
.pos-name b { font-family: var(--display); font-weight: 400; font-size: 15px; }
.pos-heroes { display: flex; gap: 4px; flex-wrap: wrap; }
.best-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--good); }
.best-tag svg { width: 14px; height: 14px; }

/* ---------- dialog ---------- */
dialog {
  margin: auto; width: min(1080px, calc(100vw - 16px)); max-height: calc(100vh - 24px); padding: 0;
  border: 1px solid var(--border-strong); border-radius: 16px; background: var(--bg); color: var(--fg);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.9);
}
dialog::backdrop { background: rgba(4, 6, 10, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dlg-head { position: sticky; top: 0; z-index: 3; display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 14px; background: rgba(17, 21, 28, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.dlg-head .row { justify-content: space-between; }
.dlg-head h2 { font-size: 20px; }
.dlg-body { padding: 20px; display: flex; flex-direction: column; gap: 26px; }

.items { display: flex; gap: 3px; flex-wrap: nowrap; }
.items img, .item-icon { width: 32px; height: 24px; border-radius: 4px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.score { font-family: var(--display); font-size: 20px; }
tr.me td { background: var(--me); }
.player-link { padding: 0; border: none; background: none; color: var(--fg); font-weight: 600; text-align: left; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.player-link:hover { color: var(--accent-strong); text-decoration-color: currentColor; }
tr.me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.bench { display: grid; grid-template-columns: 160px minmax(0,1fr) 54px; gap: 12px; align-items: center; font-size: 13px; }
.track { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.fill { height: 100%; border-radius: 999px; transform-origin: left center; }
.bench-list { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.bench .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.matrix td.cell { text-align: center; font-weight: 700; min-width: 70px; border-left: 1px solid var(--border); }
.matrix th.hcol { text-align: center; }

.cand { display: grid; grid-template-columns: minmax(160px, 1.2fr) 76px minmax(0, 3fr); gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); transition: background .12s; }
.cand:hover { background: var(--surface-hover); }
.cand:last-child { border-bottom: none; }
.cand.mine { background: var(--me); box-shadow: inset 3px 0 0 var(--accent); }
.breakdown { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; font-variant-numeric: tabular-nums; }
.breakdown span { display: inline-flex; align-items: center; gap: 4px; }
.breakdown img { width: 28px; height: 16px; border-radius: 3px; object-fit: cover; }

.chart-wrap { position: relative; padding: 14px 14px 8px; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-wrap .axis { fill: var(--fg-muted); font-size: 11px; font-family: var(--body); }
.chart-wrap .grid { stroke: var(--border); stroke-width: 1; }
.chart-wrap .zero { stroke: var(--fg-dim); stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: rgba(10,12,16,.95); border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 10px; font-size: 12px; white-space: nowrap; box-shadow: var(--shadow); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--fg-muted); padding: 0 16px 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

.item-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--border); transition: background .12s; }
.item-row:hover { background: var(--surface-hover); }
.item-row:last-child { border-bottom: none; }
.item-row .name { font-weight: 700; }
.item-row .why { font-size: 12px; color: var(--fg-muted); white-space: normal; }
.item-row .lift { font-family: var(--display); font-size: 19px; text-align: right; }

.picker { display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; min-height: 30px; align-items: center; }
.hchip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 4px 3px 3px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.hchip img { width: 38px; height: 22px; border-radius: 5px; object-fit: cover; }
.hchip button { display: grid; place-items: center; width: 24px; height: 24px; border: none; border-radius: 6px; background: none; color: var(--fg-muted); }
.hchip button:hover { background: var(--bad-soft); color: var(--bad); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.example { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* ---------- learn ---------- */
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.lesson { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.lesson-head { display: flex; align-items: center; gap: 14px; }
.lesson-n { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--display); }
.lesson-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lesson-title b { font-family: var(--display); font-weight: 400; font-size: 18px; }
.lesson-tips { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.lesson-tips li::marker { color: var(--accent); }
.drill { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; font-size: 14px; }
.drill svg { width: 18px; height: 18px; flex-shrink: 0; }
.lesson-games { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lesson-games .hchip { cursor: pointer; padding-right: 8px; }
.lesson-games .hchip:hover { border-color: var(--accent); }
.learn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.learn-grid .label { margin-bottom: 10px; }
.hero-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-head .hero-cell img { width: 64px; height: 36px; }
.hero-head .hero-cell span { font-family: var(--display); font-size: 20px; }
.build-line { display: flex; gap: 6px; padding: 14px; overflow-x: auto; }
.build-step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; padding: 8px 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.build-step .item-icon { width: 44px; height: 32px; }
.build-step b { font-size: 13px; }
.pro-ref { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--border-strong); color: var(--fg-muted); font-size: 13px; }
.pro-ref .i { color: var(--accent); flex: none; }
.pro-ref b { color: var(--fg); font-variant-numeric: tabular-nums; }
.pro-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pro-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; text-align: left; color: inherit; font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.pro-card b { font-family: var(--display); font-size: 16px; font-weight: 400; }
.pro-card:hover { border-color: var(--border-strong); }
.pro-card.active { border-color: var(--accent); background: var(--accent-soft); }
.pro-card-stats { display: flex; gap: 10px; margin-top: 6px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pro-build { padding: 12px 14px 0; border-top: 1px solid var(--border); }
.pro-build:first-child { border-top: none; }
.pro-build .build-line { padding: 10px 0 14px; }
.pro-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sits { display: flex; flex-direction: column; gap: 10px; }
.sit { display: grid; grid-template-columns: minmax(0, 1fr) auto 70px; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }
.sit .dim { color: var(--fg-muted); font-size: 12px; text-align: right; }
.matchups { display: flex; flex-direction: column; gap: 12px; }
.matchups .row { margin-top: 6px; gap: 6px; }
.matchups .hchip { padding-right: 8px; }
.matchups .dim { color: var(--fg-muted); font-weight: 500; font-size: 12px; }
.stat .value.kda { font-size: 22px; white-space: nowrap; }
@media (max-width: 900px) { .pro-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- match map ---------- */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.map-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tb { display: grid; grid-template-columns: minmax(0, 1fr) 128px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 10px; }
.tb-team { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; min-width: 0; }
.tb-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; overflow: hidden; }
.tb-pic { position: relative; width: 100%; max-width: 52px; aspect-ratio: 16 / 9; }
.tb-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255,255,255,.1); transition: filter .2s; }
.tb-hero.me .tb-pic img { box-shadow: 0 0 0 2px var(--accent); }
.tb-hero.dead .tb-pic img { filter: grayscale(1) brightness(.45); }
.tb-timer { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 400; font-size: 13px; color: #fff; text-shadow: 0 1px 3px #000; }
.tb-hero:not(.dead) .tb-timer { font-family: var(--body); font-size: 9px; font-weight: 700; color: var(--accent-strong); align-items: end; }
.tb-gold { font-size: 11px; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.tb-center { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.tb-score { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-score #tbClock { font-family: var(--display); font-size: 15px; color: var(--fg); }
.tb-k { font-family: var(--display); font-size: 20px; }
#tbR { color: var(--good); } #tbD { color: var(--bad); }
.tb-adv { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.map { position: relative; aspect-ratio: 1; overflow: hidden; padding: 0; }
.map img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: saturate(.85) brightness(.8); }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-side { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
#fogTabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#fogTabs .tab { justify-content: center; }
.map-clock { font-family: var(--display); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent-strong); }
.map-stats { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.map-events { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; }
.map-ev { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 8px; border: none; border-radius: 8px; background: transparent; text-align: left; font-size: 12px; box-shadow: inset 2px 0 0 var(--good); }
.map-ev.loss { box-shadow: inset 2px 0 0 var(--bad); }
.map-ev:hover { background: var(--surface-hover); }
.map-ev .num { color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.map-ev-body { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.map-ev-body .hero-icon { width: 26px; height: 15px; }
.timeline { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.tl-track { position: relative; flex: 1; min-width: 0; height: 52px; }
.tl-marks { position: absolute; left: 8px; right: 8px; top: 0; height: 30px; }
.tl-fight { position: absolute; top: 4px; height: 10px; min-width: 4px; padding: 0; border: none; border-radius: 3px; background: var(--good); opacity: .85; cursor: pointer; }
.tl-fight.loss { background: var(--bad); }
.tl-fight:hover { opacity: 1; transform: scaleY(1.3); }
.tl-ward { position: absolute; top: 20px; width: 2px; height: 8px; border-radius: 1px; background: var(--good); opacity: .7; }
.tl-ward.loss { background: var(--bad); }
.tl-rosh { position: absolute; top: -8px; transform: translateX(-50%); font-style: normal; font-family: var(--display); font-size: 10px; color: var(--good); }
.tl-rosh.loss { color: var(--bad); }
.tl-track input[type="range"] { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; margin: 0; accent-color: var(--accent); cursor: pointer; }
.tl-speed { width: auto; padding: 6px 8px; font-size: 13px; }
#mapPlay { width: 40px; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .spinner { animation-duration: 2.5s !important; }
}

@media (max-width: 760px) {
  .topbar { margin-inline: 0; }
  .topbar .updated { margin-left: 0; width: 100%; }
  .profile .wl { margin-left: 0; text-align: left; }
  .profile > div:not(.wl) { flex-basis: calc(100% - 90px); }
  .profile > .emblem { --s: 56px !important; }
  .match { grid-template-columns: 64px 26px minmax(0,1fr) auto 14px; gap: 10px; padding: 10px 12px; }
  .match .gpm, .match .dur { display: none; }
  .match .hero-cell img { width: 44px; height: 25px; }
  .bench { grid-template-columns: 112px minmax(0,1fr) 44px; }
  .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .two-col { grid-template-columns: 1fr; }
  .map-wrap { grid-template-columns: 1fr; }
  .learn-grid { grid-template-columns: 1fr; }
  .map-events { max-height: 240px; }
  .cand { grid-template-columns: minmax(0, 1fr) 64px; }
  .cand .breakdown { grid-column: 1 / -1; }
  .search-row { flex-direction: column; }
  .search-field { padding: 4px 10px; }
}

#heroSvg { pointer-events: none; }

.hero-pick { display: flex; flex-direction: column; gap: 14px; }
.hero-pick .search-field { max-width: 320px; }
.hero-grid { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.hg-label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--fg-muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hg-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hg-label .attr-str { background: #e0573f; } .hg-label .attr-agi { background: #4fd286; } .hg-label .attr-int { background: #3b8ec2; } .hg-label .attr-all { background: #c9a14a; }
.hg-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 4px; }
.hg { display: block; padding: 0; border: 1px solid transparent; border-radius: 6px; background: var(--surface-2); overflow: hidden; cursor: pointer; aspect-ratio: 16 / 9; transition: transform .12s, border-color .12s, filter .12s; filter: saturate(.8) brightness(.85); }
.hg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hg:hover { transform: scale(1.08); filter: none; border-color: var(--border-strong); z-index: 1; position: relative; }
.hg[aria-pressed="true"] { filter: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 4px 16px -4px rgba(227,176,75,.6); }
.hg:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.guide-pos { justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pro-ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-strong); flex: none; }
.pro-ava.big { width: 40px; height: 40px; }
.pro-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pro-head > span { display: flex; flex-direction: column; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .hg { transition: none; } .hg:hover { transform: none; } }

.hero-head-pos { margin-left: auto; }
.bench .num.peak { color: var(--accent-strong); }
.spikes { display: flex; flex-direction: column; gap: 12px; }
.spike { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; }
.spike .item-icon { width: 44px; height: 32px; }
.item-row.item-tip { align-items: start; }
.tip-ic { display: grid; place-items: center; width: 44px; height: 32px; border-radius: 6px; background: var(--surface-2); color: var(--accent); }
.start-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.start-items span { position: relative; display: inline-flex; }
.start-items .item-icon { width: 38px; height: 28px; }
.start-items b { position: absolute; right: -2px; bottom: -4px; font-size: 11px; padding: 0 3px; border-radius: 4px; background: var(--bg); }
.vs-chip { display: inline-flex; align-items: center; gap: 3px; margin: 2px 6px 0 0; font-variant-numeric: tabular-nums; }
.mini-hero { width: 32px; height: 18px; border-radius: 3px; object-fit: cover; vertical-align: middle; }
.pro-games { display: flex; flex-direction: column; }
.pg { display: grid; grid-template-columns: 92px minmax(110px, 160px) auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 14px; border: none; border-top: 1px solid var(--border); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pg:first-child { border-top: none; }
.pg:hover { background: var(--surface-hover); }
.pg .chip { justify-self: start; }
.pg-name { display: flex; flex-direction: column; min-width: 0; }
.pg-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-vs { display: flex; align-items: center; gap: 3px; }
.pg-items { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.pg-items .item-icon { width: 30px; height: 22px; }
@media (max-width: 720px) {
  .pg { grid-template-columns: auto minmax(0, 1fr); }
  .pg-vs, .pg-items { grid-column: 1 / -1; justify-content: flex-start; }
  .hero-head-pos { margin-left: 0; width: 100%; overflow-x: auto; }
}

.spike-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-color: rgba(227,176,75,.45); background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
.spike-head .item-icon { width: 66px; height: 48px; border-radius: 8px; }
.spike-head b { font-family: var(--display); font-size: 20px; font-weight: 400; }
.plan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-step { display: flex; flex-direction: column; gap: 10px; }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.plan-head b { font-family: var(--display); font-weight: 400; font-size: 16px; }
@media (max-width: 900px) { .plan { grid-template-columns: 1fr; } }

.power-chart { width: 100%; height: auto; display: block; }
.pc-grid { stroke: var(--border); stroke-width: .5; }
.pc-base { stroke: var(--fg-muted); stroke-width: .8; stroke-dasharray: 3 3; }
.pc-axis { fill: var(--fg-muted); font-size: 8px; }
.pc-fight { fill: none; stroke: var(--bad); stroke-width: 2; }
.pc-farm { fill: none; stroke: var(--good); stroke-width: 2; }
.pc-band-fight { fill: var(--bad); opacity: .1; }
.pc-band-farm { fill: var(--good); opacity: .08; }
.pc-mark { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 2; }
.pc-mlabel { fill: var(--accent); font-size: 8px; font-weight: 700; }
.spike-ic { display: grid; place-items: center; width: 44px; height: 32px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--display); font-size: 18px; }
.spike-ic.fight { background: var(--bad-soft); color: var(--bad); }
.spike-ic.farm { background: var(--good-soft); color: var(--good); }

.farm-tabs { flex-wrap: wrap; }
.farm-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.farm-spot rect { fill: rgba(10, 12, 16, .82); stroke: rgba(255, 255, 255, .25); stroke-width: .25; }
.farm-spot text { text-anchor: middle; }
.farm-spot .fs-name { fill: var(--fg-muted); font-size: 2.6px; font-weight: 600; }
.farm-spot .fs-val { fill: var(--fg); font-size: 3.8px; font-weight: 700; }
.farm-filters { display: flex; flex-direction: column; gap: 8px; }
.farm-filters .tabs { flex-wrap: wrap; }
#farmWho .tab { display: inline-flex; align-items: center; gap: 6px; }
#farmWho .pro-ava { width: 20px; height: 20px; }
.farm-mapbar { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.farm-map img { filter: brightness(.5) saturate(.6) contrast(1.05); }
.farm-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }
.farm-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--fg-muted); font-size: 14px; }
.heat-legend { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--fg-muted); }
.heat-legend i { flex: 1; height: 8px; border-radius: 99px; background: linear-gradient(90deg, rgba(59,142,194,.35), #4fd286 35%, #e3b04b 68%, #f0544a); }
.farm-head { align-items: center; grid-template-columns: auto repeat(3, minmax(0, 1fr)); }
.farm-head:not(:has(img)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.farm-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.farm-head b { display: block; font-family: var(--display); font-size: 22px; font-weight: 400; font-variant-numeric: tabular-nums; }
.farm-pat { grid-template-columns: 56px minmax(0, 1fr) auto; }
.farm-pat.best .name { color: var(--accent-strong); }
@media (max-width: 900px) { .farm-wrap { grid-template-columns: 1fr; } }

.noscript { max-width: 720px; margin: 48px auto; padding: 0 16px; line-height: 1.6; }
.noscript h1 { margin-bottom: 12px; }

footer.site-foot { flex-direction: row; }
.site-foot span { flex-basis: 100%; }
.site-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 28px 0 36px; font-size: 13px; color: var(--fg-muted); }
.site-foot a { color: var(--fg-muted); }
.site-foot a:hover { color: var(--accent-strong); }

#viewMeta [data-hero] { cursor: pointer; transition: background .15s; }
#viewMeta [data-hero]:hover, #viewMeta .hero-row:focus-visible { background: var(--surface-hover); }
#viewMeta [data-hero]:hover .hero-cell span { color: var(--accent-strong); }
#viewMeta .hero-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.nav-drop { position: relative; display: inline-flex; }
#navTools { display: inline-flex; align-items: center; gap: 4px; border: none; background: none; color: inherit; font: inherit; cursor: pointer; padding: 8px 12px; border-radius: 8px; }
#navTools[aria-current="page"] { background: var(--accent); color: #1a1408; }
#navTools[aria-expanded="true"] .i { transform: rotate(180deg); }
.nav-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 270px; display: flex; flex-direction: column; padding: 6px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg); box-shadow: 0 18px 40px -12px rgba(0,0,0,.8); }
.nav-menu[hidden] { display: none; }
.nav-menu a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; color: var(--fg); text-decoration: none; }
.nav-menu a:hover, .nav-menu a:focus-visible { background: var(--surface-hover); }
.nav-menu small { color: var(--fg-muted); font-size: 12px; }
.grid-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 170px; padding: 18px; text-align: center; border: 2px dashed var(--border-strong); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.grid-drop:hover, .grid-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.grid-drop.busy { opacity: .6; pointer-events: none; }
.grid-drop .i { color: var(--accent); }
.grid-pic { position: relative; max-width: 900px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.grid-pic img { display: block; width: 100%; height: auto; }
.grid-pic svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.grid-pic rect { fill: rgba(79, 210, 134, .12); stroke: var(--good); stroke-width: 2; vector-effect: non-scaling-stroke; }
.grid-pic rect.unsure { stroke: var(--accent); stroke-dasharray: 5 4; fill: rgba(227, 176, 75, .12); }
.grid-pic text { fill: #fff; font-weight: 700; paint-order: stroke; stroke: rgba(0,0,0,.85); stroke-width: 3px; }
.grid-name .field { max-width: 320px; }
.grid-cat .row { flex-wrap: nowrap; }
.grid-cat .cat-name { max-width: 320px; font-weight: 700; }
.grid-heroes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.grid-hero { cursor: pointer; }
.grid-hero:hover { border-color: var(--accent); }
.grid-heroes .add-hero, .grid-heroes .swap-hero { width: 150px; padding: 6px 10px; }
.grid-out code { padding: 1px 6px; border-radius: 4px; background: var(--surface-2); font-size: 12px; word-break: break-all; }
.grid-steps { margin-top: 10px; }
@media (max-width: 720px) { .nav-menu { left: auto; right: 0; } }

.art-wrap { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; align-items: start; }
.art-controls { gap: 12px; }
.grid-drop.small { min-height: 110px; }
.art-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13px; }
.art-row.col { grid-template-columns: 1fr; }
.art-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.art-row textarea { resize: vertical; font: inherit; }
.art-check { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.art-check input { accent-color: var(--accent); }
.art-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.art-zones .field { padding: 6px 10px; }
.art-canvas { width: 100%; aspect-ratio: 2 / 1; border-radius: 12px; border: 1px solid var(--border); background: #121820; display: block; }
@media (max-width: 900px) { .art-wrap { grid-template-columns: 1fr; } }

.art-mode { width: 100%; }
.art-mode .tab { flex: 1; justify-content: center; }
.art-btns { flex-wrap: wrap; gap: 6px; }
.art-canvas.drawing { cursor: crosshair; touch-action: none; }

.opt-wrap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; }
.opt-wrap .tabs { flex-wrap: wrap; }
.code-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.code-row code, .opt-wrap p code { padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; word-break: break-all; }
.code-row code { flex: 1; min-width: 0; }
.code-block { margin: 0; padding: 12px 14px; border-radius: 10px; background: #0a0d12; border: 1px solid var(--border); font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre; color: var(--fg); }
.opt-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.opt-toggle { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.opt-toggle .chip { min-width: 44px; justify-content: center; }
.opt-mods { border-color: rgba(240, 84, 74, .3); }
@media (max-width: 900px) { .opt-wrap { grid-template-columns: 1fr; } }

.mods-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
.mods-title { font-family: var(--display); font-weight: 400; font-size: 24px; }
.mods-warn { display: flex; gap: 12px; align-items: flex-start; border-color: rgba(240, 84, 74, .35); }
.mods-warn .i { color: var(--bad); flex: none; margin-top: 2px; }
.mods-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.mod .row { justify-content: space-between; margin-bottom: 6px; }
.mods-hero a.btn { text-decoration: none; }
.mod-ic { color: var(--accent); margin-right: 8px; }

.heart-btn:hover { color: #ff6b8a; border-color: rgba(255, 107, 138, .4); }
.support-links { display: flex; flex-direction: column; gap: 8px; }
.support-link { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); text-decoration: none; transition: border-color .15s; }
.support-link:hover { border-color: #ff6b8a; }

.cal-card { display: flex; flex-direction: column; gap: 8px; width: fit-content; max-width: 100%; padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head b { font-family: var(--display); font-weight: 400; font-size: 14px; }
.cal-head .btn { padding: 2px 10px; min-height: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 34px); gap: 3px; }
.cal-wd { text-align: center; font-size: 10px; color: var(--fg-muted); font-weight: 600; }
.cal-cell { position: relative; width: 34px; height: 34px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; }
.cal-cell.out { background: none; border: none; }
.cal-cell.today { border-color: var(--accent); }
.cal-cell svg { width: 70%; height: 70%; }
.cal-n { position: absolute; top: 1px; left: 3px; font-size: 8px; line-height: 1; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.cal-score { display: none; }
.cal-w { fill: var(--good); }
.cal-l { fill: var(--bad); }
.cal-d { fill: var(--accent); }
.cal-cell.played:hover { border-color: var(--border-strong); }
.cal-legend { flex-wrap: wrap; gap: 4px 10px; padding: 0; font-size: 10px; max-width: 256px; }
.cal-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.cal-legend svg { width: 9px; height: 9px; }
.cal-wrap { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.cal-note { max-width: 320px; color: var(--fg-muted); font-size: 13px; line-height: 1.6; }
.cal-note { white-space: pre-line; }
.top-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.top-main { min-width: 0; }
.top-cal { display: flex; flex-direction: column; gap: 8px; }
.top-cal .cal-note { max-width: 286px; font-size: 12px; }
@media (max-width: 860px) { .top-split { grid-template-columns: 1fr; } }
.top-main .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .top-main .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fold-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: none; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.fold-btn .i { color: var(--fg-muted); transition: transform .2s; }
.fold-btn[aria-expanded="false"] .i { transform: rotate(-90deg); }
.fold-btn:hover .i { color: var(--accent); }
.issues-brief { display: flex; flex-wrap: wrap; gap: 6px; cursor: pointer; }
.issues-brief[hidden] { display: none; }
.brief-bad { color: var(--bad); border-color: rgba(240, 84, 74, .35); }
.brief-warn { color: var(--accent); border-color: rgba(227, 176, 75, .35); }
.brief-good { color: var(--good); border-color: rgba(79, 210, 134, .35); }
@media (prefers-reduced-motion: reduce) { .fold-btn .i { transition: none; } }
.cal-cell.played { cursor: pointer; }
.cal-cell.played:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.day-dlg { width: min(520px, calc(100vw - 32px)); }
.day-head { justify-content: space-between; flex-wrap: nowrap; }
.day-head .section-title { font-size: 15px; }
.day-head .section-title::after { display: none; }
.day-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.day-game { display: grid; grid-template-columns: 96px 44px minmax(0, 1fr) auto; grid-template-areas: "res img name kda" "res img time time"; gap: 0 10px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 3px 0 0 var(--good); }
.day-game.loss { box-shadow: inset 3px 0 0 var(--bad); }
.day-game:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.day-game .chip { grid-area: res; justify-self: start; }
.day-game img { grid-area: img; width: 44px; height: 25px; border-radius: 4px; object-fit: cover; }
.day-game b { grid-area: name; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-game .num { grid-area: kda; font-size: 13px; font-variant-numeric: tabular-nums; }
.day-game .note { grid-area: time; font-size: 11px; }
@media (max-width: 520px) {
  .day-game { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "img name kda" "img time time"; }
  .day-game .chip { display: none; }
}

.mates-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 286px; }
.mates-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.link-btn { padding: 0; border: none; background: none; color: var(--fg-muted); font: inherit; font-size: 12px; cursor: pointer; }
.link-btn:hover { color: var(--accent); }
#mates { display: flex; flex-direction: column; gap: 2px; }
#mates > .note { font-size: 12px; margin: 0; }
.mate { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 38px; gap: 8px; align-items: center; padding: 4px 6px; margin: 0 -6px; border: none; border-radius: 6px; background: none; color: var(--fg); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.mate:hover { background: var(--surface-hover); }
.mate img, .mate-ph { width: 22px; height: 22px; border-radius: 50%; background: var(--border); }
.mate-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mate .note { font-size: 11px; }
.mate-wr { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }
.cmp-dlg { width: min(480px, calc(100vw - 32px)); }
.cmp-search { display: flex; gap: 8px; }
.cmp-search .field { flex: 1; min-width: 0; }
.cmp-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px 12px; align-items: center; }
.cmp-grid > :nth-child(3n+1) { text-align: right; justify-self: end; }
.cmp-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding-bottom: 6px; }
.cmp-grid > :nth-child(3n+1).cmp-who { flex-direction: row-reverse; }
.cmp-who img { width: 28px; height: 28px; border-radius: 50%; }
.cmp-who b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.cmp-label { font-size: 12px; color: var(--fg-muted); text-align: center; }
.cmp-grid .num { color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.cmp-grid .num.better { color: var(--fg); font-weight: 600; }
.cal-card .cal-note { margin: 2px 0 0; max-width: none; text-align: center; font-size: 12px; line-height: 1.4; }

#glyphForm { margin: 4px 0 12px; }
.glyph-sum { font-size: 14px; }
.glyph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.glyph-team { display: flex; flex-direction: column; gap: 4px; }
.glyph-team.radiant { box-shadow: inset 3px 0 0 var(--good); }
.glyph-team.dire { box-shadow: inset 3px 0 0 var(--bad); }
.glyph-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.glyph-head .note { margin-left: auto; }
.glyph-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 8px; color: var(--fg-muted); }
.glyph-row img { width: 44px; height: 25px; border-radius: 4px; object-fit: cover; }
.glyph-who { display: flex; flex-direction: column; min-width: 0; }
.glyph-who b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glyph-who .note { font-size: 11px; }
.glyph-n { font-variant-numeric: tabular-nums; font-size: 13px; }
.glyph-row.pressed { background: var(--accent-soft); color: var(--fg); }
.glyph-row.pressed .glyph-n { color: var(--accent); font-weight: 700; }
@media (max-width: 640px) { .glyph-grid { grid-template-columns: 1fr; } }

.dlg-foot { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 20px; background: rgba(17, 21, 28, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border); font-size: 13px; }
.dlg-foot .num { font-variant-numeric: tabular-nums; user-select: all; }
.dlg-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto; }
.dlg-links a { color: var(--fg-muted); text-decoration: none; }
.dlg-links a:hover { color: var(--accent); }
/* the stats grow to the height of the calendar column so both sides end on one line */
@media (min-width: 861px) {
  .top-split { align-items: stretch; }
  .top-main { display: flex; flex-direction: column; }
  .top-main #stats { flex: 1; grid-auto-rows: 1fr; }
  .top-main .stat .value { margin-top: auto; }
}

.mod.has-fig { grid-column: 1 / -1; }
.mod-fig { margin: 10px 0 0; }
.mod-fig img { display: block; width: 100%; max-width: 760px; height: auto; border-radius: 8px; }
.mod-fig figcaption { display: grid; grid-template-columns: 1fr 1fr; max-width: 760px; margin-top: 6px; text-align: center; }

/* ---------- hero paint ---------- */
.paint-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.paint-heroes { display: flex; flex-direction: column; gap: 8px; max-height: 640px; }
.paint-hero-grid { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.paint-hero { display: flex; align-items: center; gap: 8px; padding: 4px 6px; min-height: 44px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--fg); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.paint-hero img { width: 48px; height: 27px; border-radius: 4px; object-fit: cover; }
.paint-hero span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paint-hero:hover { background: var(--surface-hover); }
.paint-hero[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); }
.paint-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.paint-stage { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 35%, #232c3a 0%, #0f131a 70%); }
.paint-canvas { height: 520px; }
.paint-canvas canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.paint-hint { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; text-align: center; font-size: 12px; color: var(--fg-muted); pointer-events: none; }
.paint-icons .row { flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.paint-icon { width: 64px; height: 64px; padding: 0; border: 2px solid var(--border); border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; }
.paint-icon canvas { display: block; width: 100%; height: 100%; }
.paint-icon.on { border-color: var(--accent); }
.paint-icon.painted:not(.on) { border-color: var(--border-strong); }
.paint-panel { display: flex; flex-direction: column; gap: 12px; }
.paint-selected { display: flex; flex-direction: column; gap: 2px; }
.paint-selected b { font-size: 14px; }
.paint-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; min-height: 32px; }
.paint-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.paint-color-row { display: grid; grid-template-columns: auto 48px 1fr; gap: 8px; align-items: center; }
.paint-color-row input[type="color"] { width: 48px; height: 40px; padding: 0; border: 1px solid var(--border-strong); border-radius: 8px; background: none; cursor: pointer; }
.paint-hex { font-variant-numeric: tabular-nums; text-transform: lowercase; }
.paint-swatches { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.paint-swatch { aspect-ratio: 1; min-height: 28px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; cursor: pointer; }
.paint-swatch:hover { transform: scale(1.08); }
.paint-panel input[type="range"] { width: 100%; accent-color: var(--accent); }
.paint-parts { display: flex; flex-direction: column; gap: 4px; }
.paint-part { display: grid; grid-template-columns: 14px 1fr; grid-template-areas: "dot name" "dot note"; column-gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--fg); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.paint-part .note { grid-area: note; font-size: 11px; }
.paint-part.on { border-color: var(--accent); }
.paint-dot { grid-area: dot; width: 14px; height: 14px; border-radius: 50%; border: 1px dashed var(--border-strong); }
.paint-hero .paint-dot.on, i.paint-dot.on { width: 8px; height: 8px; border: none; background: var(--accent); }
.paint-reset { gap: 8px; flex-wrap: wrap; }
.paint-out .row { gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
@media (max-width: 1100px) { .paint-wrap { grid-template-columns: 1fr 300px; } .paint-heroes { grid-column: 1 / -1; max-height: none; } .paint-hero-grid { flex-direction: row; overflow-x: auto; } .paint-hero { flex: 0 0 auto; } }
@media (max-width: 760px) { .paint-wrap { grid-template-columns: 1fr; } .paint-canvas { height: 380px; } }

.paint-wheel { position: relative; width: 100%; max-width: 220px; aspect-ratio: 1; margin: 2px auto 0; }
.paint-wheel canvas { display: block; width: 100%; height: 100%; border-radius: 50%; cursor: crosshair; touch-action: none; }
.paint-wheel canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.paint-wheel-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .5); pointer-events: none; }
.mods-more { margin-top: 10px; }

/* ---------- arsenal: Dota 2 armory style ---------- */
.arsenal-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.arsenal-heroes { display: flex; flex-direction: column; gap: 6px; max-height: 680px; position: sticky; top: 80px; }
.arsenal-hero-grid { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; padding: 2px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.arsenal-hero-grid .ah { display: flex; align-items: center; gap: 8px; padding: 5px 8px; min-height: 38px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--fg-muted); font: inherit; font-size: 13px; text-align: left; cursor: pointer; width: 100%; transition: all .15s; position: relative; }
.arsenal-hero-grid .ah img { width: 44px; height: 25px; border-radius: 3px; object-fit: cover; filter: saturate(.7) brightness(.85); transition: filter .15s; }
.arsenal-hero-grid .ah span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arsenal-hero-grid .ah:hover { background: var(--surface-hover); color: var(--fg); }
.arsenal-hero-grid .ah:hover img { filter: saturate(1) brightness(1); }
.arsenal-hero-grid .ah.active { border-color: var(--accent); background: linear-gradient(135deg, rgba(227,176,75,.12), rgba(227,176,75,.04)); color: var(--accent-strong); }
.arsenal-hero-grid .ah.active img { filter: saturate(1.1) brightness(1.05); }
.arsenal-hero-grid .ah.dim { opacity: .3; cursor: default; pointer-events: none; }
.arsenal-hero-grid .ah .ah-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* slot sections */
/* hero loadout preview */
.arsenal-preview {
  display: grid; grid-template-columns: 320px 1fr; gap: 0; overflow: hidden;
  background: linear-gradient(135deg, #0d1018 0%, #141922 50%, #0d1018 100%);
  border: 1px solid var(--border); border-radius: 8px; margin-bottom: 16px;
  min-height: 340px;
}
.arsenal-preview-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #1a1f2a 0%, #0b0e14 100%);
  display: flex; align-items: flex-end; justify-content: center;
}
.arsenal-preview-hero img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  filter: saturate(1.1) brightness(1.05); min-height: 340px;
}
.arsenal-3d {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}
.arsenal-3d canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.arsenal-3d canvas:active { cursor: grabbing; }
.arsenal-3d-hint {
  position: absolute; bottom: 28px; left: 0; right: 0; z-index: 2;
  text-align: center; font-size: 10px; color: var(--fg-dim); opacity: .6;
  pointer-events: none;
}
.arsenal-preview-name {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 28px 12px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.9));
  font-family: var(--display); font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--fg);
  text-shadow: 0 1px 4px rgba(0,0,0,.7); z-index: 3; pointer-events: none;
}
.arsenal-preview-loadout {
  padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px; align-content: start; overflow-y: auto; max-height: 320px;
}
.arsenal-preview-loadout .arsenal-loadout-empty {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-dim); font-size: 13px; text-align: center; padding: 24px;
}
.arsenal-loadout-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px;
  border-radius: 5px; background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05); transition: background .15s;
}
.arsenal-loadout-row:hover { background: rgba(255,255,255,.06); }
.arsenal-loadout-row img {
  width: 44px; height: 33px; object-fit: contain; border-radius: 3px; flex-shrink: 0;
  background: linear-gradient(180deg, #181d27, #0e1117);
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.4));
}
.arsenal-loadout-row .loadout-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.arsenal-loadout-row .loadout-slot {
  font-size: 9px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--fg-dim); font-family: var(--display);
}
.arsenal-loadout-row .loadout-name { font-size: 11px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arsenal-loadout-row .loadout-rarity { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.arsenal-loadout-row .loadout-remove {
  width: 18px; height: 18px; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.06); color: var(--fg-dim); font-size: 12px; line-height: 1;
  display: grid; place-items: center; transition: all .15s; flex-shrink: 0;
}
.arsenal-loadout-row .loadout-remove:hover { background: rgba(235,75,75,.25); color: #eb4b4b; }
@media (max-width: 760px) {
  .arsenal-preview { grid-template-columns: 1fr; }
  .arsenal-preview-hero img { height: 200px; min-height: auto; }
  .arsenal-preview-hero .arsenal-3d { height: 260px; position: relative; }
  .arsenal-preview-loadout { max-height: none; grid-template-columns: 1fr 1fr; }
}

.arsenal-slot { margin-bottom: 16px; }
.arsenal-slot .label { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-family: var(--display); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-dim); }
.arsenal-slot .label::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--accent); }

/* item tile grid — Dota 2 armory style */
.arsenal-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.arsenal-item {
  position: relative; display: flex; flex-direction: column; gap: 0;
  padding: 0; border: none; border-radius: 4px;
  background: linear-gradient(180deg, #1a1f2a, #12161e);
  color: var(--fg); font: inherit; font-size: 12px; text-align: left;
  cursor: pointer; transition: transform .12s var(--ease), box-shadow .2s;
  overflow: hidden; isolation: isolate;
  outline: 2px solid transparent; outline-offset: -2px;
}
.arsenal-item::before {
  content: ''; position: absolute; inset: 0; border-radius: 4px; pointer-events: none; z-index: 2;
  border: 1px solid var(--item-color, var(--border));
  opacity: .5; transition: opacity .15s;
}
.arsenal-item:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -8px rgba(0,0,0,.6); }
.arsenal-item:hover::before { opacity: 1; }
.arsenal-item.active { outline-color: var(--accent); }
.arsenal-item.active::before { opacity: 1; border-width: 2px; }

/* rarity strip — the coloured bar at the bottom like Dota 2 item cards */
.arsenal-item::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; z-index: 2;
  background: var(--item-color, var(--border));
  opacity: .7; transition: opacity .15s, height .15s;
}
.arsenal-item:hover::after { opacity: 1; height: 4px; }
.arsenal-item.active::after { opacity: 1; height: 4px; }

/* rarity glow on hover */
.arsenal-item:hover { box-shadow: 0 8px 24px -8px rgba(0,0,0,.6), 0 0 12px -4px var(--item-color, transparent); }

/* item image — Dota 2 armory card preview */
.arsenal-item-img {
  position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden;
  background: linear-gradient(180deg, #181d27 0%, #0e1117 100%);
  display: grid; place-items: center;
}
.arsenal-item-img img {
  width: 100%; height: 100%; object-fit: contain; padding: 6px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
  transition: transform .2s var(--ease), filter .2s;
}
.arsenal-item:hover .arsenal-item-img img { transform: scale(1.05); filter: drop-shadow(0 4px 12px rgba(0,0,0,.6)) brightness(1.1); }

/* item inner content */
.arsenal-item-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.arsenal-item-name { font-weight: 600; font-size: 13px; line-height: 1.3; color: var(--fg); }
.arsenal-item-rarity {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--item-color, var(--fg-dim));
}
.arsenal-item-set { font-size: 11px; color: var(--fg-dim); line-height: 1.3; }
.arsenal-item-meta { font-size: 10px; color: var(--fg-dim); margin-top: auto; padding-top: 4px; display: flex; gap: 6px; align-items: center; }
.arsenal-item-meta svg { width: 12px; height: 12px; }

/* equipped checkmark */
.arsenal-item.active .arsenal-item-check {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.arsenal-item-check { display: none; }
.arsenal-item.active .arsenal-item-check { display: grid; }
.arsenal-item-check svg { width: 12px; height: 12px; stroke: var(--accent-ink); stroke-width: 3; fill: none; }

/* output bar */
.arsenal-out { margin-top: 12px; }
.arsenal-out .row { gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }

/* empty state */
.arsenal-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 80px 24px; color: var(--fg-dim); text-align: center; }
.arsenal-empty svg { width: 48px; height: 48px; opacity: .3; }

/* responsive */
@media (max-width: 900px) { .arsenal-items { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
@media (max-width: 760px) {
  .arsenal-wrap { grid-template-columns: 1fr; }
  .arsenal-heroes { max-height: none; position: static; }
  .arsenal-hero-grid { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; gap: 4px; padding-bottom: 4px; }
  .arsenal-hero-grid .ah { flex: 0 0 auto; min-width: 120px; }
  .arsenal-items { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* patch tab */
.nav-patch { position: relative; }
.nav-patch::after { content: ""; position: absolute; top: 6px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.patch-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; text-decoration: none; color: var(--fg); border-color: var(--accent); }
.patch-banner .note { flex: 1; min-width: 200px; }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.voice { display: flex; flex-direction: column; gap: 8px; }
.voice-head { display: flex; align-items: center; gap: 10px; }
.voice-head .hero-img { width: 64px; height: 36px; border-radius: 4px; object-fit: cover; }
.why summary, .patch-row summary { cursor: pointer; font-weight: 600; color: var(--accent-strong); }
.why[open] summary { margin-bottom: 6px; }
.why .facts, .patch-row .facts { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; line-height: 1.5; }
.patch-rows { display: flex; flex-direction: column; }
.patch-row { border-top: 1px solid var(--border); padding: 8px 0; }
.patch-row:first-child { border-top: 0; }
.patch-row summary { display: flex; align-items: center; gap: 8px; color: var(--fg); }
.patch-row h4 { margin: 10px 0 4px; font-size: 13px; color: var(--fg-muted); }
.patch-row .mini-hero { width: 48px; height: 27px; border-radius: 4px; object-fit: cover; flex: none; }
#patchSearch { max-width: 360px; }
.voice-build .build-line { padding: 6px 0 2px; gap: 4px; }
.voice-build .build-step { min-width: 46px; padding: 4px; }
.voice-build .build-step .item-icon { width: 33px; height: 24px; }
.voice-build .build-step b { font-size: 11px; }
.delta table { width: 100%; border-collapse: collapse; }
.delta th, .delta td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.delta td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta .voice-head .mini-hero { width: 48px; height: 27px; border-radius: 4px; object-fit: cover; }
.delta .why { margin-top: 4px; font-size: 13px; }
#deltaTabs { margin-bottom: 8px; }
