:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #1b1d22;
  --panel-2: #23262d;
  --ink: #f2f0e8;
  --muted: #aaa59a;
  --line: #393a40;
  --gold: #e4b84b;
  --silver: #c8ced7;
  --red: #d95c4a;
  --green: #63b97a;
  --blue: #6a9ed8;
  --black-card: #f7f4ea;
  --red-card: #c7352c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #2a2b30 0, #101114 48rem);
  color: var(--ink);
  font-family:
    "Segoe UI",
    "Yu Gothic UI",
    "Hiragino Sans",
    Meiryo,
    sans-serif;
}

button,
select,
input {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: #62646d;
  background: #2d3038;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.app {
  width: min(1660px, calc(100vw - 18px));
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  padding: 6px 0;
  overflow: hidden;
}

.topbar,
.table,
.control-panel,
.tips-panel,
.log-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 29, 34, 0.94);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 14px 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  letter-spacing: 0;
}

.brand span,
.stat-label,
.muted {
  color: var(--muted);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.stat {
  min-width: 96px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #15171b;
}

.stat-value {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.main-grid {
  display: block;
  position: relative;
  margin-top: 0;
}

.event-banner {
  margin-top: 12px;
  border: 1px solid rgba(228, 184, 75, 0.45);
  border-radius: 8px;
  padding: 12px 14px;
  background: #241f18;
  color: #fff2c5;
  font-weight: 700;
  animation: banner-pop 280ms ease-out;
}

.table {
  position: relative;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 32px minmax(420px, 1fr);
  grid-template-rows: max-content max-content max-content;
  grid-template-areas:
    "top top top"
    "left center right"
    "bottom bottom bottom";
  align-content: center;
  align-items: center;
  justify-items: center;
  column-gap: 8px;
  row-gap: clamp(20px, 3.2vh, 36px);
  padding: 12px 18px;
  height: calc(100vh - 12px);
  height: calc(100dvh - 12px);
  min-height: 0;
  overflow: hidden;
}

.table-center {
  grid-area: center;
  align-self: stretch;
  width: 32px;
  min-height: 72px;
  pointer-events: none;
}

.player {
  position: relative;
  width: min(100%, 640px);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #15171b;
}

.seat-top {
  grid-area: top;
  transform: translateY(-6px);
}

.seat-right {
  grid-area: right;
  justify-self: start;
  transform: translateY(-12px);
}

.seat-bottom {
  grid-area: bottom;
  transform: translateY(-10px);
}

.seat-left {
  grid-area: left;
  justify-self: end;
  transform: translateY(-12px);
}

.player.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(228, 184, 75, 0.25);
}

.player.active-citizen {
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(99, 185, 122, 0.28);
}

.player.active-juggernaut {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(228, 184, 75, 0.3);
}

.player.human {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 940px);
  background: #181b21;
  min-height: 286px;
}

.player.human .player-head {
  align-self: start;
}

.player.human .card-zone {
  align-self: center;
  width: min(100%, 700px);
  margin: 0 auto;
  padding: 58px 0 58px;
}

.player.human .hand-note {
  align-self: end;
}

.player-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.player-head > div:first-child {
  display: grid;
  grid-template-columns: max-content auto;
  align-items: start;
  column-gap: 18px;
  min-width: 0;
}

.name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  justify-content: flex-start;
  font-weight: 700;
  min-width: 72px;
  min-height: 1.35rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  white-space: nowrap;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #30241a;
  color: var(--gold);
  font-size: 0.78rem;
}

.role-slot {
  position: absolute;
  right: 12px;
  bottom: -12px;
  z-index: 3;
  display: inline-flex;
  justify-content: flex-end;
  width: auto;
  min-height: 24px;
  flex: 0 0 auto;
  margin-top: 0;
}

.badge.placeholder {
  visibility: hidden;
}

.badge.citizen {
  background: #1c2520;
  color: #9bc5a7;
}

.money {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.18;
  white-space: nowrap;
}

.coin-row {
  display: grid;
  grid-template-columns: 3.2rem 2.4rem auto;
  align-items: center;
  column-gap: 0.32rem;
}

.coin-label,
.coin-count {
  color: var(--muted);
}

.coin-count {
  text-align: right;
}

.gold-coins {
  display: grid;
  grid-template-columns: repeat(3, 13px);
  gap: 3px;
  min-width: 0;
}

.silver-coins {
  display: grid;
  grid-template-columns: repeat(50, 4px);
  gap: 1px;
  width: 249px;
  min-height: 13px;
  align-items: center;
}

