.sidebar-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
  align-self: stretch;
  overflow: visible;
}

.sidebar {
  flex: 1;
  min-height: 0;
  width: 300px;
  min-width: 300px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s, min-width 0.3s;
}
.sidebar.sidebar--no-anim {
  transition: none !important;
}
.sidebar.collapsed { width: 0; min-width: 0; border-right-width: 0; }

.sidebar-inner {
  width: 300px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Add streamer, global controls, sort/filters — stays pinned; list scrolls below */
.sidebar-top-fixed {
  flex-shrink: 0;
}

.sidebar-streamers-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 10px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-bright) transparent;
}
.sidebar-streamers-scroll::-webkit-scrollbar {
  width: 6px;
}
.sidebar-streamers-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-streamers-scroll::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 3px;
}
.sidebar-bottom-strip {
  flex-shrink: 0;
  height: calc(20px * var(--cell-bar-zoom, 1));
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
}

.sidebar-section.sidebar-streamers-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-streamers-toolbar .sort-bar-wrap {
  margin-bottom: 0;
}

.sidebar-empty-list-hint {
  margin-top: 10px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
}

.sidebar-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-actions {
  padding-top: 10px;
  padding-bottom: 10px;
}

.sidebar-actions-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.sidebar-actions-row--add {
  flex-wrap: nowrap;
}
.sidebar-actions-row--add .btn-sidebar-add-full {
  width: 100%;
}

/* Add/Edit modal: Riot account lookup — three-bar loader + “Verifying accounts...” (see .streamer-status-loading) */
.btn.btn--riot-account-check {
  cursor: default;
}
.btn-riot-verify-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.btn-riot-verify-label {
  font: inherit;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.streamer-status-loading--in-modal {
  height: 16px;
  gap: 4px;
}
.streamer-status-loading--in-modal .streamer-status-loading__bar {
  height: 10px;
}

/* Primary slot: #headerStreamToolbarHost; legacy equal layout no longer moves this into #streamArea. */
.stream-global-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  width: 100%;
  box-sizing: border-box;
}
.stream-global-toolbar-heading.section-label {
  color: var(--text-secondary);
  letter-spacing: 0.2em;
  font-size: 12px;
  font-weight: 500;
  margin: 0;
  width: auto;
  flex: 0 0 auto;
  text-align: center;
}
.stream-global-toolbar--focus-pair {
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(220px, 46vw);
  width: auto;
}
.stream-global-toolbar--focus-pair .stream-global-toolbar-heading.section-label {
  margin-bottom: 8px;
  width: 100%;
}
.sidebar-sel-ic-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sidebar-sel-ic-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  flex-shrink: 0;
}
.sidebar-sel-ic-btn svg {
  display: block;
}
.sidebar-sel-ic-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
  border-color: var(--border);
  color: var(--text-dim);
  background: transparent;
}
.sidebar-sel-ic-btn:disabled:hover {
  background: transparent;
}
.stream-global-toolbar .sidebar-sel-ic-btn,
.focus-dual-toolbar .sidebar-sel-ic-btn {
  min-width: 30px;
  min-height: 30px;
}
.stream-global-toolbar .sidebar-sel-ic-btn svg,
.focus-dual-toolbar .sidebar-sel-ic-btn svg {
  transform: scale(0.92);
  transform-origin: center;
}
/* Header global toolbar: explicit 16px icons — do not shrink with .stream-global-toolbar rule above. */
header .stream-global-toolbar .sidebar-sel-ic-btn svg {
  transform: none;
}

.btn-sidebar-action {
  width: auto;
  max-width: 100%;
  font-size: 12px;
  padding: 6px 14px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
}
.section-header .section-label { margin-bottom: 0; }
.section-chevron {
  font-size: 9px;
  color: var(--text-dim);
  transition: transform 0.2s;
  line-height: 1.25;
}
.section-chevron.open { transform: rotate(180deg); }
.section-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease, margin-top 0.25s ease;
  margin-top: 0;
}
.section-body.open {
  max-height: 300px;
  margin-top: 12px;
}

.layout-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.layout-btn {
  padding: 8px 6px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.layout-btn:hover { border-color: var(--border-bright); }
.layout-btn.active { border-color: var(--accent); background: rgba(232,52,74,0.08); }
.layout-btn svg { color: var(--text-dim); }
.layout-btn.active svg { color: var(--accent); }
.layout-btn span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.layout-btn.active span { color: var(--accent); }

.slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* Config modal: ON / OFF — both visible; active segment uses theme accent */
.config-bool-toggle {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-deep);
}
.config-bool-toggle__opt {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 5px 14px;
  min-width: 44px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.config-bool-toggle__opt + .config-bool-toggle__opt {
  border-left: 1px solid var(--border);
}
.config-bool-toggle__opt:hover:not(.config-bool-toggle__opt--active) {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.config-bool-toggle__opt--active {
  background: rgba(232, 52, 74, 0.18);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-dim);
}
.config-bool-toggle__opt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  z-index: 1;
}
.config-bool-toggle--triple {
  flex: 1 1 auto;
  max-width: 100%;
}
.modal--config .config-bool-toggle--triple .config-bool-toggle__opt {
  flex: 1 1 0;
  min-width: 0;
  padding: 5px 8px;
  letter-spacing: 0.08em;
}
.slider-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--accent);
}
input[type=range] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

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

.section-label.streamers-heading {
  color: var(--text-secondary);
  letter-spacing: 0.2em;
  font-size: 12px;
  font-weight: 500;
  margin: 0;
}

