/* Dota 2 Intelligence — field-manual layout: sticky brand + section rail, dossier cards, official text vs editorial clearly separated.
   Deliberately dark-only (esports broadcast look); every color is a token. */
:root {
  color-scheme: dark;
  --fs: 1.06; --fs-min: 0px;   /* global text scale */
  --bg: #090d13;
  --bg-2: #0d131c;
  --surface: #121a25;
  --surface-2: #17212f;
  --surface-3: #1d2a3b;
  --line: #233246;
  --line-2: #2f4259;
  --fg: #e6edf5;
  --fg-2: #b4c2d3;
  --muted: #7f91a7;
  --frost: #8fdcff;        /* brand: 冰魂 frost */
  --frost-deep: #3aa6d8;
  --frost-glow: rgba(143, 220, 255, .14);
  --gold: #e9b54f;
  --gold-soft: rgba(233, 181, 79, .14);
  --buff: #46d39a;
  --buff-soft: rgba(70, 211, 154, .13);
  --nerf: #ff7676;
  --nerf-soft: rgba(255, 118, 118, .13);
  --rework: #b8a2ff;
  --rework-soft: rgba(184, 162, 255, .14);
  --mixed: #f2c46b;
  --mixed-soft: rgba(242, 196, 107, .12);
  --mech: #8fa6c0;
  --mech-soft: rgba(143, 166, 192, .13);
  --str: #e5604f; --agi: #4fcf7a; --int: #4fb8f0; --uni: #c99bff;
  --editor: #f0c987;       /* 编辑解读 */
  --editor-soft: rgba(240, 201, 135, .08);
  --community: #7ee0c3;
  --font-display: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-slogan: "LXGW Marker Gothic", "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  --font-author: "ZCOOL KuaiLe", "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Noto Sans SC", monospace;
  --avatar: url("brand/ice-soul.jpg");
  --r: 14px; --r-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

/* ---------- day themes (html[data-theme]); night = :root defaults ---------- */
:root { --topbar-bg: rgba(9, 13, 19, .92); --hero-bg: linear-gradient(145deg, rgba(23, 33, 47, .95), rgba(13, 19, 28, .9)); --scepter: #7cc4ff; --shard: #a7e1ff; }
html[data-theme="sky"], html[data-theme="forest"], html[data-theme="parchment"] {
  color-scheme: light;
  --shadow: 0 8px 24px rgba(20, 32, 46, .10);
  --buff: #1c9a62; --buff-soft: rgba(28, 154, 98, .12);
  --nerf: #d2423a; --nerf-soft: rgba(210, 66, 58, .11);
  --rework: #6b4fd8; --rework-soft: rgba(107, 79, 216, .10);
  --mixed: #b9800f; --mixed-soft: rgba(185, 128, 15, .12);
  --mech: #5d7189; --mech-soft: rgba(93, 113, 137, .12);
  --str: #c8442f; --agi: #23944a; --int: #1f7fc4; --uni: #8a54d6;
  --gold: #a8740c; --gold-soft: rgba(168, 116, 12, .12);
  --editor: #9a6512; --editor-soft: rgba(154, 101, 18, .08);
  --community: #13896a;
  --scepter: #1f6fc0; --shard: #2a8fc9;
}
html[data-theme="sky"] {
  --bg: #eef3f8; --bg-2: #f5f8fb; --surface: #ffffff; --surface-2: #f6f9fc; --surface-3: #e8eff6;
  --line: #d7e1ec; --line-2: #c1cfde; --fg: #14202e; --fg-2: #3a4c61; --muted: #6a7d93;
  --frost: #1f6fc0; --frost-deep: #2b7fd6; --frost-glow: rgba(43, 127, 214, .12);
  --topbar-bg: rgba(238, 243, 248, .92); --hero-bg: linear-gradient(145deg, #ffffff, #eef4fa);
}
html[data-theme="forest"] {
  --bg: #eef3ea; --bg-2: #f4f7f1; --surface: #ffffff; --surface-2: #f5f8f2; --surface-3: #e6eee1;
  --line: #d4e0cf; --line-2: #bfcfb8; --fg: #17241a; --fg-2: #3a4d3e; --muted: #687b6b;
  --frost: #2a7d47; --frost-deep: #2f8a4e; --frost-glow: rgba(47, 138, 78, .12);
  --topbar-bg: rgba(238, 243, 234, .92); --hero-bg: linear-gradient(145deg, #ffffff, #edf4e8);
}
html[data-theme="parchment"] {
  --bg: #f3ecdd; --bg-2: #f8f2e6; --surface: #fffaf0; --surface-2: #faf3e4; --surface-3: #efe4cf;
  --line: #e2d5bb; --line-2: #d2c09f; --fg: #2a2118; --fg-2: #4d4032; --muted: #7d6d5a;
  --frost: #9a4f24; --frost-deep: #a3562a; --frost-glow: rgba(163, 86, 42, .12);
  --topbar-bg: rgba(243, 236, 221, .93); --hero-bg: linear-gradient(145deg, #fffaf0, #f4ead6);
}
html[data-theme="sky"] body, html[data-theme="forest"] body, html[data-theme="parchment"] body { background-image: radial-gradient(1200px 520px at 85% -10%, var(--frost-glow), transparent 60%); }
html[data-theme="sky"] .btn.primary, html[data-theme="forest"] .btn.primary, html[data-theme="parchment"] .btn.primary { background: var(--frost-deep); border-color: var(--frost); color: #fff; }
html[data-theme="sky"] .tal-ico, html[data-theme="forest"] .tal-ico, html[data-theme="parchment"] .tal-ico { background: var(--surface-3); }
html[data-theme="sky"] .modal, html[data-theme="forest"] .modal, html[data-theme="parchment"] .modal { background: rgba(20, 24, 30, .45); }

/* theme switcher */
.theme-sw { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); flex: 0 0 auto; }
.theme-sw button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; display: grid; place-items: center; font-size: max(var(--fs-min), calc(13px * var(--fs))); line-height: 1; }
.theme-sw button[aria-pressed="true"] { border-color: var(--frost); }
.theme-sw .t-night { background: #0b111a; color: #8fdcff; } .theme-sw .t-sky { background: #eef3f8; color: #2b7fd6; }
.theme-sw .t-forest { background: #eef3ea; color: #2f8a4e; } .theme-sw .t-parchment { background: #f3ecdd; color: #a3562a; }

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.65 var(--font-body);
  background-image:
    radial-gradient(1200px 520px at 85% -10%, rgba(58, 166, 216, .16), transparent 60%),
    radial-gradient(900px 460px at -10% 0%, rgba(233, 181, 79, .07), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
a { color: var(--frost); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--frost); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--topbar-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 64px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; border-radius: var(--r-sm); overflow: hidden; background: linear-gradient(160deg, #0f2537, #071019); border: 1px solid rgba(143, 220, 255, .35); box-shadow: 0 0 18px var(--frost-glow); display: grid; place-items: center; }
.brand-mark.has-av, .av-mini { background: var(--avatar) center / cover no-repeat, #000; border-radius: 50%; }
.brand-mark.has-av { border-radius: 50%; border-color: rgba(143, 220, 255, .5); box-shadow: 0 0 14px rgba(170, 120, 255, .22), 0 0 18px var(--frost-glow); }
.av-mini { display: inline-block; width: 18px; height: 18px; border-radius: 5px; vertical-align: -4px; margin-right: 6px; border: 1px solid rgba(143, 220, 255, .35); }
.byline { display: inline-flex; align-items: center; gap: 2px; }
.brand-mark svg, .brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; justify-content: center; gap: 3px; height: 38px; line-height: 1.15; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: max(var(--fs-min), calc(17px * var(--fs))); letter-spacing: .02em; white-space: nowrap; }
.brand-name b { color: var(--frost); font-weight: 700; }
.brand-by { font-size: max(var(--fs-min), calc(12px * var(--fs))); letter-spacing: .02em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-search { margin-left: auto; position: relative; flex: 0 1 290px; min-width: 0; }
.tagline { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; height: 30px; margin: 0; font-family: var(--font-slogan); font-weight: 400; font-size: max(var(--fs-min), calc(19px * var(--fs))); letter-spacing: .08em; line-height: 1; white-space: nowrap; color: var(--frost); background: linear-gradient(90deg, var(--fg) 0%, var(--frost) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-product { text-transform: uppercase; letter-spacing: .16em; font-weight: 700; font-size: max(var(--fs-min), calc(10.5px * var(--fs))); color: var(--frost); }
.sigpill { flex: 0 0 auto; margin-left: 6px; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(143, 220, 255, .6); background: rgba(143, 220, 255, .12); color: var(--frost); font-size: max(var(--fs-min), calc(16px * var(--fs))); white-space: nowrap; box-shadow: 0 0 12px rgba(143, 220, 255, .15); }
.au-big { font-size: 1.16em; line-height: 1; vertical-align: -0.04em; }
.au { font-family: var(--font-author); font-weight: 400; font-size: 1.08em; letter-spacing: .04em; }
.ov-tagline { display: none; margin: -10px 0 10px; font-family: var(--font-slogan); font-weight: 400; font-size: max(var(--fs-min), calc(22px * var(--fs))); letter-spacing: .08em; color: var(--frost); position: relative; z-index: 1; }
@media (max-width: 1120px) { .tagline { display: none; } .ov-tagline { display: block; } }
/* align search with overview right column (.overview = 1.35fr 1fr, gap 22px) */
@media (min-width: 921px) { .top-search { flex: 0 1 calc((100% - 22px) / 2.35); min-width: 180px; } }
.top-search input { display: block; width: 100%; height: 38px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 0 36px 0 36px; font-size: max(var(--fs-min), calc(14px * var(--fs))); line-height: 36px; }
.top-search input::placeholder { color: var(--muted); }
.top-search .s-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.kbd { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(11px * var(--fs))); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); }
.top-search .kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.search-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); max-height: min(70vh, 520px); overflow: auto; padding: 6px; z-index: 70; }
.search-group { font-size: max(var(--fs-min), calc(11px * var(--fs))); letter-spacing: .1em; color: var(--muted); padding: 8px 10px 4px; }
.search-hit { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.search-hit:hover, .search-hit.sel { background: var(--surface-3); }
.search-hit .hit-sub { color: var(--muted); font-size: max(var(--fs-min), calc(12px * var(--fs))); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hit > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.search-empty { padding: 14px; color: var(--muted); font-size: max(var(--fs-min), calc(13px * var(--fs))); }

/* ---------- section rail ---------- */
.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--topbar-size, 64px)); z-index: 40; background: var(--topbar-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.rail-in { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 8px; }
.rail-in::-webkit-scrollbar { display: none; }
/* desktop: every tab stays visible (wraps to a second row when narrow); phones keep the swipe row */
@media (min-width: 641px) { .rail-in { flex-wrap: wrap; overflow-x: visible; row-gap: 4px; } }
.tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--fg-2); font-weight: 600; font-size: max(var(--fs-min), calc(14px * var(--fs))); cursor: pointer; transition: background .15s, color .15s; }
.tab:hover { color: var(--fg); background: var(--surface); }
.tab[aria-selected="true"] { color: var(--fg); background: var(--surface-2); border-color: var(--line-2); box-shadow: inset 0 -2px 0 var(--frost); }
.tab .cnt { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(11.5px * var(--fs))); color: var(--muted); font-weight: 500; }
.tab.t-comm[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--community); }

main { padding-block: 22px 60px; }
.panel { display: none; }
.panel.on { display: block; animation: rise .22s ease; }
@keyframes rise { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.25; letter-spacing: .01em; }
h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 700; }
h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; }
h3 { font-size: max(var(--fs-min), calc(17px * var(--fs))); font-weight: 700; }
p { margin: 0; }
.eyebrow { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(11.5px * var(--fs))); letter-spacing: .14em; text-transform: uppercase; color: var(--frost); }
.lead { color: var(--fg-2); font-size: max(var(--fs-min), calc(16px * var(--fs))); max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: max(var(--fs-min), calc(13px * var(--fs))); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 36px 0 14px; }
.sec-head:first-child { margin-top: 0; }
.sec-head .hint { color: var(--muted); font-size: max(var(--fs-min), calc(13px * var(--fs))); }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---------- overview hero ---------- */
.overview { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: stretch; }
@media (max-width: 920px) { .overview { grid-template-columns: 1fr; } }
.ov-main { padding: 26px; border-radius: var(--r); background: var(--hero-bg); border: 1px solid var(--line); position: relative; overflow: hidden; }
.ov-main::after { content: "7.42"; position: absolute; right: -6px; bottom: -34px; font-family: var(--font-display); font-weight: 700; font-size: 150px; line-height: 1; color: rgba(143, 220, 255, .05); pointer-events: none; }
.ov-main h1 { margin: 10px 0 12px; max-width: 30ch; position: relative; z-index: 1; }
.ov-main .lead { position: relative; z-index: 1; }
.ov-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; position: relative; z-index: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: max(var(--fs-min), calc(12.5px * var(--fs))); border: 1px solid var(--line-2); color: var(--fg-2); background: var(--surface); white-space: nowrap; }
.pill.frost { color: var(--frost); border-color: rgba(143, 220, 255, .35); background: var(--frost-glow); }
.pill.gold { color: var(--gold); border-color: rgba(233, 181, 79, .35); background: var(--gold-soft); }
.coverage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cov { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; transition: border-color .15s, transform .15s; }
.cov:hover { border-color: var(--frost-deep); transform: translateY(-1px); }
.cov .v { font-family: var(--font-display); font-size: max(var(--fs-min), calc(30px * var(--fs))); font-weight: 700; line-height: 1.1; }
.cov .k { color: var(--fg-2); font-size: max(var(--fs-min), calc(13.5px * var(--fs))); font-weight: 600; }
.cov .s { color: var(--muted); font-size: max(var(--fs-min), calc(12px * var(--fs))); }
.cov.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; cursor: default; }
.cov.wide:hover { transform: none; border-color: var(--line); }

