/* Shared scene, controls, hands and responsive materials for every adapter. */
.table-game {
  --table-card: clamp(66px, 10dvh, 110px);
  --hand-card: clamp(82px, 13dvh, 140px);
  display: flex; flex-direction: column;
  min-height: calc(100dvh - 72px);
}
.table-game .table-scene {
  flex: 1; display: grid; grid-template-rows: 1fr auto;
  background: var(--pop-felt); color: var(--pop-paper);
  border: 3px solid var(--pop-ink); border-radius: 32px 28px 24px 30px;
  box-shadow: 5px 6px 0 var(--pop-ink), inset 0 -10px 0 var(--pop-felt-edge);
  padding: 12px 24px 14px;
}
.table-game .game { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto; min-width: 0; padding: 0; border: 0; background: none; box-shadow: none; border-radius: 0; }
.table-game .game::before, .table-game .table-topline, .table-game .table-heading { display: none; }
.table-game .opponents { margin: 0 0 10px; gap: 12px 45px; align-items: start; }
.table-game .opponent { padding: 4px 8px 7px; gap: 8px; border-bottom: 3px solid transparent; min-width: 0; }
.table-game .opponent.active { border-bottom-color: var(--pop-yellow); }
.table-game .avatar { border: var(--pop-border); border-radius: 8px; box-shadow: 2px 2px 0 var(--pop-ink); color: var(--pop-ink); background: #ebaa83; font: 24px var(--pop-title); }
.table-game .avatar-2 { background: #94c1d1; }
.table-game .avatar-3 { background: #e6c46b; }
.table-game .opponent.active .avatar { border-color: var(--pop-ink); }
.table-game .opponent-detail strong { font: 21px/1.15 var(--pop-title); gap: 6px; }
.table-game .cpu-badge { color: var(--pop-paper); font: 9px var(--pop-body); border: 0; }
.table-game .opponent-count { color: var(--pop-paper); font-size: 11px; margin-top: 3px; }
.table-game .mini-hand { display: flex; }
.table-game .card-back { border: 0; background: var(--card-back-image) center / 100% 100% no-repeat; box-shadow: 2px 2px 0 var(--pop-ink); }
.table-game .table-bottomline { font-size: 11px; letter-spacing: 0; color: var(--pop-paper); margin-top: 6px; }
.table-game .table-bottomline .text-button { flex-shrink: 0; }
.table-game .controller { padding: 4px 0 0; width: 100%; max-width: 740px; margin: 0 auto; }
.table-game .hand-heading { margin: 0 0 4px; gap: 12px; }
.table-game .human-avatar { display: none; }
.table-game .hand-heading h2 { font: 21px var(--pop-title); }
.table-game .hand { min-height: 0; width: fit-content; max-width: 100%; margin: 7px auto 0; gap: 18px; padding: 12px 0 3px; flex-wrap: nowrap; align-items: end; border-radius: 12px; }
.table-game .hand-card { width: var(--hand-card); }
.table-game .hand-card > .card-art { filter: none; box-shadow: 3px 4px 0 #253e31; outline: none; }
.table-game .hand-card.playable::after { display: none; }
.table-game .hand-card.playable { transform: translateY(-3px); }
.table-game .hand-card.playable:hover, .table-game .hand-card.hinted { transform: translateY(-9px); }
.table-game .hand-card.hinted > .card-art { box-shadow: 3px 4px 0 #253e31; outline: 2px dashed var(--pop-ink); outline-offset: -2px; }
.table-game .hand-card:focus-visible { outline: 2px solid var(--pop-ink); outline-offset: -2px; }
.table-game .hand-card.selected { transform: translateY(-12px); }
.table-game .hand-card.selected > .card-art { outline: 2px solid var(--pop-ink); outline-offset: -2px; }
.table-announcement {
  position: absolute; z-index: 9; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: max-content; max-width: calc(100% - 32px); padding: 16px 28px;
  pointer-events: none; text-align: center; overflow-wrap: anywhere;
  color: var(--pop-ink); background: var(--pop-yellow); border: var(--pop-border);
  border-radius: 12px 9px 13px 10px; box-shadow: 4px 5px 0 var(--pop-ink);
  font: clamp(25px, 4vw, 38px)/1.15 var(--pop-title);
  animation: table-notice-in 120ms ease-out;
}
@keyframes table-notice-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .table-announcement { animation: none; } }
.table-game .footer { color: var(--pop-ink); border: 0; padding: 6px 4px max(7px, env(safe-area-inset-bottom)); margin: 0; font: 12px var(--pop-body); }
.table-game .footer-controls { font: 12px var(--pop-body); }
.table-game .footer-controls select { font: inherit; min-height: 44px; color: var(--pop-ink); background: var(--pop-paper); border: var(--pop-border); }
.table-game .footer-controls #turn-number { font: 11px var(--pop-body); }
@media (min-width: 1001px) {
.table-game .table-bottomline { position: absolute; right: 0; top: 0; margin: 0; }
.table-game #last-move { display: none; }
}
@media (max-width: 1000px) {
.table-game .mini-hand { display: none; }
}
@media (max-width: 700px) {
.table-game { --table-card: clamp(40px, 12vw, 72px); --hand-card: clamp(66px, 22vw, 100px); min-height: calc(100dvh - 60px); }
.table-game .table-scene { padding: 10px 10px 13px; border-radius: 19px; box-shadow: 3px 4px 0 var(--pop-ink), inset 0 -7px 0 var(--pop-felt-edge); }
.table-game .opponents { gap: 4px; justify-content: space-evenly; margin-bottom: 8px; }
.table-game .opponent { gap: 5px; padding: 2px 2px 5px; }
.table-game .opponents:has(> :nth-child(3)) .opponent { flex: 1 1 0; }
.table-game .opponent-detail { min-width: 0; }
.table-game .avatar { width: 26px; height: 30px; font-size: 20px; }
.table-game .opponent-detail strong { font-size: 18px; }
.table-game .cpu-badge { display: none; }
.table-game .opponent-count { font-size: 9px; white-space: normal; max-width: 85px; }
.table-game .table-bottomline { font-size: 10px; margin: 3px 0 0; }
.table-game .table-bottomline .text-button { font-size: 11px; }
.table-game .hand-heading h2 { font-size: 19px; }
.table-game .hand-actions .button { min-height: 44px; font-size: 16px; padding: 6px 10px; }
.table-game .hand { gap: 15px; padding-top: 13px; }
.table-announcement { padding: 13px 19px; }
.table-game .footer-controls { justify-content: center; gap: 7px; font-size: 11px; }
.table-game .footer-controls #turn-number { padding-left: 7px; font-size: 10px; }
.table-game .footer .text-button { font-size: 12px; }
}
@media (max-width: 700px) and (max-height: 650px) {
body[data-screen="game"] {
    .brand-mark, .brand .eyebrow { display: none; }
    .brand h1 { font-size: 24px; }
    .brand h1::before { content: "← "; font: 18px var(--pop-body); }
    .top-actions .button { font-size: 14px; padding: 6px; white-space: nowrap; }
  }
.table-game { --hand-card: 60px; --table-card: 39px; }
.table-game .game-navigation { display: none; }
.table-game .table-scene { padding: 6px 8px 6px; }
.table-game .opponents { margin-bottom: 2px; }
.table-game .hand { padding-top: 6px; }
.table-game .hand-heading h2 { font-size: 18px; line-height: 1.1; }
.table-game .footer { padding-top: 3px; padding-bottom: max(3px, env(safe-area-inset-bottom)); }
}
@media (min-width: 701px) and (max-height: 500px) {
body[data-screen="game"] .app-shell { padding-top: 5px; }
body[data-screen="game"] .topbar { min-height: 44px; }
body[data-screen="game"] .brand .eyebrow { display: none; }
.table-game { --table-card: 47px; --hand-card: 62px; min-height: calc(100dvh - 53px); }
.table-game .game-navigation { position: absolute; top: 5px; left: 190px; }
.table-game .game-navigation > span { display: none; }
.table-game .table-scene { grid-template-columns: minmax(0, 1fr) 245px; grid-template-rows: 1fr; gap: 18px; padding: 7px 14px 8px; border-radius: 20px; }
.table-game .opponents { gap: 12px; margin-bottom: 4px; }
.table-game .avatar { width: 25px; height: 28px; font-size: 19px; }
.table-game .opponent-detail strong { font-size: 17px; }
.table-game .opponent-count { font-size: 9px; }
.table-game .cpu-badge { display: none; }
.table-game .table-bottomline { margin: 0; font-size: 10px; }
.table-game .controller { align-self: center; padding: 0; }
.table-game .hand-heading { gap: 6px; }
.table-game .hand-heading h2 { font-size: 18px; }
.table-game .hand-actions .button { font-size: 16px; padding: 6px; }
.table-game .hand { gap: 12px; padding-top: 18px; }
.table-game .footer { padding-top: 3px; padding-bottom: 3px; }
}

.action-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 6px; }
.action-choices[hidden] { display: none; }