.sort-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}
.sort-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sort-by-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.sort-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.filter-actions-row {
  display: flex;
  gap: 6px;
  width: 100%;
}
.filter-actions-row .sort-btn {
  flex: 1;
  min-width: 0;
  justify-content: center;
  text-align: center;
}
.sidebar-streamer-search {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.sidebar-streamer-search::placeholder {
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: 0.04em;
}
.online-filter-btn,
.deselect-all-btn {
  display: flex;
  align-items: center;
}
.sort-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}
.sort-btn:hover { border-color: var(--border-bright); color: var(--text-secondary); }
.sort-btn.active { border-color: var(--accent-dim); color: var(--accent); background: rgba(232,52,74,0.08); }

.streamer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 9px;
  position: relative;
  transition: border-color 0.2s;
}
.streamer-card.in-game { border-color: var(--green-dim); }
.streamer-card.in-game::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--green-live);
  border-radius: 4px 0 0 4px;
}
.streamer-card.variety { border-color: var(--purple-dim); }
.streamer-card.variety::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--purple-variety);
  border-radius: 4px 0 0 4px;
}
.streamer-card.live { border-color: var(--blue-dim); }
.streamer-card.live::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--blue-live);
  border-radius: 4px 0 0 4px;
}

.streamer-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 6px;
  min-width: 0;
}
/* In-game overview tree lives in .streamer-accounts; keep top block compact. */
.streamer-card.in-game .streamer-top:not(:has(.streamer-ingame-loadout)) {
  margin-bottom: 4px;
}
.streamer-card--multi-acc .streamer-top {
  margin-bottom: 4px;
}
/* In-game: nudge tree so root spine lines up with streamer avatar (tune with avatar size / card padding). */
.streamer-card.in-game .streamer-accounts .sidebar-acc-tree {
  padding-left: 0;
  margin-left: 8px;
  box-sizing: border-box;
}
/* Live/offline/etc.: lighter indent so branches sit nearer the streamer icon center. */
.streamer-card--has-avatar:not(.in-game) .streamer-accounts .sidebar-acc-tree {
  padding-left: 8px;
  box-sizing: border-box;
}
.streamer-top__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.streamer-top__main > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}
.streamer-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: min-content;
}