.coin {
  display: inline-block;
  border-radius: 999px;
  box-sizing: border-box;
}

.gold-coin {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(228, 184, 75, 0.72);
  background: var(--gold);
  box-shadow: 0 0 8px rgba(228, 184, 75, 0.35);
}

.silver-coin {
  position: relative;
  width: 5px;
  height: 5px;
  background: rgba(200, 206, 215, 0.95);
}

.silver-coin.spent {
  opacity: 0.32;
}

.silver-coin.spent::before,
.silver-coin.spent::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 2px;
  width: 4px;
  height: 1px;
  background: rgba(242, 240, 232, 0.9);
}

.silver-coin.spent::before {
  transform: rotate(45deg);
}

.silver-coin.spent::after {
  transform: rotate(-45deg);
}

.cards {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
  width: 100%;
}

.card-zone {
  position: relative;
}

.card-exchange-action {
  position: absolute;
  left: 50%;
  z-index: 2;
  display: block;
  width: 150px;
  min-height: 38px;
  margin: 0;
  transform: translateX(-50%);
  border-color: rgba(228, 184, 75, 0.62);
  background: rgba(36, 31, 24, 0.84);
  color: #fff2c5;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
}

.card-exchange-action:not(:disabled),
.exchange-outside-actions button:not(:disabled),
.card.empty.augment-slot:not(:disabled),
.augment-skip-action:not(:disabled),
.counter-actions button:not(:disabled) {
  animation: reveal-hidden-pulse 1.9s ease-in-out infinite;
}

.card-exchange-action:hover:not(:disabled) {
  border-color: rgba(228, 184, 75, 0.95);
  background: rgba(54, 45, 30, 0.94);
}

.card-exchange-above {
  top: 8px;
}

.card-exchange-below {
  bottom: 6px;
}

.exchange-outside-actions {
  position: absolute;
  right: 18px;
  bottom: 36px;
  z-index: 3;
  display: flex;
  gap: 6px;
}

.exchange-outside-actions button {
  width: 96px;
  min-height: 38px;
  padding: 0.35rem 0.55rem;
  border-color: rgba(200, 206, 215, 0.45);
  background: rgba(35, 38, 45, 0.92);
  color: var(--ink);
  font-size: 0.78rem;
}

.gold-exchange-actions {
  position: absolute;
  right: 12px;
  bottom: 36px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, 240px);
  gap: 8px;
}

.gold-exchange-actions button {
  min-height: 38px;
  padding: 0.35rem 0.6rem;
  border-color: rgba(228, 184, 75, 0.62);
  background: rgba(36, 31, 24, 0.88);
  color: #fff2c5;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.gold-exchange-actions button:not(:disabled) {
  animation: reveal-hidden-pulse 1.9s ease-in-out infinite;
}

.counter-actions {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 4;
  display: grid;
  grid-template-columns: 190px 190px;
  gap: 8px;
  transform: translateX(-50%);
}

.counter-actions button {
  min-height: 38px;
  padding: 0.35rem 0.6rem;
  border-color: rgba(228, 184, 75, 0.62);
  background: rgba(36, 31, 24, 0.9);
  color: #fff2c5;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.counter-actions button:hover:not(:disabled) {
  border-color: rgba(228, 184, 75, 0.95);
  background: rgba(54, 45, 30, 0.94);
}

.card {
  position: relative;
  width: 100%;
  aspect-ratio: 52 / 74;
  min-width: 0;
  border-radius: 6px;
  border: 1px solid #d7d0bf;
  background: var(--black-card);
  color: #171717;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.card.red {
  color: var(--red-card);
}

.card.hidden {
  border-color: #595d66;
  background:
    linear-gradient(135deg, transparent 22%, rgba(255,255,255,0.1) 23%, rgba(255,255,255,0.1) 26%, transparent 27%),
    #30333b;
  color: #b9bec8;
}

.card.joker-public {
  border-color: var(--gold);
  background: #f7f4ea;
  color: #111;
}

.card.empty {
  border-style: dashed;
  border-color: #3b3e47;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  cursor: default;
}

.card.empty.augment-slot {
  border-color: rgba(228, 184, 75, 0.55);
  background: rgba(228, 184, 75, 0.08);
  color: #fff2c5;
  cursor: pointer;
}

.card.empty.augment-slot:hover:not(:disabled) {
  border-color: rgba(228, 184, 75, 0.9);
  background: rgba(228, 184, 75, 0.16);
}

.card.empty.augment-slot:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.card.selected {
  outline: 3px solid var(--gold);
}

.card-zone .card {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
  transform-origin: center 72%;
}

