/* Full-page reports share the console's colors, with wider tables and larger type. */
html:has(body.host-report) {
  scrollbar-gutter: stable;
}
.host-report main {
  width: 100%;
  max-width: 1800px;
  padding: 14px clamp(12px, 2.5vw, 42px) 48px;
}

.host-report .site-header {
  gap: 10px 16px;
  padding: 8px 0 12px;
  margin-bottom: 14px;
}

.host-report .header-note {
  display: none;
}

.report-topbar {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px 12px;
  min-width: 0;
}

.report-location {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  min-width: 0;
}

.report-return {
  color: #b3c9f3;
  font-size: 14px;
  font-weight: 650;
}

.report-view-label {
  color: #eef4ff;
  font-size: 14px;
  overflow-wrap: anywhere;
}

#report-entry-info {
  color: #c5d2e9;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.report-page-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.report-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.report-tab,
.report-export {
  padding: 9px 12px;
  border: 1px solid #516383;
  border-radius: 8px;
  color: #e2ecff;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.report-tab[aria-current="page"] {
  border-color: #7198d1;
  background: #355483;
  color: #fff;
}

.report-export {
  margin-inline-start: 4px;
  border-color: transparent;
  color: #bad2fd;
}

.report-export.is-unavailable {
  visibility: hidden;
}

.report-tab:hover,
.report-export:hover {
  background: #2e425f;
}

.report-stage {
  min-width: 0;
}

.report-data,
.report-review {
  padding: clamp(12px, 1.6vw, 24px);
  border: 1px solid #384a65;
  border-radius: 14px;
  background: #1a2334;
}

.report-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 14px;
}

.report-tools label,
.report-review-navigation label {
  margin: 0;
  color: #d4e0f5;
  font-size: 14px;
  font-weight: 650;
}

.report-tools input,
.report-round-select,
.report-review-navigation select {
  max-width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #485c7d;
  border-radius: 8px;
  background: #131d2d;
  color: #edf3ff;
  font: inherit;
}

.report-tools input {
  width: min(100%, 282px);
}

.report-round-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-round-control label {
  white-space: nowrap;
}

.report-round-select {
  width: 158px;
}

.report-tools p {
  margin: 0 0 0 auto;
  color: #b7c8e4;
  font-size: 14px;
}

.report-scroll,
.report-review .pair-review-table-wrap {
  min-width: 0;
  max-height: min(67dvh, 770px);
  overflow: auto;
  border: 1px solid #465776;
  border-radius: 9px;
  scrollbar-color: #647898 #182339;
}

.report-scroll:focus-visible,
.report-review .pair-review-table-wrap:focus-visible {
  outline: 2px solid #94b9ff;
  outline-offset: 3px;
}

.report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.report-table :is(th, td) {
  padding: 9px 10px;
  border: 0;
  border-block-end: 1px solid #394a64;
}

.report-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #d4e4fe;
  background: #26354e;
  font-size: 13px;
  font-weight: 700;
}

.report-table tbody th {
  color: #eff5ff;
}

.report-unscored {
  color: #97a9c4;
}

.report-value {
  font-size: 18px;
  font-weight: 720;
}

