:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #eaf2ee;
  background: #101619;
  font-synthesis: none;
  --panel: #182124;
  --border: #2b3a3b;
  --muted: #9caca8;
  --accent: #a9e3be;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 50% 0, #263735 0, transparent 520px); }
main { width: min(100%, 540px); min-height: 100dvh; margin: auto; padding: 18px 16px 24px; }
button, input { font: inherit; color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.top, .brand, .search, .section-head, footer { display: flex; align-items: center; }
.top { justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.brand { gap: 8px; text-decoration: none; color: inherit; font-size: 15px; letter-spacing: .075em; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; background: var(--accent); color: #14251c; font-weight: 900; border-radius: 7px; }
.brand-game { color: var(--muted); font-size: 10px; white-space: nowrap; }
.status { color: #f0c797; border: 1px solid #69533e; background: #302720; border-radius: 20px; font-size: 11px; font-weight: 650; padding: 5px 9px; white-space: nowrap; }
.status.is-live { color: var(--accent); border-color: #476750; background: #23362b; }
.search { min-height: 43px; gap: 12px; padding: 0 12px; background: #131b1c; border: 1px solid #354742; border-radius: 11px; }
.search span { position: relative; width: 13px; height: 13px; border: 1.5px solid var(--muted); border-radius: 50%; flex-shrink: 0; }
.search span::after { position: absolute; content: ''; width: 5px; height: 1.5px; background: var(--muted); transform: rotate(45deg); right: -4px; bottom: -2px; }
.search input { width: 100%; min-width: 0; line-height: 40px; outline: none; padding: 0; border: 0; background: transparent; }
.search:focus-within { border-color: var(--accent); }
.search input::placeholder { color: var(--muted); }
.tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 4px; background: #141d1e; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; }
.tabs button { min-height: 37px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 650; }
.tabs button[aria-pressed=true] { background: #2a4739; color: var(--accent); }
.tabs button:disabled { opacity: .55; cursor: default; }
#heroes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 10px 0; overflow: visible; }
#heroes > p { grid-column: 1 / -1; }
.hero-choice { display: grid; grid-template-rows: auto minmax(29px, auto); align-items: center; gap: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 7px; background: #1b2425; font-size: 11px; font-weight: 650; }
.hero-label { padding: 3px; overflow-wrap: anywhere; line-height: 1.15; }
.hero-choice[aria-pressed=true] { border-color: #8ab79b; color: var(--accent); background: #25382e; }
.hero-thumb, .item-icon, .spell-icon { position: relative; display: grid; place-items: center; overflow: hidden; }
.hero-thumb { width: 100%; aspect-ratio: 1.65; background: linear-gradient(140deg, var(--hero), #192323); }
.portrait-unavailable { color: #eaf2ee; padding: 3px; font-size: 10px; text-align: center; }
.hero-thumb img, .item-icon img, .spell-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-card, .section { border: 1px solid var(--border); border-radius: 13px; background: var(--panel); overflow: hidden; margin-bottom: 9px; }
.hero-header { position: relative; min-height: 100px; isolation: isolate; display: flex; align-items: end; padding: 14px; background: linear-gradient(105deg, #192625, var(--hero)); }
.portrait { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.portrait img { display: block; width: 68%; height: 100%; margin-left: auto; object-fit: cover; object-position: center 36%; }
.portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #172223 23%, #172223b0 48%, transparent 90%), linear-gradient(0deg, #12191ad0, transparent 77%); }
.current-role { display: block; margin-bottom: 2px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
h1 { margin: 0; font-size: clamp(29px, 8vw, 40px); line-height: 1; letter-spacing: -.05em; }
.roles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; padding: 7px; }
.role { display: grid; gap: 2px; place-content: center; min-height: 42px; border: 1px solid var(--border); border-radius: 7px; background: #202b2c; padding: 3px 1px; color: #afbfba; }
.role b { font-size: 14px; line-height: 1; }
.role span { font-size: 9px; font-weight: 650; white-space: nowrap; }
.role[aria-pressed=true] { border-color: var(--accent); color: #14261c; background: var(--accent); }
.section { padding: 11px 12px; }
.section-head { justify-content: space-between; gap: 8px; margin-bottom: 8px; }
h2 { font-size: 14px; line-height: 1.2; margin: 0; }
.section-hint, .muted, footer { color: var(--muted); font-size: 11px; }
.muted { margin: 4px 0; }
.items, .levels, .spells, .options { list-style: none; padding: 0; margin: 0; }
.items { display: grid; gap: 5px; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.item { min-width: 0; }
.item-icon { height: 33px; border-radius: 5px; border: 1px solid #51615b; background: #2e3e3a; color: #c5d6cd; font-size: 11px; font-weight: 750; }
.item-name { display: block; margin-top: 3px; font-size: 10px; line-height: 1.15; overflow-wrap: anywhere; text-align: center; color: #d3ddd8; }
.amount { position: absolute; bottom: 1px; right: 2px; background: #111918; color: #eaf2ee; font-size: 10px; line-height: 1.25; padding: 0 3px; border-radius: 3px; }
.route .item-icon { height: 39px; }
.route .item { position: relative; }
.route .item:not(:first-child)::before { position: absolute; content: '›'; z-index: 1; left: -7px; top: 10px; font-weight: 900; color: var(--accent); text-shadow: 0 1px 5px #000; }
.levels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.level { display: grid; gap: 1px; justify-items: center; background: #243234; border: 1px solid #354547; border-radius: 6px; padding: 3px 1px 4px; }
.level small { color: #b4c5c1; font-size: 9px; }
.level b { font-size: 14px; line-height: 1.1; }
.level.ultimate { background: #294337; color: #c0f1ce; border-color: #527560; }
.level-icon { width: 75%; aspect-ratio: 1; position: relative; overflow: hidden; border-radius: 3px; background: #344747; }
.level-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.talent-icon { background: #59614b; }
.talent-icon::before { content: ''; position: absolute; inset: 20%; background: #e7dcb1; clip-path: polygon(44% 88%, 44% 62%, 17% 36%, 26% 26%, 44% 44%, 44% 8%, 56% 8%, 56% 44%, 74% 26%, 83% 36%, 56% 62%, 56% 88%); }
.talent-label { font-size: 8px; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
details { margin-top: 6px; }
summary { cursor: pointer; color: var(--accent); font-size: 11px; padding: 4px 0 1px; }
details .levels { margin-top: 7px; }
.spells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.spell { display: flex; align-items: center; gap: 5px; min-height: 30px; background: #202c2e; border: 1px solid #314142; padding: 3px; border-radius: 6px; font-size: 10px; line-height: 1.15; }
.spell-icon { flex: 0 0 23px; height: 23px; background: #364d42; border-radius: 3px; }
kbd { color: var(--accent); font: 700 10px system-ui, sans-serif; }
.options { display: grid; gap: 5px; color: #cad7d2; font-size: 11px; }
footer { justify-content: space-between; gap: 8px; padding: 4px 2px; }
footer a { color: var(--accent); text-underline-offset: 3px; flex-shrink: 0; }
@media (min-width: 450px) { #heroes { grid-template-columns: repeat(5, minmax(0, 1fr)); } .role span { font-size: 11px; } .item-name { font-size: 11px; } .spell { font-size: 12px; } }
@media (max-width: 350px) { main { padding-inline: 10px; } .item-name { font-size: 9px; } }