.card-zone:has(.card-exchange-above:hover) .card.selected {
  z-index: 2;
  transform: translateY(-8px) rotate(-3deg);
  filter: brightness(1.06);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
}

.card-zone:has(.card-exchange-below:hover) .card:not(.selected):not(.empty) {
  z-index: 2;
  transform: translateY(-12px) rotate(-3deg);
  filter: brightness(1.06);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
}

.player.human:has(.exchange-outside-actions [data-action="full"]:hover:not(:disabled)) .card-zone .card:not(.empty) {
  z-index: 2;
  transform: translateY(-12px) rotate(-3deg);
  filter: brightness(1.06);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
}

.card.changed {
  outline: 3px solid var(--blue);
  animation: card-change 900ms ease-out infinite alternate;
}

.card.new {
  outline: 3px solid var(--green);
  animation: card-new 900ms ease-out infinite alternate;
}

.card.purged {
  outline: 3px solid var(--red);
  animation: card-purge 900ms ease-out infinite alternate;
}

.player-pop {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  max-width: calc(100% - 64px);
  border: 1px solid rgba(228, 184, 75, 0.55);
  border-radius: 8px;
  padding: 14px 24px;
  background: rgba(16, 17, 20, 0.94);
  color: #fff2c5;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  animation: centered-pop-in 220ms ease-out;
}

.player-pop.power-pop {
  border-color: rgba(99, 185, 122, 0.8);
  background: rgba(16, 35, 22, 0.96);
  color: #d8ffe0;
  animation: power-pop 520ms ease-out infinite alternate;
}

.power-label,
.power-detail {
  display: block;
}

.power-label {
  margin-bottom: 2px;
  letter-spacing: 0;
}

.power-detail {
  white-space: nowrap;
  font-size: 0.92rem;
}

