:root {
  --bg: #0d0f17;
  --bg2: #131726;
  --panel: #181d2e;
  --panel2: #1f2539;
  --line: #2a3150;
  --text: #e7e9f3;
  --muted: #8f97b5;
  --accent: #f2b33d;
  --accent2: #7b5cff;
  --good: #3ecf8e;
  --bad: #ff5d6c;
  --c1: #9aa3b5;
  --c2: #3fbf6f;
  --c3: #3b8cf0;
  --c4: #b45cf0;
  --c5: #f29a2e;
  --tierS: #ff5d6c;
  --tierA: #f2b33d;
  --tierB: #3b8cf0;
  --radius: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Thai', 'Leelawadee UI', 'PingFang SC', 'Microsoft YaHei', 'Microsoft JhengHei', 'Malgun Gothic', 'Yu Gothic UI', 'Meiryo', sans-serif;
  --head: 'Oswald', 'Inter', 'Noto Sans Thai', 'Leelawadee UI', 'PingFang SC', 'Microsoft YaHei', 'Microsoft JhengHei', 'Malgun Gothic', 'Yu Gothic UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -200px, #2a1f55 0%, transparent 60%), var(--bg);
  color: var(--text); font: 14px/1.5 var(--font); min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--head); letter-spacing: .3px; font-weight: 600; margin: 0; }
