/* Marvel Rivals free tools (Batch 188) — tools/rivals_placement.html, rivals_party.html, rivals_rank.html. Loaded after
   content.css and kit.css (NetEase's rank-icon pickers .kit-pick). Everything here is prefixed .rvt- (shared) / .rvp-
   (placements) / .rvq- (party) / .rvr- (rank calculator) except the .tool-rivals theme, which recolours the shared tool
   kit in Marvel Rivals red. Filled buttons use a deeper red so white text keeps 4.5:1. */
.tool-rivals { --taccent: #e8262d; --accent-hot: #ff5a5f; --accent: #e8262d; --accent-rgb: 232,38,45; --accent-deep: #b3161c;
  --accent-ink: #ffffff; --accent-btn: #cf1d24; }
.tool-rivals .rut-tab.is-on { background: linear-gradient(180deg, #f2393f, #cf1d24); border-color: #b3161c; color: #fff; }
.tool-rivals .fe-stat b { color: #ff6b70; }

/* ---- shared */
.rvt-form { display: grid; gap: 14px; }
.rvt-lbl { display: block; margin: 0 0 8px; padding: 0; font: 700 12px/1.3 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.rvt-faint { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-faint); }
.rvt-hint { margin: 0; font-size: 12.5px; color: var(--text-faint); line-height: 1.5; }
.rvt-hint b { color: var(--text-muted); }
.rvt-hint[hidden] { display: none; }
.rvt-go { justify-self: start; }
.rvt-seg { margin: 0; padding: 0; border: 0; min-width: 0; }
.rvt-seg-tight { margin-top: 14px; }
.rvt-seg-row { display: flex; flex-wrap: wrap; gap: 8px; }
.rvt-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text-muted); font: 650 13.5px/1.2 var(--font); cursor: pointer;
  transition: border-color .15s, color .15s, background .15s; }
.rvt-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rvt-chip small { font-weight: 600; color: var(--text-faint); margin-left: 4px; }
.rvt-chip:hover { border-color: var(--border-strong); color: var(--text); }
.rvt-chip:has(input:checked) { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 15%, var(--bg)); }
.rvt-chip:has(input:focus-visible) { outline: 2px solid var(--accent-hot); outline-offset: 2px; }
.rvt-size { min-width: 46px; justify-content: center; font-variant-numeric: tabular-nums; }
.rvt-ranks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); }
.rvt-ranks[hidden] { display: none; }
.rvt-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.rvt-planner { margin-top: 0; }
.rvt-planner h3 .rvt-faint { font-size: 13px; }
.rvt-planner .rvt-hint { margin-top: 10px; }
.rvt-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rvt-nums-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rvt-nums .bxc-num, .rvt-pair .bxc-num, .rvq-field .bxc-num { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rvt-check { position: relative; display: inline-flex; align-items: center; gap: 9px; font-size: 13px; line-height: 1.3; color: var(--text-muted); cursor: pointer; }
.rvt-check input[type=checkbox] { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--accent); }
.rvt-check:has(input:checked) { color: var(--text); }
.rvt-maths { margin: 12px 0 0; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px dashed var(--border-strong);
  font-size: 13.5px; line-height: 1.55; color: var(--text-muted); overflow-wrap: anywhere; }