.player-actions {
  position: absolute;
  left: 50%;
  top: 60%;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: 0;
  min-height: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.player-actions button {
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
}

.reveal-hidden-action {
  width: 280px;
  border-color: rgba(228, 184, 75, 0.72);
  background: rgba(36, 31, 24, 0.82);
  color: #fff2c5;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  animation: reveal-hidden-pulse 1.9s ease-in-out infinite;
  pointer-events: auto;
}

.reveal-hidden-action:hover:not(:disabled) {
  border-color: rgba(228, 184, 75, 0.95);
  background: rgba(54, 45, 30, 0.92);
}

.augment-skip-action {
  position: absolute;
  right: 18px;
  bottom: 36px;
  z-index: 3;
  transform: none;
  pointer-events: auto;
  width: 96px;
  min-height: 38px;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
}

.augment-skip-action {
  border-color: rgba(200, 206, 215, 0.45);
  background: rgba(35, 38, 45, 0.9);
  color: var(--ink);
}

.discard-reveal {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  min-width: min(400px, calc(100% - 64px));
  max-width: calc(100% - 64px);
  border: 1px solid rgba(200, 206, 215, 0.45);
  border-radius: 8px;
  padding: 14px 24px;
  background: rgba(16, 17, 20, 0.96);
  color: var(--silver);
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.discard-reveal.fresh {
  animation: centered-pop-in 220ms ease-out;
}

.discard-reveal span {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.discard-reveal div {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: calc(100% - 58px);
  overflow: visible;
  vertical-align: middle;
}

.discard-reveal b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 24px;
  border-radius: 4px;
  background: #f7f4ea;
  color: #171717;
  font-size: 0.78rem;
}

.red-text {
  color: var(--red-card) !important;
}

.card small {
  position: absolute;
  left: 4px;
  top: 3px;
  font-size: clamp(0.72rem, 1.4vw, 1rem);
  line-height: 1;
}

.card .card-mark {
  display: block;
  font-size: clamp(1.7rem, 3.2vw, 2.85rem);
  line-height: 1;
}

.card.joker small,
.card.joker-public small {
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(0.48rem, 0.86vw, 0.58rem);
  letter-spacing: 0;
}

.hand-note {
  margin-top: 4px;
  min-height: 1.15rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.side {
  position: fixed;
  inset: 0 0 auto auto;
  z-index: 20;
  pointer-events: none;
  min-height: 0;
}

.control-panel,
.tips-panel,
.log-panel {
  padding: 12px;
}

.danger-panel {
  border-color: rgba(217, 92, 74, 0.75);
  background: #241817;
}

.control-panel h2,
.tips-panel h2,
.log-panel h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.control-slot,
.control-panel {
  min-height: 0;
}

.control-slot {
  position: fixed;
  top: 10px;
  right: 10px;
  width: 340px;
  max-height: 180px;
  opacity: 0.62;
}

.control-panel {
  height: auto;
  max-height: 180px;
  overflow: auto;
}

.tips-panel {
  position: fixed;
  right: max(12px, calc((100vw - 1660px) / 2 + 12px));
  top: 10px;
  width: clamp(340px, 20vw, 370px);
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 20px);
  max-height: min(180px, calc(100dvh - 20px));
  opacity: 0.62;
  overflow: auto;
}

.tips-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.result-drama {
  min-height: 250px;
}

.result-stack {
  display: grid;
  gap: 8px;
}

.result-line {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #14161b;
  color: var(--muted);
  opacity: 0.55;
}

.result-line.shown {
  border-color: rgba(228, 184, 75, 0.65);
  background: #211d16;
  color: var(--ink);
  opacity: 1;
  animation: result-reveal 320ms ease-out;
}

.result-line span {
  color: var(--gold);
  font-weight: 800;
}

.result-line em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
}

.actions {
  display: grid;
  gap: 8px;
}

.augment-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.augment-buttons button {
  min-height: 52px;
  font-size: 1.1rem;
  font-weight: 800;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.action-row input,
.action-row select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem;
  background: #101114;
  color: var(--ink);
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.84rem;
}

.log {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 330px;
  overflow: auto;
  padding-right: 4px;
}

.log-entry {
  border-left: 3px solid #555962;
  padding-left: 8px;
  color: #ddd9cf;
  font-size: 0.9rem;
  line-height: 1.45;
}

.winner {
  border-color: var(--green);
}

.player.role-juggernaut.winner,
.player.role-juggernaut.active-juggernaut {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(228, 184, 75, 0.3);
}

.center-message {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 80;
  min-width: min(560px, calc(100vw - 36px));
  max-width: calc(100vw - 36px);
  padding: 22px 30px;
  border: 2px solid currentColor;
  border-radius: 8px;
  background: rgba(12, 13, 16, 0.9);
  text-align: center;
  font-size: clamp(2rem, 5vw, 4.4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.72);
}

.center-message.fresh {
  animation: center-message-pop 520ms ease-out both;
}

.center-message.positive {
  color: var(--gold);
  box-shadow:
    0 0 0 1px rgba(228, 184, 75, 0.2),
    0 0 42px rgba(228, 184, 75, 0.35);
}

.center-message.negative {
  color: var(--red);
  box-shadow:
    0 0 0 1px rgba(217, 92, 74, 0.2),
    0 0 42px rgba(217, 92, 74, 0.35);
}

.gameover-actions {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 82;
  transform: translate(-50%, -50%);
}

.gameover-actions button {
  min-width: min(360px, calc(100vw - 48px));
  min-height: 72px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background: rgba(36, 31, 24, 0.94);
  color: #fff2c5;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 0 34px rgba(228, 184, 75, 0.32);
  animation: reveal-hidden-pulse 1.9s ease-in-out infinite;
}

@keyframes banner-pop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes center-message-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes card-change {
  from {
    box-shadow: 0 0 0 rgba(106, 158, 216, 0);
  }
  to {
    box-shadow: 0 0 18px rgba(106, 158, 216, 0.55);
  }
}

@keyframes card-new {
  from {
    box-shadow: 0 0 0 rgba(99, 185, 122, 0);
  }
  to {
    box-shadow: 0 0 18px rgba(99, 185, 122, 0.55);
  }
}

@keyframes card-purge {
  from {
    box-shadow: 0 0 0 rgba(217, 92, 74, 0);
  }
  to {
    box-shadow: 0 0 22px rgba(217, 92, 74, 0.7);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes centered-pop-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes power-pop {
  from {
    box-shadow: 0 0 0 rgba(99, 185, 122, 0);
  }
  to {
    box-shadow: 0 0 24px rgba(99, 185, 122, 0.55);
  }
}

@keyframes reveal-hidden-pulse {
  0%,
  100% {
    opacity: 0.72;
    box-shadow: 0 0 0 rgba(228, 184, 75, 0.08);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 18px rgba(228, 184, 75, 0.3);
  }
}

@keyframes result-reveal {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 980px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .side {
    order: -1;
    min-height: auto;
    grid-template-rows: auto auto;
  }

  .table {
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "top"
      "right"
      "center"
      "left"
      "bottom";
  }

  .seat-left,
  .seat-right {
    justify-self: center;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats {
    justify-content: flex-start;
  }

  .player {
    width: min(100%, 320px);
  }

  .cards {
    gap: 3px;
  }
}
