/* ============================================================
   PokeStats Matchup
   ============================================================ */

:root {
  color-scheme: dark;
  --bg: #121214;
  --panel: #1a1a22;
  --panel-inset: #121214;
  --line: #29292e;
  --line-soft: #222226;
  --muted: #a0a0a5;
  --text: #eeeeee;
  --red: #ff3e3e;
  --blue: #6390f0;
  --good: #3d7a46;
  --bad: #9c3434;
  --warn: #c98a2e;
  --cool: #345d9c;
  --radius: 12px;
}

* { box-sizing: border-box; }

/* The hidden attribute must win over any display rule below (grid, flex...). */
[hidden] { display: none !important; }

body {
  margin: 0;
  padding: 28px 22px 60px;
  background: var(--bg);
  color: var(--text);
  font: 15px 'Segoe UI', Tahoma, sans-serif;
}

.shell { max-width: 1480px; margin: auto; }

/* ---------- Header ---------- */

.brand { display: flex; align-items: center; justify-content: center; gap: 14px; }
.brand img { width: 58px; height: 58px; object-fit: contain; }
h1 { margin: 0; color: var(--red); font-size: 2rem; }

.brand-home {
  border: 0; background: transparent; color: inherit;
  padding: 4px 10px; margin: 0 auto 4px; border-radius: 10px; cursor: pointer;
}
.brand-home:hover { background: var(--panel); }
.brand-home:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.subtitle { text-align: center; color: var(--muted); margin: 8px 0 20px; }

/* ---------- Search + toolbar ---------- */

.search { display: flex; gap: 9px; max-width: 680px; margin: 0 auto 14px; }