.rvt-maths b { color: var(--text); margin-right: 4px; font: 700 11px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; }
.rvt-meta { line-height: 1.55; }
.rvt-meta.is-stuck { color: #ffcf8a; }
.rvt-notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.rvt-notes[hidden] { display: none; }
.rvt-notes li { position: relative; padding: 9px 12px 9px 30px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border);
  font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.rvt-notes li::before { content: ""; position: absolute; left: 12px; top: 15px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.rvt-read { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.rvt-read li { padding: 11px 13px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); font-size: 13.5px; line-height: 1.5; color: var(--text-muted); }
.rvt-read li b { display: block; margin-bottom: 3px; font: 700 11px/1.2 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.rvt-read li.is-up { border-color: rgba(61,220,132,.4); }
.rvt-read li.is-up b { color: #5fd38d; }
.rvt-read li.is-down { border-color: rgba(255,143,107,.4); }
.rvt-read li.is-down b { color: #ff9d7a; }
.rvt-table td, .rvt-table th { vertical-align: middle; }
.rvt-table .kit-chip img { width: 24px; height: 24px; }
.rvt-src { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 12.5px; line-height: 1.5; color: var(--text-faint); }
.rvt-src b { color: var(--text-muted); }
.rvt-src ul { margin: 6px 0 0; padding-left: 18px; }
.rvt-src li { margin: 3px 0; }
.rvt-src a { color: var(--text-muted); overflow-wrap: anywhere; }
.rvt-locked { margin: 14px 0 0; }
.rvt-locked[hidden] { display: none; }
.rvt-locked a { color: #f2c75c; text-decoration: underline; text-underline-offset: 2px; }
.rvt-tag { display: inline-block; padding: 4px 9px; border-radius: 999px; font: 700 12px/1 var(--font); white-space: nowrap; }
.rvt-tag.is-ok { color: #3ddc84; background: rgba(61,220,132,.12); border: 1px solid rgba(61,220,132,.35); }
.rvt-tag.is-no { color: #ff6b6b; background: rgba(255,92,92,.12); border: 1px solid rgba(255,92,92,.35); }
.rvt-tag.is-likely-no { color: #ff9d7a; background: rgba(255,143,107,.12); border: 1px solid rgba(255,143,107,.35); }
.rvt-tag.is-warn { color: #ffcf5c; background: rgba(255,200,80,.12); border: 1px solid rgba(255,200,80,.35); }
.rvt-yn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font: 800 13px/1 var(--font); }
.rvt-yn.is-ok { color: #3ddc84; background: rgba(61,220,132,.12); }
.rvt-yn.is-no { color: #ff6b6b; background: rgba(255,92,92,.1); }
.rvq-matrix th:not(:first-child), .rvq-matrix td:not(:first-child) { text-align: center; }
.rvt-table td { position: relative; }   /* keeps the .sr-only labels inside the table's scroller */
.rvt-src-tag { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 6px; font: 700 10.5px/1.4 var(--font); letter-spacing: .04em;
  text-transform: uppercase; vertical-align: 1px; white-space: nowrap; }
.rvt-src-tag.is-official { color: #8fd3ff; background: rgba(94,200,245,.12); border: 1px solid rgba(94,200,245,.32); }
.rvt-src-tag.is-guides { color: #ffcf5c; background: rgba(255,200,80,.1); border: 1px solid rgba(255,200,80,.32); }
.rvt-src-tag.is-community { color: #c9b5ff; background: rgba(195,166,255,.1); border: 1px solid rgba(195,166,255,.32); }
.rvt-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid color-mix(in srgb, var(--accent) 40%, var(--border)); display: grid; gap: 10px; }
.rvt-timeline li { position: relative; font-size: 14px; line-height: 1.55; color: var(--text-muted); }
.rvt-timeline li::before { content: ""; position: absolute; left: -24px; top: 7px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); }
.rvt-timeline b { color: var(--text); }

/* the kit pickers inside the tool card (kit.css styles them; a little tighter here) */
.rvt-card .kit-pick-head .lbl { font-size: 11.5px; }
.rvt-card .kit-pick-now output { white-space: nowrap; }

/* ---- booster box */
.rvt-boost { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.rvt-boost h3 { margin: 0; font-size: 17px; }
.rvt-boost .bxc-span { margin-top: 6px; color: var(--text-muted); font-weight: 600; }
.rvt-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rvt-opts-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rvt-opts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rvt-opt .bxc-opt-h { color: var(--accent-hot); }
.rvt-opt.is-main { border-color: rgba(232,38,45,.6); }
.rvt-opt .bxc-opt-go { color: var(--accent-hot); }
.rvt-min { font-weight: 600; font-size: 12px; color: var(--text-faint); }
.rvt-etas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rvt-etas-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rvt-etas-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rvt-eta { display: grid; gap: 5px; padding: 13px 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border-strong); min-width: 0; }
.rvt-eta span { font: 750 11.5px/1.3 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-hot); }
.rvt-eta b { font: 800 19px/1.2 var(--font-display); color: var(--text); }
.rvt-etas .bxc-err { grid-column: 1 / -1; }
.rvq-duo .muted { margin: 6px 0 12px; font-size: 14px; line-height: 1.55; }

/* ---- the climb (placements: last season → predicted start; rank: current → target) */
.rvt-climb { --rvc: #e8262d; margin: 20px 0 4px; padding: 14px; border-radius: var(--radius);
  background: radial-gradient(80% 140% at 50% 0%, color-mix(in srgb, var(--rvc) 16%, transparent), transparent 70%), var(--bg);
  border: 1px solid color-mix(in srgb, var(--rvc) 30%, var(--border)); }
.rvt-climb-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.rvt-end { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rvt-end > span:last-child { display: grid; gap: 2px; min-width: 0; }
.rvt-end b { font: 800 16px/1.15 var(--font-display); color: var(--text); white-space: nowrap; }
.rvt-end small { font-size: 12px; color: var(--text-faint); }
.rvt-em { width: 48px; height: 48px; flex: none; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,.45)); }
.rvt-em[hidden], .rvt-newbadge[hidden] { display: none; }
.rvt-newbadge { display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 12px; transform: rotate(45deg) scale(.8);
  border: 2px dashed color-mix(in srgb, var(--accent-hot) 70%, transparent); font: 800 11px/1 var(--font); letter-spacing: .06em; color: var(--accent-hot); }
.rvt-arrow { display: inline-flex; gap: 3px; flex: none; }
.rvt-arrow i { width: 8px; height: 8px; border-top: 2px solid var(--rvc); border-right: 2px solid var(--rvc); transform: rotate(45deg); opacity: .45; }
.rvt-arrow i:nth-child(2) { opacity: .7; }
.rvt-arrow i:nth-child(3) { opacity: 1; }
.rvt-track { display: flex; gap: 3px; height: 10px; margin: 14px 4px 0; }
.rvt-track i { position: relative; flex: 1 1 0; min-width: 2px; border-radius: 3px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.rvt-track i span { position: absolute; inset: 0 auto 0 0; background: var(--c); }

/* ---- the ladder strip: 7 tiers × 3 divisions + Eternity + One Above All */
.rvt-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 3fr)) repeat(2, minmax(0, 1.3fr)); gap: 6px; margin: 18px 0 0; padding: 12px;
  border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.rvt-tier { display: grid; gap: 6px; min-width: 0; align-content: start; }
.rvt-tier-h { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.rvt-tier-h img { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.rvt-tier-h span { font: 700 9.5px/1.1 var(--font); letter-spacing: .02em; color: var(--text-faint); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rvt-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; align-items: start; }
.rvt-tier.is-one .rvt-cells { grid-template-columns: minmax(0, 1fr); }
.rvt-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 40px; padding: 4px 0; border-radius: 4px;
  background: color-mix(in srgb, var(--tc) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 20%, transparent); }
.rvt-dv { font: 700 9px/1 var(--font); font-style: normal; color: var(--text-faint); opacity: .7; }
.rvt-cell.can { background: color-mix(in srgb, var(--tc) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 45%, transparent); }
.rvt-cell.zone { background: rgba(61,220,132,.4); box-shadow: inset 0 0 0 1px #3ddc84, 0 0 10px rgba(61,220,132,.3); }
.rvt-cell.zone .rvt-dv { color: #eafff2; opacity: 1; }
.rvt-cell.off { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255,255,255,.07) 4px 6px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.rvt-mk { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; font: 800 10px/1 var(--font); color: #160707; }
.rvt-mk.is-p { background: #ff5a5f; box-shadow: 0 0 0 2px rgba(255,90,95,.3); }
.rvt-mk.is-f { background: #e8edf2; }
.rvt-legend { margin: 8px 0 0; font-size: 12px; color: var(--text-faint); line-height: 1.6; }
.rvt-legend .rvt-mk { width: 15px; height: 15px; font-size: 9px; vertical-align: -3px; }

/* ---- party checker */
.rvq-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rvq-player { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--border); min-width: 0; }
.rvq-player[hidden] { display: none; }
.rvq-pbody { display: grid; gap: 10px; min-width: 0; }
.rvq-num, .rvq-mk { display: inline-grid; place-items: center; border-radius: 50%; font: 800 13px/1 var(--font); color: #120c05; background: var(--mk, #ff5a5f); }
.rvq-num { width: 28px; height: 28px; margin-top: 1px; }
.rvq-mk1 { --mk: #ff5a5f; } .rvq-mk2 { --mk: #5ec8f5; } .rvq-mk3 { --mk: #f2c75c; } .rvq-mk4 { --mk: #7fdc8f; } .rvq-mk5 { --mk: #c3a6ff; } .rvq-mk6 { --mk: #ffffff; }
.rvq-mk { width: 15px; height: 15px; font-size: 9.5px; }
.rvq-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; padding-top: 10px; border-top: 1px dashed var(--border); }
.rvq-pl { min-height: 38px; }
.rvq-field { display: grid; gap: 4px; min-width: 0; font: 700 11px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.rvq-field .bxc-sel, .rvq-field .bxc-num { min-height: 38px; padding-top: 6px; padding-bottom: 6px; text-transform: none; letter-spacing: 0; }
.rvq-field select { min-width: 128px; }
.rvq-score .bxc-num { width: 112px; }
.rvq-score.is-off { display: none; }
.rvq-result { --rc: #3ddc84; margin: 20px 0 0; padding: 16px 18px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--rc) 45%, var(--border));
  background: radial-gradient(120% 150% at 90% 0%, color-mix(in srgb, var(--rc) 13%, transparent), transparent 62%), var(--bg); }
.rvq-result.is-no { --rc: #ff5c5c; }
.rvq-result.is-likely-no { --rc: #ff8f6b; }
.rvq-result.is-warn { --rc: #ffc850; }
.rvq-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.rvq-verdict b { font: 800 23px/1.15 var(--font-display); color: var(--rc); }
.rvq-verdict small { font-size: 12.5px; font-weight: 650; color: var(--text-faint); }
.rvq-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rc) 22%, transparent); }
.rvq-rules { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.rvq-rule { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 55%, var(--bg)); border: 1px solid var(--border); }
.rvq-st { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font: 800 13px/1 var(--font); color: var(--text-faint); background: rgba(255,255,255,.05); }
.rvq-rule.is-ok .rvq-st { color: #3ddc84; background: rgba(61,220,132,.14); }
.rvq-rule.is-no .rvq-st { color: #ff6b6b; background: rgba(255,92,92,.14); }
.rvq-rule.is-no { border-color: rgba(255,92,92,.4); }
.rvq-rule.is-warn .rvq-st { color: #ffcf5c; background: rgba(255,200,80,.14); }
.rvq-rule.is-warn { border-color: rgba(255,200,80,.35); }
.rvq-rule.is-na { opacity: .72; }
.rvq-rb { display: grid; gap: 3px; min-width: 0; }
.rvq-rh { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.rvq-rh b { font-size: 14px; color: var(--text); }
.rvq-rt { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.rvq-fix { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.rvq-fix[hidden] { display: none; }
.rvq-fix li { padding: 9px 12px 9px 34px; position: relative; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--rc) 55%, var(--border));
  font-size: 13.5px; line-height: 1.5; color: var(--text); }
.rvq-fix li::before { content: "→"; position: absolute; left: 12px; top: 9px; color: var(--rc); font-weight: 800; }
.rvq-notes li { background: color-mix(in srgb, var(--panel) 60%, var(--bg)); }
.rvq-result .rvt-src-tag { font-size: 10px; }

/* ---- rank calculator: where you stand + the distribution chart */
.rvr-where { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.rvr-where h3 { margin: 0 0 12px; font-size: 17px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
.rvr-pcs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.rvr-pc { --tc: #e8262d; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; min-width: 0;
  background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--tc) 16%, transparent), transparent 70%), var(--bg);
  border: 1px solid color-mix(in srgb, var(--tc) 35%, var(--border)); }
.rvr-pc img { width: 44px; height: 44px; flex: none; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.rvr-pc-b { display: grid; gap: 1px; min-width: 0; }
.rvr-pc-b small { font: 700 11px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.rvr-pc-b b { font: 800 16px/1.2 var(--font-display); color: var(--text); }
.rvr-pc-top { font-size: 13px; color: var(--text-muted); }
.rvr-pc-top em { font: 800 22px/1.15 var(--font-display); font-style: normal; color: var(--tc); font-variant-numeric: tabular-nums; }
.rvr-pc-sub { font-size: 12px; line-height: 1.4; color: var(--text-faint); }
.rvr-chart { margin-top: 14px; padding: 12px 12px 8px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.rvr-read { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); min-height: 1.5em; }
.rvr-read b { color: var(--text); margin-right: 4px; }
.rvr-bars { display: grid; grid-template-columns: repeat(23, minmax(0, 1fr)); gap: 2px; align-items: end; height: 150px;
  border-bottom: 1px solid var(--border-strong); background: linear-gradient(to top, transparent calc(50% - .5px), rgba(255,255,255,.04) calc(50% - .5px), rgba(255,255,255,.04) calc(50% + .5px), transparent calc(50% + .5px)); }
.rvr-bar { position: relative; display: flex; align-items: flex-end; height: 100%; cursor: pointer; }
.rvr-bar i { display: block; width: 100%; height: max(var(--h), 2px); border-radius: 4px 4px 0 0; background: var(--c); opacity: .32; transition: opacity .15s; }
.rvr-bar.is-path i { opacity: .6; }
.rvr-bar.is-cur i, .rvr-bar.is-tgt i { opacity: 1; }
.rvr-bar.is-cur::after, .rvr-bar.is-tgt::after { content: ""; position: absolute; left: 50%; bottom: calc(var(--h) + 5px); width: 7px; height: 7px; border-radius: 50%;
  transform: translateX(-50%); background: var(--text); box-shadow: 0 0 0 2px var(--bg); }
.rvr-bar.is-tgt::after { background: transparent; border: 2px solid var(--text); width: 9px; height: 9px; }
.rvr-bar:hover i, .rvr-bar.is-hover i { opacity: 1; outline: 2px solid rgba(255,255,255,.55); outline-offset: 1px; }
.rvr-axis { display: grid; grid-template-columns: repeat(23, minmax(0, 1fr)); gap: 2px; margin-top: 6px; }
.rvr-axis-t { grid-column: span var(--n); display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.rvr-axis-t img { width: 22px; height: 22px; object-fit: contain; }
.rvr-axis-t small { font: 700 9.5px/1.1 var(--font); color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

@media (max-width: 860px) {
  .rvt-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rvt-opts, .rvt-etas { grid-template-columns: minmax(0, 1fr); }
  .rvt-opts-4, .rvt-etas-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rvt-strip { grid-template-columns: repeat(4, minmax(0, 3fr)) minmax(0, 1.3fr); row-gap: 12px; }
  .rvq-players { grid-template-columns: minmax(0, 1fr); }
  .rvr-axis-t small { display: none; }
}
@media (max-width: 560px) {
  .tool-rivals .tool-body { padding-left: 16px; padding-right: 16px; }
  .rvt-card { padding: 18px 14px 16px; }
  .rvt-ranks { padding: 12px 10px; }
  .rvt-pair, .rvt-read, .rvr-pcs { grid-template-columns: minmax(0, 1fr); }
  .rvt-chip { padding: 9px 11px; font-size: 13px; }
  .rvt-chip small { display: block; margin: 2px 0 0; }
  .rvt-climb { padding: 12px 8px; }
  .rvt-climb-row { gap: 8px; }
  .rvt-em { width: 38px; height: 38px; }
  .rvt-newbadge { width: 36px; height: 36px; font-size: 9.5px; }
  .rvt-end { gap: 7px; }
  .rvt-end b { font-size: 14px; }
  .rvt-arrow i { width: 6px; height: 6px; }
  .rvt-track { margin: 12px 2px 0; gap: 2px; }
  .rvt-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px 8px; }
  .rvq-player { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; position: relative; }
  .rvq-num { position: absolute; top: 9px; left: 10px; width: 24px; height: 24px; font-size: 12px; }
  .rvq-player .kit-pick-head { padding-left: 32px; }
  .rvq-opts { gap: 8px 10px; }
  .rvq-field select { min-width: 0; width: 100%; }
  .rvq-field { flex: 1 1 120px; }
  .rvq-score .bxc-num { width: 100%; }
  .rvq-verdict b { font-size: 20px; }
  .rvq-rule { padding: 9px 10px; gap: 8px; }
  .rvt-opts-4, .rvt-etas-4 { grid-template-columns: minmax(0, 1fr); }
  .rvr-bars { height: 120px; gap: 1px; }
  .rvr-axis { gap: 1px; }
  .rvr-axis-t img { width: 16px; height: 16px; }
  .rvt-table th, .rvt-table td { padding-left: 8px; padding-right: 8px; }
  .rvq-matrix th:not(:first-child), .rvq-matrix td:not(:first-child) { padding-left: 2px; padding-right: 2px; }
  .rvq-matrix .rvt-yn { width: 22px; height: 22px; }
}
/* phones: the tier buttons become an icon grid — the chosen rank's name is in the picker head */
@media (max-width: 480px) {
  .rvt-eta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 13px; }
  .rvt-eta b { font-size: 16px; text-align: right; }
  .rvt-etas { gap: 8px; }
  .rvt-card .kit-tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .rvt-card .kit-tier { justify-content: center; padding: 6px 2px; font-size: 0; gap: 0; }
  .rvt-card .kit-tier.has-ic { padding-left: 2px; }
  .rvt-card .kit-tier img { width: 30px; height: 30px; margin: 0; }
  .rvt-card .kit-divs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rvt-card .kit-div { min-width: 0; padding: 8px 0; }
}
@media (max-width: 400px) {
  .rvt-em { width: 32px; height: 32px; }
  .rvt-end b { white-space: normal; overflow-wrap: anywhere; }
  .rvt-nums { gap: 10px; }
  .rvt-card .kit-pick-now output { white-space: normal; }
}
