#match-report-button {
  min-height: 30px;
  padding: 3px 8px;
  font-size: .8rem;
}

#match-report-dialog {
  --report-gutter: clamp(12px, 3vw, 24px);
  width: min(680px, calc(100% - 24px));
  max-width: calc(100% - max(12px, env(safe-area-inset-left)) - max(12px, env(safe-area-inset-right)));
  height: min(850px, calc(100dvh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom))));
  padding: 0;
  border-color: #92714a;
  overflow: hidden;
  background: #1b1713;
}

#match-report-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

#match-report-dialog::backdrop { background: #0a100dcc; }

.match-report-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--report-gutter);
  border-bottom: 1px solid #a781534d;
  background: linear-gradient(120deg, #37271c, #25201a);
}

.match-report-header h2 {
  color: var(--gold, #e8bd79);
  font: 700 24px/1.2 var(--display, serif);
  white-space: nowrap;
}

.match-report-save {
  color: var(--muted, #c6b5a1);
  font-size: .78rem;
  text-align: right;
}

.match-report-scroll {
  position: relative;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #8c6d4a #1b1713;
  scrollbar-gutter: stable both-edges;
  background: #151611;
}

.match-report-scroll:focus-visible {
  outline: 2px solid #f3cf8c;
  outline-offset: -2px;
}

.match-report-poster {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  pointer-events: auto;
  -webkit-touch-callout: default;
}

.match-report-status {
  padding: 4rem var(--report-gutter);
  color: var(--muted, #c6b5a1);
  text-align: center;
}

.match-report-description {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.match-report-footer {
  padding: 9px var(--report-gutter);
  border-top: 1px solid #a7815373;
  background: linear-gradient(140deg, #35271d, #231b15);
}

.match-report-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.match-report-buttons button { min-height: 44px; }

.match-report-restart-status {
  margin-bottom: 6px;
  color: var(--red, #e4aa9c);
  font-size: .85rem;
  text-align: right;
}

@media (max-height: 460px) {
  .match-report-header { padding-block: 8px; }
  .match-report-header h2 { font-size: 20px; }
  .match-report-footer { padding-block: 6px; }
}

@media (max-width: 400px) {
  .match-report-buttons button { flex: 1; }
}