h1 { font-size: 30px; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(13,15,23,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 22px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #e0672b); color: #1a1205; font-size: 22px; }
.brand-text b { color: var(--accent); font-weight: 600; }
.mainnav { display: flex; gap: 2px; flex: 1; }
.mainnav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.mainnav a:hover { color: var(--text); background: var(--panel); }
.mainnav a.active { color: var(--text); background: var(--panel2); box-shadow: inset 0 -2px 0 var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.lang-switch { position: relative; }
.flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.15); flex: none; }
.lang-btn { display: flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px 5px 8px; cursor: pointer; font-weight: 700; font-size: 12px; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--accent); }
.lang-btn .caret { color: var(--muted); font-size: 10px; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; list-style: none; margin: 0; padding: 6px; min-width: 190px;
  background: #121729; border: 1px solid #39426a; border-radius: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.55); max-height: 70vh; overflow: auto; }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; text-align: left; font-size: 13px; }
.lang-menu button:hover { background: var(--panel2); }
.lang-menu button.on { background: rgba(242,179,61,.14); color: var(--accent); font-weight: 600; }
.user-box { display: flex; gap: 8px; align-items: center; }
.lo-icon { display: none; }
.nav-toggle { display: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-weight: 600; font-size: 13px; }
.btn:hover { border-color: #3d4672; }
.btn.primary { background: var(--accent); color: #1a1205; border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* page header */
.page-head { padding: 28px 0 18px; display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 760px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 600; }
.chip-btn.on { color: var(--text); border-color: var(--accent); background: rgba(242,179,61,.12); }
.input { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; outline: none; min-width: 0; }
.input:focus { border-color: var(--accent2); }
select.input { padding-right: 28px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 16px; }
.notice { font-size: 12px; color: var(--muted); border-left: 3px solid var(--accent2); padding: 6px 10px; background: rgba(123,92,255,.08); border-radius: 0 6px 6px 0; margin-bottom: 14px; }

/* hero icons */
.hicon { display: inline-block; vertical-align: middle; position: relative; width: 44px; height: 44px; border-radius: 8px; border: 2px solid var(--c1); background: #0a0c12; overflow: visible; flex: none; cursor: pointer; }
.hicon img { width: 100%; height: 100%; border-radius: 6px; image-rendering: auto; object-fit: cover; }
.hicon.c1 { border-color: var(--c1); } .hicon.c2 { border-color: var(--c2); } .hicon.c3 { border-color: var(--c3); }
.hicon.c4 { border-color: var(--c4); } .hicon.c5 { border-color: var(--c5); }
.hicon.lg { width: 64px; height: 64px; border-radius: 10px; }
.hicon.sm { width: 34px; height: 34px; border-radius: 6px; }
.hicon .stars { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--accent); text-shadow: 0 1px 2px #000; white-space: nowrap; letter-spacing: -1px; }
.hicon .carry { position: absolute; bottom: -6px; right: -6px; background: var(--accent); color: #1a1205; border-radius: 50%; width: 16px; height: 16px; font-size: 10px; display: grid; place-items: center; font-weight: 700; }
.hicon .mark { position: absolute; top: -6px; right: -6px; font-size: 11px; color: #d6c9ff; text-shadow: 0 1px 2px #000; }
.unit { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 56px; }
.unit .uname { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.15; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit .uitems { display: flex; gap: 2px; }
.iicon { display: inline-block; vertical-align: middle; width: 24px; height: 24px; border-radius: 4px; border: 1px solid #000; background: #0a0c12; cursor: pointer; flex: none; }
.iicon img { width: 100%; height: 100%; border-radius: 2px; object-fit: cover; }
.iicon.md { width: 36px; height: 36px; border-radius: 6px; }
.iicon.lg { width: 52px; height: 52px; border-radius: 8px; }
.iicon.t1 { border-color: #9aa3b5; } .iicon.t2 { border-color: #3fbf6f; } .iicon.t3 { border-color: #3b8cf0; } .iicon.t4 { border-color: #b45cf0; } .iicon.t5 { border-color: #f29a2e; } .iicon.t0 { border-color: #ade55c; }

/* synergy chips */
.syn { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; cursor: default; white-space: nowrap; }
.syn img { width: 18px; height: 18px; border-radius: 50%; }
.syn .n { color: var(--accent); }
.syn.lv1 { border-color: #8c6a3c; background: rgba(140,106,60,.18); }
.syn.lv2 { border-color: #9aa8c8; background: rgba(154,168,200,.16); }
.syn.lv3 { border-color: var(--accent); background: rgba(242,179,61,.18); }
.syn.off { opacity: .55; }
.syn-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* comp tier list */
.tier-group { margin-bottom: 26px; }
.tier-label { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; font-family: var(--head); font-size: 20px; color: #fff; flex: none; }
.tier-label.S { background: var(--tierS); } .tier-label.A { background: var(--tierA); color: #1a1205; } .tier-label.B { background: var(--tierB); }
.comp { cursor: pointer; display: grid; grid-template-columns: 34px 230px 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, transform .15s; }
.comp:hover { border-color: #414b7a; }
.comp-title h3 { font-size: 17px; }
.comp-title a:hover h3 { color: var(--accent); }
.comp.low { opacity: .55; }
.comp.low:hover { opacity: .9; }
.comp.voted { grid-template-columns: 40px 230px 1fr auto; }

/* votes (Reddit-style) */
.vote { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.vote.h { flex-direction: row; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px; }
.vb { width: 28px; height: 24px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1; }
.vb:hover { background: var(--panel2); }
.vb.up:hover, .vote.is-up .vb.up { color: #ff7a3d; }
.vb.down:hover, .vote.is-down .vb.down { color: #7b8cff; }
.vs { font-size: 14px; min-width: 22px; text-align: center; }
.vote.is-up .vs { color: #ff7a3d; } .vote.is-down .vs { color: #7b8cff; }

/* author / byline */
.byline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.author { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.low-tag { font-size: 11px; color: var(--bad); border: 1px solid rgba(255,93,108,.4); border-radius: 6px; padding: 0 6px; }
.seg { display: inline-flex; gap: 4px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; }
.seg .chip-btn { border-color: transparent; background: transparent; }
.seg .chip-btn.on { background: rgba(242,179,61,.15); border-color: var(--accent); }

/* relics page */
.relic-hero { display: flex; gap: 22px; align-items: center; margin: 26px 0 0; padding: 22px 24px; border-radius: 14px;
  background: radial-gradient(500px 220px at 10% 50%, rgba(173,229,92,.18), transparent 70%), linear-gradient(135deg, #1b2236, #14182a);
  border: 1px solid #3b4a3a; }
.relic-hero h1 { margin-bottom: 6px; }
.relic-hero p { margin: 0 0 12px; color: var(--muted); max-width: 720px; }
.relic-box { width: 92px; height: 92px; filter: drop-shadow(0 0 18px rgba(173,229,92,.45)); }
.relic-rounds { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.relic-rounds .round { font-family: var(--head); font-size: 15px; padding: 2px 10px; border-radius: 6px; background: rgba(173,229,92,.12); border: 1px solid rgba(173,229,92,.4); color: #cfee9f; }
.relic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.relic-card { --rc: #ade55c; position: relative; text-align: center; padding: 22px 16px 16px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(200px 120px at 50% 0%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 75%), #151a2b;
  border: 1px solid color-mix(in srgb, var(--rc) 35%, #2a3150); transition: transform .15s, border-color .15s; }
.relic-card:hover { transform: translateY(-3px); border-color: var(--rc); }
.relic-orb { width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 50%; padding: 4px;
  background: conic-gradient(from 210deg, var(--rc), transparent 40%, var(--rc) 70%, transparent);
  box-shadow: 0 0 26px color-mix(in srgb, var(--rc) 45%, transparent); }
.relic-orb img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #0a0c12; border: 3px solid #0d1120; }
.relic-cat { display: inline-block; font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; font-weight: 700; color: var(--rc); margin-bottom: 4px; }
.relic-card h3 { font-size: 18px; margin-bottom: 8px; }
.relic-card .desc { font-size: 12.5px; text-align: left; margin: 0; }
.rc-economy { --rc: #f2c53d; } .rc-recruit { --rc: #3ecf8e; } .rc-pieces { --rc: #b45cf0; } .rc-items { --rc: #3b8cf0; }
.rc-courier { --rc: #ff8a5c; } .rc-defense { --rc: #5cc8ff; } .rc-special { --rc: #ade55c; }
.chip-btn[class*="rc-"].on { border-color: var(--rc); color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); }
.relic-teaser { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 24px; }
.comp-title .tag { font-size: 12px; color: var(--muted); margin-top: 3px; }
.comp-units { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 8px; }
.comp-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.style-tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.diff { display: inline-flex; gap: 2px; }
.diff i { width: 7px; height: 7px; border-radius: 2px; background: var(--line); display: block; }
.diff i.on { background: var(--accent); }

/* comp detail */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.section { margin-bottom: 20px; }
.section > h2 { margin-bottom: 10px; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 6px; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pros-cons .panel h3 { margin-bottom: 6px; }
.pros h3 { color: var(--good); } .cons h3 { color: var(--bad); }
.unit-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* board */
.board-wrap { display: flex; flex-direction: column; gap: 6px; }
.board-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; text-align: center; }
.board { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 8px; border-radius: 12px; background: #0b0e19; border: 1px solid var(--line); }
.cell { aspect-ratio: 1; border-radius: 8px; position: relative; display: grid; place-items: center; }
.cell.light { background: #1d2337; } .cell.dark { background: #161b2c; }
.cell.drop { outline: 2px dashed var(--accent); outline-offset: -3px; }
.cell .hicon { width: 66%; height: 66%; }
.cell .cell-items { position: absolute; bottom: 3%; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; pointer-events: auto; }
.cell .cell-items .iicon { width: 27%; max-width: 28px; height: auto; aspect-ratio: 1; box-shadow: 0 1px 4px rgba(0,0,0,.7); }
.cell .hicon { margin-bottom: 14%; }
.board.edit .cell .hicon { width: 60%; height: 60%; margin-bottom: 18%; }
.board.edit .cell .cell-items .iicon { width: 31%; min-width: 22px; max-width: 30px; }
.cell.sel { box-shadow: 0 0 0 2px var(--accent2) inset; }
.board.edit .cell { cursor: pointer; }
.board.edit .cell:hover { background: #252c46; }

/* grids */
.hero-groups .cost-group { margin-bottom: 22px; }
.cost-group h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cost-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-family: var(--font); font-weight: 700; }
.cost-pill.c1 { background: rgba(154,163,181,.18); color: var(--c1); } .cost-pill.c2 { background: rgba(63,191,111,.15); color: var(--c2); }
.cost-pill.c3 { background: rgba(59,140,240,.15); color: var(--c3); } .cost-pill.c4 { background: rgba(180,92,240,.15); color: var(--c4); }
.cost-pill.c5 { background: rgba(242,154,46,.15); color: var(--c5); }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.hero-card { display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.hero-card:hover { border-color: #414b7a; }
.hero-card .hn { font-weight: 600; }
.hero-card .hs { font-size: 11px; color: var(--muted); }
.syn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.syn-card { padding: 14px; }
.syn-card-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.syn-card-head img { width: 40px; height: 40px; border-radius: 8px; }
.th-row { display: flex; gap: 4px; }
.th { min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 5px; background: var(--panel2); border: 1px solid var(--line); font-size: 11px; font-weight: 700; }
.desc { white-space: pre-line; color: #c9cde0; font-size: 13px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.item-card { display: flex; gap: 10px; padding: 10px; }
.item-card .desc { font-size: 12px; }
.tier-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; }

/* hero page */
.hero-top { display: flex; gap: 18px; align-items: center; padding: 18px; margin: 20px 0; }
.stat-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stat-table th, .stat-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.stat-table th:first-child, .stat-table td:first-child { text-align: left; color: var(--muted); font-weight: 500; }
.stat-table thead th { color: var(--accent); font-weight: 700; }
.ability-box { display: flex; gap: 12px; }
.ability-box img { width: 56px; height: 56px; border-radius: 8px; flex: none; }
.vals { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-size: 12px; margin-top: 8px; }
.vals span:nth-child(odd) { color: var(--muted); }
.vals span:nth-child(even) { text-align: right; font-weight: 600; }

/* builder */
.builder { display: grid; grid-template-columns: 270px 1fr 285px; gap: 16px; align-items: start; margin-bottom: 30px; }
.pool { max-height: calc(100vh - 140px); display: flex; flex-direction: column; position: sticky; top: 72px; }
.pool-head { padding: 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.pool-list { overflow: auto; padding: 12px 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 12px 4px; align-content: start; }
.pool-list .unit { width: auto; min-width: 0; cursor: pointer; }
.pool-list .hicon { width: 42px; height: 42px; }
.builder-main { display: flex; flex-direction: column; gap: 12px; }
.builder-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.builder-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 72px; }
.syn-rows { display: flex; flex-direction: column; gap: 6px; }
.syn-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); }
.syn-row img { width: 26px; height: 26px; border-radius: 6px; }
.syn-row .nm { font-weight: 600; flex: 1; }
.syn-row .steps-dots { display: flex; gap: 3px; font-size: 11px; color: var(--muted); }
.syn-row .steps-dots b { color: var(--accent); }
.syn-row.on { border-color: var(--accent); }
.syn-row.off { opacity: .6; }
.sel-panel .sel-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.star-pick { display: flex; gap: 6px; }
.star-pick button { flex: 1; }
.star-pick button.on { border-color: var(--accent); color: var(--accent); }
.item-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-height: 220px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.item-picker > span { display: block; }
.item-picker .iicon { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.sel-items { display: flex; gap: 6px; margin: 6px 0; min-height: 36px; }
.sel-items .iicon { position: relative; }
.sel-items .x { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bad); color: #fff; font-size: 11px; display: grid; place-items: center; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label { font-size: 12px; color: var(--muted); }
textarea.input { min-height: 90px; resize: vertical; }

/* community */
.build-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.build-card .meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.build-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.like-btn.on { color: var(--bad); border-color: var(--bad); }

/* auth */
.auth { max-width: 380px; margin: 50px auto; padding: 24px; }
.auth h1 { margin-bottom: 16px; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }

/* basics */
.basics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.odds { width: 100%; border-collapse: collapse; font-size: 13px; }
.odds th, .odds td { padding: 5px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.odds td.z { color: #444b66; }

/* tooltip */
.tooltip { position: fixed; z-index: 100; max-width: 380px; background: #0f1322; border: 1px solid #39426a; border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.6); padding: 12px; pointer-events: none; font-size: 12.5px; }
.tt-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.tt-head .hicon { cursor: default; }
.tt-name { font-family: var(--head); font-size: 17px; line-height: 1.1; }
.tt-sub { color: var(--muted); font-size: 11.5px; }
.tt-gold { color: var(--accent); font-weight: 700; }
.tt-stats { width: 100%; border-collapse: collapse; margin: 6px 0 8px; font-size: 11.5px; }
.tt-stats td, .tt-stats th { padding: 2px 4px; text-align: right; }
.tt-stats th { color: var(--accent); font-weight: 700; }
.tt-stats td:first-child, .tt-stats th:first-child { text-align: left; color: var(--muted); font-weight: 500; }
.tt-ab { border-top: 1px solid var(--line); padding-top: 8px; }
.tt-ab-head { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.tt-ab-head img { width: 30px; height: 30px; border-radius: 6px; }
.tt-ab-head .cd { margin-left: auto; color: var(--muted); font-size: 11px; text-align: right; }
.tt-desc { white-space: pre-line; color: #c9cde0; }
.tt-vals { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; margin-top: 6px; font-size: 11.5px; }
.tt-vals span:nth-child(odd) { color: var(--muted); }
.tt-vals span:nth-child(even) { text-align: right; font-weight: 600; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--good); color: #062014; padding: 10px 18px; border-radius: 8px; font-weight: 600; z-index: 120; }
.toast.bad { background: var(--bad); color: #fff; }

.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 18px 0 30px; color: var(--muted); font-size: 12px; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

@media (max-width: 1100px) {
  .builder { grid-template-columns: 1fr; }
  .pool, .builder-side { position: static; max-height: none; }
  .pool-list { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); max-height: 300px; }
  .detail-grid { grid-template-columns: 1fr; }
  .comp { grid-template-columns: 34px 1fr; }
  .comp.voted { grid-template-columns: 40px 1fr; }
  .relic-hero { flex-direction: column; align-items: flex-start; }
  .comp-main, .comp-units, .comp-side { grid-column: 1 / -1; }
  .comp-side { flex-direction: row; align-items: center; flex-wrap: wrap; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .mainnav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--bg2); border-bottom: 1px solid var(--line); padding: 8px; }
  .mainnav.open { display: flex; }
  .topbar-inner { gap: 8px; padding: 0 10px; }
  .topbar-right { gap: 6px; }
  .uname-text, .lo-text { display: none; }
  .lo-icon { display: inline !important; }
  .lang-btn .lang-code { display: none; }
  .syn-grid, .build-grid, .basics-grid { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .brand-text { display: none; }
}

/* sub-tabs (Database, How to Play) */
.subtabs { display: flex; gap: 4px; margin: 22px 0 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.subtabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.subtabs a:hover { color: var(--text); }
.subtabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.legend-note { font-size: 12px; font-family: var(--font); font-weight: 500; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 2px 8px; }
.legend-note:hover { color: var(--accent); border-color: var(--accent); }

/* talent tree */
.talent-tree { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.talent-tier { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.talent-tier .talent-tip { grid-column: 2; font-size: 12.5px; color: #c9cde0; border-left: 3px solid var(--accent); padding-left: 10px; }
.tier-badge { display: flex; flex-direction: column; gap: 2px; }
.tier-badge span { font-family: var(--head); font-size: 20px; }
.tier-badge b { font-size: 12px; color: var(--accent); font-weight: 600; }
.talent-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.talent-or { font-size: 11px; color: var(--muted); font-weight: 700; }
.talent-card { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); }
.talent-card.br-a { border-left: 3px solid #3ecf8e; } .talent-card.br-b { border-left: 3px solid #7b8cff; }
.talent-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-size: 22px; border-radius: 50%; background: radial-gradient(circle, #2f3a5c, #161b2c); box-shadow: 0 0 0 2px rgba(242,179,61,.35); }
.talent-name { font-weight: 700; }

/* match pool panel (like the in-game Legendary / Relic window) */
.pool-panel { margin: 18px 0; padding: 16px; border-radius: 12px; background: linear-gradient(180deg, #1c1626, #121522); border: 1px solid #3b3150; }
.pool-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.pool-panel-head h2 { letter-spacing: 1px; text-transform: uppercase; font-size: 18px; }
.pool-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.pool-slot { position: relative; display: grid; place-items: center; }
.pool-slot .hicon.lg, .pool-slot .iicon.lg { width: 100%; max-width: 64px; height: auto; aspect-ratio: 1; }
.pool-slot.hidden-slot .hicon img { filter: grayscale(1) brightness(.35); }
.pool-slot .q { position: absolute; inset: 0; display: grid; place-items: center; font: 700 26px var(--head); color: #cfd3e6; pointer-events: none; }
.pool-divider { height: 3px; margin: 12px 0; border-radius: 2px; background: #9ed13b; }
.pool-notes { margin: 12px 0 0; padding-left: 18px; font-size: 13px; color: #c9cde0; }
.pool-notes li { margin-bottom: 4px; }

/* how to play */
.phase-list { display: flex; flex-direction: column; gap: 10px; }
.phase { padding: 14px 16px; }
.phase-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.phase-rounds { font: 600 18px var(--head); background: var(--accent); color: #1a1205; border-radius: 8px; padding: 2px 10px; min-width: 60px; text-align: center; }
.phase-stat { font-size: 12.5px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.phase-stat b { color: var(--text); }
.phase ul { margin: 6px 0 0; padding-left: 20px; color: #c9cde0; }
.phase li { margin-bottom: 4px; }
.timeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.tl-item { display: flex; gap: 10px; padding: 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; }
.tl-round { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 600 15px var(--head); background: var(--panel2); border: 2px solid var(--accent); }
.kv { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.kv th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 8px 6px 0; width: 40%; vertical-align: top; }
.kv td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.basics-grid .wide { grid-column: span 2; }
.basics-grid h2 { margin-bottom: 6px; }

@media (max-width: 860px) {
  .talent-tier { grid-template-columns: 1fr; }
  .talent-tier .talent-tip { grid-column: 1; }
  .talent-pair { grid-template-columns: 1fr; }
  .talent-or { text-align: center; }
  .pool-grid { grid-template-columns: repeat(5, 1fr); }
  .basics-grid .wide { grid-column: auto; }
}
.basics-grid .panel { overflow-x: auto; }

/* beginner banner on Team Comps */
.beginner-banner { display: flex; gap: 14px; align-items: center; padding: 14px 18px; margin-bottom: 12px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(62,207,142,.14), rgba(123,92,255,.10)); border: 1px solid rgba(62,207,142,.45); }
.beginner-banner .bb-icon { font-size: 28px; flex: none; }
.beginner-banner b { font-family: var(--head); font-size: 18px; font-weight: 600; letter-spacing: .3px; }
.beginner-banner p { margin: 2px 0 0; color: #c9cde0; }
.beginner-banner a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.beginner-banner a:hover { color: #ffd27a; }

/* up to 6 items per piece: wrap into rows of 3 */
.cell .cell-items { flex-wrap: wrap; max-width: 92%; margin: 0 auto; }
.cell .cell-items.n4 .iicon, .cell .cell-items.n5 .iicon, .cell .cell-items.n6 .iicon,
.board.edit .cell .cell-items.n4 .iicon, .board.edit .cell .cell-items.n5 .iicon, .board.edit .cell .cell-items.n6 .iicon { width: 24%; min-width: 0; max-width: 22px; }
.cell:has(.cell-items.n4) .hicon, .cell:has(.cell-items.n5) .hicon, .cell:has(.cell-items.n6) .hicon { width: 50%; height: 50%; margin-bottom: 38%; }
.unit .uitems { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 64px; }
.unit .uitems.n3 .iicon, .unit .uitems.n4 .iicon, .unit .uitems.n5 .iicon, .unit .uitems.n6 .iicon { width: 19px; height: 19px; }
.sel-items { flex-wrap: wrap; }

/* bigger, easier-to-see star level badge */
.hicon .stars { top: -12px; font-size: 13px; line-height: 15px; letter-spacing: 0; padding: 0 5px; border-radius: 999px;
  background: #0b0e19; border: 1px solid rgba(242,179,61,.75); color: #ffc94d; text-shadow: 0 0 6px rgba(242,179,61,.6); z-index: 2; }
.hicon.lg .stars { font-size: 15px; line-height: 17px; top: -13px; }
.hicon.sm .stars { font-size: 11px; line-height: 13px; top: -10px; padding: 0 3px; }
/* carry mark: left-middle of the icon */
.hicon .carry { top: 50%; bottom: auto; right: auto; left: -9px; transform: translateY(-50%); width: 18px; height: 18px; font-size: 11px;
  box-shadow: 0 0 0 2px #0b0e19, 0 0 8px rgba(242,179,61,.7); z-index: 2; }
/* player-made styles */
.style-tag.custom { color: #d6c9ff; border-color: rgba(123,92,255,.6); background: rgba(123,92,255,.12); }
.chip-btn.custom { border-style: dashed; border-color: rgba(123,92,255,.55); color: #d6c9ff; }
.chip-btn.custom.on { border-style: solid; border-color: var(--accent2); background: rgba(123,92,255,.18); color: #fff; }
.chip-sep { color: var(--accent2); font-size: 14px; padding: 0 2px; }
#sStyleCustom { margin-top: 6px; }

/* suggested items on hero page */
.adv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.role-chip { font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(242,179,61,.12); border: 1px solid rgba(242,179,61,.45); color: var(--accent); }
.adv-sub { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin: 14px 0 8px; font-family: var(--font); font-weight: 700; }
.adv-sub.bad { color: var(--bad); }
.adv-core { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.adv-item { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); }
.adv-item b { font-size: 13.5px; }
.adv-alt { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== standardized piece layout (overrides earlier rules) ===== */
.unit { width: 62px; gap: 3px; }
.unit .uname { max-width: 62px; }
.unit .uitems, .unit .uitems.n3, .unit .uitems.n4, .unit .uitems.n5, .unit .uitems.n6 { display: flex; flex-wrap: nowrap; justify-content: center; gap: 2px; height: 19px; max-width: none; }
.unit .uitems .iicon, .unit .uitems.n3 .iicon, .unit .uitems.n4 .iicon, .unit .uitems.n5 .iicon, .unit .uitems.n6 .iicon { width: 19px; height: 19px; border-radius: 3px; }
.unit .uitems.empty { display: block; }
.imore { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 3px; border-radius: 4px; font-size: 10.5px; font-weight: 800;
  background: var(--panel2); border: 1px solid #4a5480; color: #dfe3f5; cursor: help; }
/* star badge: same size everywhere, only for 2★/3★ */
.hicon .stars, .hicon.lg .stars, .hicon.sm .stars { top: -9px; font-size: 10.5px; line-height: 13px; padding: 0 4px; letter-spacing: -.5px; }
/* carry mark back to bottom-right */
.hicon .carry { top: auto; left: auto; bottom: -6px; right: -6px; transform: none; width: 16px; height: 16px; font-size: 10px; }
/* board cells: hero + one row of up to 3 items */
.cell .hicon, .board.edit .cell .hicon, .cell:has(.cell-items.n4) .hicon, .cell:has(.cell-items.n5) .hicon, .cell:has(.cell-items.n6) .hicon { width: 60%; height: 60%; margin-bottom: 20%; }
.cell .cell-items { position: absolute; bottom: 5%; left: 0; right: 0; display: flex; flex-wrap: nowrap; justify-content: center; gap: 2px; max-width: none; }
.cell .cell-items.empty { display: none; }
.cell .cell-items .iicon, .board.edit .cell .cell-items .iicon,
.cell .cell-items.n4 .iicon, .cell .cell-items.n5 .iicon, .cell .cell-items.n6 .iicon { width: 24%; min-width: 0; max-width: 22px; height: auto; aspect-ratio: 1; }
.cell .imore { min-width: 0; width: 24%; max-width: 22px; height: auto; aspect-ratio: 1; padding: 0; font-size: 10px; }
/* items list tooltip */
.tt-items { display: flex; flex-direction: column; gap: 6px; }
.tt-item-row { display: flex; gap: 8px; align-items: center; }

/* generated game plan */
.gameplan { padding: 18px; border-color: rgba(123,92,255,.45); background: linear-gradient(180deg, rgba(123,92,255,.08), transparent 120px), var(--panel); }
.gp-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gp-type { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 1px solid; }
.gp-reroll { color: #3ecf8e; border-color: rgba(62,207,142,.5); background: rgba(62,207,142,.1); }
.gp-standard { color: var(--accent); border-color: rgba(242,179,61,.5); background: rgba(242,179,61,.1); }
.gp-fast { color: #ff8a5c; border-color: rgba(255,138,92,.5); background: rgba(255,138,92,.1); }
.gp-why { color: #c9cde0; margin: 8px 0 0; }
.gp-sub { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin: 16px 0 8px; font-family: var(--font); font-weight: 800; }
.gp-sub.bad { color: var(--bad); }
.gp-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.gp-phase { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.gp-phase-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.gp-phase ul, .gp-list { margin: 8px 0 0; padding-left: 18px; color: #c9cde0; font-size: 13px; }
.gp-phase li, .gp-list li { margin-bottom: 4px; }
.gp-list.warn li { color: #ffb3bb; }
.gp-list.tips li { color: #cfe8ff; }
.gp-row { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.gp-row .hicon.sm { width: 30px; height: 30px; }
.gp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.gp-itemrow { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); margin-bottom: 6px; }
.gp-items { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.gp-items .muted.small { width: 100%; }
.gp-items .muted.small:not(:first-child) { margin-top: 2px; }
.gp-talents { display: flex; flex-direction: column; gap: 6px; }
.gp-talent { display: flex; gap: 10px; align-items: center; }
.talent-ico.sm { width: 32px; height: 32px; font-size: 17px; }
#bPlan:not(:empty) { margin-top: 4px; }
@media (max-width: 860px) { .gp-cols { grid-template-columns: 1fr; } }

/* ---- user menu + avatars ---- */
.user-box { position: relative; }
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; object-fit: cover; background: #0a0c12; box-shadow: 0 0 0 2px var(--accent); }
.avatar.av-xs { width: 18px; height: 18px; box-shadow: 0 0 0 1px var(--line); margin-right: 5px; vertical-align: -4px; font-size: 10px; }
.avatar.av-sm { width: 26px; height: 26px; font-size: 14px; }
.avatar.av-md { width: 40px; height: 40px; font-size: 20px; }
.avatar.av-lg { width: 84px; height: 84px; font-size: 42px; box-shadow: 0 0 0 3px var(--accent), 0 8px 24px rgba(0,0,0,.5); }
.author { display: inline-flex; align-items: center; }
.user-btn { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 3px; cursor: pointer; font-weight: 700; font-size: 13px; max-width: 200px; }
.user-btn:hover, .user-btn[aria-expanded="true"] { border-color: var(--accent); }
.user-btn .uname-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn .caret { color: var(--muted); font-size: 10px; }
.user-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; padding: 6px;
  background: #121729; border: 1px solid #39426a; border-radius: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.55); }
.user-menu .um-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.user-menu .um-head b { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; text-align: left; font-size: 13px; color: var(--text); font-weight: 500; }
.user-menu a:hover, .user-menu button:hover { background: var(--panel2); }
.user-menu .um-ic { width: 18px; text-align: center; color: var(--muted); }
.user-menu .um-out { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; color: #ff8a8a; }
.user-menu .um-out .um-ic { color: inherit; }

/* ---- profile page ---- */
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.prof-card { position: sticky; top: 76px; }
.prof-preview { display: flex; align-items: center; gap: 16px; padding: 4px 4px 18px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.prof-name { font-family: var(--head); font-size: 22px; word-break: break-word; }
.prof-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; max-height: 560px; overflow-y: auto; padding: 2px; }
.av-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 1px solid transparent; border-radius: 10px; background: var(--panel2); cursor: pointer; }
.av-pick img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c1); }
.av-pick.c2 img { border-color: var(--c2); } .av-pick.c3 img { border-color: var(--c3); } .av-pick.c4 img { border-color: var(--c4); } .av-pick.c5 img { border-color: var(--c5); }
.av-pick span { font-size: 10.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-pick:hover { border-color: #3d4672; }
.av-pick.on { border-color: var(--accent); background: rgba(242,179,61,.12); }
.av-pick.on span { color: var(--accent); font-weight: 700; }
@media (max-width: 860px) {
  .profile { grid-template-columns: 1fr; }
  .prof-card { position: static; }
  .user-btn { padding: 3px; }
  .user-btn .caret { display: none; }
  .avatar-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); max-height: 420px; }
  .av-pick img { width: 40px; height: 40px; }
}

/* hero icons link to the hero page; not in the builder or on hidden pool slots */
.hicon[data-tip^="hero:"]:hover { filter: brightness(1.15); }
.pool-slot.hidden-slot .hicon, .tt-head .hicon { cursor: default; filter: none; }

/* ---- item icons: one standard shape ----
   Every item image is Dota's 88x64 artwork. Cropping it to a square cut the sides off wide items
   (they looked zoomed in) while compact ones looked small. Standalone icons now keep the game's
   own 11:8 shape at three fixed sizes; only the tiny strips attached to hero pieces stay square. */
.iicon { width: 30px; height: 22px; }
.iicon.md { width: 44px; height: 32px; border-radius: 5px; }
.iicon.lg { width: 66px; height: 48px; border-radius: 7px; }
.iicon img { object-fit: cover; object-position: center; }
.item-card { align-items: flex-start; }
.item-card .iicon.lg { margin-top: 2px; }

/* ---- creep (PvE) rounds ---- */
.pve-list { display: flex; flex-direction: column; gap: 0; margin-top: 14px; }
.pve-card { display: grid; grid-template-columns: 74px 1fr 190px; gap: 16px; align-items: stretch; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 0% 0%, rgba(173,229,92,.07), transparent 55%), var(--panel); }
.pve-round { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; background: #0b0e17; border: 2px solid #ade55c; color: #ade55c; }
.pve-round span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.pve-round b { font: 600 34px/1 var(--head); }
.pve-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pve-head h3 { margin: 0; font-size: 20px; }
.pve-total { font-size: 12.5px; color: var(--muted); } .pve-total b { color: #ff8a8a; }
.pve-units { display: flex; gap: 12px; flex-wrap: wrap; }
.pve-unit { width: 168px; display: flex; flex-direction: column; gap: 4px; }
.pve-img { position: relative; height: 128px; border-radius: 10px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(70% 70% at 50% 60%, rgba(255,255,255,.08), transparent 70%), linear-gradient(180deg, #1b2236, #0d111c); border: 1px solid var(--line); }
.pve-img img { max-width: 92%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
.pve-emoji { font-size: 56px; }
.pve-count { position: absolute; right: 6px; top: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(0,0,0,.7); border: 1px solid #ade55c; color: #ade55c; font: 600 15px var(--head); }
.pve-uname { font-weight: 700; font-size: 13px; }
.pve-stats { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11px; color: var(--muted); }
.pve-stats b { color: var(--text); font-weight: 600; }
.pve-traits { margin-top: 10px; }
.pve-traits ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: #f3c27b; }
.pve-tip { margin: 10px 0 0; font-size: 13px; line-height: 1.5; }
.pve-extra { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.pve-reward { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 12px; border-radius: 12px; background: #0b0e17; border: 1px solid var(--line); }
.pve-reward img { width: 84px; height: 84px; object-fit: contain; border-radius: 10px; }
.pve-reward.loot img { width: 88px; height: 64px; object-fit: cover; border: 1px solid #3d4672; }
.pve-reward.relic { border-color: rgba(242,179,61,.5); box-shadow: inset 0 0 24px rgba(242,179,61,.12); }
.pve-reward b { font-size: 14px; }
.pve-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 0 36px; padding: 12px 0 12px 22px; border-left: 2px dashed #39426a; font-size: 12.5px; color: var(--muted); }
.pve-pvp { font-weight: 600; color: #8fb3ff; }
.pve-mark { padding: 3px 10px; border-radius: 999px; background: rgba(63,191,111,.12); border: 1px solid rgba(63,191,111,.4); color: #8fe0a9; }
a.tl-item.tl-pve { border-color: rgba(173,229,92,.4); }
a.tl-item.tl-pve:hover { border-color: #ade55c; }
@media (max-width: 860px) {
  .pve-card { grid-template-columns: 1fr; }
  .pve-round { flex-direction: row; gap: 8px; padding: 6px 12px; justify-content: flex-start; }
  .pve-round b { font-size: 26px; }
  .pve-unit { width: calc(50% - 6px); }
  .pve-img { height: 110px; }
  .pve-reward { flex-direction: row; text-align: left; flex-wrap: wrap; justify-content: flex-start; }
  .pve-reward img, .pve-reward.loot img { width: 56px; height: 42px; }
  .pve-gap { margin-left: 16px; }
}
.pve-card + .pve-card { margin-top: 10px; }

/* ---- in-game style lists (Database → Heroes / Items, "List" view) ---- */
.view-toggle { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.pl-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.pl-cols.il-cols { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pl-col h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding-bottom: 8px; border-bottom: 3px solid var(--c1); font-size: 15px; }
.pl-col.c2 h3, .pl-col.t2 h3 { border-color: var(--c2); } .pl-col.c3 h3, .pl-col.t3 h3 { border-color: var(--c3); }
.pl-col.c4 h3, .pl-col.t4 h3 { border-color: var(--c4); } .pl-col.c5 h3, .pl-col.t5 h3 { border-color: var(--c5); } .pl-col.t0 h3 { border-color: #ade55c; }
.pl-rows { display: flex; flex-direction: column; gap: 2px; }
.pl-row { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 3px 6px; border-radius: 6px; background: rgba(255,255,255,.025); color: var(--c1); cursor: pointer; }
.pl-row:hover { background: rgba(255,255,255,.08); }
.pl-col.c2 .pl-row, .pl-col.t2 .pl-row { color: #5fd88b; } .pl-col.c3 .pl-row, .pl-col.t3 .pl-row { color: #6aa8ff; }
.pl-col.c4 .pl-row, .pl-col.t4 .pl-row { color: #d07dff; } .pl-col.c5 .pl-row, .pl-col.t5 .pl-row { color: #ffb24d; } .pl-col.t0 .pl-row { color: #ade55c; }
.pl-row.off, .pl-col .pl-row.off { color: #7d8396; }
.pl-row.off .pl-ico, .pl-row.off .pl-syn img { filter: grayscale(1) brightness(.8); }
.pl-ico { width: 28px; height: 28px; border-radius: 5px; object-fit: cover; flex: none; background: #0a0c12; }
.il-ico { width: 38px; height: 28px; border-radius: 4px; object-fit: cover; flex: none; }
.pl-name { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-name i { font-style: normal; margin-left: 3px; font-size: 11px; opacity: .9; }
.pl-syn { display: flex; gap: 3px; flex: none; }
.pl-syn img { width: 20px; height: 20px; border-radius: 4px; }
@media (max-width: 1200px) { .pl-cols, .pl-cols.il-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .pl-cols, .pl-cols.il-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pl-cols, .pl-cols.il-cols { grid-template-columns: 1fr; } }

/* legendary pool: synergy icons over the portrait, like the in-game panel */
.pool-slot { position: relative; }
.pool-syn { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); display: flex; gap: 2px; padding: 2px; border-radius: 5px; background: rgba(0,0,0,.65); }
.pool-syn img { width: 15px; height: 15px; border-radius: 3px; }
.pool-slot .hicon.lg { max-width: 72px; }
.pool-syn { bottom: -4px; gap: 2px; padding: 2px 3px; }
.pool-syn img { width: 19px; height: 19px; }
.pool-syn:empty { display: none; }

/* build author: bigger avatar + name */
.author { font-size: 13.5px; color: #c9cee0; font-weight: 700; gap: 0; }
.avatar.av-xs { width: 26px; height: 26px; margin-right: 8px; font-size: 14px; box-shadow: 0 0 0 2px var(--accent); vertical-align: middle; }
