/* =========================================================================
   Draft Helper, page styles (uses tokens from ../assets/theme.css)
   ========================================================================= */

.draft { padding-top: 34px; }

/* ---------- mode bar ---------- */

.modebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 0 0 4px;
}

.mode-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }

/* The side switch is a setting, not a game mode: it sits at the far end so it
   never reads as a sixth chip in the mode row. */
#my-side { margin-left: auto; }

/* Bracket filter. Not a native <select>: every scope is a RANK RANGE, and a
   native option cannot render the medals that make the range readable. So the
   trigger is a button and the list is a listbox we style ourselves. */
.bracket-control { position: relative; min-width: 0; }

.bracket-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 176px;
  padding: 6px 32px 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.bracket-current {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.bracket-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-caret {
  position: absolute;
  right: 11px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 1.7px solid var(--muted);
  border-bottom: 1.7px solid var(--muted);
  transform: rotate(45deg);
}

.bracket-select:hover { border-color: var(--amber); }
.bracket-select:hover .bracket-caret { border-color: var(--text); }
.bracket-select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 162, 90, .22);
}
.bracket-select[aria-expanded="true"] { border-color: var(--accent); background: rgba(200, 162, 90, .1); }
.bracket-select[aria-expanded="true"] .bracket-caret { transform: rotate(-135deg); margin-top: -2px; }
.bracket-select:disabled { opacity: .55; cursor: progress; }

/* Two medals per scope: Herald–Guardian is ranks 1+2, and one medal would
   under-state the range it stands for. */
.bracket-medals { display: inline-flex; align-items: center; flex: none; }
.bracket-medals img {
  display: block;
  width: 19px;
  height: 19px;
  object-fit: contain;
}
.bracket-medals img + img { margin-left: -6px; }

.bracket-glyph { display: inline-flex; flex: none; width: 19px; height: 19px; color: var(--text-soft); }
.bracket-glyph svg { width: 100%; height: 100%; display: block; }

.bracket-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  min-width: 244px;
  margin: 0;
  padding: 5px;
  list-style: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}

.bracket-menu li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 5px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
}

.bracket-menu li:hover,
.bracket-menu li:focus { background: var(--surface-hover); color: var(--text); outline: none; }

.bracket-menu li[aria-selected="true"] { color: var(--text); background: rgba(200, 162, 90, .12); }
.bracket-menu li[aria-selected="true"] .bracket-name { color: var(--amber); font-weight: 700; }

.bracket-menu li[aria-disabled="true"] { opacity: .42; cursor: not-allowed; }
.bracket-menu li[aria-disabled="true"]:hover { background: none; color: var(--text-soft); }

/* Pro matches are not a rank, they are a different CORPUS, so the row is set
   apart instead of sitting in the ladder as if it were the next step up. */
.bracket-menu li[data-bracket="pro"] { margin-top: 4px; border-top: 1px solid var(--line); }

