/* dota2.com typefaces, self-hosted */
@font-face { font-family: 'Radiance'; src: url('/fonts/radiance.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Radiance'; src: url('/fonts/radiance-semibold.woff') format('woff'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Radiance'; src: url('/fonts/radiance-bold.woff') format('woff'); font-weight: 700 900; font-display: swap; }
@font-face { font-family: 'Reaver'; src: url('/fonts/Reaver-SemiBold.woff') format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Reaver'; src: url('/fonts/Reaver-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Reaver'; src: url('/fonts/Reaver-Black.woff') format('woff'); font-weight: 800 900; font-display: swap; }

:root {
  /* Wex palette: every accent is a shade of the pink orb */
  --wex: #ff5fd2;
  --wex-soft: rgba(255, 95, 210, 0.10);
  --wex-bloom: #2a1730;
  --wex-line: rgba(255, 95, 210, 0.30);
  --quas: #d77bff;
  --quas-soft: rgba(215, 123, 255, 0.10);
  --quas-line: rgba(215, 123, 255, 0.28);
  --exort: #ff3d8b;
  --exort-soft: rgba(255, 61, 139, 0.10);
  --exort-line: rgba(255, 61, 139, 0.30);
  --gradient-invoke: linear-gradient(90deg, #b44dff, #ff5fd2, #ff3d8b);
  --accent-fill: linear-gradient(135deg, #ff5fd2, #d63fae);
  --on-accent: #ffffff;

  /* Dark neutrals */
  --bg: #0e0b13;
  --ink: #ffffff;
  --carbon: #f5eefc;
  --graphite: #ddd3ea;
  --iron: #b5aac4;
  --slate: #968ba6;
  --mist: #6b6279;
  --fog: #2b2335;
  --paper: #17121f;
  --gold: #ffd76a;
  --lime: #94e022;
  --win: #4ade80;
  --loss: #ff5c6c;

  --font-ui: 'Radiance', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Reaver', 'Radiance', ui-serif, Georgia, serif;

  --radius-card: 12px;
  --radius-input: 8px;
  --radius-pill: 32px;
  --tabbar-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color-scheme: dark; color: var(--graphite); font-family: var(--font-ui); font-size: 16px; line-height: 1.5; }
body { overscroll-behavior-y: none; }
img { display: block; max-width: 100%; }
a { color: var(--wex); text-decoration: none; }
button { font: inherit; cursor: pointer; }

.view { padding: 16px 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }
.view.view-enter { animation: viewIn .32s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .view.view-enter, .sheet, .sheet-body, .howto-panel, .tabbar a { animation: none !important; transition: none !important; }
}

/* Typography */
.display { font-family: var(--font-display); font-weight: 800; color: var(--ink); font-size: 30px; line-height: 1.1; letter-spacing: 0.5px; text-transform: uppercase; margin: 0; }
.h2 { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 21px; line-height: 1.2; letter-spacing: 0.2px; margin: 0; }
.h3 { font-weight: 700; color: var(--carbon); font-size: 16px; margin: 0; }
.muted { color: var(--slate); font-size: 14px; }
.small { font-size: 12px; color: var(--slate); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 9999px; border: 1px solid var(--wex-line); background: var(--wex-soft); color: var(--wex); font-size: 12px; font-weight: 600; }

.section { margin-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

/* Cards */
.card { border: 1px solid var(--fog); border-radius: var(--radius-card); padding: 16px; background: var(--paper); }
.card.soft { background: var(--wex-soft); border-color: var(--wex-line); }
.card.quas { background: var(--quas-soft); border-color: var(--quas-line); }
.card.exort { background: var(--exort-soft); border-color: var(--exort-line); }
.card + .card { margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--radius-pill); padding: 12px 16px; font-weight: 700; font-size: 15px; background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 6px 18px rgba(255, 95, 210, 0.25); }
.btn:active { transform: scale(0.98); }
.btn.block { width: 100%; }
.btn.grow { flex: 1; }
.btn.ghost { background: transparent; color: var(--wex); border: 1px solid var(--wex-line); font-weight: 600; box-shadow: none; }
.btn.exort, .btn.quas { background: var(--accent-fill); }
.btn.dark { background: var(--fog); color: var(--carbon); box-shadow: none; }
.btn[disabled] { opacity: 0.5; }

/* Chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--fog); background: var(--paper); color: var(--graphite); border-radius: 9999px; padding: 6px 12px; font-size: 13px; font-weight: 500; white-space: nowrap; transition: border-color .15s, background .15s; user-select: none; }
.chip:hover { border-color: var(--wex-line); }
.chip.active { background: var(--wex); border-color: var(--wex); color: var(--on-accent); font-weight: 600; box-shadow: 0 0 14px rgba(255, 95, 210, 0.35); }
.chip-icon { width: 16px; height: 16px; }
.attr-icon, .tag-icon { width: 14px; height: 14px; }
@media (hover: hover) {
  .chips { scrollbar-width: thin; scrollbar-color: var(--wex-line) transparent; padding-bottom: 6px; cursor: grab; }
  .chips::-webkit-scrollbar { display: block; height: 4px; }
  .chips::-webkit-scrollbar-thumb { background: var(--wex-line); border-radius: 4px; }
}
.filters { display: grid; gap: 8px; margin: 12px 0 4px; }

.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 9999px; padding: 2px 8px; font-size: 11px; font-weight: 600; background: var(--wex-soft); color: var(--wex); border: 1px solid var(--wex-line); }
.tag.quas { background: var(--quas-soft); color: var(--quas); border-color: var(--quas-line); }
.tag.exort { background: var(--exort-soft); color: var(--exort); border-color: var(--exort-line); }
.tag.gold { background: rgba(255, 215, 106, 0.12); color: var(--gold); border-color: rgba(255, 215, 106, 0.35); }
.tag.bad { background: rgba(255, 92, 108, 0.12); color: var(--loss); border-color: rgba(255, 92, 108, 0.35); }
.tag.good { background: rgba(74, 222, 128, 0.12); color: var(--win); border-color: rgba(74, 222, 128, 0.35); }

/* Inputs */
.input { width: 100%; border: 1px solid var(--fog); border-radius: var(--radius-input); padding: 12px 16px; font: inherit; color: var(--graphite); background: var(--paper); outline: none; }
.input::placeholder { color: var(--mist); }
.input:focus { border-color: var(--wex); box-shadow: 0 0 0 3px var(--wex-line); }
.row { display: flex; gap: 8px; align-items: center; }
.row > .input { flex: 1; }

/* Home hero */
.hero-banner { position: relative; overflow: hidden; border-radius: 16px; background: #150e1c; border: 1px solid var(--wex-line); padding: 20px; min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-banner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 75% 35%, rgba(255,95,210,0.30), transparent 50%), radial-gradient(circle at 95% 80%, rgba(180,77,255,0.22), transparent 45%); }
.hero-banner .invoker { position: absolute; right: -44px; top: -14px; height: 300px; width: 300px; max-width: none; object-fit: contain; pointer-events: none; }

/* Launch / Telegram-only screen */
.gate { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 14px; }
.gate-art { position: relative; }
.gate-art::before { content: ''; position: absolute; inset: 15%; border-radius: 50%; background: radial-gradient(circle, rgba(255,95,210,0.35), transparent 70%); filter: blur(12px); }
.gate-invoker { position: relative; width: 220px; height: 220px; object-fit: contain; pointer-events: none; }

/* Hero encyclopedia */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat-cell { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--fog); border-radius: var(--radius-card); background: var(--paper); }
.stat-cell b { color: var(--carbon); font-size: 15px; }
.ability + .ability { margin-top: 8px; }
.ability-icon { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.lore summary { cursor: pointer; list-style: none; }
.lore summary::after { content: ' ▾'; color: var(--slate); }
.lore[open] summary::after { content: ' ▴'; }
.patch-change + .patch-change { margin-top: 8px; }
.hero-banner .content { position: relative; max-width: 62%; }
.hero-banner .display { margin: 10px 0 6px; }
.orbs { display: flex; gap: 6px; margin-top: 14px; }
.orb { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--fog); overflow: hidden; background: var(--paper); }
.orb img { width: 100%; height: 100%; object-fit: cover; }
.gradient-line { height: 3px; border-radius: 3px; background: var(--gradient-invoke); margin: 18px 0 0; }

.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.quick a {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center;
  min-height: 92px; padding: 12px 4px 10px; border-radius: 14px;
  border: 1px solid transparent;
  background: linear-gradient(160deg, #221728, #140f1b) padding-box, linear-gradient(160deg, rgba(255, 95, 210, 0.7), rgba(180, 77, 255, 0.15) 55%, rgba(255, 95, 210, 0.45)) border-box;
  color: var(--carbon); font-weight: 600; font-size: 12.5px; line-height: 1.15;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform .18s ease, box-shadow .18s ease;
}
.quick a img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 95, 210, 0.35), 0 4px 14px rgba(255, 95, 210, 0.25); transition: transform .25s ease, box-shadow .25s ease; }
/* Light sweep across the card */
.quick a::after { content: ''; position: absolute; inset: -40% auto -40% -60%; width: 40%; transform: rotate(20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent); z-index: -1; transition: left .6s ease; }
.quick a:hover, .quick a:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255, 95, 210, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.quick a:hover::after { left: 130%; }
.quick a:hover img { transform: scale(1.08) rotate(-3deg); box-shadow: 0 0 0 1px rgba(255, 95, 210, 0.7), 0 0 20px rgba(255, 95, 210, 0.55); }
.quick a:active { transform: scale(0.96); }
.quick a:active img { box-shadow: 0 0 0 1px var(--wex), 0 0 26px rgba(255, 95, 210, 0.8); }

.lang-switch { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; padding: 3px; border-radius: 9999px; background: rgba(14, 11, 19, 0.7); border: 1px solid var(--wex-line); backdrop-filter: blur(6px); }
.lang-switch button { border: 0; background: none; color: var(--slate); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 9999px; letter-spacing: 0.5px; }
.lang-switch button.active { background: var(--wex); color: var(--on-accent); }

/* Tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; background: rgba(14, 11, 19, 0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--fog); z-index: 20; }
.tabbar[hidden] { display: none; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; border-radius: 12px; border: 1px solid var(--fog); background: var(--paper); font-size: 10px; font-weight: 600; color: var(--slate); transition: color .15s, border-color .15s, background .15s, box-shadow .15s; }
.tabbar a span { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a:active { transform: scale(0.95); }
.tabbar a.active { color: var(--on-accent); border-color: var(--wex); background: linear-gradient(160deg, #ff5fd2, #c1389d); box-shadow: 0 0 16px rgba(255, 95, 210, 0.45); }

/* Lists */
.list { border: 1px solid var(--fog); border-radius: var(--radius-card); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--graphite); }
.list-item + .list-item { border-top: 1px solid var(--fog); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; color: var(--carbon); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-img { width: 56px; height: 32px; border-radius: 6px; object-fit: cover; background: var(--wex-bloom); flex: none; }
.hero-img.lg { width: 112px; height: 64px; border-radius: 10px; }
.item-img { width: 40px; height: 30px; border-radius: 6px; object-fit: cover; background: var(--fog); flex: none; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.up { color: var(--win); }
.down { color: var(--loss); }

.tier { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); font-size: 14px; flex: none; }
.tier-S { background: var(--exort); color: var(--on-accent); }
.tier-A { background: var(--wex); color: var(--on-accent); }
.tier-B { background: var(--quas); color: var(--on-accent); }
.tier-C { background: var(--wex-bloom); color: var(--wex); }
.tier-D { background: var(--fog); color: var(--iron); }
.tier-N { background: var(--paper); color: var(--mist); border: 1px solid var(--fog); }

/* Heroes grid */
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.hero-tile { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--fog); background: var(--wex-bloom); }
.hero-tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-tile span { display: block; font-size: 11px; font-weight: 600; color: var(--carbon); padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--paper); }
.hero-tile.selected { outline: 2px solid var(--wex); }
.hero-tile .tile-attr { position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; aspect-ratio: auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8)); }

/* Animated hero render (dota2.com videos with alpha) */
.hero-banner-video { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--wex-line); background: radial-gradient(circle at 50% 38%, rgba(255, 95, 210, 0.28), transparent 60%), #120c18; margin-bottom: 8px; }
.hero-stage { height: 300px; display: flex; justify-content: center; }
.hero-stage video { height: 100%; width: 100%; object-fit: cover; object-position: center 20%; }
.hero-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(14, 11, 19, 0.92) 55%); }
.hero-caption .display { font-size: 26px; }
.against { display: flex; gap: 2px; flex: none; }
.against img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }

/* Hero page */
.hero-head { display: flex; gap: 14px; align-items: center; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 54px 1fr 92px; align-items: center; gap: 8px; font-size: 13px; }
.bar { height: 8px; border-radius: 9999px; background: var(--fog); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 9999px; background: var(--wex); }
.items-row { display: flex; flex-wrap: wrap; gap: 8px; }
.item-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 56px; text-align: center; }
.item-cell img { width: 52px; height: 38px; border-radius: 6px; object-fit: cover; border: 1px solid var(--fog); }
.item-cell .small { line-height: 1.2; }
.phase-title { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-weight: 700; color: var(--carbon); font-size: 14px; }
.phase-title::before { content: ''; width: 8px; height: 8px; border-radius: 9999px; background: var(--wex); }
.phase-title.q::before { background: var(--quas); }
.phase-title.e::before { background: var(--exort); }

.chart { width: 100%; height: 150px; }

/* Draft */
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.slot { aspect-ratio: 16 / 10; border-radius: 8px; border: 1px dashed var(--mist); display: grid; place-items: center; color: var(--mist); font-size: 20px; overflow: hidden; background: var(--paper); padding: 0; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot.enemy { border-color: rgba(255, 92, 108, 0.45); background: rgba(255, 92, 108, 0.08); }
.slot.ally { border-color: var(--quas-line); background: var(--quas-soft); }

/* Match */
.match-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.team-title { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; }
.player { border: 1px solid var(--fog); border-radius: var(--radius-card); padding: 12px; }
.player + .player { margin-top: 8px; }
.player.worst { border-color: rgba(255, 92, 108, 0.45); background: rgba(255, 92, 108, 0.06); }
.player.mvp { border-color: rgba(255, 215, 106, 0.5); background: rgba(255, 215, 106, 0.06); }
.player-top { display: flex; gap: 10px; align-items: center; }
.stat-line { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--iron); margin: 8px 0; }
.mini-items { display: flex; gap: 4px; flex-wrap: wrap; }
.mini-items img { width: 34px; height: 25px; border-radius: 4px; border: 1px solid var(--fog); }
.score { width: 44px; height: 44px; border-radius: 9999px; display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); font-size: 15px; flex: none; }
.score.great { background: rgba(74, 222, 128, 0.12); color: var(--win); }
.score.ok { background: var(--quas-soft); color: var(--quas); }
.score.weak { background: var(--exort-soft); color: var(--exort); }
.score.bad { background: rgba(255, 92, 108, 0.12); color: var(--loss); }
.tips { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tips li { font-size: 13px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; background: var(--wex-soft); color: var(--graphite); white-space: normal; }
.tips li.counter { background: var(--exort-soft); }
.tips li.vision { background: var(--quas-soft); }
.tips li.build, .tips li.odd, .tips li.gold, .tips li.deaths, .tips li.damage { background: var(--wex-soft); }

/* Esports */
.es-list { display: grid; gap: 8px; }
.match-row { border: 1px solid var(--fog); border-radius: var(--radius-card); background: var(--paper); padding: 10px 12px; display: grid; gap: 6px; }
.match-tour { text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; color: var(--carbon); font-size: 14px; }
.team span:not(.team-logo) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team.right { justify-content: flex-end; text-align: right; }
.team-logo { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; background: var(--wex-bloom); flex: none; }
.match-score { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--ink); min-width: 56px; text-align: center; }
.match-score.live { color: var(--wex); text-shadow: 0 0 12px rgba(255, 95, 210, 0.6); }
.match-score.time { font-size: 15px; color: var(--wex); }
.tour-cover { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 8px; margin-bottom: 10px; background: var(--wex-bloom); }