/* First sweep: per-streamer status lane (Spectator) not finished yet — three bars, L→R pulse */
.streamer-status-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 14px;
  flex: 0 0 auto;
  vertical-align: middle;
  box-sizing: border-box;
}
.streamer-status-loading__bar {
  display: block;
  width: 2px;
  height: 8px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.22);
  transform-origin: center center;
  animation: streamer-status-bar-wave 0.95s ease-in-out infinite;
}
.streamer-status-loading__bar:nth-child(1) {
  animation-delay: 0s;
}
.streamer-status-loading__bar:nth-child(2) {
  animation-delay: 0.16s;
}
.streamer-status-loading__bar:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes streamer-status-bar-wave {
  0%,
  100% {
    transform: scaleY(0.62) scaleX(1);
    background: rgba(255, 255, 255, 0.22);
  }
  40% {
    transform: scaleY(1.45) scaleX(1.65);
    background: var(--accent, #e8344a);
  }
  55% {
    transform: scaleY(0.62) scaleX(1);
    background: rgba(255, 255, 255, 0.22);
  }
}
/* Linked account row: Riot account-v1 still queued or failed (after add/edit timeout or bad Riot ID). */
.streamer-status-loading--sidebar-acc {
  height: 12px;
  gap: 2px;
  flex: 0 0 auto;
}
.streamer-status-loading--sidebar-acc .streamer-status-loading__bar {
  width: 2px;
  height: 6px;
}
/* Same slot as 16×16 profile icon beside summoner link (see .sidebar-tree-section-icon--account-row img). */
.streamer-status-loading--sidebar-acc-icon {
  height: 16px;
  width: 16px;
  flex: 0 0 16px;
  align-self: center;
  gap: 2px;
  box-sizing: border-box;
}
.streamer-status-loading--sidebar-acc-icon .streamer-status-loading__bar {
  height: 7px;
}
.sidebar-account-puuid-msg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
}
.sidebar-account-puuid-msg.sidebar-account-puuid-msg--pending {
  font-weight: 400;
}
.sidebar-account-puuid-msg.sidebar-account-puuid-msg--pending .sidebar-account-puuid-msg__text {
  font-weight: 400;
}
/* Pending verify: loader + label sit in rank row (see `.sidebar-acc-tree-stats--account-pending`). */
.sidebar-acc-tree-stats-body--account-pending {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.streamer-accounts .sidebar-acc-tree-stats--account-pending .sidebar-account-puuid-msg {
  margin: 0;
}
.sidebar-account-puuid-msg__text {
  color: var(--text-secondary);
  min-width: 0;
}
.sidebar-account-puuid-msg--invalid {
  color: var(--accent, #e8344a);
  font-weight: 600;
  flex-wrap: wrap;
}
.sidebar-account-puuid-msg--invalid-found {
  color: var(--accent, #e8344a);
  font-weight: 400;
  letter-spacing: 0.06em;
}
/* Invalid linked account: error label sits under summoner row (same tree slot as rank/W–L). */
.streamer-accounts .sidebar-acc-tree-stats--account-invalid-msg .sidebar-account-puuid-msg {
  margin: 0;
}
/* Timer + label as one horizontal pill (shared chrome; modifiers set border + segment colors). */
.status-badge-split {
  display: inline-flex;
  flex-direction: row;
  align-items: stretch;
  flex: 0 0 auto;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 2px;
  overflow: hidden;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}
.status-badge-split--ingame {
  border-color: var(--green-live);
}
.status-badge-split__time,
.status-badge-split__label {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 0;
  padding-block: 3px;
  box-sizing: border-box;
  line-height: 1;
  white-space: nowrap;
  /* Plex Mono: grid center is correct; caps still read ~1px low in the cell */
  transform: translateY(-1px);
}
.status-badge-split__time {
  min-width: max(44px, min-content);
  padding-inline: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.status-badge-split__label {
  padding-inline: 7px;
  background: var(--green-dim);
  color: var(--green-live);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-left: 1px solid rgba(61, 220, 132, 0.35);
}
/* LIVE / VARIETY: same box as in-game; only palette differs. */
.status-badge-split--live {
  border-color: var(--blue-live);
}
.status-badge-split--live .status-badge-split__label {
  background: var(--blue-dim);
  color: var(--blue-live);
  border-left-color: rgba(56, 189, 248, 0.35);
}
.status-badge-split--variety {
  border-color: var(--purple-variety);
}
.status-badge-split--variety .status-badge-split__label {
  background: var(--purple-dim);
  color: var(--purple-variety);
  border-left-color: rgba(167, 139, 250, 0.35);
}
.sidebar-ingame-timer,
.sidebar-live-uptime-timer {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: inherit;
}

.streamer-favorite-btn {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--border-bright);
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 0;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.streamer-favorite-btn .streamer-favorite-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.streamer-favorite-btn .streamer-favorite-svg {
  display: block;
  flex-shrink: 0;
}
.streamer-favorite-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-dim);
  background: rgba(232,52,74,0.06);
}
.streamer-favorite-btn--on {
  border-color: var(--accent-dim);
  background: rgba(232, 52, 74, 0.1);
}
.streamer-favorite-btn--on .streamer-favorite-icon {
  color: #fff;
}
.streamer-favorite-btn--on:hover {
  border-color: var(--accent);
  background: rgba(232,52,74,0.16);
}
.streamer-favorite-btn--on:hover .streamer-favorite-icon {
  color: #fff;
}

.streamer-name {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  min-width: 0;
}

/* Same box model for every chip — VARIETY used to have translateY(-1px) alone, which made LIVE look “lower” */
.status-badge {
  display: inline-grid;
  place-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 2px;
  box-sizing: border-box;
  vertical-align: middle;
  transform: translateY(-1px);
}
.status-badge.ingame           { background: var(--green-dim);              color: var(--green-live); }
.status-badge.variety          { background: var(--purple-dim);            color: var(--purple-variety); }
.status-badge.live             { background: var(--blue-dim);               color: var(--blue-live); }
.status-badge.offline          { background: rgba(255,255,255,0.04);        color: var(--text-dim); }
.status-badge.loading          { background: rgba(255,255,255,0.04);        color: var(--text-dim); }

.streamer-accounts {
  font-family: 'IBM Plex Mono', monospace;
  /* Sidebar itself is zoomed by --ui-scale; counter-scale only a bit so Large can still read larger. */
  font-size: clamp(9px, calc(10px - (var(--ui-scale, 1.25) - 1.25) * 2px), 10px);
  color: var(--text-secondary);
  --sidebar-tree-line-h: 1.32;
  line-height: var(--sidebar-tree-line-h);
  overflow-wrap: break-word;
  letter-spacing: 0.012em;
  /*
   * Tree toggles (SVG): snap control to ~1 monospace cell, harmonize `──`→button gaps, tail before label.
   * In-game alignment: nudge whole `sidebar-tree-branch` rows + section-gap (not `__body` alone) so `│`
   * runs through head + children without a kink at head/body boundaries.
   */
  /* Branch glyph → toggle: flex gap 0 everywhere; SVG is left-aligned in the hit box (see `.sidebar-tree-toggle__sym`). */
  --sidebar-tree-toggle-branch-gap: 0;
  --sidebar-tree-toggle-inline-w: max(1.16em, 1.22ch);
  --sidebar-tree-toggle-after-w: 0.62ch;
  --sidebar-tree-toggle-label-pad: 0.08em;
  --sidebar-tree-toggle-slot: calc(
    var(--sidebar-tree-toggle-branch-gap) + var(--sidebar-tree-toggle-inline-w) + var(--sidebar-tree-toggle-after-w)
  );
  /* Spine alignment: avoid padding/transform on `.sidebar-acc-tree-glyph__branch` — it breaks the 4-char monospace grid; adjust `sidebarTreeGutter.js` vs this slot if needed. */
  --sidebar-tree-toggle-branch-gap-nested: 0;
  --sidebar-tree-toggle-branch-gap-ingame-root: var(--sidebar-tree-toggle-branch-gap-nested);
  /* Horizontal nudge for branch rows under ingame-root (`margin-left: calc(-1 * …)` below). Keep 0 unless tuning. */
  --sidebar-tree-ingame-sibling-nudge: 0;
}

/* Uniform row height across all streamer states (matches in-game spacing). */
.streamer-accounts {
  --sidebar-tree-row-min-h: max(1.55em, 18px);
}
.streamer-accounts .sidebar-tree-branch__head,
.streamer-accounts .sidebar-acc-tree-stats,
.streamer-accounts .sidebar-ingame-tree-loadout__line {
  min-height: var(--sidebar-tree-row-min-h);
}
.streamer-accounts .sidebar-acc-tree-node--section-gap .sidebar-acc-tree-name {
  min-height: 0;
}
/*
 * Monospace branch spans use a tall line-height; the square toggle is shorter, so flex cross-axis “center”
 * sits visually high vs `├`/`─` and folder text — nudge the hit target down in-game only.
 */
.streamer-card.in-game .streamer-accounts .sidebar-tree-toggle--inline {
  transform: translateY(0.5px);
}
.streamer-card.in-game .streamer-accounts .sidebar-tree-toggle--inline:active {
  transform: translateY(1px);
}
.streamer-accounts br.sidebar-acc-row-break {
  line-height: 0;
  margin: 0;
  height: 0;
  display: block;
  font-size: 0; /* kills the line box entirely */
}
/* Linked accounts: tree list (├── / └── name line, │ └── /     └── stats line). */
.streamer-accounts .sidebar-acc-tree {
  display: block;
  /* Inherit from .streamer-accounts would widen every box-drawing cell — keep tree at 0 tracking */
  letter-spacing: normal;
}
/* Box-drawing must not inherit em-based tracking or `│` / `──` columns visually separate */
.streamer-accounts .sidebar-acc-tree-glyph,
.streamer-accounts .sidebar-acc-tree-glyph--inline-toggle,
.streamer-accounts .sidebar-acc-tree-glyph--inline-toggle .sidebar-acc-tree-glyph__branch {
  letter-spacing: normal;
}
.streamer-accounts .sidebar-acc-tree-node {
  display: block;
}
.streamer-accounts .sidebar-acc-tree-node + .sidebar-acc-tree-node {
  margin-top: 0.08em;
}
.streamer-accounts .sidebar-acc-tree-node--section-gap {
  height: auto;
  min-height: 0;
  margin-top: 0 !important;
}
.streamer-accounts .sidebar-acc-tree-name {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  line-height: var(--sidebar-tree-line-h);
}
.streamer-accounts .sidebar-acc-tree-name .sidebar-acc-tree-glyph {
  flex: 0 0 auto;
  color: var(--text-secondary);
  opacity: 0.82;
  user-select: none;
  white-space: pre;
  line-height: var(--sidebar-tree-line-h);
  font-size: inherit;
}
.streamer-accounts .sidebar-account-link.sidebar-account-link--tree {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  /* Brighter than folder / stats tree copy, softer than pure white */
  color: #d4dae4;
}
.streamer-accounts .sidebar-account-link.sidebar-account-link--tree:link,
.streamer-accounts .sidebar-account-link.sidebar-account-link--tree:visited {
  color: #d4dae4;
}
.streamer-accounts .sidebar-account-link.sidebar-account-link--tree:hover {
  color: var(--text-secondary);
}
.streamer-accounts .sidebar-account-link.sidebar-account-link--tree:active {
  color: #6d7382;
}
.streamer-accounts .sidebar-acc-tree-name + .sidebar-acc-tree-stats {
  margin-top: 0.08em;
}
.streamer-accounts .sidebar-acc-tree-stats + .sidebar-acc-tree-stats {
  margin-top: 0.08em;
}
.streamer-accounts .sidebar-acc-tree-stats {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  color: var(--text-secondary);
  opacity: 0.95;
  cursor: default;
  overflow-wrap: normal;
  word-break: normal;
  line-height: var(--sidebar-tree-line-h);
}
.streamer-accounts .sidebar-acc-tree-stats .sidebar-acc-tree-glyph {
  flex: 0 0 auto;
  color: var(--text-secondary);
  opacity: 0.82;
  user-select: none;
  white-space: pre;
  line-height: var(--sidebar-tree-line-h);
  font-size: inherit;
}
.streamer-accounts .sidebar-acc-tree-stats-body {
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* W/L row: icon + numbers share a tall tree line-height; inline baseline sits high vs the 16px swords mask — center as a flex row. */
.streamer-accounts .sidebar-acc-tree-stats-body:has(.sidebar-tree-section-icon--wl) {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
}
/* Rank row: flex aligns crest + rank spans; `translateY` threw off the branch midline — keep neutral. */
.streamer-accounts .sidebar-acc-tree-stats-body:has(.sidebar-rank-mini-crest) {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
}
/* Inline-flex collapses the literal space between tier span and `#n` span — restore gap before leaderboard #. */
.streamer-accounts .sidebar-acc-tree-stats-body:has(.sidebar-rank-mini-crest) .sidebar-rank-lb {
  margin-left: 0.35ch;
}
.streamer-accounts .sidebar-acc-tree-name .sidebar-acc-region-only {
  margin-left: 0.35em;
}
.streamer-accounts .sidebar-acc-region-only {
  color: var(--text-secondary);
  opacity: 0.88;
  flex-shrink: 0;
}
.streamer-accounts .sidebar-acc-summoner {
  overflow-wrap: normal;
}

/* Collapsible tree sections (HWMonitor-style +/- toggle) */
.streamer-accounts .sidebar-tree-branch {
  display: block;
}
.streamer-accounts .sidebar-tree-branch__head {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  line-height: var(--sidebar-tree-line-h);
}
.streamer-accounts .sidebar-tree-branch__head .sidebar-acc-tree-glyph--inline-toggle {
  flex: 0 0 auto;
}
.streamer-accounts .sidebar-tree-branch__head .sidebar-tree-folder-title,
.streamer-accounts .sidebar-tree-branch__head .streamer-copresence-branch-title {
  flex: 0 1 auto;
  min-width: 0;
}
.streamer-accounts .sidebar-tree-branch__body {
  display: block;
}
/* Move each branch block + spine gap row left together (avoid margin on `__body` only — that broke `│` through heads) */
.streamer-accounts
  .sidebar-tree-branch--ingame-root
  .sidebar-tree-branch__body
  > :is(.sidebar-ingame-root-mid-wrap, .sidebar-tree-branch) {
  margin-left: calc(-1 * var(--sidebar-tree-ingame-sibling-nudge));
}
.streamer-accounts .sidebar-tree-branch--collapsed .sidebar-tree-branch__body {
  display: none;
}
/* In-game root: collapse hides the entire game subtree (including “Other Accounts”). */
.streamer-accounts .sidebar-ingame-root-mid-wrap {
  display: block;
}
.streamer-accounts .sidebar-tree-branch__body > .sidebar-acc-tree-node + .sidebar-acc-tree-node {
  margin-top: 0.08em;
}
.streamer-accounts .sidebar-tree-branch__body > .sidebar-tree-branch + .sidebar-tree-branch {
  margin-top: 0.08em;
}
.streamer-accounts .sidebar-tree-branch--ingame-root .sidebar-tree-branch__body > .sidebar-tree-branch + .sidebar-tree-branch {
  margin-top: 0;
}
.streamer-accounts .sidebar-tree-branch__body > .sidebar-tree-branch--nested-account {
  display: block;
}
.streamer-accounts .sidebar-tree-branch__body > .sidebar-tree-branch--nested-account + .sidebar-tree-branch--nested-account {
  margin-top: 0.08em;
}
.streamer-accounts .sidebar-tree-branch__body .sidebar-acc-tree-glyph--inline-toggle {
  gap: var(--sidebar-tree-toggle-branch-gap-nested);
}
.streamer-accounts .sidebar-tree-branch--ingame-root > .sidebar-tree-branch__head .sidebar-acc-tree-glyph--inline-toggle {
  gap: var(--sidebar-tree-toggle-branch-gap-ingame-root);
}
/* Account / Loadout / … folder heads: direct child branch under game body — use nested gap (same as summoner toggle) */
.streamer-accounts .sidebar-tree-branch--ingame-root > .sidebar-tree-branch__body > .sidebar-tree-branch > .sidebar-tree-branch__head .sidebar-acc-tree-glyph--inline-toggle {
  gap: var(--sidebar-tree-toggle-branch-gap-nested);
}
.streamer-accounts .sidebar-acc-tree-glyph--inline-toggle {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--sidebar-tree-toggle-branch-gap);
  white-space: pre;
  line-height: var(--sidebar-tree-line-h);
  font-size: inherit;
  color: var(--text-secondary);
  opacity: 0.82;
  user-select: none;
  /* max-content: do not let flex shrink the branch+toggle below intrinsic width (avoids “everything slid left”). */
  width: max-content;
  max-width: 100%;
}
.streamer-accounts .sidebar-acc-tree-glyph--inline-toggle .sidebar-acc-tree-glyph__branch {
  flex: 0 0 auto;
  white-space: pre;
}
/* Thin-space tail after toggle; width caps monospace double-cell blow-up */
.streamer-accounts .sidebar-tree-toggle-after-gap {
  display: inline-block;
  width: var(--sidebar-tree-toggle-after-w);
  overflow: hidden;
  white-space: pre;
  user-select: none;
  vertical-align: baseline;
  line-height: inherit;
  font-size: inherit;
}
.streamer-accounts .sidebar-tree-branch__head > .sidebar-tree-folder-title,
.streamer-accounts .sidebar-tree-branch__head > .streamer-copresence-branch-title {
  margin-left: var(--sidebar-tree-toggle-label-pad);
  transform: translateY(0.02em);
}
.streamer-accounts .sidebar-tree-branch__head.sidebar-acc-tree-name > .sidebar-account-link {
  margin-left: var(--sidebar-tree-toggle-label-pad);
  transform: translateY(0.02em);
}
.streamer-accounts .sidebar-tree-toggle--inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  /* Hit target; SVG sits at start of box (`.sidebar-tree-toggle__sym`) to meet `──` / `├` */
  width: var(--sidebar-tree-toggle-inline-w);
  height: var(--sidebar-tree-toggle-inline-w);
  min-width: var(--sidebar-tree-toggle-inline-w);
  min-height: var(--sidebar-tree-toggle-inline-w);
  box-sizing: border-box;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: rgba(188, 202, 222, 0.88);
  cursor: pointer;
  flex-shrink: 0;
  font: inherit;
  line-height: 1;
  vertical-align: middle;
  transition:
    color 0.12s ease,
    transform 0.08s ease;
}
.streamer-accounts .sidebar-tree-toggle--inline .sidebar-tree-toggle__sym {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  line-height: 0;
  pointer-events: none;
}
.streamer-accounts .sidebar-tree-toggle--inline .sidebar-tree-toggle__icon {
  display: block;
  width: 88%;
  height: 88%;
  flex-shrink: 0;
  overflow: visible;
}
.streamer-accounts .sidebar-tree-toggle--inline:hover {
  color: rgba(240, 245, 255, 0.98);
}
.streamer-accounts .sidebar-tree-toggle--inline:active {
  transform: scale(0.92);
  color: rgba(255, 255, 255, 0.92);
}
.streamer-accounts .sidebar-tree-toggle--inline:focus-visible {
  outline: 1px solid rgba(120, 165, 220, 0.9);
  outline-offset: 1px;
}

/* In-Game unified tree: folder labels only (glyphs use default .sidebar-acc-tree-glyph). */
.streamer-accounts .sidebar-tree-section-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  box-sizing: border-box;
  margin-right: 0.52ch;
  transform: translateY(0);
  opacity: 0.92;
}
.streamer-accounts .sidebar-tree-section-icon--tint {
  /* Neutral, softer than full white; parent `.sidebar-tree-section-icon` opacity applies on top. */
  background-color: rgba(255, 255, 255, 0.82);
  -webkit-mask-image: var(--sidebar-tree-icon-mask);
  mask-image: var(--sidebar-tree-icon-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.streamer-accounts .sidebar-tree-section-icon--account-row {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
}
.streamer-accounts .sidebar-tree-section-icon--wl {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin-right: 0.7ch;
  opacity: 0.9;
  transform: translateY(0);
}
.streamer-accounts .sidebar-tree-folder-title {
  font-weight: 400;
  letter-spacing: 0.012em;
}
.streamer-accounts .sidebar-tree-folder-title--ingame,
.streamer-accounts .sidebar-tree-folder-title--account,
.streamer-accounts .sidebar-tree-folder-title--loadout,
.streamer-accounts .sidebar-tree-folder-title--loadout-sub,
.streamer-accounts .sidebar-tree-folder-title--accounts {
  color: #a2aab8;
}

.streamer-accounts .sidebar-ingame-tree-loadout__line {
  display: inline-flex;
  align-items: center;
  /* ~one monospace cell so icon rows line up with text-only tree rows */
  gap: 0.78ch;
  min-height: max(1.34em, 18px);
  line-height: var(--sidebar-tree-line-h);
}
.streamer-accounts .sidebar-ingame-tree-loadout__icon {
  width: 16px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  vertical-align: middle;
  margin-right: 0;
  background: rgba(0, 0, 0, 0.18);
  display: block;
  flex: 0 0 auto;
  transform: translateY(2px);
}
.streamer-accounts .sidebar-ingame-tree-loadout__icon--rune {
  width: 16px;
  height: 16px;
  border: none;
  background: transparent;
  border-radius: 0;
  object-fit: contain;
}
.streamer-accounts .sidebar-ingame-tree-loadout__icon--rune-secondary {
  width: 13px;
  height: 13px;
}
/*
 * Masked rune-tree SVGs use an external URL; `transform` on the same node (from
 * `.sidebar-ingame-tree-loadout__icon`) can break mask compositing in Chromium while
 * plain `<img>` keystones still paint. Tooltips render under `body` without this transform.
 */
.streamer-accounts .sidebar-rune-tree-icon.sidebar-ingame-tree-loadout__icon {
  transform: none;
}
.streamer-accounts .sidebar-ingame-tree-loadout__text {
  color: inherit;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: var(--sidebar-tree-line-h);
  transform: translateY(2px);
}
/* Secondary path row: masked tree icon has `transform: none` (mask fix); drop text nudge so label centers with 13px glyph. */
.streamer-accounts
  .sidebar-ingame-tree-loadout__line:has(.streamer-ingame-loadout__rune-hit--secondary)
  .sidebar-ingame-tree-loadout__text {
  transform: translateY(0);
}
.streamer-accounts .streamer-ingame-loadout__spell-hit,
.streamer-accounts .streamer-ingame-loadout__rune-hit,
.streamer-accounts .streamer-ingame-loadout__champ-hit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  margin-right: 0;
  line-height: var(--sidebar-tree-line-h);
  vertical-align: middle;
  transform: none;
}
.streamer-accounts .sidebar-acc-tree-stats-body--loadout-leaf {
  overflow: visible;
  text-overflow: clip;
}

/* Copresence folders embedded in the account tree */
.streamer-accounts .streamer-copresence-tree__section {
  display: block;
}
.streamer-accounts .streamer-copresence-tree__title-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  line-height: var(--sidebar-tree-line-h);
}
.streamer-accounts .streamer-copresence-tree__title-row .streamer-copresence-branch-title {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 400;
  letter-spacing: 0.012em;
  color: #a2aab8;
}
.streamer-accounts .streamer-copresence-tree__section .sidebar-tree-branch__body > .streamer-copresence-tree__peer-row:first-child {
  margin-top: 0.08em;
}
.streamer-accounts .streamer-copresence-tree__section .sidebar-tree-branch__body .streamer-copresence-tree__peer-row + .streamer-copresence-tree__peer-row {
  margin-top: 0.08em;
}
.streamer-accounts .streamer-copresence-tree__peer-row {
  color: var(--text-secondary);
  opacity: 0.95;
}
.streamer-accounts .streamer-copresence-tree__peer-row .sidebar-acc-tree-stats-body {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
.streamer-accounts .streamer-copresence-tree__peer-body {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  line-height: 1.45;
}
.streamer-accounts .streamer-copresence-peer {
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  border-radius: 0;
}
.streamer-accounts .streamer-copresence-peer__label {
  color: #a2aab8;
  transition: color 0.12s ease, text-decoration-color 0.12s ease, text-underline-offset 0.12s ease;
}
.streamer-accounts .streamer-copresence-peer:hover {
  background: transparent;
}
.streamer-accounts .streamer-copresence-peer:hover .streamer-copresence-peer__label {
  color: #c3cada;
  text-decoration: underline;
  text-decoration-color: rgba(162, 170, 184, 0.75);
  text-underline-offset: 0.18em;
}
.streamer-accounts .streamer-copresence-peer:active .streamer-copresence-peer__label {
  color: #6d7382;
}
.streamer-accounts .streamer-copresence-peer:focus-visible {
  outline: 1px solid var(--accent-dim);
  outline-offset: 1px;
}
.streamer-accounts .streamer-copresence-peer__avatar {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}
.streamer-accounts .streamer-copresence-peer__avatar--placeholder {
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
  border-radius: 50%;
  min-width: 15px;
  min-height: 15px;
  width: 15px;
  height: 15px;
}
.streamer-accounts .streamer-copresence-peer__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}
.streamer-accounts .sidebar-stat-win-count {
  color: #6bcf7f;
  font-weight: 400;
}
.streamer-accounts .sidebar-stat-loss-count {
  color: #e07070;
  font-weight: 400;
}
.streamer-accounts .sidebar-rank-paren {
  color: var(--text-secondary);
  opacity: 0.88;
}
.streamer-accounts .sidebar-rank-lb {
  font-weight: 400;
}
.streamer-accounts .sidebar-rank-lb--rest {
  color: var(--text-secondary);
  opacity: 0.9;
}
.streamer-accounts .sidebar-rank-lb--gold {
  color: #e8c547;
  text-shadow: 0 0 12px rgba(232, 197, 71, 0.22);
}
.streamer-accounts .sidebar-rank-lb--silver {
  color: #c5cedd;
  text-shadow: 0 0 10px rgba(197, 206, 221, 0.18);
}
.streamer-accounts .sidebar-rank-lb--bronze {
  color: #d18b52;
  text-shadow: 0 0 10px rgba(209, 139, 82, 0.2);
}
.streamer-accounts .sidebar-stat-sep {
  color: var(--text-secondary);
  opacity: 0.85;
  font-weight: 400;
}
.streamer-accounts .sidebar-stat-sep.sidebar-stat-sep--em {
  font-weight: 500;
  opacity: 0.88;
  letter-spacing: 0.02em;
}
.streamer-accounts .sidebar-rank + .sidebar-rank-paren {
  margin-left: 0.18em;
}
.streamer-accounts .sidebar-account-link {
  color: inherit;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s ease;
}
.streamer-accounts .sidebar-account-link:link,
.streamer-accounts .sidebar-account-link:visited,
.streamer-accounts .sidebar-account-link:active {
  color: inherit;
}
.streamer-accounts .sidebar-account-link:hover {
  color: var(--text-primary);
}
.streamer-accounts .sidebar-panel-sep {
  color: var(--text-secondary);
  opacity: 0.88;
  margin: 0 3px;
}
.streamer-accounts .sidebar-wr-paren {
  color: var(--text-secondary);
  opacity: 0.88;
}
.streamer-accounts .sidebar-accounts-more {
  font-size: max(8px, 0.9em);
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.streamer-accounts .sidebar-rank {
  font-weight: 500;
}
.streamer-accounts .sidebar-rank-mini-crest {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  /* Match `.sidebar-tree-section-icon--wl` gap so rank line breathes like W/L + swords */
  margin-right: 0.7ch;
  flex-shrink: 0;
  object-fit: contain;
}
.streamer-accounts .sidebar-rank-pending,
.streamer-accounts .sidebar-rank-unranked {
  color: var(--text-dim);
  font-weight: 400;
}
.streamer-accounts .sidebar-wr {
  font-weight: 400;
  font-size: 1em;
}
.streamer-accounts .sidebar-wr--wr-na {
  color: var(--text-dim);
  font-weight: 400;
}
.streamer-accounts .sidebar-wr--wr-bad {
  color: #b86b70;
}
.streamer-accounts .sidebar-wr--wr-near50 {
  color: #9aa3b2;
}
.streamer-accounts .sidebar-wr--wr-fiftys {
  color: #89b4e8;
}
.streamer-accounts .sidebar-wr--wr-green {
  color: #7dcea0;
}
.streamer-accounts .sidebar-wr--wr-yellow {
  color: #e8d55d;
}
.streamer-accounts .sidebar-wr--wr-gold {
  color: #d4a84b;
}

.streamer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin-top: 11px;
}
.streamer-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.icon-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-bright);
  border-radius: 3px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 3px 6px;
  font-size: 11px;
  transition: all 0.15s;
  font-family: 'IBM Plex Mono', monospace;
}
.icon-btn:hover:not(.danger) {
  border-color: var(--accent-dim);
  color: var(--text-primary);
  background: rgba(232, 52, 74, 0.06);
}
.icon-btn.danger { color: var(--text-secondary); }
.icon-btn.danger:hover { border-color: var(--red-danger); color: var(--red-danger); }