.bracket-off {
  margin-left: auto;
  padding-left: 10px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.mode-note { font-size: 12px; color: var(--text-soft); max-width: 42ch; }
.mode-note:empty { display: none; }

@media (max-width: 620px) {
  /* The filter takes its own row rather than sharing one and being squeezed:
     a shortened "Divine–Immo…" is exactly the unreadable state this control
     was rebuilt to fix. */
  #bracket-pick { flex-basis: 100%; }
  .bracket-select { min-width: 0; max-width: 100%; }
  .bracket-menu { min-width: 0; width: max(196px, 100%); max-width: calc(100vw - 24px); }
}

/* Below ~340px the word "Bracket" costs more than it explains; the medals and
   the scope name already say what the control is. It stays for screen readers. */
@media (max-width: 340px) {
  #bracket-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.mode-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- turn bar ---------- */

.turnbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 2px;
  padding: 10px 14px;
  border: 1px solid rgba(200, 162, 90, .35);
  border-radius: var(--radius);
  background: rgba(200, 162, 90, .07);
}

.turn-info { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.turn-step {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.turn-what { font-size: 14px; font-weight: 700; }

.turn-actions { display: flex; gap: 7px; }

/* ---------- teams ---------- */

.teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}

.team {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  box-shadow: var(--shadow);
}

/* The card's own wash and edge follow its map side. `.team--enemy` used to be a
   fixed red tint, which painted a Radiant enemy card warm while its accents
   were green. */
.team[data-side] {
  background: linear-gradient(160deg, var(--side-tint), rgba(255, 255, 255, .012));
  border-left: 3px solid var(--side-color);
}

/* Map-side palette. Which side YOUR team plays is a setting ("Sisi kamu"), so
   these two blocks are facts about the game and never a stand-in for
   yours/mine: a Dire team gets the red one whichever column it sits in. The art
   lives in --side-icon as a mask, so one glyph serves the board header, the
   picker banner and the switch chips without being copied into the JS. */
[data-side="radiant"] {
  --side-color: var(--good);
  --side-soft: rgba(110, 231, 168, .13);
  --side-line: rgba(110, 231, 168, .55);
  --side-tint: rgba(110, 231, 168, .05);
  --side-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='3.8'/%3E%3Cpath d='M12 2.5v2.4M12 19.1v2.4M2.5 12h2.4M19.1 12h2.4M5.3 5.3l1.7 1.7M17 17l1.7 1.7M18.7 5.3 17 7M7 17l-1.7 1.7'/%3E%3C/svg%3E");
}

[data-side="dire"] {
  --side-color: var(--bad);
  --side-soft: rgba(255, 122, 107, .13);
  --side-line: rgba(255, 122, 107, .55);
  --side-tint: rgba(255, 122, 107, .06);
  --side-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M12 1.8 14.7 8.2 21.4 5.9 17.2 11.5 22.1 15.8 15.5 16.1 15.8 22.4 12 17 8.2 22.4 8.5 16.1 1.9 15.8 6.8 11.5 2.6 5.9 9.3 8.2Z'/%3E%3C/svg%3E");
}


.team-mark,
.pickbanner-icon {
  flex: none;
  width: 17px;
  height: 17px;
  background: var(--side-color, var(--muted));
  -webkit-mask: var(--side-icon) center / contain no-repeat;
  mask: var(--side-icon) center / contain no-repeat;
}

.team-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
}

.team-head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
}

.team-name { color: var(--side-color); font-weight: 700; }

/* "Your team" / "enemy team" is an ownership claim and it takes the same colour
   as the side it belongs to, dimmed never: on a two-colour board a grey label
   was the one word you had to read instead of glance at. */
.team-sub {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--side-color);
  opacity: .88;
}

.team-sub::before { content: "·"; margin-inline-end: 5px; color: var(--side-color); opacity: .6; }

/* ---------- side switch ---------- */

.chip--side { display: inline-flex; align-items: center; gap: 6px; }

.chip--side .chip-icon {
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: var(--side-icon) center / contain no-repeat;
  mask: var(--side-icon) center / contain no-repeat;
}

.chip--side[aria-pressed="true"] {
  background: var(--side-soft);
  border-color: var(--side-line);
  color: var(--side-color);
}