/* Patch notes */
.note-list { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.note-list li { margin: 2px 0; }

/* Sheet & toast */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0); display: flex; align-items: flex-end; touch-action: none; transition: background .28s ease; }
.sheet[hidden] { display: none; }
.sheet.open { background: rgba(0, 0, 0, 0.6); }
.sheet-body { position: relative; width: 100%; max-height: 86vh; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; background: var(--paper); border-radius: 16px 16px 0 0; border-top: 1px solid var(--wex-line); padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform .32s cubic-bezier(0.22, 1, 0.36, 1); }
.sheet.open .sheet-body { transform: translateY(0); }
.sheet.closing .sheet-body { transform: translateY(110%); transition-duration: .28s; }
.sheet-top { position: sticky; top: -12px; z-index: 2; display: flex; justify-content: center; align-items: center; height: 44px; margin: -12px -16px 4px; background: var(--paper); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.sheet-top:active { cursor: grabbing; }
.sheet-handle { width: 44px; height: 5px; border-radius: 4px; background: var(--fog); pointer-events: none; }
html.sheet-open, html.sheet-open body { overflow: hidden; overscroll-behavior: none; }
html.sheet-open body { position: fixed; left: 0; right: 0; width: 100%; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + 16px); z-index: 50; padding: 12px 16px; border-radius: 12px; background: var(--wex); color: var(--on-accent); font-size: 14px; text-align: center; }

