/* Table-owned match result. The native canvas remains mounted beneath it. */
.superuno-end-screen {
  --surface: #4b060c;
  --text: #fff4d8;
  --border: #d6a94e;
  --accent: #f8cc60;
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: clamp(.65rem, 2.5vw, 1.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #6b0810;
  color: #fff4d8;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(.75rem, 1.8vw, .95rem);
  line-height: 1.5;
  text-align: start;
}

.superuno-end-panel {
  width: min(100%, 40rem);
  min-width: 0;
  margin: auto;
}

.superuno-end-heading {
  margin: 0 0 .75rem;
  color: #f8cc60;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(.85rem, 2.8vw, 1.3rem);
  line-height: 1.8;
  overflow-wrap: anywhere;
  text-align: center;
  text-shadow: 2px 2px #3f060a;
}

.superuno-end-scores {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.superuno-end-scores caption {
  padding: 0 0 .75rem;
  color: #fff4d8;
  text-align: center;
}

.superuno-end-scores :is(th, td) {
  padding: .55rem .35rem;
  border-bottom: 1px solid #a85045;
  text-align: end;
  vertical-align: middle;
}

.superuno-end-scores th:first-child {
  width: 48%;
  text-align: start;
}

.superuno-end-scores thead th {
  color: #f8cc60;
  font-size: .85em;
  font-weight: 600;
}

.superuno-end-scores tbody th {
  font-weight: 400;
}

.superuno-end-player {
  display: block;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.superuno-end-player-detail,
.superuno-end-ready {
  display: block;
  color: #e8c6a7;
  font-size: .8em;
  line-height: 1.5;
}

.superuno-end-winner :is(.superuno-end-player-detail, td:last-child) {
  color: #f8cc60;
  font-weight: 700;
}

.superuno-end-status {
  margin: .75rem 0;
  min-height: 1.5em;
  overflow-wrap: anywhere;
  text-align: center;
}

.superuno-end-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  padding: .6rem 0;
  background: #6b0810;
}

.superuno-end-actions button {
  flex: 1 1 8rem;
  min-width: 0;
  min-height: 44px;
  padding: .6rem .75rem;
  border: 2px solid #f8cc60;
  border-radius: 2px;
  background: #f8cc60;
  color: #3f060a;
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: 2px 2px 0 #3f060a;
}

.superuno-end-actions .superuno-end-leave {
  background: #4b060c;
  color: #fff4d8;
}

.superuno-end-actions button:disabled {
  cursor: default;
  opacity: .65;
}

.superuno-end-actions button:focus-visible {
  outline: 3px solid #fff4d8;
  outline-offset: 3px;
}

.superuno-end-screen [hidden],
.superuno-end-results:empty {
  display: none !important;
}

.superuno-end-results {
  margin-block-start: .75rem;
}

@media (max-height: 400px) and (orientation: landscape) {
  .superuno-end-screen { padding-block: .5rem; }
  .superuno-end-heading { margin-bottom: .25rem; }
  .superuno-end-scores caption { padding-bottom: .35rem; }
  .superuno-end-scores :is(th, td) { padding-block: .35rem; }
}