.count {
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

/* One column of the board: the role badge above, the hero slot under it. The
   role control is NOT inside the button, the button removes the hero on click,
   and a select inside it would eat those clicks. */
.pickslot {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

/* The role of this slot, drawn OVER the portrait: the board reads left to right
   as pos 1…5, so the number belongs above the face that fills it. It stays a
   real <select>, a caption you cannot correct is a label, not a control. */
.slot-role-badge {
  width: 100%;
  min-width: 0;
  padding: 1px 0 1px 2px;
  border: 1px solid transparent;
  border-radius: 3px;
  /* OPAQUE on purpose. The native option list is painted from this colour: a
     translucent fill (rgba white) composites over the popup's white and light
     text on it vanishes, only the hovered row stayed readable. */
  background-color: transparent;
  color: var(--amber);
  color-scheme: dark;
  font: inherit;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  text-align-last: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

/* Belt and braces: some Chromium builds take the popup colours from the option
   elements, not from the select. */
.slot-role-badge option {
  background-color: #0d0c12;
  color: var(--ink);
}

/* No role yet is an ACTION, not a placeholder: amber + dashed, so it reads as
   the one thing still to answer. */
.slot-role-badge--empty {
  color: var(--amber);
  border-color: rgba(200, 162, 90, .55);
  border-style: dashed;
}

.slot-role-badge:hover { border-color: rgba(200, 162, 90, .55); border-style: solid; }
.slot-role-badge:focus { outline: none; border-color: var(--accent); }

/* An empty slot still shows the position it will hand out, dimmed: the column
   says what goes where before you click anything. */
.slot-role-badge--ghost {
  display: block;
  color: var(--text-soft, rgba(216, 223, 230, .78));
  border: 1px solid transparent;
  font-weight: 500;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: default;
  user-select: none;
}

.slot {
  position: relative;
  appearance: none;
  padding: 0;
  aspect-ratio: 16 / 10;
  border: 1.5px dashed var(--line);
  border-radius: 3px;
  background: var(--paper-2);
  overflow: hidden;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .12s, background .12s;
}

.slot:hover:not([disabled]) { border-color: var(--line-strong); background: rgba(255, 255, 255, .09); }
.slot[disabled] { cursor: default; }

.slot--filled {
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
}

.slot--target {
  border: 1px solid var(--amber);
  background: rgba(200, 162, 90, .1);
  box-shadow: 0 0 0 3px rgba(200, 162, 90, .14);
}

.slot--locked { opacity: .45; }

/* Drag and drop between slots: the source fades, the target gets a dashed amber
   outline. `-webkit-user-drag` is what actually lets a <button> be dragged in
   Chromium; `draggable="true"` alone is not always enough. */
.slot[draggable="true"] {
  -webkit-user-drag: element;
  cursor: grab;
}

.slot.is-dragging {
  opacity: .35;
  cursor: grabbing;
}

.slot.is-drop-target {
  border-color: var(--amber);
  border-style: solid;
  box-shadow: 0 0 0 2px rgba(200, 162, 90, .35);
}

.slot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.slot-name {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 3px 3px;
  background: linear-gradient(180deg, transparent, rgba(25, 21, 16, .92));
  color: #fff8ee;
  font-size: 9.5px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-x {
  position: absolute;
  top: 2px;
  right: 5px;
  font-size: 11px;
  color: #fff;
  opacity: 0;
  transition: opacity .12s;
  text-shadow: 0 1px 3px #000;
}

.slot--filled:hover .slot-x { opacity: .95; }
.slot--filled:hover .slot-img { filter: brightness(.55); }

.slot-plus { font-size: 17px; opacity: .55; }

/* ---------- bans ---------- */

.ban-strip { margin-top: 11px; }

.ban-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.ban-slots { display: flex; flex-wrap: wrap; gap: 5px; }

.ban {
  position: relative;
  appearance: none;
  padding: 0;
  width: 36px;
  height: 24px;
  border: 1.5px dashed var(--line);
  border-radius: 3px;
  background: var(--paper-2);
  overflow: hidden;
  color: var(--muted);
  cursor: default;
  display: grid;
  place-items: center;
}

.ban img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: grayscale(1) brightness(.62);
  display: block;
}

.ban--filled { border: 1px solid var(--line-strong); }

.ban--filled::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 45%,
    rgba(255, 122, 107, .9) 45%,
    rgba(255, 122, 107, .9) 55%,
    transparent 55%
  );
}

.ban--target {
  border: 1px solid var(--amber);
  box-shadow: 0 0 0 3px rgba(200, 162, 90, .14);
  cursor: pointer;
}

.ban--add { cursor: pointer; font-size: 12px; }
.ban--add:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- filters ---------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 16px;
}

/* The lane chips are the role/lane selector, not just a filter, they need a
   label or they read as an anonymous row of buttons. */
.lane-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.toggles { display: flex; flex-wrap: wrap; gap: 16px; }

.toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.toggle:hover { color: var(--ink); }
.toggle input { margin: 0; width: 15px; height: 15px; accent-color: var(--accent); }

/* ---------- results ---------- */

.results { min-height: 140px; }

.result-head { margin-bottom: 12px; }

.result-head h3 {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
}

.result-head p { margin: 0; font-size: 12.5px; color: var(--muted); }

.summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.tag {
  padding: 2px 9px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.tabs {
  display: flex;
  gap: 2px;
  margin: 16px 0 12px;
  border-bottom: 1.5px solid var(--line);
}

.tab {
  appearance: none;
  padding: 8px 13px;
  border: 0;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.rows { display: flex; flex-direction: column; gap: 6px; }

.row {
  display: grid;
  grid-template-columns: 24px 200px 112px 176px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: var(--card);
  transition: border-color .12s, box-shadow .12s, transform .12s;
}

.row:hover {
  border-color: rgba(200, 162, 90, .45);
  transform: translateY(-1px);
}

.row--best { border-left: 4px solid var(--good); }
.row--worst { border-left: 4px solid var(--bad); }
.row--ban { border-left: 4px solid var(--accent); }

.row-rank {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row-hero { display: flex; align-items: center; gap: 9px; min-width: 0; }
.row-hero > div { min-width: 0; }

.row-hero img {
  width: 44px;
  height: 28px;
  flex: none;
  object-fit: cover;
  object-position: center 22%;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper-2);
}

.row-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-score { text-align: right; font-variant-numeric: tabular-nums; }

.row-score b {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -.01em;
}

.row-score span {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The other readings of the same hero, on one line, or two if the labels are
   long. Deliberately smaller: they are context, not the verdict. */
.row-score em {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  color: var(--text-soft);
}

.row-vs { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }

/* ---------- lane score strip ---------- */

/* One cell per position, same idea as STRATZ's per-role column: what this hero
   is worth in each lane. The number is a win rate against the opposing heroes
   that can play that position, see docs/DRAFTING.md, it is not a per-role
   win rate. A position the hero is not tagged for is dimmed and dashed, never
   hidden: the score there is hypothetical, not imaginary. */
.row-lane { display: flex; gap: 3px; }

.lane {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 1px 4px 2px;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  cursor: help;
}

.lane i {
  font-style: normal;
  font-size: 8.5px;
  color: var(--dim);
}

.lane--up { color: var(--good); }
.lane--down { color: var(--bad); }
.lane--flat { color: var(--ink-soft); }
.lane--none { color: var(--dim); }

.lane--off {
  opacity: .45;
  border-style: dashed;
}

.lane--thin { border-style: dashed; }

.lane--on {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(200, 162, 90, .14);
  color: var(--ink);
}

.lane--on i { color: var(--amber); }

.vs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 3px;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: var(--paper-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vs img {
  width: 20px;
  height: 20px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 2px;
}

.vs b { font-weight: 700; }
.vs em { font-style: normal; font-size: 10.5px; font-weight: 700; }
.vs em.up { color: var(--good); }
.vs em.down { color: var(--bad); }
.vs em.flat { color: var(--muted); }
.vs--none { opacity: .5; }
.vs--thin { border-style: dashed; }

/* ---------- hero picker (inline) ---------- */

/* Not a modal. A pick is judged against the ranking AND against what is already
   taken, so the picker opens IN the page, under the board, with the two
   shortlists beside the grid, closing a window to look at a recommendation was
   the whole problem with the old drawer.

   `[hidden]` needs the explicit rule below: `.pickrow` sets `display: grid`,
   which would otherwise win over the UA `[hidden] { display: none }`. */
.pickrow {
  display: grid;
  /* Wide enough for the three basis columns side by side, but it gives ground
     back to the hero grid on narrow screens instead of squeezing the lists. */
  grid-template-columns: minmax(0, 1fr) clamp(430px, 52%, 648px);
  gap: 16px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  box-shadow: var(--shadow);
  animation: fade .15s ease;
  /* .yos-topbar is 84px of sticky header, without this the picker scrolls its
     own title underneath it. */
  scroll-margin-top: 96px;
}

.pickrow[hidden] { display: none; }

@keyframes fade { from { opacity: 0; } }

.pickrow-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  grid-column: 1;
  grid-row: 2;
}

/* One heading for the whole area: on a narrow screen the shortlists come before
   the roster, and a "pick terbaik" block with no title above it might read as
   advice for the other team. Explicit placement keeps that order fixed. */
.pickrow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  grid-column: 1 / -1;
  grid-row: 1;
}

.pickrow-headtext { min-width: 0; }

.pickrow-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
}

/* Who this slot belongs to and what the action is. Two channels, two colours:
   the SIDE colours the bar, the icon and the team name, the ACTION colours the
   pill. Merging them was the bug, a red "Ban" on a green side reads as one
   statement when it is two. */
.pickbanner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 7px 0 0;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--side-color, var(--muted));
  border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
}

.pickbanner:empty { display: none; }

.pickbanner-side { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }

.pickbanner-side b { font-weight: 700; color: var(--side-color); }

.pickbanner-side em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--side-color);
  opacity: .88;
}

.pickbanner-side em::before {
  content: "·";
  margin-inline-end: 5px;
  opacity: .6;
}

.pickbanner-act {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius);
}