.report-mini-link {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 5px;
  color: #c0d8ff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}

.report-mini-link:hover {
  background: #334d75;
  color: #fff;
}

.report-data {
  container: report-score-board / inline-size;
}

.report-score-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

@container report-score-board (min-width: 480px) {
  .report-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container report-score-board (min-width: 725px) {
  .report-score-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@container report-score-board (min-width: 970px) {
  .report-score-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@container report-score-board (min-width: 1200px) {
  .report-score-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.report-score-group {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  padding: 9px;
  border: 1px solid #465b7a;
  border-radius: 11px;
  background: #202d43;
}

.report-score-group-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 7px;
  min-height: 34px;
  margin-bottom: 8px;
}

.report-score-group-heading h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #eef4ff;
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.report-score-status {
  padding: 2px 6px;
  border: 1px solid #54637c;
  border-radius: 5px;
  color: #c9d6ea;
  font-size: 12px;
  white-space: nowrap;
}

.report-score-status[data-settled="true"] {
  border-color: #527e72;
  background: #203e3b;
  color: #bff1d9;
}

.report-score-group-heading .report-mini-link {
  min-height: 26px;
  padding: 3px 6px;
  border: 1px solid #4e6485;
}

.report-score-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.report-score-player {
  --choice-line: #455976;
  --choice-surface: #1b2940;
  --choice-text: #d5e3f9;
  display: grid;
  align-content: space-between;
  gap: 13px;
  min-width: 0;
  min-height: 168px;
  padding: 11px 9px 9px;
  border: 1px solid var(--choice-line);
  border-radius: 8px;
  background: var(--choice-surface);
}

.report-score-player[data-choice="red"] {
  --choice-line: #98596d;
  --choice-surface: #542d40;
  --choice-text: #ffd2d9;
}

.report-score-player[data-choice="blue"] {
  --choice-line: #627faf;
  --choice-surface: #2b436e;
  --choice-text: #d7e5ff;
}

.report-score-person {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 5px;
  min-width: 0;
}

.report-score-person h3 {
  max-width: 100%;
  margin: 0;
  color: #f5f7ff;
  font-size: clamp(17px, 1.3vw, 23px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.report-score-person small {
  flex-basis: 100%;
  min-width: 0;
  color: #e1e8f8;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.report-choice-label {
  padding: 1px 5px;
  border: 1px solid var(--choice-line);
  border-radius: 4px;
  background: #13203455;
  color: var(--choice-text);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.report-score-values {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 6px 7px;
  border-radius: 6px;
  background: #111b2c72;
  font-variant-numeric: tabular-nums;
}

.report-score-values > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1px 4px;
}

.report-score-values dt {
  color: #e6edfb;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.report-score-values dd {
  margin: 0;
  line-height: 1.2;
}

.report-score-total .report-value {
  color: #f4f7ff;
  font-size: 22px;
}

.report-score-total .report-value.negative {
  color: #ffb0b7;
}

.report-score-round .report-value {
  font-size: 17px;
}

.report-rank-points .report-value {
  font-size: 22px;
}

.report-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(12px, 1.4vw, 22px);
}

.report-rank-panel {
  --rank-accent: #acdcbf;
  min-width: 0;
  padding: clamp(11px, 1.35vw, 21px);
  border: 1px solid #45625f;
  border-radius: 14px;
  background: #1b292f;
}

.report-rank-negative {
  --rank-accent: #f3c397;
  border-color: #785e58;
  background: #2d2731;
}

.report-rank-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.report-rank-heading h2 {
  margin: 0;
  color: var(--rank-accent);
  font-size: clamp(22px, 2vw, 31px);
}

.report-rank-heading p {
  margin: 4px 0 0;
  color: #d3ddec;
  font-size: 13px;
}

.report-rank-count {
  color: var(--rank-accent);
  font-size: clamp(25px, 2.7vw, 38px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.report-rank-count small {
  font-size: 13px;
}

.report-rank-table {
  min-width: 445px;
  text-align: start;
  background: #192337;
}

.report-rank-table tbody tr:nth-child(even) {
  background: #202d43;
}

.report-rank-table tbody tr:hover {
  background: #273b54;
}

.report-rank-table tbody tr:last-child > * {
  border-block-end: 0;
}

.report-rank-table :is(th,td):nth-child(1),
.report-rank-table :is(th,td):nth-child(3),
.report-rank-table :is(th,td):last-child {
  text-align: center;
}

.report-rank-place {
  color: #b4c6e4;
  font-size: 19px;
  font-weight: 700;
}

.report-first {
  color: var(--rank-accent);
}

.report-rank-name > strong,
.report-rank-partner > span,
.report-rank-group > strong {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
}

.report-rank-name > strong {
  font-size: 16px;
}

.report-rank-name small {
  display: block;
  color: #b4c4e0;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.report-rank-group > strong {
  color: #dce9ff;
}

.report-empty {
  padding: clamp(24px, 4vw, 64px) 14px;
  margin: 0;
  border: 1px dashed #4a5a76;
  border-radius: 9px;
  color: #becce2;
  text-align: center;
}

#report-open-dialog {
  max-width: min(460px, calc(100% - 24px));
}

#report-open-dialog h2 {
  margin-bottom: 8px;
}

#report-open-dialog p {
  color: #c3d2e9;
  line-height: 1.6;
}

#report-open-dialog .actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.report-review-navigation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.report-review-navigation select {
  min-width: min(100%, 180px);
  max-width: min(100%, 420px);
}

.report-review-navigation .button {
  min-height: 42px;
  padding: 7px 12px;
}

.report-review-summary {
  margin: 0 0 12px;
  color: #becce2;
}

.report-review .review-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.report-review .review-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.report-review .review-table :is(th, td) {
  padding: 10px 8px;
  border: 0;
  border-inline-end: 1px solid #4b5e7a;
  border-block-end: 1px solid #4b5e7a;
  text-align: center;
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.35;
}

.report-review .review-table thead th,
.report-review .review-table th[scope="row"] {
  background: #27374e;
  color: #e0ebfd;
}

.report-review .review-table thead th[scope="colgroup"] {
  padding: 0;
  background: #473449;
  white-space: normal;
}

.report-review .review-table thead th.review-split[scope="colgroup"] {
  background: #293f65;
}

.report-review .review-table tbody tr:nth-child(even) {
  background: #222e43;
}

.report-review .review-table .review-split {
  border-inline-start: 3px solid #93a9c7;
}

.report-review .review-table .review-total {
  background: #2d4260;
  font-size: clamp(18px, 1.75vw, 25px);
  font-weight: 750;
}

.report-review .review-table thead .review-total {
  font-size: clamp(14px, 1.25vw, 18px);
}

.report-review .review-table .review-pending {
  color: #aebed9;
}

.report-review .review-discuss {
  color: #c3d5f0;
  font-size: 12px;
}

.report-review .review-person {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 12px;
  padding: 12px 16px;
  text-align: start;
}

.report-review .review-person > strong {
  font-size: clamp(22px, 2.2vw, 34px);
  overflow-wrap: anywhere;
}

.report-review .review-person > small {
  grid-row: 2;
  color: #cbd7eb;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.report-review .review-person > span {
  grid-column: 2;
  grid-row: 1 / 3;
  color: #dce8fb;
  font-size: 13px;
  text-align: end;
}

.report-review .review-person b {
  display: block;
  font-size: clamp(25px, 3vw, 43px);
  line-height: 1.05;
}

@media (max-width: 1020px) {
  .report-rank-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 550px) {
  .host-report .site-header {
    flex-wrap: wrap;
  }

  .report-topbar {
    order: 1;
    flex-basis: 100%;
  }

  .host-report #connection {
    margin-inline-start: auto;
  }

  .report-tools p {
    margin-inline-start: 0;
  }
}
