@font-face { font-family: 'Hanken Grotesk'; src: url(fonts/hanken-grotesk-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url(fonts/hanken-grotesk-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url(fonts/hanken-grotesk-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url(fonts/hanken-grotesk-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Big Shoulders Display'; src: url(fonts/big-shoulders-display-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Big Shoulders Display'; src: url(fonts/big-shoulders-display-latin-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --bg: #14171f;
  --bg-side: #11141b;
  --panel: #1a1e28;
  --raised: #232937;
  --line: #2c3241;
  --line-soft: #222733;
  --text: #e8eaef;
  --text-2: #b9bfcb;
  --muted: #8d94a3;
  --faint: #626a7b;
  --focus: #9cc1f0;

  /* Energy types, muted so they read as information rather than decoration */
  --t-grass: #7bb26a;
  --t-fire: #db7b55;
  --t-water: #5a9bd3;
  --t-lightning: #d7ba4e;
  --t-psychic: #b07acb;
  --t-fighting: #c88a57;
  --t-darkness: #8a84b8;
  --t-metal: #8ea2ae;
  --t-dragon: #b9a25a;
  --t-colorless: #b5b3ab;
  --t-unknown: #6f7687;

  --tier-s: #e9c46a;
  --tier-a: #e38d6a;
  --tier-b: #9fb1e6;
  --tier-c: #7fc2a0;
  --tier-d: #8a90a0;

  --win: #74c391;
  --win-soft: #a6cfa9;
  --even: #a3a9b5;
  --loss-soft: #dba29c;
  --loss: #e07a74;

  --font-ui: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Big Shoulders Display', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --side-w: 236px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.num, .table td.n { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* App frame */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 12px 16px;
  background: var(--bg-side);
  border-right: 1px solid var(--line-soft);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 27px; line-height: 1; letter-spacing: 0.01em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 13px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 15.5px;
}
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a[aria-current='page'] { background: var(--raised); color: var(--text); }
.icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.badge {
  margin-left: auto; padding: 2px 7px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; line-height: 1.5;
  background: #1f2d44; color: #9cc1f0;
}
.badge.new { background: #2b2541; color: #c7aef0; }

.side-foot { margin-top: auto; padding: 18px 10px 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.side-foot a { color: var(--text-2); }

/* Top bar */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 32px;
  background: rgba(20, 23, 31, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.menu-btn, .topbar .brand { display: none; }
.menu-btn { background: none; border: 0; padding: 6px; margin-left: -6px; border-radius: 8px; cursor: pointer; color: var(--text); }
.menu-btn .icon { width: 22px; height: 22px; }
.controls { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lang-seg { flex: none; }
.seg { display: inline-flex; padding: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.seg button {
  border: 0; background: none; cursor: pointer;
  padding: 5px 10px; border-radius: 7px;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed='true'] { background: var(--raised); color: var(--text); }
.select {
  appearance: none; -webkit-appearance: none;
  padding: 6px 30px 6px 11px; border-radius: 9px;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d94a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 8px center / 16px;
  border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; cursor: pointer;
}

/* Content */
#view { padding: 30px 32px 56px; width: 100%; max-width: 1180px; outline: none; }
.page-head h1 {
  margin: 0 0 10px;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(36px, 4.6vw, 52px); line-height: 1; letter-spacing: 0.004em;
}
.page-head p { margin: 0; max-width: 68ch; color: var(--text-2); }
.crumb { display: inline-block; margin-bottom: 14px; color: var(--muted); font-size: 14px; text-decoration: none; }
.crumb:hover { color: var(--text); }

.section { margin-top: 40px; }
.section > h2 {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: 0 0 12px; font-size: 18px; font-weight: 700;
}
.section > h2 .aside { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.section > h2 a.aside { margin-left: auto; text-decoration: none; color: var(--text-2); }
.section > h2 a.aside:hover { color: var(--text); }
.note { color: var(--muted); font-size: 13.5px; margin: 10px 0 0; max-width: 72ch; }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }

/* Spectrum: the meta split by deck share */
.spectrum { margin-top: 28px; }
.spectrum-bar { display: flex; gap: 2px; height: 64px; border-radius: 12px; overflow: hidden; }
.sp {
  position: relative; display: flex; align-items: flex-end;
  min-width: 4px; padding: 7px 9px;
  background: var(--c); color: #12151c;
  text-decoration: none; overflow: hidden; white-space: nowrap;
  font-size: 12.5px; font-weight: 700; line-height: 1.2;
  transform-origin: left center;
}
.sp:nth-child(even) { filter: saturate(0.85) brightness(0.92); }
.sp.other { background: var(--raised); color: var(--muted); }
.sp:hover, .sp:focus-visible { filter: brightness(1.12); }
.sp span { overflow: hidden; text-overflow: ellipsis; }
.spectrum-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-2); }
.spectrum-legend li { display: flex; align-items: center; gap: 7px; }
.spectrum-legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .spectrum.animate .sp { animation: grow 700ms cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 45ms); }
  @keyframes grow { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
}

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--t-unknown)); flex: none; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th {
  padding: 8px 10px; text-align: left; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.table th.n, .table td.n { text-align: right; }
.table td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.table .rank { color: var(--faint); width: 2.5em; font-variant-numeric: tabular-nums; }
.sort-btn { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font-weight: inherit; white-space: nowrap; }
.sort-btn:hover { color: var(--text); }
th[aria-sort] .sort-btn { color: var(--text); }
th[aria-sort='descending'] .sort-btn::after { content: ' ↓'; }
th[aria-sort='ascending'] .sort-btn::after { content: ' ↑'; }
.deck-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.deck-link:hover .label { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.sub { color: var(--muted); font-size: 13px; font-weight: 400; }

.wr-hi { color: var(--win); }
.wr-up { color: var(--win-soft); }
.wr-mid { color: var(--even); }
.wr-down { color: var(--loss-soft); }
.wr-lo { color: var(--loss); }
.trend-up { color: var(--win); }
.trend-down { color: var(--loss); }
.trend-flat { color: var(--faint); }
.tier-chip {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1;
  color: #12151c; background: var(--tc);
}

/* Toolbar (filters + search) */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 6px; }
.search {
  flex: 1 1 220px; max-width: 320px;
  padding: 8px 12px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--line);
}
.search::placeholder { color: var(--faint); }

/* Tier list */
.tiers { margin-top: 26px; }
.tier-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.tier-row:first-child { border-top: 0; }
.tier-letter {
  display: flex; align-items: flex-start; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 62px; line-height: 0.9;
  color: var(--tc);
}
.tier-decks { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 8px; align-content: start; }
.deck-tile {
  position: relative; display: block; text-decoration: none;
  padding: 11px 12px 11px 16px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--line-soft);
}
.deck-tile::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--c); }
.deck-tile:hover { background: var(--raised); }
.deck-tile .label { display: block; font-weight: 600; line-height: 1.3; }
.deck-tile .stats { display: flex; gap: 14px; margin-top: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.deck-tile .stats b { color: var(--text); font-weight: 600; }
.unranked { color: var(--muted); font-size: 14px; }
.unranked a { color: var(--text-2); }

/* Deck and card detail */
.detail-head { display: flex; flex-direction: column; gap: 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 10px 3px 8px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.stat-strip { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 22px 0 0; padding: 0; }
.stat-strip div { display: flex; flex-direction: column-reverse; }
.stat-strip dt { font-size: 13px; color: var(--muted); }
.stat-strip dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.05; font-variant-numeric: tabular-nums; }

.card-rows { list-style: none; margin: 0; padding: 0; }
.card-rows li { display: grid; grid-template-columns: minmax(0, 1fr) 92px 38px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.card-rows .cname { text-decoration: none; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-rows .cname:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.meter { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.meter i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--c, var(--text-2)); border-radius: 3px; }
.card-rows .copies { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 14px; }
.group-title { margin: 18px 0 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); }

.mu-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.mu-list { list-style: none; margin: 0; padding: 0; }
.mu-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.mu-list .deck-link { flex: 1; min-width: 0; font-weight: 500; }
.mu-list .deck-link .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-list .wr { font-weight: 700; font-variant-numeric: tabular-nums; }
.mu-list .n { color: var(--faint); font-size: 12.5px; width: 4.5em; text-align: right; font-variant-numeric: tabular-nums; }
.mu-head { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; margin: 0 0 4px; }
.mu-head.good { color: var(--win); }
.mu-head.bad { color: var(--loss); }
.empty-line { color: var(--muted); font-size: 14px; padding: 8px 0; margin: 0; }

details.more { margin-top: 16px; }
details.more summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 14px; }
details.more summary:hover { color: var(--text); }
details.more[open] summary { margin-bottom: 8px; }

/* Card page: decks that use the card */
.use-list { list-style: none; margin: 0; padding: 0; }
.use-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; padding: 16px 0 16px 16px; border-bottom: 1px solid var(--line-soft); position: relative; }
.use-item::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 2px; background: var(--c); }
.use-item .deck-link { font-size: 16px; }
.use-nums { display: flex; gap: 22px; font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.use-nums b { display: block; font-size: 15px; color: var(--text); font-weight: 700; }
.use-mu { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips .k { font-weight: 600; margin-right: 2px; }
.chips .k.good { color: var(--win); }
.chips .k.bad { color: var(--loss); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px 2px 7px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line-soft);
  text-decoration: none; color: var(--text-2); white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line); }