.keys { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); } .keys .key:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .keys { grid-template-columns: repeat(6, minmax(0, 1fr)); } .keys .key { grid-column: span 2; } .keys .key:nth-child(n+4) { grid-column: span 3; } .keys .key:last-child:nth-child(odd) { grid-column: span 3; } }
.key { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.key h3 { font-size: max(var(--fs-min), calc(16.5px * var(--fs))); }
.key .fact { color: var(--fg); font-size: max(var(--fs-min), calc(14px * var(--fs))); }
.key-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

/* editorial vs official vs community markers */
.ed { position: relative; padding: 10px 12px 10px 34px; border-radius: var(--r-sm); background: var(--editor-soft); border: 1px dashed rgba(240, 201, 135, .35); color: var(--fg-2); font-size: max(var(--fs-min), calc(14px * var(--fs))); }
.ed::before { content: "解读"; position: absolute; left: 9px; top: 11px; font-size: max(var(--fs-min), calc(10.5px * var(--fs))); font-weight: 700; color: var(--editor); writing-mode: vertical-rl; letter-spacing: .1em; line-height: 1; }
.ed b { color: var(--editor); font-weight: 600; }
.src-tag { display: inline-flex; align-items: center; gap: 5px; font-size: max(var(--fs-min), calc(11.5px * var(--fs))); font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.src-tag.official { color: var(--frost); background: var(--frost-glow); }
.src-tag.editor { color: var(--editor); background: var(--editor-soft); border: 1px dashed rgba(240, 201, 135, .4); }
.src-tag.community { color: var(--community); background: rgba(126, 224, 195, .1); }
.legend { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; font-size: max(var(--fs-min), calc(12.5px * var(--fs))); color: var(--muted); }

/* ---------- buttons / chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg); font-size: max(var(--fs-min), calc(13.5px * var(--fs))); font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; text-decoration: none; }
.btn:hover { border-color: var(--frost-deep); text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, #1d5f86, #164a69); border-color: #2c7aa8; }
.btn.ghost { background: none; }
.btn.sm { padding: 4px 10px; font-size: max(var(--fs-min), calc(12.5px * var(--fs))); border-radius: 8px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--frost); font-size: max(var(--fs-min), calc(13px * var(--fs))); cursor: pointer; font-weight: 600; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg-2); font-size: max(var(--fs-min), calc(13px * var(--fs))); cursor: pointer; white-space: nowrap; transition: all .15s; }
.chip:hover { color: var(--fg); border-color: var(--muted); }
.chip[aria-pressed="true"] { color: var(--bg); background: var(--frost); border-color: var(--frost); font-weight: 600; }
.chip .c { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(11px * var(--fs))); opacity: .75; }
.chip-label { font-size: max(var(--fs-min), calc(12px * var(--fs))); color: var(--muted); margin-right: 2px; letter-spacing: .04em; }

/* classification pills */
.cls { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; font-size: max(var(--fs-min), calc(12px * var(--fs))); font-weight: 700; white-space: nowrap; line-height: 1.6; }
.cls-buff { color: var(--buff); background: var(--buff-soft); }
.cls-nerf { color: var(--nerf); background: var(--nerf-soft); }
.cls-mixed { color: var(--mixed); background: var(--mixed-soft); }
.cls-rework { color: var(--rework); background: var(--rework-soft); }
.cls-mech { color: var(--mech); background: var(--mech-soft); }
.cls-new { color: var(--gold); background: var(--gold-soft); }
.cls-return { color: var(--frost); background: var(--frost-glow); }
.cls-rotated { color: var(--muted); background: var(--surface-3); }
.cls-removed { color: var(--muted); background: var(--surface-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.tagp { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 6px; font-size: max(var(--fs-min), calc(11.5px * var(--fs))); color: var(--fg-2); background: var(--surface-3); white-space: nowrap; line-height: 1.75; }
.tagp svg { width: 11px; height: 11px; }
.tagp.scepter { color: var(--scepter); } .tagp.shard { color: var(--shard); } .tagp.innate { color: var(--gold); }
.tagp.potency { color: var(--rework); } .tagp.major { color: var(--nerf); } .tagp.talent { color: var(--mixed); }

/* ---------- filter bar ---------- */
.filters { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 14px; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search { flex: 1 1 260px; min-width: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 9px 12px; font-size: max(var(--fs-min), calc(14px * var(--fs))); }
.search::placeholder { color: var(--muted); }
select.sel { background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 7px 10px; font-size: max(var(--fs-min), calc(13.5px * var(--fs))); }
.result-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: max(var(--fs-min), calc(13px * var(--fs))); margin-bottom: 10px; }
.toggle { display: inline-flex; align-items: center; gap: 7px; font-size: max(var(--fs-min), calc(13px * var(--fs))); color: var(--fg-2); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--frost); width: 15px; height: 15px; }

/* ---------- entity cards ---------- */
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; align-items: start; }
.list.one { grid-template-columns: 1fr; }
.ent { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s; min-width: 0; }
.ent:hover { border-color: var(--line-2); }
.ent.open { grid-column: 1 / -1; border-color: var(--line-2); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.ent-head { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 13px 14px; cursor: pointer; border-radius: var(--r); }
.ent-head:hover .ent-name { color: var(--frost); }
.ent-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.ent-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ent-name { font-family: var(--font-display); font-weight: 700; font-size: max(var(--fs-min), calc(16px * var(--fs))); line-height: 1.3; }
.ent-en { color: var(--muted); font-size: max(var(--fs-min), calc(12px * var(--fs))); }
.ent-sum { color: var(--fg-2); font-size: max(var(--fs-min), calc(13px * var(--fs))); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ent.open .ent-sum { -webkit-line-clamp: unset; }
.ent-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.ent-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.chev { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.ent.open .chev { transform: rotate(180deg); }
.fav { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--muted); line-height: 0; border-radius: 6px; }
.fav svg { width: 18px; height: 18px; }
.fav[aria-pressed="true"] { color: var(--gold); }
.dirc { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(11.5px * var(--fs))); white-space: nowrap; }
.dirc .u { color: var(--buff); } .dirc .d { color: var(--nerf); }

.portrait { width: 64px; height: 36px; border-radius: 6px; flex: 0 0 64px; object-fit: cover; background-color: var(--surface-3); border: 1px solid var(--line); }
.icon { width: 44px; height: 32px; border-radius: 6px; flex: 0 0 44px; object-fit: cover; background-color: var(--surface-3); border: 1px solid var(--line); }
.icon.sq { width: 40px; height: 40px; flex-basis: 40px; }
.ab-icon { width: 34px; height: 34px; border-radius: 7px; flex: 0 0 34px; object-fit: cover; background-color: var(--surface-3); border: 1px solid var(--line); }
.spr { display: inline-block; background-repeat: no-repeat; background-color: var(--surface-3); }
.attr-ico { width: 16px; height: 16px; flex: 0 0 16px; }
.mk-ico { width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; }
.tal-ico { display: inline-grid; place-items: center; background: radial-gradient(circle, #2a3442, #121a25); }
.tal-ico img { width: 26px; height: 26px; }
.ph { display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: var(--fg); letter-spacing: .02em; overflow: hidden; }
.ph.attr-力量 { background: linear-gradient(140deg, rgba(229, 96, 79, .55), rgba(229, 96, 79, .15)); }
.ph.attr-敏捷 { background: linear-gradient(140deg, rgba(79, 207, 122, .5), rgba(79, 207, 122, .12)); }
.ph.attr-智力 { background: linear-gradient(140deg, rgba(79, 184, 240, .55), rgba(79, 184, 240, .14)); }
.ph.attr-全才 { background: linear-gradient(140deg, rgba(201, 155, 255, .55), rgba(201, 155, 255, .14)); }
.ph.k-item { background: linear-gradient(140deg, rgba(233, 181, 79, .4), rgba(233, 181, 79, .08)); color: var(--gold); }
.ph.k-ab { background: linear-gradient(140deg, rgba(143, 220, 255, .3), rgba(143, 220, 255, .06)); color: var(--frost); font-size: max(var(--fs-min), calc(13px * var(--fs))); }
.ph.k-creep { background: linear-gradient(140deg, rgba(143, 166, 192, .4), rgba(143, 166, 192, .08)); }
.attr-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 9px; }
.attr-dot.力量 { background: var(--str); } .attr-dot.敏捷 { background: var(--agi); } .attr-dot.智力 { background: var(--int); } .attr-dot.全才 { background: var(--uni); }

.ent-detail { padding: 0 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.detail-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 8px 0 0; border-top: 1px solid var(--line); }
.blk { border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.blk-h { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .015); }
.blk-h h4 { font-size: max(var(--fs-min), calc(14.5px * var(--fs))); font-family: var(--font-display); }
.blk-h .ent-en { margin-left: 2px; }
.notes { list-style: none; margin: 0; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.note { position: relative; padding-left: 16px; font-size: max(var(--fs-min), calc(14px * var(--fs))); color: var(--fg); min-width: 0; overflow-wrap: anywhere; }
.note::before { content: ""; position: absolute; left: 3px; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.note.d-up::before { background: var(--buff); box-shadow: 0 0 0 3px var(--buff-soft); }
.note.d-down::before { background: var(--nerf); box-shadow: 0 0 0 3px var(--nerf-soft); }
.note.i2 { margin-left: 18px; font-size: max(var(--fs-min), calc(13.5px * var(--fs))); color: var(--fg-2); }
.note.i3 { margin-left: 34px; font-size: max(var(--fs-min), calc(13.5px * var(--fs))); color: var(--fg-2); }
.note.i4 { margin-left: 50px; font-size: max(var(--fs-min), calc(13px * var(--fs))); color: var(--fg-2); }
.note.i0 { padding-left: 16px; }
.note.sub { padding-left: 0; margin-top: 6px; font-family: var(--font-display); font-weight: 700; color: var(--frost); font-size: max(var(--fs-min), calc(14px * var(--fs))); letter-spacing: .02em; }
.note.sub::before { display: none; }
.note .en { display: block; margin-top: 2px; font-size: max(var(--fs-min), calc(12.5px * var(--fs))); color: var(--muted); font-family: var(--font-body); }
.note .info { display: block; margin-top: 4px; padding: 6px 9px; border-radius: 7px; background: var(--surface-2); color: var(--fg-2); font-size: max(var(--fs-min), calc(12.5px * var(--fs))); border-left: 2px solid var(--line-2); }
.note .tnote { display: block; margin-top: 4px; padding: 6px 9px; border-radius: 7px; background: var(--editor-soft); color: var(--editor); font-size: max(var(--fs-min), calc(12.5px * var(--fs))); border-left: 2px solid var(--editor); }
.mk { display: inline-flex; align-items: center; margin-left: 6px; padding: 0 6px; border-radius: 5px; font-size: max(var(--fs-min), calc(10.5px * var(--fs))); font-weight: 700; vertical-align: 1px; line-height: 1.7; }
.mk.tr { color: var(--editor); background: var(--editor-soft); border: 1px dashed rgba(240, 201, 135, .4); }
.mk.fix { color: var(--nerf); background: var(--nerf-soft); }
.mk.scepter { color: var(--scepter); background: rgba(124, 196, 255, .12); }
.mk.shard { color: var(--shard); background: rgba(167, 225, 255, .1); }
.mk.innate { color: var(--gold); background: var(--gold-soft); }
.hide-en .note .en, .hide-en .ev-line .en { display: none; }
.br-sep { height: 1px; background: var(--line); margin: 4px 0; list-style: none; }

/* ---------- simulators ---------- */
.sims { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.sim { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sim.bare { padding: 0; border: 0; background: none; border-radius: 0; }
.osec > summary .chev { transition: transform .2s; }
.osec[open] > summary .chev { transform: rotate(180deg); }
.osec > summary:hover h3 { color: var(--frost); }
.sim .formula { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(12.5px * var(--fs))); color: var(--muted); }
.sim-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sim-row label { font-size: max(var(--fs-min), calc(13.5px * var(--fs))); color: var(--fg-2); }
.sim-val { font-family: var(--font-display); font-size: max(var(--fs-min), calc(28px * var(--fs))); font-weight: 700; color: var(--frost); line-height: 1; }
input[type="range"] { width: 100%; accent-color: var(--frost); height: 24px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.metrics.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 520px) { .metrics.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.metric { padding: 9px 10px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.metric .k { font-size: max(var(--fs-min), calc(11.5px * var(--fs))); color: var(--muted); }
.metric .v { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(18px * var(--fs))); font-weight: 700; font-variant-numeric: tabular-nums; }
.v.pos { color: var(--buff); } .v.neg { color: var(--nerf); }
.verdict { font-size: max(var(--fs-min), calc(13.5px * var(--fs))); color: var(--fg-2); padding: 9px 11px; border-radius: 9px; background: var(--bg-2); border-left: 3px solid var(--frost-deep); }
.spark { width: 100%; height: 80px; display: block; }

/* tables */
.tbl-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: max(var(--fs-min), calc(13.5px * var(--fs))); }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: max(var(--fs-min), calc(12px * var(--fs))); letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--bg-2); position: sticky; top: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
td.pct { font-family: var(--font-mono); font-weight: 700; color: var(--rework); white-space: nowrap; }

/* official section drawers */
.osec { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.osec > summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.osec > summary::-webkit-details-marker { display: none; }
.osec > summary h3 { flex: 1; }
.osec[open] > summary { border-bottom: 1px solid var(--line); }
.osec-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.takes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--fg-2); font-size: max(var(--fs-min), calc(14px * var(--fs))); }

/* ---------- neutral pools ---------- */
.tiers { display: flex; flex-direction: column; gap: 14px; }
.tier { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.tier-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(143, 220, 255, .08), transparent); }
.tier-h .t-num { font-family: var(--font-display); font-size: max(var(--fs-min), calc(22px * var(--fs))); font-weight: 700; color: var(--frost); }
.pools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); }
@media (max-width: 860px) { .pools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pools { grid-template-columns: 1fr; } }
.pool { background: var(--surface); padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pool-h { font-size: max(var(--fs-min), calc(11.5px * var(--fs))); letter-spacing: .1em; color: var(--muted); font-family: var(--font-mono); }
.pi { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 7px; border-radius: 8px; border: 1px solid transparent; background: var(--bg-2); cursor: pointer; text-align: left; min-width: 0; }
.pi:hover { border-color: var(--frost-deep); }
.pi .icon { width: 36px; height: 26px; flex-basis: 36px; }
.pi .nm { font-size: max(var(--fs-min), calc(13.5px * var(--fs))); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi .st { font-size: max(var(--fs-min), calc(11px * var(--fs))); color: var(--muted); }
.pi .st.chg { color: var(--gold); }
.pi > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ench-row { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: max(var(--fs-min), calc(13px * var(--fs))); color: var(--fg-2); }
.ench-row b { color: var(--muted); font-weight: 600; font-size: max(var(--fs-min), calc(12px * var(--fs))); }
.timeline-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 640px) { .timeline-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ts { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.ts .t { font-family: var(--font-mono); color: var(--frost); font-weight: 700; }
.ts .l { font-size: max(var(--fs-min), calc(12.5px * var(--fs))); color: var(--fg-2); }

/* creeps camp board */
.camps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .camps { grid-template-columns: 1fr; } }
.camp { padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.camp.rad { box-shadow: inset 3px 0 0 #5fbf6c; } .camp.dire { box-shadow: inset 3px 0 0 #d0604f; }
.camp h3 { margin-bottom: 8px; }
.camp ul { margin: 0; padding-left: 18px; color: var(--fg-2); font-size: max(var(--fs-min), calc(14px * var(--fs))); display: flex; flex-direction: column; gap: 4px; }
.newmark { color: var(--gold); font-weight: 700; }

/* ---------- analysis ---------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.pillar { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.pillar p { color: var(--fg-2); font-size: max(var(--fs-min), calc(14.5px * var(--fs))); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.chart { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.chart h3 { margin-bottom: 4px; }
.bars { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.bar { display: grid; grid-template-columns: 92px minmax(0, 1fr) 40px; align-items: center; gap: 10px; font-size: max(var(--fs-min), calc(13px * var(--fs))); }
.bar .lab { color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .lab button { all: unset; cursor: pointer; } .bar .lab button:hover { color: var(--frost); }
.bar .track { height: 12px; border-radius: 4px; background: var(--bg-2); overflow: hidden; display: flex; }
.bar .fill { height: 100%; }
.bar .val { font-family: var(--font-mono); text-align: right; color: var(--fg); font-variant-numeric: tabular-nums; }
.stackbar { display: flex; height: 18px; border-radius: 6px; overflow: hidden; margin-top: 12px; background: var(--bg-2); }
.stackbar > span { height: 100%; }
.tl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.tl-card { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); position: relative; }
.tl-card .t { font-family: var(--font-mono); color: var(--frost); font-size: max(var(--fs-min), calc(13px * var(--fs))); font-weight: 700; }
.tl-card h3 { margin: 4px 0 8px; font-size: max(var(--fs-min), calc(15.5px * var(--fs))); }
.tl-card ul { margin: 0; padding-left: 17px; display: flex; flex-direction: column; gap: 6px; color: var(--fg-2); font-size: max(var(--fs-min), calc(13.5px * var(--fs))); }
.takes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 12px; }
.take { display: flex; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.take p { color: var(--fg-2); font-size: max(var(--fs-min), calc(13.5px * var(--fs))); margin-top: 4px; }
.take > div { min-width: 0; }
.secondary { border-radius: var(--r); border: 1px dashed var(--line-2); background: var(--bg-2); }
.secondary > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; color: var(--fg-2); list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.secondary > summary::-webkit-details-marker { display: none; }
.secondary-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.recs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.rec { padding: 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: max(var(--fs-min), calc(13.5px * var(--fs))); color: var(--fg-2); }
.rec-items { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-item { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); font-size: max(var(--fs-min), calc(12.5px * var(--fs))); color: var(--fg-2); }
.rec-item .icon { width: 30px; height: 22px; flex-basis: 30px; border-radius: 4px; }
.rec-top { display: flex; align-items: center; gap: 10px; }
.journal { display: grid; gap: 10px; }
.journal label { font-size: max(var(--fs-min), calc(13px * var(--fs))); color: var(--fg-2); display: block; margin-bottom: 4px; }
.journal textarea, .journal select { width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 10px; }
.journal textarea { min-height: 80px; resize: vertical; }
.checklist { display: flex; flex-direction: column; gap: 6px; }
.checklist label { display: flex; gap: 8px; align-items: center; font-size: max(var(--fs-min), calc(13.5px * var(--fs))); color: var(--fg); margin: 0; }
.jlist { display: flex; flex-direction: column; gap: 6px; }
.jrow { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 8px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-size: max(var(--fs-min), calc(13px * var(--fs))); }
.jrow p { min-width: 0; overflow-wrap: anywhere; }

/* ---------- community ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: rgba(126, 224, 195, .06); border: 1px solid rgba(126, 224, 195, .25); color: var(--fg-2); font-size: max(var(--fs-min), calc(14px * var(--fs))); }
.notice.warn { background: var(--gold-soft); border-color: rgba(233, 181, 79, .3); }
.notice b { color: var(--fg); }
.notice svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; color: var(--community); }
.intel { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.intel.hl { border-color: var(--community); box-shadow: 0 0 0 3px rgba(126, 224, 195, .12); }
.intel-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.intel h3 { font-size: max(var(--fs-min), calc(16.5px * var(--fs))); overflow-wrap: anywhere; }
.intel h3 a { color: var(--fg); }
.intel h3 a:hover { color: var(--community); }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.mg { padding: 7px 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.mg .k { font-size: max(var(--fs-min), calc(11px * var(--fs))); color: var(--muted); letter-spacing: .04em; }
.mg .v { font-size: max(var(--fs-min), calc(13px * var(--fs))); color: var(--fg); overflow-wrap: anywhere; }
.mg .v.na { color: var(--muted); font-style: italic; }
.st { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: max(var(--fs-min), calc(12px * var(--fs))); font-weight: 700; }
.st-confirmed { color: var(--buff); background: var(--buff-soft); }
.st-partial { color: var(--mixed); background: var(--mixed-soft); }
.st-contradicted { color: var(--nerf); background: var(--nerf-soft); }
.st-pending { color: var(--mech); background: var(--mech-soft); }
.lvl { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(12px * var(--fs))); font-weight: 700; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--fg-2); }
.claim { padding: 10px 12px; border-radius: var(--r-sm); background: rgba(126, 224, 195, .05); border-left: 3px solid var(--community); font-size: max(var(--fs-min), calc(14px * var(--fs))); color: var(--fg); }
.claim .lab { display: block; font-size: max(var(--fs-min), calc(11.5px * var(--fs))); color: var(--community); font-weight: 700; margin-bottom: 2px; }
.verify { padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); font-size: max(var(--fs-min), calc(14px * var(--fs))); display: flex; flex-direction: column; gap: 8px; }
.ev-lines { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; }
.ev-line { font-size: max(var(--fs-min), calc(13px * var(--fs))); color: var(--fg-2); padding: 6px 9px; border-radius: 7px; background: var(--surface); border-left: 2px solid var(--frost-deep); }
.ev-line .who { color: var(--frost); font-weight: 600; margin-right: 6px; }
.ev-line .en { display: block; color: var(--muted); font-size: max(var(--fs-min), calc(12px * var(--fs))); }
.kv { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 12px; font-size: max(var(--fs-min), calc(13.5px * var(--fs))); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--fg-2); }
.relchips { display: flex; gap: 6px; flex-wrap: wrap; }
.research { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.rq { padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px dashed var(--line-2); font-size: max(var(--fs-min), calc(14px * var(--fs))); display: flex; flex-direction: column; gap: 6px; }
.rq .how { color: var(--muted); font-size: max(var(--fs-min), calc(13px * var(--fs))); }
.sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.source { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: max(var(--fs-min), calc(13.5px * var(--fs))); color: var(--fg); }
.source:hover { border-color: var(--community); text-decoration: none; }
.source .kind { font-size: max(var(--fs-min), calc(11.5px * var(--fs))); color: var(--muted); white-space: nowrap; }
.arch { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px; counter-reset: s; }
.arch-step { padding: 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: max(var(--fs-min), calc(13px * var(--fs))); color: var(--fg-2); position: relative; }
.arch-step b { display: block; color: var(--fg); font-size: max(var(--fs-min), calc(14px * var(--fs))); margin-bottom: 2px; }
.arch-step .state { display: inline-block; margin-top: 6px; font-size: max(var(--fs-min), calc(11.5px * var(--fs))); color: var(--mech); }
.arch-step .state.on { color: var(--buff); }

/* community link in details */
.comm-link { display: inline-flex; align-items: center; gap: 6px; color: var(--community); font-weight: 600; font-size: max(var(--fs-min), calc(13px * var(--fs))); background: none; border: 1px solid rgba(126, 224, 195, .3); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.comm-link:hover { background: rgba(126, 224, 195, .08); }
.comm-link[disabled] { color: var(--muted); border-color: var(--line); cursor: default; background: none; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(3, 6, 10, .72); display: none; align-items: flex-end; justify-content: center; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
.modal.on { display: flex; }
@media (min-width: 700px) { .modal { align-items: center; } }
.modal-box { width: min(680px, 100%); max-height: min(86vh, 860px); overflow: auto; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; position: relative; }
.modal-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: max(var(--fs-min), calc(18px * var(--fs))); line-height: 1; }
.modal-head { display: flex; gap: 12px; align-items: center; padding-right: 40px; margin-bottom: 12px; }

/* footer */
footer { border-top: 1px solid var(--line); padding-block: 26px 40px; color: var(--muted); font-size: max(var(--fs-min), calc(13px * var(--fs))); }
.foot { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }
.foot h4 { color: var(--fg-2); font-size: max(var(--fs-min), calc(13px * var(--fs))); margin-bottom: 6px; font-family: var(--font-body); }
.foot ul { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }
.sig { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--fg-2); }
.sig .brand-mark { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; }
.sig .brand-mark.has-av { border-radius: 50%; }

.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; z-index: 95; padding: 9px 16px; border-radius: var(--r-sm); background: var(--surface-3); border: 1px solid var(--line-2); color: var(--fg); font-size: max(var(--fs-min), calc(13.5px * var(--fs))); transition: all .2s; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translateX(-50%); }
.empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }
.jump-flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--frost); } 100% { box-shadow: 0 0 0 0 transparent; } }

@media (max-width: 640px) {
  body { font-size: max(var(--fs-min), calc(14.5px * var(--fs))); }
  .topbar { position: relative; top: auto; }
  .topbar-in { flex-wrap: wrap; gap: 10px 12px; min-height: 0; padding-block: 12px; }
  .top-search input { height: 40px; line-height: 38px; }
  .top-search { flex: 1 1 100%; order: 3; }
  .top-search .kbd { display: none; }
  .rail { top: env(safe-area-inset-top, 0px); }
  .ov-main { padding: 20px; }
  .ent-head { padding: 12px; gap: 10px; }
  .portrait { width: 52px; height: 30px; flex-basis: 52px; }
  .ent-detail { padding: 0 10px 14px; }
  .notes { padding: 8px 8px 10px; }
  .note.i2 { margin-left: 10px; } .note.i3 { margin-left: 20px; } .note.i4 { margin-left: 28px; }
  .metrics .v { font-size: max(var(--fs-min), calc(16px * var(--fs))); }
  .bar { grid-template-columns: 74px minmax(0, 1fr) 34px; }
  .sec-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .sec-head .hint { font-size: max(var(--fs-min), calc(12.5px * var(--fs))); }
  .filters { padding: 12px; gap: 8px; }
  .filter-row .search { flex: 1 1 100%; }
  .filter-row .sel { flex: 1 1 auto; }
  .filter-row:has(> .chip-label) { position: relative; padding-left: 40px; gap: 6px; }
  .filter-row > .chip-label { position: absolute; left: 0; top: 6px; }
  .chip { padding: 4px 10px; font-size: max(var(--fs-min), calc(12.5px * var(--fs))); }
  .result-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- folded long info / long note groups ---------- */
.note details.info.fold { padding: 0; border-left-color: var(--frost-deep); }
.info.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 7px 10px; }
.info.fold > summary::-webkit-details-marker { display: none; }
.info.fold .fold-sum { flex: 1; min-width: 0; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info.fold .more, .fold-btn { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; color: var(--frost); font-size: max(var(--fs-min), calc(12px * var(--fs))); font-weight: 600; }
.info.fold .more svg, .fold-btn svg { width: 14px; height: 14px; transform: rotate(-90deg); transition: transform .2s; }
.info.fold[open] .more svg, .fold-btn[aria-expanded="true"] svg { transform: rotate(0deg); }
.info.fold[open] .more { font-size: 0; } .info.fold[open] .more svg { width: 14px; }
.info.fold[open] .fold-sum { color: var(--frost); }
.info.fold .fold-body { padding: 0 10px 9px; }
.itab-wrap { overflow-x: auto; margin-top: 2px; }
.itab { border-collapse: collapse; font-family: var(--font-mono); font-size: max(var(--fs-min), calc(12px * var(--fs))); min-width: 100%; }
.itab th { text-align: left; font-family: var(--font-body); font-weight: 600; color: var(--muted); padding: 4px 10px 4px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.itab td { padding: 3px 10px 3px 0; color: var(--fg-2); border-bottom: 1px solid var(--line); }
.itab td.chg { color: var(--frost); font-weight: 700; }
.itab tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .02); }
.itab-note { margin: 8px 0 0; font-size: max(var(--fs-min), calc(12px * var(--fs))); color: var(--muted); }
.ilist { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.ilist span { padding: 2px 8px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line); font-size: max(var(--fs-min), calc(12px * var(--fs))); color: var(--fg-2); }
.note.fx { display: none; } .note.fx.fx-on { display: block; }
.fold-more { list-style: none; padding-left: 16px; }
.fold-btn { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.fold-btn:hover { border-color: var(--frost); }
.osec > summary .dirc { margin-right: 2px; }

/* ---------- at-a-glance visual wall ---------- */
.vis { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 920px) { .vis { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.vis-card { padding: 16px; border-radius: var(--r); background: radial-gradient(120% 80% at 0% 0%, rgba(143, 220, 255, .07), transparent 60%), var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vis-card h3 { font-size: max(var(--fs-min), calc(15.5px * var(--fs))); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vis-all { align-self: flex-start; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.vgrid.items { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
.vtile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 7px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); border-bottom: 3px solid var(--mech); cursor: pointer; color: var(--fg); transition: transform .15s, border-color .15s, box-shadow .15s; min-width: 0; }
.vtile:hover { transform: translateY(-2px); border-color: var(--frost-deep); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.vtile.c-buff { border-bottom-color: var(--buff); } .vtile.c-nerf { border-bottom-color: var(--nerf); } .vtile.c-mixed { border-bottom-color: var(--mixed); }
.vtile.c-rework, .vtile.c-new, .vtile.c-return { border-bottom-color: var(--rework); } .vtile.c-removed, .vtile.c-rotated { border-bottom-color: var(--line-2); }
.vtile .vn { font-size: max(var(--fs-min), calc(12px * var(--fs))); font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vtile .vd { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(10.5px * var(--fs))); color: var(--muted); display: flex; gap: 6px; }
.vtile .vd .u { color: var(--buff); } .vtile .vd .d { color: var(--nerf); }
.vgrid.gone .vtile { opacity: .6; filter: grayscale(.8); }
.vgrid.gone .vtile:hover { opacity: 1; filter: none; }

/* ---------- hero card direction bar ---------- */
.dbar { display: flex; height: 5px; border-radius: 99px; overflow: hidden; background: var(--surface-3); margin: 2px 0 1px; max-width: 220px; gap: 2px; }
.dbar i { display: block; min-width: 0; }
.dbar .u { background: var(--buff); } .dbar .d { background: var(--nerf); } .dbar .n { background: var(--line-2); }

/* ---------- icon jump nav ---------- */
.icon-nav { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 10px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.in-btn { flex: 0 0 auto; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; position: relative; transition: transform .15s; }
.in-btn::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: -4px; height: 3px; border-radius: 3px; background: var(--mech); }
.in-btn.c-buff::after { background: var(--buff); } .in-btn.c-nerf::after { background: var(--nerf); } .in-btn.c-mixed::after { background: var(--mixed); }
.in-btn.c-new::after, .in-btn.c-rework::after, .in-btn.c-return::after { background: var(--rework); } .in-btn.c-removed::after { background: var(--line-2); }
.in-btn:hover { transform: translateY(-2px); }
.in-btn .icon, .in-btn .portrait { display: block; }

/* ---------- community topics ---------- */
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; align-items: start; }
.topic { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.topic.hl { border-color: var(--community); box-shadow: 0 0 0 3px rgba(126, 224, 195, .12); }
.topic h3 { font-size: max(var(--fs-min), calc(16.5px * var(--fs))); }
.topic-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.where { font-size: max(var(--fs-min), calc(12px * var(--fs))); color: var(--muted); }
.buzz { font-size: max(var(--fs-min), calc(14px * var(--fs))); color: var(--fg); padding: 9px 11px; border-radius: var(--r-sm); background: rgba(126, 224, 195, .05); border-left: 3px solid var(--community); }
.buzz .lab, .vfy .lab { display: block; font-size: max(var(--fs-min), calc(11.5px * var(--fs))); font-weight: 700; margin-bottom: 2px; }
.buzz .lab { color: var(--community); }
.vfy { font-size: max(var(--fs-min), calc(13.5px * var(--fs))); color: var(--fg-2); padding: 9px 11px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.vfy .lab { color: var(--frost); }
.vfy details { margin-top: 6px; }
.vfy summary { cursor: pointer; color: var(--frost); font-size: max(var(--fs-min), calc(12.5px * var(--fs))); font-weight: 600; }

.ask { display: flex; flex-direction: column; gap: 4px; padding: 11px 12px; border-radius: var(--r-sm); background: linear-gradient(135deg, rgba(143, 220, 255, .10), rgba(184, 162, 255, .08)); border: 1px solid rgba(143, 220, 255, .35); }
.ask-lab { font-family: var(--font-slogan); font-size: max(var(--fs-min), calc(16px * var(--fs))); color: var(--frost); letter-spacing: .04em; }
.ask p { margin: 0; font-size: max(var(--fs-min), calc(14px * var(--fs))); color: var(--fg); }
.ask-cta { font-size: max(var(--fs-min), calc(12px * var(--fs))); color: var(--muted); }

.ask-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ask-btn, .ask-cta.on-comments { display: none; }
body.has-comments .ask-btn { display: inline-flex; }
body.has-comments .ask-cta.on-comments { display: inline; }
body.has-comments .ask-cta.no-comments { display: none; }

/* uniform collapsed cards: every row of a card has a fixed height so all boxes match */
.ent:not(.open) .ent-top { flex-wrap: nowrap; overflow: hidden; height: calc(24px * var(--fs)); }
.ent:not(.open) .ent-top > * { flex-shrink: 0; }
.ent:not(.open) .ent-top .ent-en { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ent:not(.open) .ent-sum { height: calc(13px * 1.65 * 2); }
.ent:not(.open) .ent-tags { flex-wrap: nowrap; overflow: hidden; height: 22px; }
.ent-head { height: 100%; }
.list { align-items: stretch; }
.ent.open { align-self: start; }

/* equal-height rows for every card grid (content is never clipped; shorter cards get extra space) */
.takes-grid, .timeline-strip, .recs, .pillars, .tl, .topics, .camps, .coverage, .keys { grid-auto-rows: 1fr; }
.topics { align-items: stretch; }

/* ---------- compact filters ---------- */
.filters.compact:not(.show) .filter-row[data-chip] { display: none; }
.ftoggle svg { width: 14px; height: 14px; transition: transform .2s; }
.ftoggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.ftoggle.on { border-color: var(--frost); color: var(--frost); }

/* ---------- old → new value bars ---------- */
.vbar { display: grid; gap: 3px; max-width: 300px; margin: 5px 0 2px; font-family: var(--font-mono); font-size: max(var(--fs-min), calc(11px * var(--fs))); color: var(--muted); }
.vbar .vl { font-family: var(--font-body); font-size: max(var(--fs-min), calc(10.5px * var(--fs))); letter-spacing: .04em; }
.vbar .vr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.vbar .vt { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.vbar .vt i { display: block; height: 100%; border-radius: 99px; }
.vbar .o { background: var(--line-2); }
.vbar.up .nw { background: var(--buff); } .vbar.down .nw { background: var(--nerf); } .vbar.flat .nw { background: var(--frost-deep); }
.vbar b { font-weight: 600; color: var(--fg-2); white-space: nowrap; }
.vbar.up .vr:last-child b { color: var(--buff); } .vbar.down .vr:last-child b { color: var(--nerf); }

/* ---------- neutral tier timeline ---------- */
.tier-tl { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; padding-top: 14px; }
.tier-tl::before { content: ""; position: absolute; left: 8px; right: 8px; top: 20px; height: 2px; background: linear-gradient(90deg, var(--frost-deep), var(--gold)); opacity: .55; }
.tt { position: relative; padding: 18px 12px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tt.end { min-width: 110px; }
.tt-dot { position: absolute; top: -1px; left: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--frost); box-shadow: 0 0 0 4px var(--bg); transform: translateY(-50%); }
.tt.end .tt-dot { background: var(--gold); }
.tt-h { display: flex; align-items: baseline; gap: 8px; }
.tt-h .t { font-family: var(--font-mono); font-weight: 700; font-size: max(var(--fs-min), calc(18px * var(--fs))); color: var(--frost); }
.tt-n { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(11px * var(--fs))); color: var(--muted); padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 6px; }
.tt .l { font-size: max(var(--fs-min), calc(12px * var(--fs))); color: var(--fg-2); margin: 2px 0 8px; }
.tt-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 5px; }
.tl-pi { padding: 0; border: 1px solid transparent; background: none; border-radius: 7px; cursor: pointer; transition: transform .15s; }
.tl-pi .icon { width: 100%; height: auto; aspect-ratio: 11 / 8; flex: none; display: block; }
.tl-pi.chg { border-color: var(--gold); }
.tl-pi:hover { transform: translateY(-2px) scale(1.06); }
@media (max-width: 900px) { .tier-tl { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tt.end { grid-column: 1 / -1; } .tier-tl::before { display: none; } }

/* ---------- item wall grouped by change ---------- */
.iwall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; margin-bottom: 14px; }
.iw-g { padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--mech); }
.iw-g.c-new, .iw-g.c-return { border-top-color: var(--rework); } .iw-g.c-buff { border-top-color: var(--buff); } .iw-g.c-nerf { border-top-color: var(--nerf); }
.iw-g.c-mixed { border-top-color: var(--mixed); } .iw-g.c-removed { border-top-color: var(--line-2); }
.iw-g.c-removed .in-btn { opacity: .55; filter: grayscale(.7); }
.iw-h { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: max(var(--fs-min), calc(13.5px * var(--fs))); margin-bottom: 8px; }
.iw-h .num { margin-left: auto; font-family: var(--font-mono); font-size: max(var(--fs-min), calc(12px * var(--fs))); color: var(--muted); font-weight: 500; }
.iw-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.iw-g .in-btn::after { display: none; }

/* ---------- polish ---------- */
.sec-head h2 { position: relative; padding-left: 14px; }
.sec-head h2::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 4px; border-radius: 4px; background: linear-gradient(180deg, var(--frost), var(--frost-deep)); }
.ent { transition: border-color .15s, transform .15s, box-shadow .15s; }
.ent:not(.open):hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--frost-deep); }
.osec { transition: border-color .15s, box-shadow .15s; }
.osec:hover { border-color: var(--line-2); }
.osec[open] { border-color: var(--frost-deep); box-shadow: 0 0 0 3px var(--frost-glow); }
.osec > summary h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; vertical-align: middle; background: var(--frost); box-shadow: 0 0 0 3px var(--frost-glow); }
.osec-body { animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.key, .cov, .chart, .vis-card { transition: border-color .15s, transform .15s, box-shadow .15s; }
.key:hover, .chart:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.portrait, .icon { box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.fold-stack { margin-bottom: 22px; }

/* ===================== readability pass: fewer words on screen, more air ===================== */
body { line-height: 1.7; }
.sec-head { margin: 44px 0 16px; }
.lead, .note, .ed, .fact, .pillar p, .tl-card li { max-width: 72ch; }

/* cards: name + one sentence + colour bar; counts and tags only when opened */
.ent:not(.open) .ent-meta, .ent:not(.open) .ent-tags { display: none; }
.ent:not(.open) .ent-sum { height: auto; min-height: calc(13.5px * var(--fs) * 1.6 * 2); }
.ent-sum { font-size: max(var(--fs-min), calc(13.5px * var(--fs))); line-height: 1.6; color: var(--fg-2); }
.ent .ent-top .cls { font-size: max(var(--fs-min), calc(11px * var(--fs))); padding: 0 7px; }
.ent-body { gap: 6px; }
.ent .dbar { max-width: none; height: 4px; margin: 0; }
.list { gap: 14px; }

/* opened detail: the value bars carry the message, text steps back */
.ent.open .note { font-size: max(var(--fs-min), calc(13.5px * var(--fs))); color: var(--fg-2); line-height: 1.65; }
.ent.open .note.sub { color: var(--frost); }
.notes { gap: 10px; }
.vbar { max-width: 340px; }
.vbar .vt { height: 7px; }
.blk { padding-bottom: 4px; }

/* home: hero shrinks to one strong line */
.ov-main .lead { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }

@media (max-width: 640px) {
  body { font-size: max(var(--fs-min), calc(15px * var(--fs))); }
  .sec-head { margin: 34px 0 12px; }
  .ov-main { padding: 18px; }
  .ov-main h1 { font-size: max(var(--fs-min), calc(24px * var(--fs))); line-height: 1.3; }
  .ov-main .lead { -webkit-line-clamp: 2; font-size: max(var(--fs-min), calc(14.5px * var(--fs))); }
  .ov-tagline { display: none; }
  .ov-meta .pill:not(.byline) { display: none; }
  .ov-meta { margin-top: 12px; }
  /* key changes become a swipe row */
  .keys { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .keys::-webkit-scrollbar { display: none; }
  .keys .key { flex: 0 0 84%; scroll-snap-align: start; }
  .key .ed { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  .list { grid-template-columns: 1fr; gap: 10px; }
  .ent-head { padding: 12px; gap: 12px; }
  .ent:not(.open) .ent-en { display: none; }
  .ent-name { font-size: max(var(--fs-min), calc(15.5px * var(--fs))); }
  .vgrid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .charts { gap: 10px; }
  .note.i2 { margin-left: 8px; } .note.i3 { margin-left: 16px; } .note.i4 { margin-left: 22px; }
}

/* language picker */
.lang-sel { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px 0 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--fg-2); flex: 0 0 auto; }
.lang-sel svg { width: 15px; height: 15px; }
.lang-sel select { background: transparent; border: 0; color: var(--fg); font: inherit; font-size: max(var(--fs-min), calc(13px * var(--fs))); padding: 0 2px; cursor: pointer; outline: none; }
.lang-sel select option { background: var(--surface); color: var(--fg); }
html:not([lang="zh-CN"]) .au-big, html:not([lang="zh-CN"]) .ov-tagline { font-family: var(--font-display); }
html:not([lang="zh-CN"]) .zh-only { display: none; }
html:not([lang="zh-CN"]) .ed::before { content: "✦"; writing-mode: horizontal-tb; font-size: max(var(--fs-min), calc(13px * var(--fs))); top: 10px; left: 12px; }

/* phones: bigger text, nothing below 13px */
@media (max-width: 640px) { :root { --fs: 1.15; --fs-min: 13px; } }

/* ===================== redesign v2: card = name + one line + colour bar; values lead the detail ===================== */
.ent:not(.open) .ent-top .cls, .ent:not(.open) .ent-en { display: none; }
/* value bar first, official wording small and faded beneath it */
.note.has-v .vbar { display: grid; margin: 2px 0 4px; max-width: 360px; }
.note.has-v .vbar .vt { height: 9px; }
.note.has-v .vbar b { font-size: max(var(--fs-min), calc(14px * var(--fs))); color: var(--fg); }
.note.has-v .nt { display: block; font-size: max(var(--fs-min), calc(12.5px * var(--fs))); color: var(--muted); line-height: 1.6; }
/* text-only notes: at most 2 lines, tap to see the rest */
.nt.clp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.nt.clp.on { display: block; -webkit-line-clamp: unset; }
.nt.more { cursor: pointer; position: relative; }
.nt.more:not(.on)::after { content: "⌄"; position: absolute; right: 0; bottom: 0; padding-left: 18px; color: var(--frost); font-weight: 700; background: linear-gradient(90deg, transparent, var(--bg-2) 14px); }
/* English original only when the toggle is on */
.hide-en .note .en, .hide-en .ev-line .en { display: none !important; }
/* typography: 15–16px body, 1.7 leading, bounded line length, more air */
body { font-size: max(var(--fs-min), calc(15px * var(--fs))); line-height: 1.7; }
.ent.open .note { font-size: max(var(--fs-min), calc(14.5px * var(--fs))); line-height: 1.7; }
.notes { gap: 12px; padding: 12px 14px 14px; }
.ent-detail { gap: 18px; }
.ent-detail .notes, .ent-detail .ed, .ent-detail .info { max-width: 68ch; }
.sec-head { margin: 52px 0 18px; }
.ov-main .lead { -webkit-line-clamp: unset; display: block; }
@media (max-width: 640px) {
  .sec-head { margin: 38px 0 14px; }
  .notes { padding: 10px 12px 12px; gap: 11px; }
  .note.has-v .vbar { max-width: none; }
}

/* language menu (custom, works where native <select> popups don't) */
.lang-sel { position: relative; padding: 0; }
.lang-sel > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 9px; cursor: pointer; font-size: max(var(--fs-min), calc(13px * var(--fs))); color: var(--fg); }
.lang-sel > summary::-webkit-details-marker { display: none; }
.lang-sel > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; opacity: .7; }
.lang-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 80; min-width: 150px; padding: 6px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.lang-menu a { padding: 8px 12px; border-radius: 8px; color: var(--fg); text-decoration: none; font-size: max(var(--fs-min), calc(14px * var(--fs))); }
.lang-menu a:hover { background: var(--surface-2); }
.lang-menu a[aria-current] { color: var(--frost); font-weight: 700; }

/* easter eggs */
.eggs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.egg { display: block; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.egg-ico { display: inline-grid; place-items: center; min-width: 1.9em; height: 1.6em; padding: 0 6px; margin-right: 8px; border-radius: 7px; vertical-align: 0.08em; background: var(--gold-soft); color: var(--gold); font-family: var(--font-display); font-weight: 800; font-size: 0.78em; line-height: 1; }
.egg-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.egg h3 { font-size: max(var(--fs-min), calc(16px * var(--fs))); line-height: 1.4; }
.egg p { color: var(--fg-2); margin: 0; }
.egg .key-foot { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ===================== texture layer: a faint motif per theme, behind everything ===================== */
:root {
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='83.14'%3E%3Cpath d='M0 0L48 83.14M48 0L0 83.14M0 41.57H48' stroke='%238fdcff' stroke-width='.6' fill='none'/%3E%3C/svg%3E");
  --tex-size: 48px 83.14px; --tex-op: .05;
  --tex-mask: radial-gradient(130% 70% at 50% 0%, #000 0%, rgba(0,0,0,.45) 55%, transparent 100%);
}
html[data-theme="sky"] {
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='11' cy='11' r='1.1' fill='%232b7fd6'/%3E%3C/svg%3E");
  --tex-size: 22px 22px; --tex-op: .16;
}
html[data-theme="forest"] {
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='none' stroke='%232f8a4e' stroke-width='.8'%3E%3Cpath d='M0 48Q24 24 48 48T96 48'/%3E%3Cpath d='M48 0Q72 24 48 48T48 96'/%3E%3Cpath d='M30 38q8-10 18-6M66 58q-8 10-18 6'/%3E%3C/g%3E%3C/svg%3E");
  --tex-size: 96px 96px; --tex-op: .11;
}
html[data-theme="parchment"] {
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .15 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3Cg fill='none' stroke='%239a4f24' stroke-width='.7' opacity='.55'%3E%3Cellipse cx='60' cy='70' rx='40' ry='26'/%3E%3Cellipse cx='60' cy='70' rx='62' ry='42'/%3E%3Cellipse cx='60' cy='70' rx='86' ry='60'/%3E%3Cellipse cx='175' cy='175' rx='30' ry='20'/%3E%3Cellipse cx='175' cy='175' rx='52' ry='36'/%3E%3C/g%3E%3C/svg%3E");
  --tex-size: 220px 220px; --tex-op: .16;
}
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: var(--tex); background-size: var(--tex-size); opacity: var(--tex-op); -webkit-mask-image: var(--tex-mask); mask-image: var(--tex-mask); }

/* finishing touches shared by all themes */
.ent, .vis-card, .key, .cov, .chart, .egg, .osec, .blk { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045); }
html[data-theme="sky"] .ent, html[data-theme="forest"] .ent, html[data-theme="parchment"] .ent, html[data-theme="radiant"] .ent,
html[data-theme="sky"] .vis-card, html[data-theme="forest"] .vis-card, html[data-theme="parchment"] .vis-card, html[data-theme="radiant"] .vis-card { box-shadow: 0 1px 2px rgba(40, 30, 10, .05), inset 0 1px 0 rgba(255, 255, 255, .7); }
.eyebrow::after { content: ""; display: inline-block; width: 22px; height: 1px; margin-left: 8px; vertical-align: middle; background: linear-gradient(90deg, currentColor, transparent); opacity: .7; }
.ov-main::after { content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid var(--frost-glow); box-shadow: 0 0 0 22px var(--frost-glow); pointer-events: none; opacity: .7; }

/* ===================== Dota 2 candidate themes (preview with ?theme=…) ===================== */
/* 天辉圣树 radiant: ivory, sunlit gold, living green */
html[data-theme="radiant"] {
  color-scheme: light;
  --bg: #f4efe2; --bg-2: #f9f5ea; --surface: #fffdf6; --surface-2: #faf6ea; --surface-3: #efe7d2;
  --line: #e3d8bc; --line-2: #d0c19b; --fg: #24200f; --fg-2: #4b4430; --muted: #7c735a;
  --frost: #3d8a3a; --frost-deep: #2f7a33; --frost-glow: rgba(61, 138, 58, .13);
  --gold: #b07d12; --gold-soft: rgba(176, 125, 18, .13);
  --buff: #2a8f4c; --buff-soft: rgba(42, 143, 76, .12); --nerf: #c2412f; --nerf-soft: rgba(194, 65, 47, .11);
  --rework: #6d55c9; --rework-soft: rgba(109, 85, 201, .1); --mixed: #b07d12; --mixed-soft: rgba(176, 125, 18, .12);
  --mech: #6b7562; --mech-soft: rgba(107, 117, 98, .12); --editor: #8f5f0f; --editor-soft: rgba(143, 95, 15, .08);
  --str: #c8442f; --agi: #23944a; --int: #1f7fc4; --uni: #8a54d6; --community: #13896a; --scepter: #1f6fc0; --shard: #2a8fc9;
  --shadow: 0 8px 24px rgba(60, 50, 20, .1);
  --topbar-bg: rgba(244, 239, 226, .93); --hero-bg: radial-gradient(120% 120% at 100% 0%, rgba(214, 170, 60, .18), transparent 55%), linear-gradient(150deg, #fffdf6, #f3ecd8);
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23b07d12' stroke-width='.7'%3E%3Ccircle cx='60' cy='60' r='22'/%3E%3Ccircle cx='60' cy='60' r='4'/%3E%3Cpath d='M60 26V8M60 94v18M26 60H8M94 60h18M36 36L24 24M84 84l12 12M84 36l12-12M36 84L24 96'/%3E%3C/g%3E%3C/svg%3E");
  --tex-size: 120px 120px; --tex-op: .12;
}
html[data-theme="radiant"] body { background-image: radial-gradient(1200px 520px at 85% -10%, rgba(214, 170, 60, .16), transparent 60%); }
html[data-theme="radiant"] .btn.primary { background: var(--frost-deep); border-color: var(--frost); color: #fff; }
html[data-theme="radiant"] .tal-ico { background: var(--surface-3); }
html[data-theme="radiant"] .modal { background: rgba(20, 24, 30, .45); }
/* 夜魇熔岩 dire: scorched black, ember red, molten orange */
html[data-theme="dire"] {
  --bg: #0f0a09; --bg-2: #150e0c; --surface: #1b1210; --surface-2: #221714; --surface-3: #2c1d19;
  --line: #3a2620; --line-2: #4e332a; --fg: #f1e6e0; --fg-2: #cdb7ad; --muted: #957d72;
  --frost: #ff7a45; --frost-deep: #d9481f; --frost-glow: rgba(255, 106, 51, .14);
  --gold: #f0a63c; --gold-soft: rgba(240, 166, 60, .14);
  --topbar-bg: rgba(15, 10, 9, .92); --hero-bg: radial-gradient(120% 120% at 100% 0%, rgba(217, 72, 31, .22), transparent 55%), linear-gradient(150deg, #22140f, #140c0a);
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='none' stroke='%23ff6a33' stroke-width='.9'%3E%3Cpath d='M0 40l30 8 18-20 34 14 22-12 30 18 26-6'/%3E%3Cpath d='M48 28l6 40-20 30 10 34M82 42l-4 36 26 22-8 40M126 48l10 30-18 26 22 34'/%3E%3Cpath d='M34 98l44 2 26 0 32 6 24-4'/%3E%3C/g%3E%3C/svg%3E");
  --tex-size: 160px 160px; --tex-op: .09;
}
html[data-theme="dire"] body { background-image: radial-gradient(1100px 520px at 85% -10%, rgba(217, 72, 31, .2), transparent 60%), radial-gradient(800px 420px at -10% 110%, rgba(240, 120, 40, .08), transparent 60%); }
/* 不朽盾 aegis: midnight navy with Aegis gold */
html[data-theme="aegis"] {
  --bg: #0a0e18; --bg-2: #0e1320; --surface: #131a2a; --surface-2: #182136; --surface-3: #1f2a43;
  --line: #27324c; --line-2: #34415f; --fg: #eef0f6; --fg-2: #c0c7d8; --muted: #8590a8;
  --frost: #e6c06a; --frost-deep: #c99a35; --frost-glow: rgba(230, 192, 106, .14);
  --gold: #e6c06a; --gold-soft: rgba(230, 192, 106, .14);
  --topbar-bg: rgba(10, 14, 24, .92); --hero-bg: radial-gradient(120% 120% at 100% 0%, rgba(201, 154, 53, .2), transparent 55%), linear-gradient(150deg, #18203a, #0e1322);
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='72'%3E%3Cpath d='M32 4l24 10v20c0 16-11 27-24 34C19 61 8 50 8 34V14z' fill='none' stroke='%23e6c06a' stroke-width='.8'/%3E%3C/svg%3E");
  --tex-size: 64px 72px; --tex-op: .06;
}
html[data-theme="aegis"] body { background-image: radial-gradient(1100px 520px at 85% -10%, rgba(201, 154, 53, .16), transparent 60%); }
/* 肉山巢穴 roshan: cave stone, moss teal, torch amber */
html[data-theme="roshan"] {
  --bg: #0d1111; --bg-2: #111716; --surface: #161e1d; --surface-2: #1b2524; --surface-3: #22302e;
  --line: #2a3936; --line-2: #374a46; --fg: #e7ece6; --fg-2: #bccac3; --muted: #82948d;
  --frost: #5fd0a8; --frost-deep: #2fa57e; --frost-glow: rgba(95, 208, 168, .13);
  --gold: #e4a64a; --gold-soft: rgba(228, 166, 74, .14);
  --topbar-bg: rgba(13, 17, 17, .92); --hero-bg: radial-gradient(120% 120% at 100% 0%, rgba(228, 166, 74, .16), transparent 55%), linear-gradient(150deg, #1c2725, #101615);
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cg fill='none' stroke='%235fd0a8' stroke-width='.7'%3E%3Cpath d='M0 0h120M0 30h120M40 0v30M100 0v30M10 30v30M70 30v30'/%3E%3C/g%3E%3C/svg%3E");
  --tex-size: 120px 60px; --tex-op: .06;
}
html[data-theme="roshan"] body { background-image: radial-gradient(1000px 480px at 85% -10%, rgba(228, 166, 74, .13), transparent 60%), radial-gradient(800px 420px at -10% 0%, rgba(95, 208, 168, .07), transparent 60%); }
/* 至宝 arcana: deep violet with arcana-green sparks */
html[data-theme="arcana"] {
  --bg: #0d0a16; --bg-2: #120e1e; --surface: #181328; --surface-2: #1e1832; --surface-3: #261f3f;
  --line: #2f2750; --line-2: #3d3366; --fg: #efebfa; --fg-2: #c6bde0; --muted: #8d84aa;
  --frost: #ade55c; --frost-deep: #7cc23b; --frost-glow: rgba(173, 229, 92, .13);
  --gold: #c99bff; --gold-soft: rgba(201, 155, 255, .14);
  --topbar-bg: rgba(13, 10, 22, .92); --hero-bg: radial-gradient(120% 120% at 100% 0%, rgba(136, 71, 255, .26), transparent 55%), linear-gradient(150deg, #211a3a, #110d1e);
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='%23c99bff'%3E%3Ccircle cx='12' cy='18' r='1'/%3E%3Ccircle cx='70' cy='40' r='1.4'/%3E%3Ccircle cx='118' cy='12' r='.8'/%3E%3Ccircle cx='40' cy='96' r='1.2'/%3E%3Ccircle cx='104' cy='88' r='.9'/%3E%3Ccircle cx='128' cy='126' r='1.3'/%3E%3C/g%3E%3Cpath d='M70 112l2 6 6 2-6 2-2 6-2-6-6-2 6-2z' fill='%23ade55c'/%3E%3C/svg%3E");
  --tex-size: 140px 140px; --tex-op: .35;
}
html[data-theme="arcana"] body { background-image: radial-gradient(1100px 520px at 85% -10%, rgba(136, 71, 255, .24), transparent 60%), radial-gradient(800px 420px at -10% 0%, rgba(173, 229, 92, .06), transparent 60%); }

/* editor notes: plain "编辑解读" label instead of the author name */
.ed.has-by { padding-left: 12px; }
.ed.has-by::before { display: none; }
.ed.has-by .byline { color: var(--editor); font-size: max(var(--fs-min), calc(12.5px * var(--fs))); letter-spacing: .06em; }

/* easter eggs: official icon beside the title */
.egg h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.egg-pic { flex: 0 0 auto; display: inline-flex; border-radius: 9px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 0 3px 10px rgba(0, 0, 0, .18); transform: rotate(-3deg); }
.egg:nth-child(even) .egg-pic { transform: rotate(3deg); }
.egg-pic > * { display: block; flex: none; border: 0; border-radius: 0; }
.egg-pic .ab-icon { width: 44px; height: 44px; }
.egg-pic .icon { width: 55px; height: 40px; }
.egg-pic .portrait { width: 71px; height: 40px; }
.egg:hover .egg-pic { transform: rotate(0) scale(1.06); transition: transform .2s; }

/* sprite cells keep their native ratio inside column flex boxes (hero/creep 16:9, item 11:8, ability 1:1) */
.vtile > .portrait, .vtile > .icon, .vtile > .ab-icon { flex: none; }

/* card index badge: net buff/nerf score (or change type) at the right of the name row */
.ent-top { align-items: center; }
.dx { margin-left: auto; flex: 0 0 auto; min-width: 2.6em; padding: 1px 8px; border-radius: 999px; text-align: center; font-family: var(--font-mono); font-weight: 700; font-size: max(var(--fs-min), calc(12.5px * var(--fs))); line-height: 1.6; }
.dx.p { color: var(--buff); background: var(--buff-soft); }
.dx.m { color: var(--nerf); background: var(--nerf-soft); }
.dx.z { color: var(--mixed); background: var(--mixed-soft); }
.dx.k { color: var(--muted); background: var(--surface-3); font-family: var(--font-body); font-weight: 600; }
.ent.open .dx { display: none; }

/* long names (English/Russian) truncate cleanly instead of pushing the index badge out; icon rows never widen the page */
.ent-top .ent-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx.k { max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel, .icon-nav { min-width: 0; max-width: 100%; }

/* top bar: the slogan yields space first (long in RU/ES/PT) */
.tagline { overflow: hidden; }
.tagline, .tagline * { min-width: 0; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 1440px) { html:not([lang="zh-CN"]) .tagline { display: none; } }
.topbar-in > * { min-width: 0; }

/* ===================== community topics: clear card boundaries, four blocks in a fixed order ===================== */
.topics { gap: 22px; }
.topic { position: relative; gap: 12px; padding: 0 18px 18px; border: 1px solid var(--line-2); box-shadow: 0 6px 22px rgba(0, 0, 0, .14); overflow: hidden; }
.topic .topic-top { margin: 0 -18px; padding: 12px 18px 10px; background: linear-gradient(180deg, var(--surface-2), transparent); border-bottom: 1px solid var(--line); }
.topic::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--community), var(--frost)); }
.topic h3 { font-size: max(var(--fs-min), calc(18px * var(--fs))); line-height: 1.4; }
.topic .buzz, .topic .vfy, .topic .ed, .topic .ask { margin: 0; border-radius: var(--r-sm); }
/* 社区热议 leads: larger than the other three blocks */
.topic .buzz { font-size: max(var(--fs-min), calc(15.5px * var(--fs))); line-height: 1.65; padding: 12px 14px; }
.topic .buzz .lab { font-size: max(var(--fs-min), calc(13.5px * var(--fs))); letter-spacing: .04em; margin-bottom: 4px; }
.topic .vfy, .topic .ed, .topic .ask p { font-size: max(var(--fs-min), calc(13.5px * var(--fs))); line-height: 1.65; }
.topic .vfy .lab, .topic .ask .ask-lab { font-size: max(var(--fs-min), calc(12px * var(--fs))); font-family: var(--font-body); font-weight: 700; letter-spacing: .04em; }
.topic .ed { padding: 10px 12px; }
.ed.has-by .byline { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: max(var(--fs-min), calc(12px * var(--fs))); font-weight: 700; color: var(--editor); }
.ed.has-by .byline .av-mini { width: 20px; height: 20px; flex: 0 0 20px; }
.topic .relchips { order: 5; }
.topic .ask { order: 6; margin-top: auto; }
.topics { grid-auto-rows: auto; align-items: stretch; }
.topic .relchips { margin-top: auto; }
.topic .ask { margin-top: 0; }

/* ===== font preview (?font=dota): Trajan-style display face for headings; body text, slogan and author name unchanged ===== */
html[data-font="dota"] { --font-display: "Cinzel", "Noto Serif SC", "Songti SC", "SimSun", serif; }
html[data-font="dota"] :is(h1, h2, h3, h4, .ent-name, .tab, .cov .v, .brand-name, .eyebrow, .osec > summary h3) { font-family: var(--font-display); }
html[data-font="dota"] :is(h1, h2) { font-weight: 800; letter-spacing: .02em; }
html[data-font="dota"] :is(h3, h4, .ent-name, .tab) { font-weight: 700; letter-spacing: .01em; }

/* ===== cross-card alignment: blocks line up row by row in side-by-side cards ===== */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 700px) {
    .topics { grid-auto-rows: auto; row-gap: 22px; }
    .topic { display: grid; grid-template-rows: subgrid; grid-row: span 7; row-gap: 12px; }
    .topic > * { min-width: 0; }
    .topic .relchips { margin-top: 0; align-self: end; }
    .topic .ed, .topic .vfy, .topic .buzz { align-self: stretch; }
  }
}
@supports (grid-template-rows: subgrid) {
  @media (min-width: 700px) {
    .eggs { grid-auto-rows: auto; }
    .egg { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 8px; }
    .egg h3 { margin-bottom: 0; }
    .egg .ask-foot { align-self: end; }
  }
  @media (min-width: 641px) {
    .keys { grid-auto-rows: auto; }
    .keys .key { display: grid; grid-template-rows: subgrid; grid-row: span 5; row-gap: 10px; }
    .keys .key .key-foot { align-self: end; }
  }
}

/* ===================== motion, after dota2.com: shine sweeps, hover glow, scroll reveal, embers ===================== */
@media (prefers-reduced-motion: no-preference) {
  /* 1 shine sweep on the active tab and primary buttons */
  .tab[aria-selected="true"], .btn.primary { position: relative; overflow: hidden; }
  .tab[aria-selected="true"]::after, .btn.primary::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%); background-size: 250% 100%; animation: d2shine 4.5s ease-in-out infinite; }
  @keyframes d2shine { 0%, 55% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
  /* 2 hover: portraits and icons brighten and grow, like the official hero grid */
  .spr { transition: filter .2s, transform .2s; }
  .ent-head:hover .spr, .vtile:hover .spr, .in-btn:hover .spr, .egg:hover .spr, .tl-pi:hover .spr { filter: brightness(1.18) saturate(1.1); transform: scale(1.06); }
  .ent:not(.open):hover, .vis-card:hover, .key:hover, .topic:hover, .egg:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, .28), 0 0 0 1px var(--frost-glow); }
  /* 3 scroll reveal */
  .rv { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
  .rv.in { opacity: 1; transform: none; }
  /* 4 embers drifting up through the hero card */
  .ov-main .embers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
  .ov-main .embers i { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: var(--frost); box-shadow: 0 0 8px 2px var(--frost-glow); opacity: 0; animation: d2ember 7s linear infinite; }
  @keyframes d2ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 70% { opacity: .5; } 100% { transform: translate(var(--dx, 20px), -320px); opacity: 0; } }
  /* 5 the hero emblem breathes slowly */
  .ov-main { animation: d2breath 9s ease-in-out infinite; }
  @keyframes d2breath { 0%, 100% { background-size: 300px 300px, auto; } 50% { background-size: 318px 318px, auto; } }
}
.ov-main > *:not(.embers) { position: relative; z-index: 1; }

/* slogan: three short lines outside Chinese, sized as a tagline rather than a headline */
.ov-tagline { white-space: pre-line; }
html:not([lang="zh-CN"]) .ov-tagline { font-family: var(--font-display); font-size: max(var(--fs-min), calc(15px * var(--fs))); line-height: 1.55; letter-spacing: .06em; margin: -6px 0 12px; }
html:not([lang="zh-CN"]) .tagline { font-family: var(--font-display); font-size: max(var(--fs-min), calc(14px * var(--fs))); letter-spacing: .04em; }
/* Cinzel is wide: tone the display sizes down a step in Latin/Cyrillic layouts */
html[data-font="dota"]:not([lang="zh-CN"]) .ov-main h1 { font-size: max(var(--fs-min), calc(28px * var(--fs))); line-height: 1.25; }
html[data-font="dota"]:not([lang="zh-CN"]) .sec-head h2 { font-size: max(var(--fs-min), calc(20px * var(--fs))); }
html[data-font="dota"]:not([lang="zh-CN"]) .tab { font-size: max(var(--fs-min), calc(13.5px * var(--fs))); letter-spacing: 0; }
html[data-font="dota"]:not([lang="zh-CN"]) .eyebrow { letter-spacing: .1em; }
@media (max-width: 640px) { html[data-font="dota"]:not([lang="zh-CN"]) .ov-main h1 { font-size: max(var(--fs-min), calc(22px * var(--fs))); } }

/* ===================== page effects ===================== */
/* 8 reading progress */
.readbar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--frost-deep), var(--frost)); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; z-index: 2; }
@media (max-width: 640px) { .readbar { position: fixed; top: 0; bottom: auto; z-index: 70; } }
/* 9 back to top, wearing the theme glyph */
.totop { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 60; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); cursor: pointer; display: grid; place-items: center; opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .25s, transform .25s, border-color .2s; }
.totop.on { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { border-color: var(--frost); }
.totop span { width: 20px; height: 20px; background: var(--frost); -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
.totop::after { content: ""; position: absolute; top: 5px; width: 6px; height: 6px; border-left: 1.5px solid var(--frost); border-top: 1.5px solid var(--frost); transform: rotate(45deg); }
.tab.is-active { border-color: var(--accent, var(--frost)); box-shadow: inset 0 -2px 0 var(--accent, var(--frost)); }
.theme-sw svg { width:16px; height:16px; display:block; }
.asset-icon { object-fit:cover; background:linear-gradient(120deg,#152232,#263950,#152232); border-radius:4px; }
@media (prefers-reduced-motion: no-preference) {
  /* 2 spotlight that follows the pointer */
  :is(.ent, .vis-card, .key, .egg, .cov, .chart, .topic, .osec) { --mx: -999px; --my: -999px; }
  @media (hover: hover) and (pointer: fine) {
    :is(.ent, .vis-card, .key, .egg, .cov, .chart, .topic, .osec):hover { background-image: radial-gradient(260px circle at var(--mx) var(--my), var(--frost-glow), transparent 70%), var(--corner-tl), var(--corner-br); background-repeat: no-repeat; background-position: 0 0, 7px 7px, right 7px bottom 7px; background-size: auto, 14px 14px, 14px 14px; }
    /* 3 tilt */
    .cov, .egg { transition: transform .18s ease-out, box-shadow .2s, border-color .2s; transform-style: preserve-3d; will-change: transform; }
  }
  /* 4 attribute-coloured ring around portraits */
  .vtile .spr, .in-btn .spr { transition: box-shadow .2s, transform .2s, filter .2s; }
  .vtile:hover .spr, .in-btn:hover .spr { box-shadow: 0 0 0 2px var(--ring, var(--frost)), 0 0 14px 2px var(--ring, var(--frost)); }
  .at-力量 { --ring: var(--str); } .at-敏捷 { --ring: var(--agi); } .at-智力 { --ring: var(--int); } .at-全才 { --ring: var(--uni); }
  /* 5 value bars: the new value grows or shrinks from the old one */
  .ent.open .vbar .nw { animation: d2bar .9s cubic-bezier(.2, .7, .2, 1) both .15s; }
  @keyframes d2bar { from { width: var(--from); } }
  /* 7 smooth expand */
  .ent.open .ent-detail { animation: d2open .35s ease both; }
  @keyframes d2open { from { opacity: 0; transform: translateY(-6px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
  .ent-side .chev { transition: transform .25s ease; }
  .ent.open .ent-side .chev { transform: rotate(180deg); }
  /* 10 theme switch: new theme spreads from the click point */
  ::view-transition-old(root) { animation: none; }
  ::view-transition-new(root) { animation: d2reveal .65s cubic-bezier(.4, 0, .2, 1); }
  @keyframes d2reveal { from { clip-path: circle(0 at var(--rx, 50%) var(--ry, 0)); } to { clip-path: circle(150% at var(--rx, 50%) var(--ry, 0)); } }
}

/* non-Chinese versions: one humanist face for everything, close in spirit to the official English typography */
html:not([lang="zh-CN"]) { --font-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif; --font-display: "Alegreya Sans", "Segoe UI", system-ui, sans-serif; }
html:not([lang="zh-CN"]) body { font-size: max(var(--fs-min), calc(16px * var(--fs))); }
html[data-font="dota"]:not([lang="zh-CN"]) :is(h1, h2) { font-weight: 800; letter-spacing: 0; }
html[data-font="dota"]:not([lang="zh-CN"]) :is(h3, h4, .ent-name, .tab) { font-weight: 700; letter-spacing: 0; }
html[data-font="dota"]:not([lang="zh-CN"]) .ov-main h1 { font-size: max(var(--fs-min), calc(32px * var(--fs))); line-height: 1.15; }
html[data-font="dota"]:not([lang="zh-CN"]) .tab { font-size: max(var(--fs-min), calc(15px * var(--fs))); }
html[data-font="dota"]:not([lang="zh-CN"]) .eyebrow { letter-spacing: .16em; }

/* charts: rows size to their own content (no stretched blank cards) */
.charts { grid-auto-rows: auto; align-items: start; }

/* clamped blocks: hide the partial next line that leaked into the padding */
.ov-main .lead, .ent-sum, .nt.clp { overflow: clip; overflow-clip-margin: content-box; }
/* key-change takes: clamp the text itself so the frame and its side label stay whole */
.key .ed { display: block; -webkit-line-clamp: unset; overflow: visible; }
.key .ed .edt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
@media (min-width: 641px) { .key .ed .edt { -webkit-line-clamp: unset; display: inline; } }

/* ===================== live win rates ===================== */
#wrCard .wr-mini { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
#wrCard .wr-mini button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--fg); font-family: var(--font-mono); font-size: max(var(--fs-min), calc(12.5px * var(--fs))); }
#wrCard .wr-mini .portrait { width: 36px; height: 20px; flex: none; }
.wr-chips { margin: 0 0 12px; }
.wr-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.wr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wr-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; }
.wr-row > button { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; color: var(--fg); text-align: left; }
.wr-row .portrait { width: 43px; height: 24px; flex: none; }
.wr-row .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: max(var(--fs-min), calc(13.5px * var(--fs))); }
.wr-bar { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.wr-bar i, .wr-bk i { display: block; height: 100%; border-radius: 99px; }
.hi { background: var(--buff); } .lo { background: var(--nerf); } .mid { background: var(--mixed); }
.wr-v.hi, .wr-v.lo, .wr-v.mid { background: none; } .wr-v.hi { color: var(--buff); } .wr-v.lo { color: var(--nerf); } .wr-v.mid { color: var(--mixed); }
.wr-row b { font-size: max(var(--fs-min), calc(13.5px * var(--fs))); min-width: 3.4em; text-align: right; }
.wr-row .g, .wr-line .g { color: var(--muted); font-size: max(var(--fs-min), calc(11.5px * var(--fs))); min-width: 4.2em; text-align: right; }
.wr-t { font-size: 10px; } .wr-t.up { color: var(--buff); } .wr-t.dn { color: var(--nerf); }
.wr-row .wr-t:empty { display: none; }
.wr-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.wr-line:empty { display: none; }
.wr-k { font-size: max(var(--fs-min), calc(12px * var(--fs))); font-weight: 700; color: var(--frost); }
.wr-v { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(18px * var(--fs))); }
.wr-bk { display: flex; gap: 10px; align-items: flex-end; height: 40px; margin-left: auto; }
.wr-bk > span { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; width: 44px; }
.wr-bk i { width: 12px; border-radius: 3px; }
.wr-bk em { font-style: normal; font-size: max(var(--fs-min), calc(10px * var(--fs))); color: var(--muted); margin-top: 3px; white-space: nowrap; }
@media (max-width: 640px) { .wr-row { grid-template-columns: minmax(0, 1fr) 60px auto auto; } .wr-row .wr-t { display: none; } .wr-bk { margin-left: 0; width: 100%; justify-content: space-between; } }

/* list toolbar: one slim row, the list below gets the space */
.filters.compact { padding: 0; background: none; border: 0; border-radius: 0; margin-bottom: 6px; gap: 8px; }
.filters.compact.show { padding: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
.filters.compact .filter-row:first-child { gap: 8px; flex-wrap: nowrap; }
.filters.compact .search { flex: 1 1 auto; min-width: 0; height: 38px; padding: 0 12px 0 34px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px 50% / 15px 15px; }
.filters.compact .sel, .filters.compact .chip { height: 38px; flex: 0 0 auto; }
.result-meta { margin: 0 0 10px; font-size: max(var(--fs-min), calc(12px * var(--fs))); }
.result-meta .btn.sm { padding: 3px 9px; font-size: max(var(--fs-min), calc(12px * var(--fs))); min-height: 0; }
@media (max-width: 640px) {
  .filters.compact .filter-row:first-child { gap: 6px; }
  .filters.compact .search { min-width: 56px; padding-left: 30px; background-position: 9px 50%; }
  .filters.compact .sel { max-width: 34%; padding-left: 8px; padding-right: 22px; }
  .filters.compact .chip { padding: 0 10px; }
  #h-fav { font-size: 0; width: 38px; padding: 0; justify-content: center; } #h-fav::before { content: "★"; font-size: 16px; }
}
.result-meta { flex-wrap: nowrap; flex-direction: row; align-items: center; }
.result-meta > .chips { flex-wrap: nowrap; gap: 6px; flex: 0 0 auto; }
.result-meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 359px) { .filters.compact .filter-row:first-child { flex-wrap: wrap; } .filters.compact .search { flex: 1 1 100%; } }

/* key takeaways label in official sections */
.byline.kp { display: flex; align-items: center; gap: 6px; }
.kp-ico { width: 17px; height: 17px; flex: none; color: var(--gold); }

/* ===================== key takeaways lead, official lines are reference ===================== */
.ed.kpbox { padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-left: 4px solid var(--gold); border-radius: var(--r-sm); background: linear-gradient(135deg, var(--gold-soft), transparent 70%), var(--surface); color: var(--fg); box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.ed.kpbox .byline.kp { font-size: max(var(--fs-min), calc(15px * var(--fs))); color: var(--gold); letter-spacing: .04em; margin-bottom: 8px; }
.ed.kpbox .kp-ico { width: 20px; height: 20px; }
.ed.kpbox .takes { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; }
.ed.kpbox .takes li { font-size: max(var(--fs-min), calc(15.5px * var(--fs))); line-height: 1.7; color: var(--fg); }
.ed.kpbox .takes li::marker { color: var(--gold); }
.ed.kpbox.sm { padding: 12px 14px; box-shadow: none; }
.ed.kpbox.sm .byline.kp { font-size: max(var(--fs-min), calc(13px * var(--fs))); margin-bottom: 4px; }
.ed.kpbox.sm .edt { color: var(--fg); }
/* the official lines: quiet, folded reference */
details.ref { margin-top: 12px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); background: transparent; }
details.ref > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; color: var(--muted); font-size: max(var(--fs-min), calc(13px * var(--fs))); }
details.ref > summary::-webkit-details-marker { display: none; }
details.ref > summary .chev { margin-left: auto; width: 16px; height: 16px; transition: transform .2s; }
details.ref[open] > summary .chev { transform: rotate(180deg); }
details.ref > .blk { margin: 0 10px 10px; opacity: .92; }
details.ref .note { font-size: max(var(--fs-min), calc(13.5px * var(--fs))); }
.ed.kpbox { max-width: none; }

/* ---------- topbar v3: tagline moves into the hero card; theme / search / feedback sit together on the right ---------- */
.topbar-in > .tagline { display: none !important; }
@media (min-width: 641px) { .ov-tagline { display: block; } }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0; }
.top-actions .top-search { margin-left: 0; flex: 0 1 300px; min-width: 150px; }
.top-actions .theme-sw { height: 38px; align-items: center; padding: 0 5px; gap: 5px; }
.top-actions .theme-sw button { width: 28px; height: 28px; }
.fb-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--frost); background: var(--surface); color: var(--frost); font: inherit; font-weight: 600; font-size: max(var(--fs-min), calc(14px * var(--fs))); white-space: nowrap; cursor: pointer; box-shadow: 0 0 12px var(--frost-glow); }
.fb-btn svg { width: 17px; height: 17px; flex: 0 0 17px; }
.fb-btn:hover { background: var(--frost-glow); }
.fb-btn:focus-visible { outline: 2px solid var(--frost); outline-offset: 2px; }
@media (max-width: 1000px) { .top-actions .top-search { flex-basis: 220px; } }
@media (max-width: 640px) {
  .top-actions { flex: 1 1 100%; order: 3; gap: 8px; }
  .top-actions .top-search { flex: 1 1 auto; min-width: 0; order: 0; }
  .fb-btn { padding: 0 11px; height: 40px; }
  .fb-btn .fb-lbl { display: none; }
  .top-actions .theme-sw { height: 40px; padding: 0 4px; gap: 3px; }
  .top-actions .theme-sw button { width: 27px; height: 27px; }
  .top-actions .top-search input { padding-right: 10px; }
}
/* feedback dialog */
.fb-dlg { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 12, .55); }
.fb-dlg[hidden] { display: none; }
.fb-card { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.fb-card h2 { margin: 0 0 6px; font-size: max(var(--fs-min), calc(18px * var(--fs))); }
.fb-card p { margin: 0 0 12px; color: var(--muted); font-size: max(var(--fs-min), calc(13.5px * var(--fs))); }
.fb-card textarea, .fb-card input { display: block; width: 100%; box-sizing: border-box; background: var(--bg, var(--surface)); color: var(--fg); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; font: inherit; font-size: max(16px, calc(14px * var(--fs))); }
.fb-card textarea { min-height: 130px; resize: vertical; margin-bottom: 10px; }
.fb-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* ---------- theme art: one official Dota 2 background (Steam store page art, (c) Valve) under a per-theme veil ---------- */
:root { --theme-art: url("../img/theme/dota-bg.webp"); --veil-a: rgba(10, 15, 22, .9); --veil-b: rgba(10, 15, 22, .38); --amb-op: .22; }
html[data-theme="forest"] { --veil-a: rgba(244, 248, 240, .93); --veil-b: rgba(237, 244, 232, .42); --amb-op: .2; }
html[data-theme="sky"] { --veil-a: rgba(246, 249, 252, .93); --veil-b: rgba(238, 244, 250, .4); --amb-op: .2; }
html[data-theme="parchment"] { --veil-a: rgba(250, 244, 230, .93); --veil-b: rgba(244, 234, 214, .45); --amb-op: .18; }
.ov-main > .ov-art.ov-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(90deg, var(--veil-a) 0%, var(--veil-a) 34%, var(--veil-b) 100%), var(--theme-art) 0% 30% / auto 170% no-repeat; }
@media (max-width: 640px) { .ov-main > .ov-art.ov-art { background: linear-gradient(180deg, var(--veil-b) 0%, var(--veil-a) 55%), var(--theme-art) center 30% / cover no-repeat; } }
.amb { position: absolute; left: 0; right: 0; top: 0; height: 520px; overflow: hidden; pointer-events: none; z-index: -1; }
.amb::before { content: ""; position: absolute; inset: -30px; background: var(--theme-art) center 35% / cover no-repeat; opacity: var(--amb-op); filter: blur(14px) saturate(1.05); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); mask-image: linear-gradient(180deg, #000 30%, transparent 100%); }
@media (max-width: 640px) { .amb { height: 320px; } }

/* fold-card headings: no duplicate English label, the title keeps the full width */
.osec > summary .num { display: none; }
.osec > summary h3 { flex: 1 1 auto; min-width: 0; }
.art-tip { margin: 4px 0 14px; padding: 12px 14px; border-left: 4px solid var(--gold); border-radius: var(--r-sm); background: linear-gradient(135deg, var(--gold-soft), transparent 75%), var(--surface); }
.art-tip b { display: block; color: var(--gold); font-size: max(var(--fs-min), calc(13px * var(--fs))); letter-spacing: .04em; margin-bottom: 4px; }
.art-tip p { margin: 0; color: var(--fg); }

/* ---------- cleaner headings (all themes): no glyph, dot, kicker label or card corner ornaments ---------- */
html:root, html:root[data-theme] { --corner-tl: none; --corner-br: none; }
html .sec-head h2 { padding-left: 0; }
html .sec-head h2::before, html .osec > summary h3::before { content: none; display: none; }
html .sec-head > div > .eyebrow { display: none; }

/* ---------- 极览 Ultra theme: near-black, Dota red-orange as the only accent (after dota2.com / senseos) ---------- */
html[data-theme="ultra"] {
  --bg: #0e0f12; --bg-2: #121318; --surface: #17191e; --surface-2: #1d2026; --surface-3: #262a32;
  --line: #2a2d35; --line-2: #383c46; --fg: #ece6d8; --fg-2: #c3beb3; --muted: #8b929a;
  --frost: #ff6046; --frost-deep: #e1261c; --frost-glow: rgba(255, 96, 70, .13);
  --gold: #ebcf87; --gold-soft: rgba(235, 207, 135, .11);
  --buff: #6fd08c; --buff-soft: rgba(111, 208, 140, .12); --nerf: #ff6046; --nerf-soft: rgba(255, 96, 70, .12);
  --mech: #00a3d7; --mech-soft: rgba(0, 163, 215, .12); --editor: #ebcf87;
  --topbar-bg: rgba(11, 12, 15, .94); --hero-bg: #121318;
  --tex: none; --tex-op: 0; --emblem: none; --divider: none;
  --r: 10px; --r-sm: 8px;
  --veil-a: rgba(14, 15, 18, .9); --veil-b: rgba(40, 14, 8, .3); --amb-op: .32;
}
html[data-theme="ultra"] body { background-image: none; }
html[data-theme="ultra"] .ov-main::after { display: none; }
html[data-theme="ultra"] .tab[aria-selected="true"], html[data-theme="ultra"] .tab.on { border-color: var(--frost); background: var(--frost-glow); color: var(--fg); box-shadow: none; }
html[data-theme="ultra"] .ent, html[data-theme="ultra"] .vis-card, html[data-theme="ultra"] .key, html[data-theme="ultra"] .cov, html[data-theme="ultra"] .osec { box-shadow: none; }
.theme-sw .t-ultra { background: #0e0f12; color: #ff6046; }
/* phone top bar: row 1 brand + feedback, row 2 language + themes, row 3 full-width search */
@media (max-width: 640px) {
  .topbar-in > .top-actions { display: contents; }
  .topbar-in > .brand { order: 0; flex: 1 1 auto; }
  .topbar-in .fb-btn { order: 1; }
  .topbar-in > .lang-sel { order: 2; }
  .topbar-in .theme-sw { order: 3; margin-left: auto; }
  .topbar-in .top-search { order: 4; flex: 1 1 100%; }
  .top-actions .top-search input { padding-right: 12px; }
}

/* per-rank win rate strip: one bar per official rank medal, no text labels */
.wr-bk { gap: 6px; height: 74px; align-items: flex-end; }
.wr-bk > span { width: 34px; justify-content: flex-end; gap: 3px; }
.wr-bk > span.few { opacity: .45; }
.wr-bk .bv { font-family: var(--font-mono); font-size: max(var(--fs-min), calc(10.5px * var(--fs))); line-height: 1; font-weight: 600; }
.wr-bk .bv.hi { color: var(--buff); } .wr-bk .bv.lo { color: var(--nerf); } .wr-bk .bv.mid { color: var(--mixed); }
.wr-bk i { width: 14px; min-height: 4px; }
.wr-bk > span { height: 100%; }
.wr-bk > span > i { flex: 0 0 auto; max-height: 38px; }
img.rk { display: block; width: 28px; height: 28px; object-fit: contain; flex: 0 0 auto; }
.wr-chips .chip-rk { padding: 4px 8px; display: inline-flex; align-items: center; }
.wr-chips .chip-rk img.rk { width: 24px; height: 24px; }
@media (max-width: 640px) { .wr-bk { width: 100%; justify-content: space-between; } .wr-bk > span { width: auto; flex: 1 1 0; } }

/* tap an ability / item / hero icon to read Valve's official in-game text */
.desc-btn { padding: 0; border: 0; background: none; cursor: pointer; position: relative; flex: 0 0 auto; border-radius: 8px; line-height: 0; }
.desc-btn::after { content: "i"; position: absolute; right: -4px; bottom: -4px; width: 15px; height: 15px; border-radius: 50%; background: var(--frost); color: var(--bg); font: 700 10px/15px Georgia, serif; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.desc-btn:hover > *, .desc-btn:focus-visible > * { outline: 2px solid var(--frost); outline-offset: 1px; }
.desc-btn:focus-visible { outline: none; }
.desc-body { display: grid; gap: 10px; }
.desc-d { white-space: pre-line; color: var(--fg); }
.desc-meta { color: var(--muted); font-size: max(var(--fs-min), calc(13px * var(--fs))); }
.desc-up { white-space: pre-line; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.desc-up b { display: block; color: var(--gold); font-size: max(var(--fs-min), calc(12.5px * var(--fs))); margin-bottom: 2px; }
.desc-no { margin: 0; padding-left: 1.2em; color: var(--fg-2); font-size: max(var(--fs-min), calc(13.5px * var(--fs))); }
.desc-lo { font-style: italic; color: var(--muted); font-size: max(var(--fs-min), calc(13px * var(--fs))); white-space: pre-line; }
.desc-src { color: var(--muted); font-size: max(var(--fs-min), calc(12px * var(--fs))); border-top: 1px solid var(--line); padding-top: 8px; }
.desc-slot:not(:empty) { margin: 0 0 14px; }
/* per-rank strip v2: fixed-height track so bar heights stay comparable */
.wr-bk { height: auto; align-items: flex-end; gap: 6px; }
.wr-bk > span { height: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 38px; }
.wr-bk .bt { display: flex; align-items: flex-end; justify-content: center; height: 40px; width: 14px; border-radius: 3px; background: var(--surface-3, rgba(255,255,255,.06)); }
.wr-bk .bt > i { display: block; width: 100%; max-height: none; border-radius: 3px; }
.wr-bk .bv { color: var(--fg-2); }
@media (max-width: 640px) { .wr-bk > span { width: auto; flex: 1 1 0; } }

/* ===================== Dota2 天眼 brand mark ===================== */
.topbar .brand-mark.logo { background: #120c0a; border: 0; border-radius: 9px; box-shadow: 0 0 14px rgba(230, 80, 30, .28); }
.brand-product { text-transform: none; letter-spacing: .06em; }

/* growth: overview call-to-action row and crawlable footer links */
.ov-cta{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.seo-links{display:flex;flex-wrap:wrap;gap:6px 14px;padding:8px 16px 24px;font-size:12.5px}
.seo-links a{color:var(--muted);text-decoration:none}.seo-links a:hover{color:var(--gold);text-decoration:underline}

/* ===================== money hooks: house slot, early-bird review, support row ===================== */
.spon { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin: 20px 0 4px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.spon-tag { flex: none; padding: 1px 7px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); font-size: max(var(--fs-min), calc(11px * var(--fs))); letter-spacing: .06em; }
.spon-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.spon-main b { color: var(--fg); }
.spon-main span, .dx-pro span { color: var(--muted); font-size: max(var(--fs-min), calc(13px * var(--fs))); line-height: 1.6; }
.spon-act { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spon-biz { color: var(--muted); font-size: max(var(--fs-min), calc(12px * var(--fs))); text-decoration: underline dotted; text-underline-offset: 3px; }
.dx-pro { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 14px 16px; border: 1px dashed color-mix(in srgb, var(--gold) 55%, transparent); border-radius: var(--r-sm); background: linear-gradient(135deg, var(--gold-soft), transparent 70%); }
.dx-pro > div { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dx-pro b { color: var(--fg); }
.eb-price { margin: 14px 0 0; font-weight: 700; color: var(--gold); }
.eb-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
#footer .sup { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
/* tabs: one row on desktop too (user request 2026-11-23); tighter spacing first, then the counts give way, then the row scrolls */
@media (min-width: 641px) {
  .rail-in { flex-wrap: nowrap; overflow-x: auto; }
  .rail-in .tab { padding: 0 11px; }
}
@media (min-width: 641px) and (max-width: 1400px) {
  .rail-in { gap: 2px; }
  .rail-in .tab { padding: 0 8px; gap: 4px; font-size: max(var(--fs-min), calc(13.5px * var(--fs))); }
}
@media (min-width: 641px) and (max-width: 1240px) { .rail-in .tab .cnt { display: none; } }

/* key-change tags: distinct icon and colour per tag */
.kc { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 7px; font-size: max(var(--fs-min), calc(12.5px * var(--fs))); font-weight: 700; line-height: 1.5; color: var(--kc); background: color-mix(in srgb, var(--kc) 15%, transparent); }
.kc .kc-ico { width: 15px; height: 15px; flex: none; }
.kc-glob { --kc: #b8a2ff; } .kc-new { --kc: #f2c46b; } .kc-eco { --kc: #46d39a; } .kc-map { --kc: #6fc3ff; } .kc-neu { --kc: #ff9a5c; }
/* section headings on the overview: gold bar, text set in from it */
#p-general .sec-head > div:first-child { padding-left: 14px; border-left: 3px solid var(--gold); }
#p-general .sec-head .eyebrow { display: block; margin-bottom: 2px; }
/* early-bird card inside 我的 Dota: noticeable, not loud */
#p-me .spon { margin: 18px 0; border-left: 3px solid var(--gold); background: linear-gradient(90deg, var(--gold-soft), transparent 60%), var(--surface); }
.kc-amp { --kc: #ff7ac8; }
@media (min-width: 1000px) { .keys .key, .keys .key:nth-child(n+4) { grid-column: span 2; } }
.result-meta { display: none; }
/* change badge: green arrow = lines that raise a value, red arrow = lines that lower it; the pill itself stays neutral */
.dx.z { color: var(--fg-2); background: var(--surface-3); }
.dx b.u { color: var(--buff); font-weight: 700; }
.dx b.d { color: var(--nerf); font-weight: 700; }
/* hero tab: most-changed heroes card, two columns on wide screens */
.top-heroes { margin: 0 0 18px; }
.top-heroes h3 { margin: 0; }
.top-heroes .bars { display: grid; grid-template-columns: 1fr; gap: 7px 28px; }
@media (min-width: 760px) { .top-heroes .bars { grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(6, auto); } }

/* 社区热门（自动） */
.hot-auto{margin:0 0 22px}
.hot-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px;counter-reset:h}
.hot-item{counter-increment:h;position:relative;padding:12px 14px 12px 44px;border:1px solid var(--line);border-radius:var(--r-sm,10px);background:var(--surface,var(--card))}
.hot-item::before{content:counter(h);position:absolute;left:12px;top:12px;width:22px;height:22px;border-radius:50%;background:var(--gold);color:#1a1206;font-weight:800;font-size:12px;text-align:center;line-height:22px}
.hot-t{display:block;line-height:1.5}.hot-s{margin:6px 0 0;color:var(--muted);font-size:13.5px;line-height:1.6;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.hot-rel{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.hot-rel a{font-size:12.5px;padding:1px 8px;border-radius:999px;border:1px solid var(--line);color:var(--gold);text-decoration:none}

img{background:linear-gradient(120deg,#152232,#263950,#152232)}.static-intro{padding:24px 0;line-height:1.7;min-height:300px}.static-intro nav{display:flex;flex-wrap:wrap;gap:12px}.static-intro a{color:var(--frost)}
@media (min-width:641px) and (max-width:1100px) {
  .topbar { position:relative; top:auto; }
  .rail { top:env(safe-area-inset-top,0px); }
  .topbar-in { flex-wrap:wrap; gap:10px 16px; }
  .topbar-in > .top-actions { flex:1 1 100%; margin-left:0; }
  .top-actions .top-search { flex:1 1 220px; min-width:0; }
}

/* The two-line product name must not be clipped by fixed flex heights or WebView font scaling. */
.topbar-in .brand { overflow:visible; min-height:44px; }
.topbar-in .brand-text { height:auto; min-height:44px; flex-shrink:0; overflow:visible; gap:3px; }
.topbar-in .brand-name { line-height:1.15; }
.topbar-in .brand-product { line-height:1.35; overflow:visible; text-overflow:clip; flex-shrink:0; }
@media(max-width:640px){
  .topbar-in .brand-name { font-size:clamp(16px,4.7vw,21px); }
  .topbar-in .brand-product { font-size:12px; letter-spacing:.04em; }
}

/* Information architecture: six stable destinations and contextual second level. */
.nav-groups{display:flex;align-items:center;gap:6px;overflow-x:auto;scrollbar-width:none;padding-top:9px;padding-bottom:9px}.nav-groups::-webkit-scrollbar,.nav-quick::-webkit-scrollbar{display:none}
.nav-group{position:relative;flex:0 0 auto;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--fg-2);padding:10px 16px;font:inherit;font-size:14px;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .18s,border-color .18s,color .18s}.nav-group:hover{background:var(--surface-2);color:var(--fg)}.nav-group.is-current{color:var(--fg);background:var(--surface-2);border-color:var(--line-2);box-shadow:inset 0 -2px 0 var(--frost)}
.nav-group:focus-visible,.nav-quick :focus-visible,.section-jumps :focus-visible,.identity-strip :focus-visible{outline:2px solid var(--frost);outline-offset:2px}
.rail-in{padding-top:0;padding-bottom:8px;gap:5px}.rail-in .tab[hidden]{display:none}.rail-in.single-tab{display:none}.rail-in .tab{height:32px;padding:0 12px;font-size:13px;border-radius:7px}
.nav-quick{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding-top:0;padding-bottom:8px}.nav-quick[hidden]{display:none}.nav-quick button,.nav-quick a,.section-jumps button{flex:0 0 auto;color:var(--fg-2);background:var(--surface);border:1px solid var(--line);border-radius:7px;font:inherit;font-size:13px;text-decoration:none;padding:7px 11px;cursor:pointer;white-space:nowrap}.nav-quick button:hover,.nav-quick a:hover,.section-jumps button:hover{color:var(--frost);border-color:var(--frost)}
.section-jumps{display:flex;gap:7px;overflow-x:auto;padding:4px 0 12px;scrollbar-width:thin}.tool-shortcuts{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.identity-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:20px 0 30px}.identity-strip button{display:flex;align-items:center;gap:10px;text-align:left;min-width:0;padding:15px;border:1px solid var(--line-2);border-radius:12px;background:var(--surface);color:var(--fg);font:inherit;cursor:pointer;transition:transform .15s,border-color .15s}.identity-strip button:hover{border-color:var(--frost);transform:translateY(-2px)}.identity-strip strong{flex:1;line-height:1.4}.identity-num{font:700 12px var(--font-mono);color:var(--frost);opacity:.75}.identity-strip button>span:last-child{color:var(--frost)}
@media(max-width:700px){.nav-groups{padding:8px 16px;gap:4px}.nav-group{padding:9px 12px;font-size:13px}.rail-in{flex-wrap:nowrap;overflow-x:auto;padding:0 16px 8px}.nav-quick{padding:0 16px 8px}.identity-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0 24px}.identity-strip button{padding:12px;font-size:13px}.section-jumps{margin-inline:-2px}}
