.match-actions { display: grid; gap: 10px; }
.round-heading { display: flex; align-items: baseline; gap: 8px; }
.round-total { font-size: 12px; color: var(--muted); white-space: nowrap; }
#gameView .game-top { margin-bottom: 16px; }
.number-choices { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 20px 0; }
.number-choices button { min-width: 0; min-height: 46px; padding: 8px 0; border: 1px solid var(--line); border-radius: 9px; background: #f5f7ef; color: var(--green); font-size: 14px; white-space: nowrap; }
.number-choices button:hover, .number-choices button:active, .number-choices button[aria-pressed="true"] { background: var(--green); color: white; border-color: var(--green); }
.match-action-pair { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.match-action-pair > button { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px; border-radius: 10px; white-space: normal; text-align: center; font-size: 14px; font-weight: 500; }
.match-action-pair .outline-button { background: #fffef9; border-color: #dce2d5; color: var(--green); }
.match-action-pair .action-symbol { float: none; font-size: 24px; line-height: 1; font-weight: 400; }
.match-action-pair strong { font-size: 14px; font-weight: 500; letter-spacing: -.3px; }
.match-action-pair small { font-size: 10px; font-weight: 400; opacity: .75; }
#ppeokAction { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; border: 0; background: #ecefe4; color: #62744f; min-height: 52px; }
#ppeokAction small { font-size: 10px; }
.match-feedback { margin: 0; min-height: 18px; font-size: 11px; color: var(--muted); text-align: center; }
.history-dialog .wizard-head h2 { font-size: 21px; color: var(--green); letter-spacing: -.6px; }
.history-summary { font-size: 12px; color: var(--muted); margin: 0 0 18px; }
.history-content .panel-head { margin-bottom: 6px; }.history-content .panel-head h2 { font-size: 12px; color: var(--muted); font-weight: 500; }
.history-scroll { min-height: 120px; }
.history-receipt { border-top: 1px solid var(--line); }
.history-receipt summary { list-style: none; display: grid; grid-template-columns: 30px 1fr auto 12px; align-items: center; gap: 9px; min-height: 75px; padding: 12px 0; }
.history-receipt summary::-webkit-details-marker { display: none; }
.history-receipt .history-main strong { font-size: 13px; overflow-wrap: anywhere; }.history-receipt .history-round { font-size: 11px; }
.history-receipt .history-amount { font-size: 13px; font-variant-numeric: tabular-nums; }
.receipt-chevron { color: var(--muted); font-size: 12px; }.history-receipt[open] .receipt-chevron { transform: rotate(180deg); }
.receipt-payments { background: #f3f5ed; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.receipt-payments > div { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; padding: 6px 0; }.receipt-payments span { overflow-wrap: anywhere; }
.player-choices { display: flex; gap: 8px; margin: 22px 0 12px; }
.player-choice { flex: 1 1 0; min-width: 0; min-height: 112px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 5px; border: 1px solid var(--line); border-radius: 14px; background: #f7f8f1; color: var(--green); }
.player-choice:hover, .player-choice:active { border-color: var(--green); background: #e9f0df; }
.player-choice strong { width: 100%; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.player-choice small { font-size: 9px; color: var(--muted); }
.choice-avatar { display: grid; place-items: center; width: 32px; height: 36px; border-radius: 9px; background: #dce7ce; font-size: 13px; }
.player-choice:nth-child(2) .choice-avatar { background: #efe0cf; color: #916748; }
.player-choice:nth-child(3) .choice-avatar { background: #dce5ee; color: #57768e; }
.player-choice:nth-child(4) .choice-avatar { background: #eadfe9; color: #86627e; }
.player-choice.previous-winner {
  border: 1px solid transparent;
  background: linear-gradient(155deg, #fffdf4, #f4ecd4) padding-box,
    linear-gradient(135deg, #d9bd77, #99702e 48%, #edd69a 76%, #ac813b) border-box;
  box-shadow: inset 0 0 0 2px #fff9e9, 0 3px 10px #a7802b14;
}
.player-choice.previous-winner .choice-avatar { background: #ead9a9; color: #785c26; }
.player-choice.previous-winner small { color: #89662b; font-weight: 600; }
.player-choice.previous-winner:hover, .player-choice.previous-winner:active {
  background: linear-gradient(155deg, #fff7dd, #efdfaf) padding-box,
    linear-gradient(135deg, #c49b4a, #88601f, #e2c17a) border-box;
}
.match-actions .entry-guide { margin: 0 0 2px; text-align: center; }
.sheet-title { font-size: 23px; letter-spacing: -.8px; margin: 8px 0 22px; }
.match-score { width: 100%; border: 1px solid var(--line); background: #f8f9f3; border-radius: 14px; height: 70px; padding: 16px; font-size: 28px; color: var(--green); }
.penalty-row { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: #edf2e5; border-radius: 12px; font-size: 14px; margin: 16px 0; }
.penalty-row small { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.penalty-player { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 16px 0; }
.penalty-player legend { font-size: 14px; font-weight: 600; padding: 0 6px; }
.penalty-player label { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; min-height: 44px; font-size: 13px; }
.penalty-player b { display: block; border-top: 1px solid var(--line); padding-top: 12px; text-align: right; font-size: 20px; }
.penalty-row input, .penalty-player input { width: 19px; height: 19px; accent-color: var(--green); }
.player-role { display: block; font-size: 10px; font-weight: 400; color: var(--muted); margin-top: 5px; }
#matchError { color: var(--red); font-size: 12px; margin: 8px 0 0; }

/* Match overview: a compact header, balances, and a bottom action bar. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app-shell:has(#gameView:not(.hidden)) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: calc(12px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.app-shell:has(#gameView:not(.hidden)) .masthead { display: none; }
#gameView { display: flex; flex-direction: column; flex: 1; }
#gameView .game-top { min-height: 44px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
#gameView .game-top h1 { font-size: 18px; font-weight: 600; letter-spacing: -.5px; }
#gameModeLabel { display: none; }
#newGameBtn { border: 0; min-height: 44px; padding: 8px 0 8px 16px; font-size: 12px; }
#gameView .progress-wrap { margin: 12px 0 20px; }
#gameView .progress-label { margin-bottom: 7px; font-size: 10px; }
#gameView .progress-track { height: 2px; }
#gameView .game-grid { display: flex; flex-direction: column; flex: 1; gap: 16px; }
#gameView .scoreboard { padding: 0; border: 0; border-radius: 0; background: transparent; }
#gameView .panel-head { margin-bottom: 8px; }
#gameView .panel-head h2 { font-size: 12px; font-weight: 500; color: var(--muted); }
#gameView .standings { gap: 0; }
#gameView .standing { min-height: 64px; padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--line); background: transparent; gap: 12px; }
#gameView .standing-name { font-size: 14px; }
#gameView .standing-money { font-size: 18px; font-weight: 600; text-align: right; letter-spacing: -.5px; }
#gameView .avatar { width: 28px; height: 32px; background: #e4e9dc; }
#gameView .player-role { font-size: 10px; margin-top: 4px; }
#gameView .match-actions { margin-top: auto; gap: 8px; padding-top: 12px; }
#gameView #handSummary { font-size: 11px; text-align: left; margin: 0; line-height: 1.5; color: var(--muted); }
#gameView #ppeokAction { background: transparent; padding: 8px 0; min-height: 44px; border-radius: 0; }
#gameView #ppeokAction span { font-size: 12px; }
#gameView #ppeokAction small { font-size: 10px; }
#gameView .match-feedback { font-size: 10px; min-height: 0; line-height: 1.4; }
#gameView .match-feedback:empty { display: none; }
#gameView .match-action-pair { border-top: 1px solid var(--line); padding-top: 12px; }
@media (min-width: 600px) {
  .app-shell:has(#gameView:not(.hidden)) { min-height: calc(100dvh - 56px); }
}
@media (max-height: 620px) {
  #gameView .progress-wrap { margin: 8px 0 12px; }
  #gameView .standing { min-height: 54px; padding: 6px 0; }
  #gameView .game-grid { gap: 10px; }
}