.chip .dot { width: 8px; height: 8px; }
.chip b { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Matchup matrix */
.matrix { border-collapse: separate; border-spacing: 2px; font-size: 13px; }
.matrix th { font-weight: 600; color: var(--text-2); }
.matrix thead th { width: 76px; min-width: 76px; padding: 4px 4px 8px; vertical-align: bottom; text-align: center; font-size: 12px; line-height: 1.2; }
.matrix thead th a { text-decoration: none; display: block; }
.matrix tbody th { position: sticky; left: 0; z-index: 1; text-align: left; padding: 0 12px 0 2px; background: var(--bg); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.matrix tbody th .deck-link { font-weight: 600; }
.matrix td {
  height: 40px; text-align: center; border-radius: 6px;
  font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--cell, var(--panel)); color: #12151c;
}
.matrix td.self { background: var(--line-soft); color: var(--faint); font-weight: 400; }
.matrix td.thin { opacity: 0.38; }
.matrix td.none { background: var(--panel); color: var(--faint); font-weight: 400; }
.legend-scale { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.legend-scale .ramp { width: 160px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #c96b66, #8d919c 50%, #67b585); }

/* Tournaments */
.flag { font-size: 15px; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: #22362c; color: #9fd3b0; margin-left: 6px; vertical-align: 1px; }
.ext { color: var(--text-2); }

/* About */
.prose { max-width: 70ch; }
.prose h2 { font-size: 18px; margin: 34px 0 8px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose b { color: var(--text); }

/* States */
.state { padding: 60px 0; max-width: 52ch; }
.state h1 { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; margin: 0 0 10px; }
.state p { color: var(--text-2); margin: 0 0 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 9px; cursor: pointer;
  background: var(--raised); border: 1px solid var(--line); font-weight: 600;
}
.btn:hover { background: #2a3142; }
.skeleton { height: 64px; border-radius: 12px; background: linear-gradient(90deg, var(--panel), var(--raised), var(--panel)); background-size: 200% 100%; margin-top: 28px; }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: shimmer 1.4s linear infinite; } }
@keyframes shimmer { to { background-position: -200% 0; } }

.site-foot { margin-top: auto; padding: 22px 32px 30px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 12.5px; }
.site-foot p { margin: 0; max-width: 90ch; }
.site-foot a { color: var(--muted); }

.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(5, 7, 11, 0.6); }

/* Mobile */
@media (max-width: 880px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(84vw, 290px);
    transform: translateX(-102%); transition: transform 220ms ease;
  }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0); }
  .menu-btn, .topbar .brand { display: flex; }
  .topbar { padding: 9px 16px; }
  .topbar .brand { padding: 0; }
  .topbar .brand svg { width: 24px; height: 24px; }
  .topbar .brand-name { font-size: 23px; }
  .lang-seg { margin-left: auto; }
  .controls { order: 4; margin-left: 0; width: 100%; justify-content: space-between; }
  .sp span { display: none; }
  .table .rank { display: none; }
  #view { padding: 22px 16px 44px; }
  .cols, .mu-lists, .use-mu { grid-template-columns: minmax(0, 1fr); }
  .tier-row { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
  .tier-letter { font-size: 44px; }
  .tier-decks { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
  .stat-strip { gap: 12px 26px; }
  .stat-strip dd { font-size: 28px; }
  .spectrum-bar { height: 52px; }
  .use-item { grid-template-columns: minmax(0, 1fr); }
  .use-nums { text-align: left; }
  .site-foot { padding: 20px 16px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}

/* Card images */
.thumb { flex: none; width: 34px; height: 34px; border-radius: 8px; overflow: hidden; background: var(--raised); border: 1px solid var(--line); display: inline-block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; transform: scale(1.9); transform-origin: 50% 26%; display: block; }
.card-rows .cname { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: visible; white-space: normal; }
.card-rows .cname > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mu-list .deck-link .thumb, .chip .thumb { width: 26px; height: 26px; }
.deck-tile .thumb { width: 28px; height: 28px; margin-right: 8px; vertical-align: middle; }
.card-zoom { position: fixed; left: 0; top: 0; z-index: 1000; width: 260px; pointer-events: none; border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6); }
.card-zoom[hidden] { display: none; }
.card-zoom img { display: block; width: 100%; height: auto; border-radius: 14px; background: var(--panel); }
.detail-head { position: relative; }
.hero-card { position: absolute; right: 0; top: 0; width: 168px; height: auto; border-radius: 11px; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5); }
.detail-head:has(.hero-card) { min-height: 235px; padding-right: 190px; }
@media (max-width: 640px) {
  .hero-card { width: 112px; }
  .detail-head:has(.hero-card) { min-height: 160px; padding-right: 128px; }
}
.deck-tile { display: flex; align-items: center; gap: 10px; }
.deck-tile .thumb { margin-right: 0; }
.deck-tile .tile-text { min-width: 0; }

/* Matchups: pick a deck, see win/lose odds per opponent */
.mu-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 24px 0 0; }
.mu-picker label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.mu-picker .select { font-size: 15px; padding: 9px 36px 9px 13px; min-width: min(100%, 340px); max-width: 100%; }
.mu-hero { display: flex; gap: 22px; align-items: flex-start; margin: 20px 0 6px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; }
.mu-card { flex: none; width: 96px; height: auto; border-radius: 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); }
.mu-hero-body { min-width: 0; flex: 1; }
.mu-name { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.05; }
.mu-name a { text-decoration: none; }
.mu-hero .stat-strip { margin-top: 14px; }
.mu-hero .stat-strip dd { font-size: 30px; }
.mu-key { margin-left: auto; display: inline-flex; gap: 14px; font-size: 13px; color: var(--muted); }
.mu-key span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mu-key .kw::before { background: var(--win); }
.mu-key .kl::before { background: var(--loss); }
.mu-rows { list-style: none; margin: 10px 0 0; padding: 0; }
.mu-row { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(220px, 2fr) 170px; gap: 8px 18px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.mu-row.low .mu-bar { opacity: 0.55; }
.mu-opp { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mu-opp .deck-link { min-width: 0; }
.mu-opp .deck-link .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-opp .sub { padding-left: 44px; }
.mu-bar { display: flex; gap: 2px; height: 28px; border-radius: 8px; overflow: hidden; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: #10131a; }
.mu-bar span { display: flex; align-items: center; padding: 0 9px; min-width: 2px; }
.mu-bar .w { background: var(--win); justify-content: flex-start; }
.mu-bar .l { background: var(--loss); justify-content: flex-end; }
.mu-meta { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.verdict { font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor; }
.verdict.fav { color: var(--win); }
.verdict.even { color: var(--even); }
.verdict.unf { color: var(--loss); }
.mu-matrix { margin-top: 28px; }
@media (max-width: 760px) {
  .mu-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 13px 0; }
  .mu-meta { flex-direction: row; align-items: center; gap: 10px; }
  .mu-key { margin-left: 0; }
  .mu-hero { flex-direction: column; gap: 14px; padding: 16px; }
  .mu-card { width: 84px; }
  .mu-hero .stat-strip { gap: 12px 24px; }
}

/* Two-card decks, card tier list, tabs */
.thumbs { display: inline-flex; flex: none; }
.thumbs .thumb + .thumb { margin-left: -13px; }
.thumbs .thumb { box-shadow: 0 0 0 2px var(--bg); }
.deck-tile .thumbs .thumb { box-shadow: 0 0 0 2px var(--panel); }
.deck-tile:hover .thumbs .thumb { box-shadow: 0 0 0 2px var(--raised); }
.tabs { display: inline-flex; gap: 4px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.tabs a { padding: 6px 16px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 14.5px; color: var(--muted); }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current='page'] { background: var(--raised); color: var(--text); }
.toolbar .tabs { margin-right: 6px; }
.tile-card { flex: none; width: 46px; border-radius: 5px; overflow: hidden; background: var(--raised); display: block; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4); }
.tile-card img { display: block; width: 100%; height: auto; }
.card-tile { padding-top: 9px; padding-bottom: 9px; }
.hero-cards { position: absolute; right: 0; top: 0; display: flex; }
.hero-cards .hero-card { position: static; width: 150px; }
.hero-cards .hero-card + .hero-card { margin-left: -58px; }
.detail-head:has(.hero-cards) { min-height: 235px; padding-right: 270px; }
.mu-cards { position: static; flex: none; }
.mu-cards .hero-card { width: 88px; border-radius: 7px; }
.mu-cards .hero-card + .hero-card { margin-left: -34px; }
@media (max-width: 640px) {
  .hero-cards .hero-card { width: 100px; }
  .hero-cards .hero-card + .hero-card { margin-left: -38px; }
  .detail-head:has(.hero-cards) { min-height: 160px; padding-right: 176px; }
  .mu-cards .hero-card { width: 80px; }
}

/* Decks: full cards side by side, as in a match */
.pcards { display: inline-flex; gap: 5px; flex: none; vertical-align: middle; margin-right: 8px; }
.pcard { display: block; width: 30px; border-radius: 3px; overflow: hidden; background: var(--raised); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.pcard img { display: block; width: 100%; height: auto; }
.deck-tile .pcards { margin-right: 0; gap: 4px; }
.deck-tile .pcard { width: 40px; border-radius: 4px; }
.hero-cards { gap: 14px; }
.hero-cards .hero-card + .hero-card, .mu-cards .hero-card + .hero-card { margin-left: 0; }
.hero-cards .hero-card { width: 160px; }
.detail-head:has(.hero-cards) { min-height: 245px; padding-right: 370px; }
.mu-cards { gap: 8px; }
.mu-cards .hero-card { width: 84px; }
@media (max-width: 640px) {
  .hero-cards { gap: 8px; }
  .hero-cards .hero-card { width: 96px; }
  .detail-head:has(.hero-cards) { min-height: 160px; padding-right: 214px; }
  .mu-cards .hero-card { width: 70px; }
}

/* In-game formation: active on top, bench below */
.board { position: absolute; right: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 18px 16px; border-radius: 16px; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c, #5b8fd9) 22%, var(--panel)), var(--panel)); border: 1px solid var(--line); }
.b-cap { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.board .pcard { border-radius: 6px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); }
.board .b-active .pcard { width: 132px; }
.b-bench { display: flex; gap: 8px; }
.board .b-bench .pcard { width: 84px; }
.detail-head:has(.board) { min-height: 380px; padding-right: 340px; }
.board.mini { position: static; flex: none; padding: 7px 9px 9px; gap: 5px; border-radius: 10px; }
.board.mini .b-active .pcard { width: 56px; }
.board.mini .b-bench { gap: 4px; }
.board.mini .b-bench .pcard { width: 38px; }
@media (max-width: 640px) {
  .board:not(.mini) { position: static; margin-top: 16px; align-self: flex-start; }
  .detail-head:has(.board) { min-height: 0; padding-right: 0; }
  .board .b-active .pcard { width: 104px; }
  .board .b-bench .pcard { width: 66px; }
  .board.mini .b-active .pcard { width: 56px; }
  .board.mini .b-bench .pcard { width: 38px; }
}