/* In-game: full-width chip under streamer name — champion | spells | runes */
.streamer-ingame-loadout {
  width: auto;
  max-width: 100%;
  min-width: 0;
  padding-top: 1px;
  box-sizing: border-box;
}
.streamer-ingame-loadout__box {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px 0;
  width: auto;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 3px calc(7px + 2px * (var(--ui-scale, 1.25) - 1)) 3px calc(6px + 1px * (var(--ui-scale, 1.25) - 1));
  border: 1px solid var(--border-bright);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
/* 1px rules — border so every segment reads the same thickness (avoids subpixel flex oddities) */
.streamer-ingame-loadout__vsep {
  box-sizing: border-box;
  width: 0;
  flex: 0 0 0;
  align-self: center;
  height: 16px;
  margin: 0 calc(4px + 1px * (var(--ui-scale, 1.25) - 1));
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  background: none;
}
.streamer-ingame-loadout__champ-bit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: calc(3px + 2px * (var(--ui-scale, 1.25) - 1));
  min-width: 0;
  flex: 0 0 auto;
  max-width: 100%;
}
.streamer-ingame-loadout__champ-bit img {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  background: rgba(0, 0, 0, 0.25);
}
.streamer-ingame-loadout__champ-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  display: block;
  flex: 0 1 auto;
  max-width: 18ch;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.streamer-ingame-loadout__spells {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: calc(2px + 1px * (var(--ui-scale, 1.25) - 1));
  flex: 0 0 auto;
  min-width: 0;
}
.streamer-ingame-loadout__runes {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 2px;
  flex: 0 0 auto;
  min-width: 0;
  justify-content: center;
}
.streamer-ingame-loadout__spell-hit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  line-height: 0;
  flex-shrink: 0;
  cursor: default;
}
.streamer-ingame-loadout__spell-icon {
  width: 16px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  display: block;
  box-sizing: border-box;
}
.streamer-ingame-loadout__rune-hit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  flex-shrink: 0;
  cursor: default;
}
.streamer-ingame-loadout__rune-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 0;
  border: none;
  background: transparent;
  display: block;
  box-sizing: border-box;
}
.streamer-ingame-loadout__rune-icon--secondary {
  width: 13px;
  height: 13px;
}

