.match-result {
  position: absolute;
  left: calc(var(--left-rail, 0px) + 10px);
  right: calc(var(--right-rail, 0px) + 10px);
  top: 100px;
  max-height: calc(100% - 125px);
  z-index: 10;
  background: #fffaf0ed;
  border: 2px solid var(--winner);
  border-radius: 24px;
  box-shadow: 0 10px 50px #39342b25;
  backdrop-filter: blur(6px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.match-result h2 {
  font:
    800 clamp(24px, 3vw, 40px)/1.1 Bricolage,
    sans-serif;
  color: var(--winner-ink);
  margin: 10px 0 8px;
}
.result-minimize {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 0;
  background: transparent;
  color: #625744;
  font-size: 11px;
  cursor: pointer;
}
.result-subtitle {
  font-size: 12px;
  color: #625744;
  margin: 0 0 12px;
}
.result-scroll {
  min-height: 0;
  overflow-y: auto;
}
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.result-table thead {
  color: #625744;
  font-size: 11px;
}
.result-table th,
.result-table td {
  text-align: left;
  padding: 10px 5px;
  border-bottom: 1px solid #dfcba7;
}
.result-table tbody th {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 70px;
}
.result-position {
  font-size: 14px;
  color: #625744;
}
.result-table .result-points {
  font:
    800 27px Bricolage,
    sans-serif;
  color: #39342b;
}
.result-breakdown {
  font-size: 10px;
}
.result-breakdown span {
  display: inline-block;
  margin: 2px 7px 2px 0;
}
.result-breakdown b {
  color: #2446ed;
}
.result-highlights {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.result-highlights li {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #dfcba7;
  border-radius: 12px;
  background: #ffda5526;
  font-size: 11px;
}
.result-highlights strong {
  font-size: 13px;
}
.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}
.result-actions .button {
  font-size: 12px;
  min-height: 38px;
  padding: 8px 12px;
}
.result-actions small,
.result-history-note {
  font-size: 11px;
  color: #625744;
}
.result-reopen {
  position: absolute;
  left: 50%;
  top: 90px;
  transform: translateX(-50%);
  z-index: 8;
}
.victory-arrive {
  animation: mesa-victory 0.8s ease-out;
}
@keyframes mesa-victory {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  50% {
    box-shadow: 0 0 0 12px #ffda5550;
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 640px) {
  .match-result {
    left: 8px;
    right: 8px;
    top: 122px;
    max-height: calc(100% - 132px);
    border-radius: 20px;
    padding: 20px 12px 14px;
  }
  .match-result h2 {
    font-size: 27px;
    margin-top: 15px;
  }
  .result-table {
    font-size: 11px;
  }
  .result-table th,
  .result-table td {
    padding: 7px 3px;
  }
  .result-table tbody th {
    gap: 4px;
    min-height: 100px;
  }
  .result-table .player-avatar {
    width: 23px;
    height: 23px;
  }
  .result-table .result-points {
    font-size: 24px;
  }
  .result-breakdown {
    font-size: 9px;
    max-width: 145px;
  }
  .result-breakdown span {
    display: block;
    margin: 2px 0;
  }
  .result-actions {
    gap: 6px;
  }
  .result-actions .button {
    font-size: 11px;
    padding: 8px 9px;
  }
  .result-reopen {
    top: 122px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .victory-arrive {
    animation: none;
  }
}
.result-error {
  width: 100%;
  font-size: 12px;
  color: #b52b1d;
}