input, select {
  min-width: 0; padding: 13px 15px;
  background: #1a1a1e; border: 1px solid var(--line);
  border-radius: 8px; color: #fff; font-size: 15px; font-family: inherit;
}
.search input { flex: 1; }
input:focus, select:focus { outline: 2px solid #ff3e3e66; border-color: var(--red); }

button { font: inherit; cursor: pointer; }

.search button, .primary {
  padding: 12px 20px; border: 0; border-radius: 8px;
  background: var(--red); color: #fff; font-weight: 700;
}
.search button:hover, .primary:hover { background: #e03434; }
.search button:disabled { opacity: .6; cursor: progress; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; align-items: center; margin: 0 auto 24px;
}
.ghost-btn {
  padding: 8px 14px; border-radius: 8px; font-size: 13px;
  background: #1f1f27; border: 1px solid var(--line); color: #d4d4da;
}
.ghost-btn:hover { background: #26262f; border-color: #44444e; }
.toggle { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.toggle input { width: 16px; height: 16px; padding: 0; accent-color: var(--red); }

/* ---------- Team columns ---------- */

.teams {
  display: grid;
  grid-template-columns: minmax(160px, 215px) minmax(420px, 1fr) minmax(160px, 215px);
  gap: 16px; align-items: start;
}

.team {
  background: var(--panel); padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  position: sticky; top: 12px;
}
.team h2 {
  text-align: center; font-size: 14px; text-transform: uppercase;
  letter-spacing: 1.2px; margin: 0 0 12px; color: #ffb0b0;
}
.team.ours h2 { color: #a8c8ff; }

.slot-list { display: grid; gap: 8px; }

.slot {
  position: relative; width: 100%; min-height: 62px;
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 6px 9px; color: #ddd;
  background: var(--panel-inset); border: 1px solid #303038; border-radius: 8px;
}
.slot:hover { border-color: #777; }
/* "viewing" = shown on the Pokemon tab; "active" = where the next search lands. */
.slot.viewing { background: #1f1f29; }
.slot.active { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.ours .slot.active { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.slot-pick {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; flex: 1; min-width: 0; align-items: center;
  flex-direction: inherit; gap: inherit;
}
.slot-pick:focus-visible { outline: 2px solid #ffffff88; outline-offset: 2px; border-radius: 4px; }
.slot img { width: 44px; height: 44px; object-fit: contain; }
.slot .slot-name { font-weight: 650; text-transform: capitalize; }
.slot .slot-empty { color: #84848d; font-size: 13px; }
.slot .slot-num { margin-left: auto; color: #72727a; font-size: 11px; }
.slot .slot-tera {
  position: absolute; left: 3px; bottom: 3px;
  font-size: 8px; font-weight: 800; padding: 1px 4px; border-radius: 3px;
}

.slot-clear {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px; line-height: 1;
  border: 0; border-radius: 50%;
  background: #2c2c34; color: #bbb; font-size: 13px;
  display: none; align-items: center; justify-content: center;
}
.slot:hover .slot-clear, .slot:focus-within .slot-clear { display: flex; }
.slot-clear:hover { background: var(--red); color: #fff; }

.team-note { font-size: 11px; text-align: center; color: #777; margin: 12px 0 0; }

/* ---------- Workspace tabs ---------- */

.workspace { min-width: 0; }

.tabs {
  display: flex; gap: 6px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.tab {
  padding: 10px 16px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 600; border-radius: 6px 6px 0 0;
}
.tab:hover { color: #fff; background: #1c1c23; }
.tab[aria-selected="true"] { color: #fff; border-bottom-color: var(--red); }
.tab .count {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  border-radius: 10px; background: #2d2d35; font-size: 11px;
}

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: 0 8px 24px #0003;
}
.card h3 {
  color: var(--red); font-size: 1.15rem; margin: 0 0 14px;
  padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.card + .card { margin-top: 16px; }
.details > .card { margin-top: 0; }
.caption { margin: -6px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* Card title with a control on the right (team switch). */
.card-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 14px; padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.card-head h3 { margin: 0; padding: 0; border: 0; }

.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented button {
  padding: 6px 12px; border: 0; background: #1f1f27; color: var(--muted);
  font-size: 12px; font-weight: 600;
}
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button:hover { color: #fff; }
.segmented button[aria-pressed="true"] { background: #33333e; color: #fff; }

/* Small sprite used in the analysis views. */
.mini { width: 28px; height: 28px; object-fit: contain; vertical-align: middle; }

/* ---------- Pokemon detail ---------- */

.identity { display: grid; grid-template-columns: minmax(165px, .8fr) minmax(220px, 1.2fr); gap: 20px; }
.center {
  text-align: center; background: var(--panel-inset);
  border: 1px solid var(--line-soft); border-radius: 9px; padding: 15px;
}
.center h2 { margin: 0 0 6px; text-transform: capitalize; }
.sprite { width: 170px; height: 170px; object-fit: contain; display: block; margin: 5px auto; }
.dex-no { color: #72727a; font-size: 12px; }

.badge {
  display: inline-block; padding: 4px 9px; border-radius: 20px;
  color: #fff; font-size: 11px; font-weight: bold; text-transform: uppercase;
  text-shadow: 1px 1px 2px #0006; margin: 2px;
}

/* Official type colors. Ghost is #735797 - it used to share Dark's brown. */
.type-normal   { background: #A8A77A; }
.type-fire     { background: #EE8130; }
.type-water    { background: #6390F0; }
.type-electric { background: #F7D02C; color: #333; }
.type-grass    { background: #7AC74C; }
.type-ice      { background: #96D9D6; color: #333; }
.type-fighting { background: #C22E28; }
.type-poison   { background: #A33EA1; }
.type-ground   { background: #E2BF65; color: #333; }
.type-flying   { background: #A98FF3; }
.type-psychic  { background: #F95587; }
.type-bug      { background: #A6B91A; }
.type-rock     { background: #B6A136; }
.type-ghost    { background: #735797; }
.type-dragon   { background: #6F35FC; }
.type-dark     { background: #705746; }
.type-steel    { background: #B7B7CE; color: #333; }
.type-fairy    { background: #D685AD; }

/* ---------- Stats ---------- */

.stats { padding: 8px 2px; }
.stat { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 12px; }
.label { width: 42px; color: #aaa; font-weight: 700; }
.value { width: 30px; text-align: right; font-weight: 700; }
.track { flex: 1; height: 11px; border-radius: 5px; background: #111; overflow: hidden; position: relative; }
.bar { height: 100%; width: 0; transition: width .4s; }
.bar-hp { background: #ff5959; }
.bar-attack { background: #f5ac78; }
.bar-defense { background: #fae078; }
.bar-specialAttack { background: #9db7f5; }
.bar-specialDefense { background: #a7db8d; }
.bar-speed { background: #fa92b2; }

.bst-row {
  display: flex; align-items: baseline; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 13px; color: #ccc;
}
.bst-row strong { font-size: 20px; color: #fff; margin-left: auto; font-variant-numeric: tabular-nums; }
.bst-note {
  color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
  padding: 2px 7px; border: 1px solid var(--line); border-radius: 10px;
}
.bst-note:empty { display: none; }

/* ---------- Detail sub-cards ---------- */

.details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.group {
  background: var(--panel-inset); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 12px; margin: 9px 0;
}
.gtitle { font-size: 11px; color: #aaa; text-transform: uppercase; margin-bottom: 8px; font-weight: 700; }
.gmult { color: #fff; margin-left: 2px; }
.group.alert { border-color: #7a2d2d; background: #1d1416; }

.ability-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #aaa; }
.field select { width: 100%; padding: 9px 11px; font-size: 13px; }
.ability-desc { margin: 0 0 8px; font-size: 12.5px; line-height: 1.5; color: #d4d4da; }
.ability-hint { margin: 0 0 8px; font-size: 11px; color: var(--muted); }
.ability-desc:empty, p.ability-hint:empty { display: none; }

/* ---------- Evolutions ---------- */

.evo {
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; padding: 12px 10px;
  background: var(--panel-inset); border: 1px solid var(--line-soft); border-radius: 8px;
}
.evo-stage { display: grid; gap: 12px; flex: none; }
.evo-stage.wide { grid-template-columns: 1fr 1fr; gap: 12px 8px; }
.evo-how { display: grid; justify-items: center; gap: 2px; width: 84px; flex: none; text-align: center; }
.evo-how.bare { width: 26px; }
.evo-arrow { color: #ff7777; font-size: 18px; line-height: 1; }
.evo-method { display: block; font-size: 11px; line-height: 1.3; color: #ffb3b3; font-weight: 600; }
.evo-node { width: 86px; text-align: center; font-size: 12px; color: #c9c9d1; }
.evo-node img { display: block; width: 56px; height: 56px; object-fit: contain; margin: 0 auto 2px; }
.evo-node.current { color: #fff; font-weight: 700; }
.evo-node.current img { filter: drop-shadow(0 0 6px #ff3e3eaa); }
.evo-none { margin: 0; font-size: 13px; color: var(--muted); }
.evo-hint { margin: 8px 0 0; font-size: 11px; color: var(--muted); }

/* Other members of the line are buttons that switch the slot to them. */
button.evo-link {
  padding: 4px 0; border: 1px solid transparent; border-radius: 8px;
  background: transparent; font: inherit; font-size: 12px; color: #c9c9d1;
}
button.evo-link:hover:not(:disabled) { background: #1f1f29; border-color: #3a3a45; color: #fff; }
button.evo-link:focus-visible { outline: 2px solid #ffffff88; outline-offset: 1px; }
button.evo-link:disabled { cursor: progress; opacity: .45; }
button.evo-link.loading { opacity: 1; border-color: var(--red); }

/* ---------- Teammate suggestions ---------- */

.suggestion {
  background: var(--panel-inset); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 10px 12px;
}
.suggestion + .suggestion { margin-top: 8px; }
.sg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 8px; }
.sg-types { flex: none; }
.sg-types .badge { margin: 0 4px 0 0; }
.sg-why { font-size: 12.5px; color: #d4d4da; }
.sg-caveat { font-size: 11px; color: #f0b860; }
.sg-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px 2px 4px; border-radius: 16px;
  background: #1f1f27; border: 1px solid var(--line); color: #d4d4da; font-size: 12px;
}
.pick img { width: 30px; height: 30px; object-fit: contain; }
.pick:hover:not(:disabled) { background: #26262f; border-color: #55555f; color: #fff; }
.pick:disabled { cursor: progress; opacity: .5; }
.pick.more { padding: 6px 12px; color: var(--muted); }
.pick.extra { display: none; }
.suggestion.open .pick.extra { display: inline-flex; }
.suggestion.open .pick.more { display: none; }

/* ---------- Empty state ---------- */

.empty { min-height: 300px; display: grid; place-items: center; text-align: center; color: #aaa; padding: 20px; }
.empty img { width: 96px; opacity: .8; }
.empty h2 { color: #fff; margin: 10px 4px 4px; }

/* ---------- Matrix / grids ---------- */

.legend {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin: 0 0 12px; color: #c6c6cc; font-size: 11px;
}
.legend span { display: flex; align-items: center; gap: 6px; }
.swatch { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }
.swatch.super { background: var(--good); }
.swatch.resist { background: var(--cool); }
.swatch.immune { background: #4a4a52; }
.swatch.danger { background: var(--bad); }
.swatch.caution { background: var(--warn); }
.swatch.edge { background: #24462b; }
.swatch.behind { background: #4d2426; }

.grid-scroll {
  overflow-x: auto; overscroll-behavior-x: contain;
  border: 1px solid var(--line); border-radius: 7px;
}

table.grid {
  width: 100%; min-width: 790px; table-layout: fixed;
  border-collapse: collapse; background: var(--panel-inset); font-size: 11px;
}
table.grid th, table.grid td {
  padding: 4px 2px; text-align: center;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
table.grid .corner, table.grid .row-head { width: 108px; text-align: left; background: #202027; }
table.grid .corner { color: #aaa; font-size: 10px; line-height: 1.5; }
table.grid .row-head { position: sticky; left: 0; z-index: 1; }
table.grid .row-head .badge { min-width: 76px; margin: 0; text-align: center; }
table.grid .col-head { height: 38px; background: #25252d; }
table.grid td { height: 30px; font-weight: 800; }
table.grid tr:last-child th, table.grid tr:last-child td { border-bottom: 0; }
table.grid th:last-child, table.grid td:last-child { border-right: 0; }

.type-mark {
  display: inline-block; min-width: 29px; padding: 4px 2px;
  border-radius: 4px; font-size: 9px; font-weight: 800;
}

.cell-neutral { background: #151518; }
/* Blank cells in the type chart only - the head-to-head grid keeps its numbers visible. */
table.grid .cell-neutral { color: transparent; }
.cell-super   { background: var(--good); color: #f0fff1; }
.cell-resist  { background: var(--cool); color: #f0f6ff; }
.cell-immune  { background: #4a4a52; color: #fff; }
.cell-danger  { background: var(--bad); color: #ffecec; }
.cell-caution { background: var(--warn); color: #231a08; }
.cell-edge    { background: #24462b; color: #dff5e2; }
.cell-behind  { background: #4d2426; color: #ffdede; }

/* ---------- Team analysis ---------- */

/* Defensive grid: one row per attacking type, one column per team member. */
table.team-grid {
  width: 100%; min-width: 520px; table-layout: fixed;
  border-collapse: collapse; background: var(--panel-inset); font-size: 12px;
}
table.team-grid th, table.team-grid td {
  padding: 3px 4px; text-align: center;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
table.team-grid tr:last-child th, table.team-grid tr:last-child td { border-bottom: 0; }
table.team-grid th:last-child, table.team-grid td:last-child { border-right: 0; }
table.team-grid thead th { background: #25252d; font-size: 10px; color: #bbb; font-weight: 600; }
table.team-grid .corner { width: 108px; text-align: left; padding-left: 8px; text-transform: uppercase; }
table.team-grid .member { padding: 6px 2px; }
table.team-grid .member span {
  display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
table.team-grid .total { width: 58px; text-transform: uppercase; }
table.team-grid td { height: 30px; font-weight: 800; }
table.team-grid td.total { background: #1b1b22; font-size: 13px; font-variant-numeric: tabular-nums; color: #9ec1ff; }
table.team-grid td.total.weak { color: #d8d8e0; }
table.team-grid .row-head { background: #202027; text-align: left; position: sticky; left: 0; z-index: 1; }
table.team-grid .row-head .badge { min-width: 76px; margin: 0; text-align: center; }
table.team-grid .cell-danger { background: #6e2a2c; }
table.team-grid .cell-danger.strong { background: #b93a3a; }
table.team-grid tr.row-caution td.total.weak { color: #f0b860; }
table.team-grid tr.row-danger td.total.weak { background: var(--bad); color: #fff; }
table.team-grid tr.row-danger .row-head { box-shadow: inset 3px 0 0 #ff5a5a; }

/* Offensive coverage: one tile per defending type. */
.coverage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.cov-tile {
  display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 5px 8px;
  background: var(--panel-inset); border: 1px solid var(--line-soft); border-radius: 8px;
}
.cov-tile .badge { min-width: 76px; margin: 0; text-align: center; flex: none; }
.cov-who { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; justify-content: flex-end; font-size: 11px; }
.cov-tile.gap { border-color: #7a2d2d; background: #1d1416; }
.cov-tile.gap .cov-who { color: #ff9b9b; font-weight: 600; }

.verdict {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.verdict-tile {
  background: var(--panel-inset); border: 1px solid var(--line-soft);
  border-radius: 9px; padding: 14px;
}
.verdict-tile .vt-label { font-size: 11px; text-transform: uppercase; color: #999; letter-spacing: .6px; }
.verdict-tile .vt-value { font-size: 26px; font-weight: 800; margin: 6px 0 2px; }
.verdict-tile .vt-detail { font-size: 11px; color: var(--muted); }
.verdict-tile.good .vt-value { color: #7fd48c; }
.verdict-tile.bad .vt-value { color: #ff8585; }
.verdict-tile.neutral .vt-value { color: #d8d8e0; }

/* ---------- Head to head ---------- */

.h2h-summary { margin: 0 0 12px; font-size: 13px; color: #d4d4da; }
.h2h-summary:empty { display: none; }

table.h2h {
  width: 100%; min-width: 640px; table-layout: fixed;
  border-collapse: collapse; font-size: 11px; background: var(--panel-inset);
}
table.h2h th, table.h2h td {
  padding: 6px 4px; text-align: center;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
table.h2h tr > :last-child { border-right: 0; }
table.h2h tfoot th, table.h2h tfoot td { border-bottom: 0; border-top: 2px solid #3a3a45; }
table.h2h .corner, table.h2h .row-head { background: #202027; text-align: left; width: 132px; }
table.h2h .corner { color: #aaa; font-size: 10px; font-weight: 600; padding-left: 8px; }
table.h2h .row-head { position: sticky; left: 0; z-index: 1; font-weight: 700; font-size: 12px; }
table.h2h .row-head span { margin-left: 4px; }
table.h2h .col-head { background: #25252d; font-weight: 600; }
table.h2h .col-head span, table.h2h .answer span {
  display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
table.h2h tbody td { height: 58px; line-height: 1.4; }
.h2h-line { display: block; opacity: .9; }
.h2h-line b { font-size: 13px; font-weight: 800; opacity: 1; }
.h2h-speed { display: block; margin-top: 2px; font-size: 9px; text-transform: uppercase; letter-spacing: .5px; opacity: .75; }
table.h2h .answer { background: #1b1b22; font-weight: 600; }
table.h2h .answer.none { color: var(--muted); font-weight: 400; }

/* ---------- Toasts ---------- */

.toasts {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: grid; gap: 8px; z-index: 50; width: min(420px, calc(100% - 28px));
}
.toast {
  padding: 12px 16px; border-radius: 9px; font-size: 14px;
  background: #24242d; border: 1px solid var(--line);
  box-shadow: 0 10px 30px #0007; animation: rise .18s ease-out;
}
.toast.error { border-color: #7a2d2d; background: #2a1618; }
.toast.ok { border-color: #2d5a35; background: #16241a; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .teams { grid-template-columns: 1fr 1fr; }
  .team:not(.ours) { grid-column: 1; grid-row: 1; }
  .team.ours { grid-column: 2; grid-row: 1; }
  .workspace { grid-column: 1 / -1; grid-row: 2; }
  .team { position: static; }
  .slot-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slot { min-height: 52px; justify-content: center; }
  .slot img { width: 36px; height: 36px; }
  .slot .slot-num { display: none; }
}

@media (max-width: 560px) {
  body { padding: 14px 10px; }
  .brand-home { gap: 8px; padding: 4px 6px; }
  .brand img { width: 38px; height: 38px; }
  h1 { font-size: 1.35rem; }
  .subtitle { font-size: 13px; margin: 6px 0 14px; }

  .search { gap: 6px; margin-bottom: 10px; }
  .search input { padding: 11px 10px; font-size: 14px; }
  .search button { padding: 10px 12px; font-size: 13px; white-space: nowrap; }
  .toolbar { gap: 7px; margin-bottom: 16px; }
  .ghost-btn { padding: 7px 11px; font-size: 12px; }

  .teams { gap: 9px; }
  .team { padding: 8px 6px; min-width: 0; }
  .team h2 { font-size: 10px; letter-spacing: .7px; margin-bottom: 8px; }

  .slot-list {
    display: flex; overflow-x: auto; gap: 6px; padding: 0 0 5px;
    scroll-snap-type: x mandatory; scrollbar-width: thin;
  }
  .slot {
    flex: 0 0 62px; width: 62px; min-height: 66px;
    flex-direction: column; justify-content: center; gap: 1px;
    padding: 4px 2px; scroll-snap-align: start;
  }
  .slot img { width: 35px; height: 35px; }
  .slot .slot-name {
    display: block; max-width: 56px; font-size: 9px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
  }
  .slot .slot-empty { font-size: 10px; }
  .slot .slot-num { display: block; position: absolute; right: 3px; top: 2px; margin: 0; font-size: 9px; }
  .slot-clear { display: flex; width: 17px; height: 17px; font-size: 11px; top: 1px; left: 1px; right: auto; }
  .team-note { font-size: 9px; margin: 7px 0 1px; }

  .tab { padding: 8px 10px; font-size: 12.5px; }
  .card { padding: 13px; border-radius: 10px; }
  .card h3 { font-size: 1rem; margin-bottom: 10px; }
  .identity { grid-template-columns: 1fr; gap: 10px; }
  .center { padding: 12px; }
  .sprite { width: 145px; height: 145px; }
  .details { grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
  .group { padding: 10px; margin: 7px 0; }
  .ability-row { grid-template-columns: 1fr; }
  .coverage-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .evo-how { width: 70px; }
  .evo-how.bare { width: 22px; }
  .verdict { grid-template-columns: 1fr 1fr; gap: 8px; }
  .verdict-tile { padding: 10px; }
  .verdict-tile .vt-value { font-size: 20px; }
  table.grid { min-width: 560px; }
  .evo { justify-content: flex-start; }
}