.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--wex-soft), var(--wex-bloom), var(--wex-soft)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 28px 12px; color: var(--slate); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--wex); font-weight: 600; font-size: 14px; margin-bottom: 12px; background: none; border: 0; padding: 0; }
.pro-list { display: grid; gap: 8px; margin: 12px 0 16px; padding: 0; list-style: none; }
.pro-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.pro-list li::before { content: ''; width: 10px; height: 10px; margin-top: 6px; border-radius: 9999px; background: var(--gradient-invoke); flex: none; }

/* Items */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.item-group { grid-column: 1 / -1; margin: 10px 0 2px; font-size: 13px; font-weight: 700; color: var(--iron); text-transform: uppercase; letter-spacing: 0.4px; }
.item-group:first-child { margin-top: 0; }
.item-tile { position: relative; display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; border: 1px solid var(--fog); background: var(--paper); color: var(--carbon); padding: 0; text-align: left; transition: border-color .15s, transform .15s; }
.item-tile:active { transform: scale(0.97); }
.item-tile:hover { border-color: var(--wex-line); }
.item-tile img { width: 100%; aspect-ratio: 88 / 64; object-fit: cover; background: var(--fog); }
.item-tile .item-name { font-size: 11px; font-weight: 600; padding: 4px 6px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-tile .item-cost { font-size: 11px; color: var(--gold); padding: 0 6px 4px; }
.item-tile.gone img { filter: grayscale(1) brightness(0.6); }
.item-badge { position: absolute; top: 3px; left: 3px; right: 3px; border-radius: 6px; padding: 1px 4px; font-size: 9.5px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-badge.good { background: rgba(20, 60, 35, 0.92); color: var(--win); }
.item-badge.bad { background: rgba(70, 18, 28, 0.92); color: var(--loss); }
.trainer-link { display: flex; align-items: center; gap: 12px; margin-top: 12px; color: var(--graphite); }
.trainer-link .num { font-size: 22px; color: var(--wex); }
.item-head { display: flex; gap: 14px; align-items: center; }
.item-big { width: 88px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--wex-line); box-shadow: 0 0 18px rgba(255, 95, 210, 0.25); flex: none; }
.status-banner { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.status-banner.good { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.35); color: var(--win); }
.status-banner.bad { background: rgba(255, 92, 108, 0.08); border-color: rgba(255, 92, 108, 0.35); color: var(--loss); }
.status-banner a { color: inherit; text-decoration: underline; }
.bonus-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bonus-list li { color: var(--carbon); font-weight: 600; }
.pre { white-space: pre-line; }
.notes { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.lore { font-style: italic; color: var(--slate); }
a.item-cell { color: var(--graphite); }

/* Draft modes + counter-item trainer */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: var(--radius-pill); background: var(--paper); border: 1px solid var(--fog); }
.seg a { text-align: center; padding: 8px 6px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 700; color: var(--slate); transition: color .2s, background .2s, box-shadow .2s, transform .2s; }
.seg a.active { background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 0 14px rgba(255, 95, 210, 0.35); }
.inv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.inv-slot { aspect-ratio: 88 / 64; border-radius: 8px; border: 1px dashed var(--wex-line); background: var(--wex-soft); color: var(--wex); font-size: 22px; display: grid; place-items: center; overflow: hidden; padding: 0; }
.inv-slot img { width: 100%; height: 100%; object-fit: cover; }
.link { background: none; border: 0; padding: 0; color: var(--wex); font-weight: 600; }
.link[disabled] { opacity: 0.4; }
.verdict { text-align: center; }
.verdict.great { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.35); }
.verdict.ok { background: rgba(255, 215, 106, 0.08); border-color: rgba(255, 215, 106, 0.35); }
.verdict.bad { background: rgba(255, 92, 108, 0.08); border-color: rgba(255, 92, 108, 0.35); }
.verdict-row .title::before { content: '✓ '; color: var(--win); }
.verdict-row.bad .title::before { content: '✗ '; color: var(--loss); }
.verdict-row .small { white-space: normal; }
.list-item.top { align-items: flex-start; }
.hero-icons { display: flex; gap: 4px; }
.hero-icons img { width: 26px; height: 26px; border-radius: 6px; }
.btn.grow { flex: 1; }