/* The action is coloured by WHAT it is, never by the side it is for: a red pill
   next to a red "Dire" turned two answers into one. Pick is solid amber, ban is
   an outlined slate, so the side stays the only green/red thing on the bar. */
.pickbanner[data-act="pick"] .pickbanner-act {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #0a090f;
}

.pickbanner[data-act="ban"] .pickbanner-act {
  background: rgba(216, 223, 230, .1);
  border: 1px dashed var(--line-strong);
  color: var(--text);
}

.pickbanner-note {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pickrow-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

/* ---------- shortlists beside the grid ---------- */

.pickrow-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding-left: 14px;
  border-left: 1.5px solid var(--line);
  grid-column: 2;
  grid-row: 2;
}

.pickrow-side h3 {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

/* What the number under each heading IS. The two ban columns measure opposite
   things (one against you, one for them), so the unit is not decoration. */
.rank-unit {
  margin: -3px 0 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--dim);
}

/* Two readings of the same pick side by side: the lane it will fight and the
   lineup it will fight. Same candidates, different question, the headings are
   the whole point, so they are amber and never abbreviated away. */
.rank-cols {
  display: grid;
  /* One column per reading, as many per row as fit: three on a wide screen,
     two (with the third wrapped) when the roster needs the space more. */
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 14px;
  align-items: start;
}

.rank-col h3 {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--amber);
}

.rank-col h4 {
  margin: 10px 0 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

.rank-list { display: flex; flex-direction: column; gap: 4px; }

.rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 3px 7px 3px 3px;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .12s;
}

.rank-row:hover { border-color: rgba(200, 162, 90, .55); }

.rank-row img {
  width: 34px;
  height: 22px;
  object-fit: cover;
  object-position: center 22%;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper-2);
}

