#game.is-in-match .opening-deck {
  --pack-width: clamp(35px, 5.8vw, 70px);
  --pack-height: calc(var(--pack-width) * 1.37);
  position: absolute;
  left: 50%;
  top: 40%;
  translate: -50% -50%;
  width: var(--pack-width);
  height: var(--pack-height);
  z-index: 7;
  pointer-events: none;
  perspective: 600px;
}
#game.is-in-match .opening-pack {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid #f8e6c0;
  border-radius: 4px;
  background: url('/art/card-back.webp') center / 100% 100% no-repeat, #682b2e;
  box-shadow: 0 1px #dacbae, 0 2px #8b7e65, 0 3px #eddfc3, 0 4px #95836e,
    0 5px #eddfc3, 0 6px #817261, 0 7px #d7c7aa, 0 10px 11px #07181080;
  transform-origin: center;
}
#game.is-in-match .opening-pack.is-upper { z-index: 2; }
#game.is-in-match .opening-pack.is-lower { z-index: 1; }

.playing-card.turning-card {
  animation: card-turn var(--turn-duration, 260ms) cubic-bezier(.35,.02,.37,1) both;
  animation-delay: var(--turn-delay, 0ms);
}
.playing-card.turning-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  background: url('/art/card-back.webp') center / 90% 90% no-repeat, #5c252a;
  border: 1px solid #efdfbc;
  animation: turn-back var(--turn-duration, 260ms) steps(1, end) both;
  animation-delay: var(--turn-delay, 0ms);
  pointer-events: none;
}
@keyframes card-turn {
  0% { transform: perspective(600px) rotateY(-7deg); }
  41% { transform: perspective(600px) rotateY(-86deg); }
  42% { transform: perspective(600px) rotateY(86deg); }
  100% { transform: perspective(600px) rotateY(0deg); }
}
@keyframes turn-back { 0% { opacity: 1; } 42%, 100% { opacity: 0; } }
#game.is-in-match .reveals.revealed-seat {
  animation: seat-reveal 240ms cubic-bezier(.22,.65,.39,1) both;
}
@keyframes seat-reveal { from { opacity: .3; filter: brightness(1.2); } to { opacity: 1; filter: brightness(1); } }
#game.is-in-match .seat .seat-box.fold-cue {
  animation: fold-seat 260ms ease-out both;
}
#game.is-in-match .seat .seat-box.timeout-cue {
  animation: timeout-seat 420ms ease-out both;
}
@keyframes fold-seat {
  0% { translate: 0 0; }
  38% { translate: 0 2px; border-color: #d3a682; }
  100% { translate: 0 0; }
}
@keyframes timeout-seat {
  0%, 25% { border-color: #f2aa82; box-shadow: 0 0 0 1px #efad6d6e, 0 0 16px #e8a35d52; }
  100% { border-color: #9c84644d; box-shadow: 0 4px 9px #08080868; }
}
#game.is-in-match .payout-impact {
  position: absolute;
  z-index: 8;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 4px;
  width: max-content;
  max-width: 37%;
  translate: -50% calc(-100% - 7px);
  padding: 4px 10px;
  border: 1px solid #e1b87d;
  border-radius: 6px;
  background: linear-gradient(162deg, #503b24, #221c15);
  box-shadow: 0 3px 10px #0c120b96;
  color: #ffe6b9;
  font: 750 clamp(11px, 1.3vw, 17px)/1.2 var(--body);
  font-variant-numeric: tabular-nums;
  text-align: center;
  pointer-events: none;
  animation: payout-land 240ms cubic-bezier(.2,.62,.36,1) both;
}
#game.is-in-match .payout-impact small { font-size: .72em; font-weight: 500; color: #ead1a9; }
@keyframes payout-land { from { opacity: .2; scale: .87; } to { opacity: 1; scale: 1; } }

#game.is-in-match .result-summary.champion-summary {
  position: relative;
  gap: 4px 12px;
  padding: 14px clamp(15px, 2.4vw, 29px);
  border-block: 1px solid #f0c983;
  background: radial-gradient(ellipse at 50% 40%, #795b2b87, #192e2299 72%, transparent);
  box-shadow: 0 11px 32px #0d1a0b35;
}
#game.is-in-match .result-summary.champion-summary.champion-arrival {
  animation: champion-arrive 580ms cubic-bezier(.18,.6,.34,1) both;
}
#game.is-in-match .champion-summary:has(.champion-portrait) {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  text-align: left;
  justify-items: start;
}
#game.is-in-match .champion-summary .champion-portrait {
  grid-row: 1 / 5;
  grid-column: 1;
  display: grid;
  place-items: center;
  width: clamp(42px, 5.8vw, 77px);
  height: clamp(42px, 5.8vw, 77px);
  border: 1px solid #e6c58d;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #e1bb781a, 0 2px 12px #10110c82;
  background: var(--player-portrait) center / cover no-repeat, #4e3c25;
  overflow: hidden;
}
#game.is-in-match .champion-summary:has(.champion-portrait) > :not(.champion-portrait) { grid-column: 2; }
#game.is-in-match .champion-summary .hero-value { font-size: clamp(26px, 3.4vw, 45px); color: #ffe0a0; margin-block: 1px; }
#game.is-in-match .champion-summary .detail { color: #ffe5b6; }
#game.is-in-match .table.champion-focus::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 34%, #ffd7831d, transparent 54%);
  animation: champion-light 610ms ease-out both;
}
#game.is-in-match .table.champion-focus .seat .seat-box.champion-seat {
  border-color: #ffe2a0;
  box-shadow: 0 0 0 2px #f1ca8140, 0 0 26px #eac07966, 0 5px 12px #08110b8a;
}
#game.is-in-match .table.champion-focus .seat .seat-box.champion-seat.champion-arrival {
  animation: champion-seat 620ms ease-out both;
}
@keyframes champion-arrive { from { opacity: .35; scale: .94; } to { opacity: 1; scale: 1; } }
@keyframes champion-light { from { opacity: 0; } to { opacity: 1; } }
@keyframes champion-seat { from { filter: brightness(1.35); } to { filter: brightness(1); } }

@media (max-height: 590px) and (orientation: landscape) {
  #game.is-in-match .opening-deck { --pack-width: 31px; top: 39%; }
  #game.is-in-match .opening-pack { border-radius: 2px; }
  #game.is-in-match .payout-impact { padding: 3px 6px; font-size: 10px; translate: -50% calc(-100% - 3px); }
  #game.is-in-match .result-summary.champion-summary { padding: 5px 9px; gap: 2px 7px; }
  #game.is-in-match .champion-summary .champion-portrait { width: 34px; height: 34px; }
  #game.is-in-match .champion-summary .status { font-size: 11px; }
  #game.is-in-match .champion-summary .hero-value { font-size: 18px; line-height: 1.1; }
  #game.is-in-match .champion-summary .detail { font-size: 10px; line-height: 1.15; }
}

@media (prefers-reduced-motion: reduce) {
  .playing-card.turning-card,
  .playing-card.turning-card::before,
  #game.is-in-match .reveals.revealed-seat,
  #game.is-in-match .seat .seat-box.fold-cue,
  #game.is-in-match .seat .seat-box.timeout-cue,
  #game.is-in-match .payout-impact,
  #game.is-in-match .result-summary.champion-summary.champion-arrival,
  #game.is-in-match .table.champion-focus::after,
  #game.is-in-match .table.champion-focus .seat .seat-box.champion-seat.champion-arrival { animation: none; }
  .playing-card.turning-card::before { opacity: 0; }
}