/* Match id how-to, review history */
.howto summary { cursor: pointer; font-weight: 700; color: var(--carbon); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: '▾'; color: var(--wex); transition: transform .25s ease; }
.howto[open] summary::after { transform: rotate(180deg); }
.howto[open] .howto-inner { animation: howtoIn .34s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes howtoIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.steps b { color: var(--wex); }
.howto-img { width: 100%; margin-top: 12px; border-radius: 10px; border: 1px solid var(--wex-line); }
.match-ph { display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--wex); }

/* Dota-style item tooltip */
.item-tip { position: fixed; z-index: 60; width: min(300px, calc(100vw - 16px)); max-height: 70vh; overflow: auto; border-radius: 10px; border: 1px solid #3c3247; background: linear-gradient(180deg, #221a2c, #120e18); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6); font-size: 13px; color: var(--graphite); pointer-events: none; }
.item-tip.touch { pointer-events: auto; }
.tip-head { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: linear-gradient(90deg, rgba(255, 95, 210, 0.18), transparent); border-bottom: 1px solid #3c3247; }
.tip-head img { width: 52px; height: 38px; border-radius: 6px; object-fit: cover; }
.tip-name { font-weight: 700; color: var(--ink); font-size: 15px; line-height: 1.2; }
.tip-cost { color: var(--gold); font-weight: 600; font-size: 12px; }
.tip-body { padding: 8px 12px 10px; display: grid; gap: 8px; }
.tip-bonuses { color: var(--carbon); font-weight: 600; }
.tip-block-title { color: #8fd3ff; font-weight: 700; }
.tip-block-text { white-space: pre-line; color: var(--iron); }
.tip-meta { display: flex; gap: 10px; font-size: 12px; }
.tip-meta .cd { color: var(--quas); }
.tip-meta .mana { color: #5eb3ff; }
.tip-more { color: var(--wex); font-weight: 600; font-size: 12px; }

/* Legal docs */
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.legal-links a { color: var(--slate); font-size: 12px; font-weight: 600; }
.legal-doc h3 { margin: 18px 0 6px; font-size: 15px; color: var(--ink); }
.legal-doc p, .legal-doc li { font-size: 14px; line-height: 1.5; color: var(--graphite); }
.legal-doc ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.legal-doc code { font-size: 12px; background: var(--fog); padding: 1px 5px; border-radius: 5px; }
.pro-legal { margin: 10px 0 0; font-size: 12px; color: var(--slate); line-height: 1.4; }
.pro-legal a { color: var(--wex); font-weight: 600; }
