.lp-matches tbody tr { cursor: pointer; }
.lp-matches tbody tr:is(:hover, :focus-within) { background: #fff1c9; }
.lp-matches tbody td:first-child { padding: 0; }
.lp-open-match {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 33px;
  padding: 3px;
  border: 0;
  border-radius: 4px;
  color: inherit;
  background: transparent;
  text-align: left;
  font: inherit;
}
.lp-open-match svg { width: 12px; height: 12px; flex: none; transform: rotate(-90deg); }

#dialog:has(.sb-board) { width: min(1040px, calc(100% - 24px)); }
.sb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 13px;
}
.sb-meta time { font-weight: 650; color: var(--ink); }
.sb-teams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}
.sb-team {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.sb-team header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px;
  color: #fff;
  background: #272921;
}
.sb-team header h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: inherit; font-size: 16px; }
.sb-team header h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #8bc0ea; }
.sb-team[data-team="200"] header h3::before { background: #efa5a2; }
.sb-outcome { padding: 3px 7px; border-radius: 5px; color: #f5f4ee; background: #4a4c43; font-size: 12px; font-weight: 680; }
.sb-won { color: #35270b; background: #ffd477; }
.sb-team table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.3; }
.sb-team thead th { padding: 8px 4px; color: var(--muted); font-weight: 570; font-size: 11px; text-align: left; }
.sb-team :is(thead, tbody) tr > :first-child { padding-left: 11px; }
.sb-team :is(thead, tbody) tr > :last-child { padding-right: 11px; }
.sb-team thead abbr { text-decoration: none; }
.sb-team tbody tr { border-top: 1px solid var(--line); }
.sb-team tbody tr > * { padding: 5px 4px; height: 52px; vertical-align: middle; text-align: left; }
.sb-team [data-member="true"] { background: #fff1ca; box-shadow: inset 3px 0 #cb8d12; }
.sb-player { display: flex; align-items: center; gap: 7px; }
.sb-portrait, .sb-item {
  display: inline-grid;
  flex: none;
  position: relative;
  place-items: center;
  overflow: hidden;
  color: #595a52;
  background: #f0f0ea;
  font-weight: 650;
}
.sb-portrait { width: 32px; height: 32px; border-radius: 7px; }
.sb-item { width: 24px; height: 24px; border-radius: 4px; }
.sb-portrait > span, .sb-item > span {
  position: absolute;
  inset: 0 auto auto 0;
  width: 48px;
  height: 48px;
  transform-origin: top left;
  background-repeat: no-repeat;
}
.sb-portrait > span { transform: scale(.6666667); }
.sb-item > span { transform: scale(.5); }
.sb-name { overflow-wrap: anywhere; font-weight: 680; font-size: 13px; }
.sb-member-name { display: block; margin-top: 2px; color: #6a4910; font-size: 12px; }
.sb-kda { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 650; font-size: 12px; }
.sb-inventory { width: min-content; max-width: 100%; }
.sb-inventory-bar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 34px;
}
.sb-item-link, .sb-inventory-toggle, .sb-item-name-link {
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.sb-item-link, .sb-inventory-toggle {
  display: inline-grid;
  flex: none;
  place-items: center;
  min-width: 24px;
  min-height: 30px;
}
.sb-inventory-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.sb-inventory-toggle[aria-expanded="true"]::after { transform: rotate(225deg); }
.sb-inventory :is(.sb-item-link, .sb-inventory-toggle, .sb-item-name-link):focus-visible {
  outline: 2px solid #916306;
  outline-offset: 1px;
}
.sb-item-link:hover .sb-item, .sb-inventory-toggle:hover { box-shadow: 0 0 0 2px #bd8b2d; }
.sb-trinket { margin-left: 2px; box-shadow: 0 0 0 1px #aa8c46; }
.sb-empty { background: #edede6; box-shadow: inset 0 0 0 1px #ddddd3; }
.sb-item-names { display: grid; gap: 3px; margin: 1px 0 6px; padding: 0; list-style: none; color: var(--ink); font-size: 12px; }
.sb-item-names li:last-child { color: var(--muted); }
.sb-item-names[hidden] { display: none; }
.sb-item-name-link { min-height: 24px; text-align: left; text-decoration: underline; text-decoration-color: #c7ad75; text-underline-offset: 3px; }
@media (max-width: 930px) {
  #dialog:has(.sb-board) { width: min(680px, calc(100% - 24px)); }
  .sb-teams { grid-template-columns: 1fr; }
}
@media (max-width: 550px) {
  .lp-open-match { min-height: 44px; }
  .sb-team table, .sb-team tbody { display: block; }
  .sb-team thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .sb-team tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 5px;
    padding: 8px 11px 3px;
  }
  .sb-team tbody tr > *, .sb-team tbody tr > :first-child, .sb-team tbody tr > :last-child { padding: 0; height: auto; }
  .sb-team tbody tr > :last-child { grid-column: 1 / -1; }
  .sb-inventory { margin-left: 39px; }
  .sb-item-link, .sb-inventory-toggle { min-height: 44px; min-width: 27px; }
  .sb-item-name-link { min-height: 36px; }
}

#dialog:has(.sb-item-sheet) { width: min(590px, calc(100% - 24px)); }
.sb-item-price {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
  margin: 0 0 18px;
  padding: 10px 16px;
  border-radius: 9px;
  color: #4c3710;
  background: #fff0cb;
}
.sb-item-price dt { font-size: 12px; font-weight: 650; }
.sb-item-price dd { margin: 0; font-size: 21px; font-weight: 750; font-variant-numeric: tabular-nums; }
.sb-item-info { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; }
.sb-item-info section { min-width: 0; }
.sb-item-info h3 { margin: 0 0 8px; font-size: 16px; }
.sb-item-stats { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.sb-item-stats li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.sb-item-stats li:first-child { padding-top: 0; }
.sb-item-effects p, .sb-item-empty, .sb-item-stats {
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.sb-item-effects p, .sb-item-empty { margin: 0; white-space: pre-line; }
.sb-item-effects p + p { margin-top: 9px; }
.sb-item-empty { color: var(--muted); }
.sb-item-source { margin: 16px 0 0; color: var(--muted); font-size: 11px; }
@media (max-width: 500px) {
  .sb-item-info { grid-template-columns: minmax(0, 1fr); gap: 17px; }
}
@media (max-width: 355px) {
  .sb-inventory { margin-left: 0; }
}