.rank-row span {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row b {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.rank-row--worst b { color: var(--bad); }
.rank-row--best b { color: var(--good); }

.rank-note { margin: 8px 0 0; font-size: 11px; color: var(--dim); }

#picker-search {
  flex: 1 1 220px;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
}

#picker-search:focus { outline: none; border-color: var(--accent); }

/* Its own scroll, capped to the viewport, so the shortlists beside it stay in
   view while the roster is scrolled. */
.hero-grid {
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 4px;
}

.grid-group {
  margin: 0 0 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.grid-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.hero-card {
  position: relative;
  appearance: none;
  padding: 0;
  aspect-ratio: 16 / 11;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: var(--paper-2);
  overflow: hidden;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
  text-align: left;
  transition: border-color .12s, transform .1s, box-shadow .1s;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.hero-card span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 4px 3px;
  background: linear-gradient(180deg, transparent, rgba(25, 21, 16, .93));
  color: #fff8ee;
  font-size: 9.5px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-card:hover {
  border-color: rgba(200, 162, 90, .6);
  box-shadow: var(--shadow-sm);
}

.hero-card.is-picked { opacity: .3; cursor: not-allowed; }
.hero-card.is-picked:hover { transform: none; box-shadow: none; border-color: var(--line); }

.hero-card.in-pool::after {
  content: "★";
  position: absolute;
  top: 1px;
  left: 4px;
  font-size: 11px;
  color: var(--mark);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85);
}

.picker-hint {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- lane matchup (under the board) ---------- */

.lanes {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  box-shadow: var(--shadow);
}

.lanes[hidden] { display: none; }

.lanes header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.lanes h3 {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
}

.lanes header span { font-size: 11.5px; color: var(--muted); }

.lane-list { list-style: none; margin: 0; padding: 0; }

.lane-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
}

.lane-row:first-child { border-top: 0; }

.lane-pos {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
}

.lane-side {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.lane-side img {
  width: 30px;
  height: 19px;
  flex: none;
  object-fit: cover;
  object-position: center 22%;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper-2);
}

.lane-side span {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* One heading per physical lane, because a lane is two pairs, not one. */
.lane-group {
  margin: 12px 0 2px;
  padding-top: 9px;
  border-top: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--amber);
}

.lane-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* The position number travels WITH the hero, since the row label can only name
   our own side. */
.lane-tag {
  flex: none;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
  line-height: 1;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}

.lane-tag:empty { display: none; }

.lane-side--them { justify-content: flex-end; text-align: right; }

/* Lane / Team switch: which reading orders the ranking once a lane is chosen. */
.basis {
  display: inline-flex;
  gap: 4px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
}

.basis[hidden] { display: none; }

.basis .chip:disabled { opacity: .4; cursor: not-allowed; }
.lane-side.is-empty { color: var(--dim); font-size: 11px; font-weight: 400; }

.lane-rate {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.lane-rate--up { color: var(--good); }
.lane-rate--down { color: var(--bad); }
.lane-rate--flat { color: var(--muted); }
.lane-rate--none { color: var(--dim); font-size: 12px; }

/* Under 30 games the pair is a read, not a result. */
.lane-rate.is-thin { text-decoration: underline dashed; text-underline-offset: 3px; }

/* ---------- suggested picks ---------- */

/* The strip above the roster: "here are five, pick one". Deliberately flat and
   labelled, it is a shortcut into the grid below, not a second ranking. */
.suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.suggest[hidden] { display: none; }

.suggest-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--amber);
  margin-right: 2px;
}

.suggest-card {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 2px;
  border: 1.5px solid rgba(200, 162, 90, .45);
  border-radius: 3px;
  background: var(--card);
  cursor: pointer;
  transition: border-color .12s, transform .12s;
}

.suggest-card:hover { border-color: var(--amber); transform: translateY(-1px); }

.suggest-card b {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #1a1206;
  background: var(--amber);
  border-radius: 2px;
}

.suggest-card img {
  width: 30px;
  height: 17px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 2px;
}

.suggest-card span {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* The same five, marked where they live in the roster. */
.hero-card.is-suggested {
  border-color: rgba(200, 162, 90, .8);
  box-shadow: 0 0 0 1px rgba(200, 162, 90, .3) inset;
}

.hero-card-rank {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #1a1206;
  background: var(--amber);
  border-radius: 2px;
}

/* ---------- team analysis ---------- */

.analysis {
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  box-shadow: var(--shadow);
}

.analysis-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.analysis-intro { max-width: 62ch; }

.analysis-intro h2 {
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -.01em;
}

/* The bracket the panel's numbers were read from. Small, but it has to be on
   the panel itself: this block sits far below the mode bar that chose it. */
.analysis-bracket {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-soft);
  white-space: nowrap;
}

.analysis-intro p { margin: 0; font-size: 12.5px; color: var(--muted); }

.chance {
  min-width: 200px;
  padding: 12px 14px;
  border: 1px solid rgba(200, 162, 90, .35);
  border-radius: var(--radius);
  background: rgba(200, 162, 90, .07);
}

.chance-num {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.chance-label {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.chance-track {
  display: block;
  height: 5px;
  margin-top: 9px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

.chance-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--copper), var(--amber));
}

.chance-foot {
  display: block;
  margin-top: 7px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ---------- analysis charts ---------- */

.analysis-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.chart-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  min-width: 0;
}

.chart-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.chart-card h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}

.chart-card header span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--dim);
}

.chart-rows { display: flex; flex-direction: column; gap: 7px; }

.chart-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 42px 40px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.chart-label {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-row b {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
}

.chart-row b.up { color: var(--good); }
.chart-row b.down { color: var(--bad); }

.chart-n {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* One bar per row: amber is you, whatever is left is them. The 50% tick is what
   turns the bar into a readable verdict, no arithmetic needed. */
.split {
  position: relative;
  display: block;
  height: 7px;
  border-radius: 2px;
  background: rgba(255, 122, 107, .35);
  overflow: hidden;
}

.split-us {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--copper), var(--amber));
}

.split::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(10, 14, 19, .8);
}

.split--empty { background: rgba(255, 255, 255, .07); }
.split--empty::after { display: none; }
.chart-row.is-empty { opacity: .45; }

.chart-foot {
  margin: 10px 0 0;
  font-size: 10px;
  line-height: 1.5;
  color: var(--dim);
}