/* Runes: CommunityDragon `{tree}/{tree}_icon.svg` tinted to match LoL path colors (mask + fill). */
.sidebar-rune-tree-icon {
  display: inline-block;
  flex-shrink: 0;
  box-sizing: border-box;
  vertical-align: middle;
  -webkit-mask-image: var(--sidebar-rune-tree-mask);
  mask-image: var(--sidebar-rune-tree-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.sidebar-rune-tree-icon--precision {
  background-color: #c8aa6e;
}
.sidebar-rune-tree-icon--domination {
  background-color: #e84057;
}
.sidebar-rune-tree-icon--sorcery {
  background-color: #6498ff;
}
.sidebar-rune-tree-icon--resolve {
  background-color: #53a76d;
}
.sidebar-rune-tree-icon--inspiration {
  background-color: #44c6c9;
}

/* Tree rows: `.sidebar-ingame-tree-loadout__icon--rune` uses `background: transparent` with higher specificity than `.sidebar-rune-tree-icon--*`, so path tints never applied — restore tint for masked secondaries. */
.streamer-accounts .sidebar-rune-tree-icon.sidebar-rune-tree-icon--precision {
  background-color: #c8aa6e;
}
.streamer-accounts .sidebar-rune-tree-icon.sidebar-rune-tree-icon--domination {
  background-color: #e84057;
}
.streamer-accounts .sidebar-rune-tree-icon.sidebar-rune-tree-icon--sorcery {
  background-color: #6498ff;
}
.streamer-accounts .sidebar-rune-tree-icon.sidebar-rune-tree-icon--resolve {
  background-color: #53a76d;
}
.streamer-accounts .sidebar-rune-tree-icon.sidebar-rune-tree-icon--inspiration {
  background-color: #44c6c9;
}

.sidebar-loadout-rune-tooltip .sidebar-rune-tree-icon.sidebar-rune-tree-icon--tooltip {
  width: calc(var(--chat-emote-h, 22px) * var(--emote-tooltip-scale, 1.75));
  height: calc(var(--chat-emote-h, 22px) * var(--emote-tooltip-scale, 1.75));
}

/* Copresence UI lives in `.streamer-accounts` (unified in-game tree); see rules under that block above. */

/* Reuse chat emote tooltip chrome (fixed to body; see sidebar.js) */
.sidebar-loadout-rune-tooltip {
  --chat-emote-h: 22px;
  --emote-tooltip-scale: 1.75;
  zoom: var(--ui-scale, 1.25);
  z-index: 10060;
}
.sidebar-loadout-rune-tooltip .chat-emote-tooltip__inner {
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
}
.sidebar-loadout-rune-tooltip .chat-emote-tooltip__text {
  max-width: 220px;
}
.sidebar-loadout-rune-tooltip .chat-emote-tooltip__preview {
  min-height: calc(var(--chat-emote-h, 22px) * var(--emote-tooltip-scale, 1.75));
}
.sidebar-loadout-rune-tooltip .chat-emote {
  height: calc(var(--chat-emote-h, 22px) * var(--emote-tooltip-scale, 1.75));
}
/* Hide hint line entirely (sidebar loadout uses icon + name only). */
.sidebar-loadout-rune-tooltip .chat-emote-tooltip__line--mod {
  display: none;
}

/* Speech-bubble arrow (points to hovered icon). */
.sidebar-loadout-rune-tooltip::after {
  content: '';
  position: absolute;
  left: var(--sidebar-tip-arrow-x, 50%);
  top: 100%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(20, 20, 22, 0.97);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
.sidebar-loadout-rune-tooltip.sidebar-loadout-tooltip--below::after {
  top: auto;
  bottom: 100%;
  border-top: 0;
  border-bottom: 8px solid rgba(20, 20, 22, 0.97);
}

.streamer-remove-confirm-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(10, 10, 14, 0.94);
  border: 1px solid var(--red-danger);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
}
.streamer-remove-confirm-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #ffe6e6;
  text-transform: uppercase;
}
.streamer-remove-confirm-actions {
  display: flex;
  gap: 8px;
}
.streamer-remove-confirm-btn {
  min-height: 0;
  padding: 5px 10px;
  font-size: 11px;
}
.streamer-remove-confirm-btn--yes {
  border-color: var(--red-danger);
  color: #fff2f2;
  background: rgba(255, 107, 107, 0.2);
}
.streamer-remove-confirm-btn--yes:hover {
  border-color: var(--red-danger);
  color: #fff;
  background: rgba(255, 107, 107, 0.28);
}

.add-form { display: flex; flex-direction: column; gap: 8px; }
.field-group { display: flex; flex-direction: column; gap: 4px; }
/* HTML [hidden] loses to .field-group { display:flex } without this */
.field-group[hidden] {
  display: none !important;
}
.field-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.field-label .field-label__paren {
  color: color-mix(in srgb, var(--text-dim) 78%, black);
  letter-spacing: 0.06em;
}
input[type=text]:not(.chat-input), select:not(.chat-send-target-select) {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
input[type=text]:not(.chat-input):focus, select:not(.chat-send-target-select):focus { border-color: var(--accent-dim); }
select:not(.chat-send-target-select) option { background: var(--bg-card); }

.account-entry {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
}
.account-entry--riot-invalid input.acc-name,
.account-entry--riot-invalid input.acc-tag,
.account-entry--riot-invalid .acc-region-flag-wrap select.acc-region {
  border-color: var(--accent, #e8344a);
}
/* Beat global `input:focus { border-color: accent }` so invalid rows stay red while editing. */
.account-entry--riot-invalid input[type=text].acc-name:focus,
.account-entry--riot-invalid input[type=text].acc-tag:focus,
.account-entry--riot-invalid .acc-region-flag-wrap select.acc-region:focus {
  border-color: var(--accent, #e8344a);
}
.account-entry .acc-region-flag-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.account-entry .acc-region-flag-wrap select.acc-region {
  width: 60px;
  flex: 0 0 60px;
}
.acc-riot-invalid-flag {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, #e8344a) 22%, transparent);
  color: var(--accent, #e8344a);
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  cursor: help;
  user-select: none;
}
.acc-riot-invalid-flag[hidden] {
  display: none !important;
}
/* Must beat input[type=text]:not(.chat-input) { width: 100% }. */
.account-entry input[type=text].acc-name {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: 160px;
}
.account-entry input[type=text].acc-tag {
  flex: 0 0 58px;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
}
.account-entry .acc-tag::placeholder {
  color: var(--text-dim);
  opacity: 0.85;
}
.acc-hash {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
  flex-shrink: 0;
  user-select: none;
}
.accounts-list { display: flex; flex-direction: column; gap: 4px; }

.accounts-riot-error {
  margin-top: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  line-height: 1.4;
  color: var(--red-danger);
  white-space: pre-wrap;
}

.config-error {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--red-danger);
  margin-top: 6px;
  display: none;
}

.main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.stream-area {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px;
  gap: 8px;
}
/* Focus mode: tight margins; dvh uses dynamic viewport when supported for a bit more usable height. */
