/* Finished results own their layout; live game children stay in the play grid. */
.game > .game-content { display: contents; }
.game:has(.post-game) { width: min(100%, 520px); margin-inline: auto; }
.post-game { width: 100%; min-width: 0; grid-column: 1 / -1; display: flex; flex-direction: column; gap: 1rem; padding: 1rem; color: var(--ink); }
.post-game__result-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; margin-bottom: 1rem; }
.post-game__result-row .status-banner { max-width: 100%; }
.post-game__banner { text-align: center; padding: .5rem 0; }
.post-game__headline { max-width: 22ch; margin: 0 auto; white-space: pre-line; font-size: 1.5rem; line-height: 1.2; overflow-wrap: anywhere; }
.post-game__banner-title { font-size: 1.1rem; font-weight: 500; color: var(--ink); }
.post-game__banner-reason { font-size: .9rem; color: var(--ink-soft); margin-top: .4rem; }
.post-game .win-chance { grid-template-columns: minmax(0, 1fr) auto; gap: 20px 12px; padding: 18px; }
.post-game .win-chance__row { gap: 8px 12px; align-items: baseline; }
.post-game .win-chance__label { grid-column: 1; grid-row: 1; font-size: 1.25rem; line-height: 1.2; }
.post-game .win-chance__value { grid-column: 2; grid-row: 1; font-size: 2.75rem; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.post-game .win-chance__track { grid-column: 1 / -1; grid-row: 2; height: 32px; margin-right: 32px; }
.post-game .win-chance__track::before { top: 15px; }
.post-game .win-chance__progress { top: 15px; height: 5px; }
.post-game .win-chance__horse { font-size: 28px; line-height: 32px; }
.post-game .win-chance__finish { grid-column: 2; grid-row: 2; justify-self: end; align-self: center; font-size: 24px; line-height: 32px; }
.post-game__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 0; text-align: center; }
.post-game__stats div { min-width: 0; display: flex; flex-direction: column; }
.post-game__stats dd { order: -1; margin: 0 0 auto; font-weight: 500; overflow-wrap: anywhere; }
.post-game__stats dt { font-size: .8rem; color: var(--ink-soft); }
.post-game__best { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-sm); }
.post-game__best div { min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.post-game__best span { font-size: .8rem; color: var(--ink-soft); }
.post-game__best > strong { flex-shrink: 0; }
.post-game__actions { display: grid; gap: .75rem; }
.post-game__actions .game-rematch, .post-game__actions .game-rematch form { width: 100%; }
.post-game__actions .button { width: 100%; }
.post-game__details summary { min-height: 44px; align-content: center; color: var(--ink-soft); cursor: pointer; }
.post-game__board { margin-top: .5rem; min-width: 0; }
.post-game .board-region { grid-area: auto; width: 100%; min-width: 0; margin: 0; }
.post-game .board-tools { display: none; }
.post-game .board-scroll { width: 100%; }
.post-game__new-player { font-size: .9rem; text-align: center; color: var(--ink-soft); }
.post-game #game-chat { margin: 0; font-size: .85rem; color: var(--ink-soft); }
.post-game #game-chat .game-chat__note { margin: 0; }
@media (max-width: 700px) {
  .post-game .post-game__banner { background: transparent; border-radius: 0; }
  .post-game .post-game__banner-title { font-size: 1.1rem; }
}