/* ---------- game-length line chart ---------- */

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-mid {
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-line {
  fill: none;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-line--us { stroke: var(--amber); }
.chart-line--them { stroke: #ff7a6b; stroke-opacity: .85; }

.chart-dot { stroke: none; }
.chart-dot--us { fill: var(--amber); }
.chart-dot--them { fill: #ff7a6b; }

.chart-axis,
.chart-x {
  font-family: var(--font-mono);
  font-size: 6.5px;
  fill: var(--dim);
}

.chart-x { font-size: 7px; letter-spacing: .02em; }

.analysis-team {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.analysis-team--enemy {
  background: linear-gradient(160deg, rgba(255, 122, 107, .07), rgba(255, 255, 255, .012));
}

.analysis-team header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.analysis-team h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

.analysis-team header span {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--muted);
}

.analysis-rows {
  margin: 0 0 11px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.analysis-rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(216, 223, 230, .09);
  font-size: 12px;
  color: var(--muted);
}

.analysis-rows li:last-child { border-bottom: 0; padding-bottom: 0; }

.analysis-rows b {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.analysis-rows b.up { color: var(--good); }
.analysis-rows b.down { color: var(--bad); }

.analysis-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.pos-badges { display: inline-flex; gap: 3px; }

.pos-badge {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-soft);
}

.pos-badge.is-missing {
  border-color: rgba(255, 122, 107, .6);
  border-style: dashed;
  color: var(--bad);
}

.analysis-counters {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.analysis-counters header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.analysis-counters h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

.analysis-counters header span {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

.counter-list { display: flex; flex-direction: column; gap: 8px; }

.counter-item {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.counter-item:first-child { border-top: 0; padding-top: 0; }

.counter-target {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
}

.counter-target img {
  width: 38px;
  height: 24px;
  flex: none;
  object-fit: cover;
  object-position: center 22%;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper-2);
}

.counter-target span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.counter-suggest { display: flex; flex-wrap: wrap; gap: 6px; }

.counter-pick {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}

.counter-pick:hover:not([disabled]) {
  border-color: rgba(200, 162, 90, .55);
  color: var(--accent);
}

.counter-pick[disabled] { opacity: .45; cursor: not-allowed; }

.counter-pick img {
  width: 24px;
  height: 15px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 2px;
}

.counter-pick b {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--good);
}

.analysis-empty { font-size: 12px; color: var(--muted); }

/* ---------- responsive ---------- */

/* Between the two layouts the shortlist panel is squeezed but still split in two,
   so the rows give up portrait width and a point of type rather than the name. */
@media (max-width: 1100px) {
  .rank-row { grid-template-columns: 27px minmax(0, 1fr) auto; gap: 6px; }
  .rank-row img { width: 27px; height: 18px; }
  .rank-row span { font-size: 11.5px; }
}

@media (max-width: 900px) {
  .teams { grid-template-columns: 1fr; }
  .pickrow { grid-template-columns: 1fr; }
  /* Shortlists above the roster once they cannot sit beside it: they are what a
     pick is decided from, and the roster is the long part. */
  .pickrow-side {
    grid-column: 1;
    grid-row: 2;
    padding: 0 0 12px;
    border-left: 0;
    border-bottom: 1.5px solid var(--line);
  }
  .pickrow-main { grid-column: 1; grid-row: 3; }
  /* The two bases keep their columns here, they are the reason this panel is
     read at all, and the lists inside them go back to one row per hero. */
  .rank-list { display: flex; flex-direction: column; gap: 4px; }
  .hero-grid { max-height: 46vh; }
  .row { grid-template-columns: 22px 1fr auto; row-gap: 8px; }
  .row-lane { grid-column: 1 / -1; }
  .row-vs { grid-column: 1 / -1; justify-content: flex-start; }
  .analysis-grid { grid-template-columns: 1fr; }
  .analysis-charts { grid-template-columns: 1fr; }
  .counter-item { grid-template-columns: 144px minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .draft { padding-top: 22px; }
  .lane-row { grid-template-columns: 62px minmax(0, 1fr) 46px; row-gap: 2px; }
  .lane-side--them { grid-column: 2 / -1; justify-content: flex-start; text-align: left; }
  .lane-rate { grid-column: 3; grid-row: 1; }
  .pickrow { padding: 12px; }
  .rank-cols { grid-template-columns: 1fr; }
  .rank-list { grid-template-columns: 1fr; }
  .slot-name { font-size: 8.5px; }
  .slot-role-badge { font-size: 8.5px; padding-left: 0; }
  .toggles { width: 100%; }
  .page-actions { width: 100%; }
  .analysis { padding: 14px; }
  .chart-row { grid-template-columns: 62px minmax(0, 1fr) 38px 34px; gap: 6px; }
  .counter-item { grid-template-columns: 1fr; align-items: start; }
  .chance { width: 100%; }
  .analysis-counters header { flex-direction: column; align-items: flex-start; gap: 2px; }
  .analysis-counters header span { text-align: left; }
}
