:root {
  color-scheme: dark;
  --bg: #071411;
  --panel: #10221d;
  --panel-2: #162d27;
  --felt: #0f6a48;
  --felt-dark: #0a3f31;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f2fff9;
  --muted: #a9c7bd;
  --gold: #f1c453;
  --red: #ec5b5b;
  --green: #48d597;
  --shadow: rgba(0, 0, 0, 0.26);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.seo-info {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(4, 35, 27, 0.72);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.seo-info h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.15rem;
}

.seo-info p {
  margin: 8px 0 0;
}

.seo-info a {
  color: #8ff0ce;
  font-weight: 700;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #14513e 0, var(--bg) 42rem);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 14px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--line);
}

button:active {
  transform: translateY(1px);
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

button.primary {
  background: var(--gold);
  color: #231900;
}

button.accent {
  background: var(--green);
  color: #052015;
}

button.all-in {
  background: #d94848;
  color: #fff7f7;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.app {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
}

.topbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  min-height: 64px;
}

.topbar h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.icon-btn {
  width: 44px;
  padding: 0;
  font-size: 21px;
}

.view {
  display: grid;
  gap: 14px;
}

.hidden {
  display: none !important;
}

.panel {
  background: rgba(16, 34, 29, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px var(--shadow);
}

.create-panel,
.player-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.player-panel {
  max-width: 360px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.rooms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.room-card {
  display: grid;
  align-content: space-between;
  gap: 16px;
  min-height: 148px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.room-card button {
  width: 100%;
}

.room-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: 0;
}

.room-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.chip {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.table-shell {
  position: relative;
  min-height: min(68vh, 620px);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--felt), var(--felt-dark));
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 70px var(--shadow);
}

.table-shell.showdown {
  border-color: rgba(241, 196, 83, 0.72);
  box-shadow: 0 0 0 3px rgba(241, 196, 83, 0.18), 0 24px 80px rgba(0, 0, 0, 0.4);
}

.felt {
  position: absolute;
  inset: 29% 9% 26%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.12);
}

.message {
  max-width: 86%;
  color: #e8fff5;
  font-size: 13px;
  text-align: center;
}

.community,
.my-cards {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.card {
  width: clamp(42px, 12vw, 64px);
  aspect-ratio: 0.72;
  position: relative;
  display: block;
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.92), rgba(230,235,231,0.96));
  color: #101010;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.card.deal-new {
  animation: dealCard 720ms cubic-bezier(.2,.8,.2,1) both;
}

.community .card.deal-new:nth-child(2),
.my-cards .card.deal-new:nth-child(2) { animation-delay: 180ms; }
.community .card.deal-new:nth-child(3) { animation-delay: 360ms; }
.community .card.deal-new:nth-child(4) { animation-delay: 180ms; }
.community .card.deal-new:nth-child(5) { animation-delay: 180ms; }

@keyframes dealCard {
  from {
    opacity: 0;
    transform: translateY(-34px) scale(0.72) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

.card.red {
  color: #c92632;
}

.card.hidden-card {
  background: repeating-linear-gradient(45deg, #26384f 0 8px, #30496b 8px 16px);
  color: rgba(255, 255, 255, 0.65);
  display: grid;
  place-items: center;
}

.card .corner {
  position: absolute;
  display: grid;
  place-items: center;
  font-size: clamp(10px, 2.8vw, 15px);
  line-height: 1;
  min-width: 18px;
}

.card .corner small {
  font-size: 0.78em;
}

.card .corner.top {
  left: 5px;
  top: 5px;
}

.card .corner.bottom {
  right: 5px;
  bottom: 5px;
  transform: rotate(180deg);
}

.card .suit-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(22px, 7vw, 35px);
}

.card .card-back {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.78);
}

.pot {
  color: var(--gold);
  font-weight: 800;
}

.table-continue {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.seats {
  position: absolute;
  inset: 0;
}

.seat {
  position: absolute;
  width: min(36vw, 180px);
  min-height: 72px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(7, 20, 17, 0.76);
  border: 1px solid var(--line);
}

.seat.turn {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(241, 196, 83, 0.38), 0 0 28px rgba(241, 196, 83, 0.45);
  animation: turnPulse 1s ease-in-out infinite;
}

.seat.winner {
  border-color: #fff0a8;
  background: rgba(68, 51, 11, 0.92);
  box-shadow: 0 0 0 4px rgba(241, 196, 83, 0.42), 0 0 42px rgba(241, 196, 83, 0.62);
  animation: winnerPulse 0.9s ease-in-out infinite;
}

.seat.winner::after {
  content: "Победитель";
  position: absolute;
  left: 8px;
  top: -13px;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff0a8;
  color: #241900;
  font-size: 11px;
  font-weight: 900;
}

.seat.rebought {
  border-color: #ff9a9a;
  background: rgba(66, 15, 18, 0.94);
  box-shadow: 0 0 0 4px rgba(230, 67, 67, 0.4), 0 0 42px rgba(230, 67, 67, 0.58);
  animation: rebuyPulse 0.9s ease-in-out infinite;
}

.seat.rebought::after {
  content: "Пополнен";
  position: absolute;
  left: 8px;
  top: -13px;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ffb7b7;
  color: #350809;
  font-size: 11px;
  font-weight: 900;
}

@keyframes winnerPulse {
  0%, 100% {
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(1.02);
  }
  50% {
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(1.08);
  }
}

@keyframes rebuyPulse {
  0%, 100% {
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(1.01);
  }
  50% {
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(1.07);
  }
}

.seat.turn::before {
  content: "ХОД";
  position: absolute;
  right: 8px;
  top: -13px;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: #241900;
  font-size: 11px;
  font-weight: 900;
}

@keyframes turnPulse {
  0%, 100% {
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(1);
  }
  50% {
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(1.04);
  }
}

.seat.folded {
  opacity: 0.58;
}

.seat .name {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 13px;
  font-weight: 900;
}

.seat-hand {
  min-height: 16px;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.seat .stack {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.last-action {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 22px;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(241, 196, 83, 0.18);
  color: #ffe69b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.last-action.fresh-action {
  animation: actionBadge 0.5s ease-out both;
}

.seat .mini-cards {
  display: flex;
  gap: 4px;
  margin-top: 7px;
}

.seat .mini-cards .card {
  width: 34px;
  border-radius: 5px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

.seat .mini-cards .card .corner {
  font-size: 10px;
  min-width: 13px;
}

.seat .mini-cards .card .corner.top {
  left: 3px;
  top: 3px;
}

.seat .mini-cards .card .corner.bottom {
  right: 3px;
  bottom: 3px;
}

.seat .mini-cards .card .suit-mark {
  font-size: 14px;
  opacity: 0.5;
}

.pos-0 { left: 50%; bottom: 3%; --tx: -50%; transform: translateX(-50%); }
.pos-1 { left: 3%; bottom: 24%; }
.pos-2 { left: 5%; top: 12%; }
.pos-3 { left: 28%; top: 3%; --tx: -50%; transform: translateX(-50%); }
.pos-4 { left: 50%; top: 3%; --tx: -50%; transform: translateX(-50%); }
.pos-5 { right: 28%; top: 3%; --tx: 50%; transform: translateX(50%); }
.pos-6 { right: 5%; top: 12%; }
.pos-7 { right: 3%; bottom: 24%; }

.chip-fly,
.fold-card {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  pointer-events: none;
}

.chip-fly {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff3a9 0 18%, transparent 19%),
    radial-gradient(circle at 50% 50%, var(--gold) 0 58%, #9d6c18 60% 100%);
  color: #241900;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
  animation: chipToPot 820ms cubic-bezier(.2,.85,.25,1) both;
}

.fold-card {
  width: 30px;
  aspect-ratio: 0.72;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: repeating-linear-gradient(45deg, #26384f 0 7px, #30496b 7px 14px);
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  animation: foldToMuck 760ms cubic-bezier(.25,.75,.2,1) both;
}

@keyframes actionBadge {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes chipToPot {
  0% {
    opacity: 0;
    transform: translate(var(--from-x), var(--from-y)) scale(0.58);
  }
  18% {
    opacity: 1;
  }
  70% {
    opacity: 1;
    transform: translate(var(--mid-x), var(--mid-y)) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate(var(--to-x), var(--to-y)) scale(0.52);
  }
}

@keyframes foldToMuck {
  0% {
    opacity: 0;
    transform: translate(var(--from-x), var(--from-y)) rotate(-7deg) scale(0.92);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--to-x), var(--to-y)) rotate(22deg) scale(0.42);
  }
}

.hand-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(16, 34, 29, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.log-panel {
  background: rgba(16, 34, 29, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-height: 0;
}

.log-panel summary {
  min-height: 42px;
  padding: 11px 12px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-log {
  display: block;
  height: min(34vh, 220px);
  max-height: 220px;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 14px;
  scrollbar-color: rgba(241, 196, 83, 0.62) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.action-log::-webkit-scrollbar {
  width: 8px;
}

.action-log::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.action-log::-webkit-scrollbar-thumb {
  background: rgba(241, 196, 83, 0.62);
  border-radius: 999px;
}

.log-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
  min-height: 0;
  margin: 0 0 8px;
  padding: 0 0 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.log-row span {
  display: block;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.log-row b {
  display: block;
  font-weight: 800;
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: normal;
}

.hand-panel small {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.hand-rank {
  margin-top: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.turn-badge {
  min-width: 100px;
  padding: 9px 10px;
  border-radius: 8px;
  text-align: center;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

.turn-badge.live {
  background: var(--gold);
  color: #231900;
}

.actions {
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  background: rgba(7, 20, 17, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.actions.live {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(241, 196, 83, 0.22), 0 16px 46px rgba(0, 0, 0, 0.35);
  animation: actionGlow 1.1s ease-in-out infinite;
}

@keyframes actionGlow {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(241, 196, 83, 0.18), 0 16px 46px rgba(0, 0, 0, 0.35);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(241, 196, 83, 0.35), 0 16px 46px rgba(0, 0, 0, 0.35);
  }
}

.actions .primary,
.actions .raise,
.actions .auto-check,
.actions .all-in {
  grid-column: span 2;
}

.auto-check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 13px;
}

.auto-check input {
  width: 18px;
  min-height: 18px;
  margin: 0 8px 0 0;
  accent-color: var(--gold);
}

.raise {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.raise input {
  min-height: 34px;
  padding: 0 8px;
}

dialog {
  width: min(380px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: var(--panel);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
}

.dialog-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.dialog-card h2 {
  margin: 0;
  font-size: 20px;
}

menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10;
  width: min(540px, calc(100% - 28px));
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f8efe0;
  color: #24170a;
  font-weight: 800;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

@media (min-width: 760px) {
  .create-panel {
    grid-template-columns: 1fr 1fr 1fr auto;
    align-items: end;
  }

  .actions {
    grid-template-columns: repeat(7, 1fr);
  }

  .actions .primary,
  .actions .raise,
  .actions .auto-check,
  .actions .all-in {
    grid-column: span 1;
  }
}

@media (min-width: 980px) {
  .app {
    width: min(1260px, 100%);
  }

  #tableView {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas:
      "table log"
      "hand log"
      "actions actions";
    align-items: stretch;
  }

  .table-shell {
    grid-area: table;
  }

  .hand-panel {
    grid-area: hand;
  }

  .log-panel {
    grid-area: log;
    align-self: start;
    height: min(68vh, 620px);
    max-height: min(68vh, 620px);
    min-height: 0;
  }

  .log-panel[open] .action-log {
    height: calc(min(68vh, 620px) - 54px);
    max-height: calc(min(68vh, 620px) - 54px);
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 12px;
  }

  .actions {
    grid-area: actions;
  }
}

@media (max-width: 430px) {
  .app {
    padding-inline: 10px;
  }

  .action-log {
    height: min(36vh, 240px);
    max-height: 240px;
    padding-inline: 10px;
  }

  .log-row {
    grid-template-columns: 62px minmax(0, 1fr);
    column-gap: 7px;
    margin-bottom: 9px;
    padding-bottom: 8px;
    font-size: 12px;
    line-height: 1.5;
  }

  .log-row span,
  .log-row b {
    line-height: 1.5;
  }

  .table-shell {
    min-height: 62vh;
  }

  .felt {
    inset: 31% 7% 28%;
  }

  .seat {
    width: 40vw;
    min-height: 67px;
    padding: 7px;
  }

  .pos-1,
  .pos-7 {
    bottom: 18%;
  }

  .pos-2,
  .pos-6 {
    top: 10%;
  }
}

/* Warmer card-room presentation */
:root {
  --bg: #090d0c;
  --panel: #151d1a;
  --panel-2: #202a26;
  --felt: #176947;
  --felt-dark: #083d2d;
  --line: rgba(255, 244, 215, 0.16);
  --text: #fff8e8;
  --muted: #bfc8bf;
  --gold: #f2c14e;
  --red: #d94b4b;
  --green: #54d69b;
}

body {
  background:
    radial-gradient(circle at 50% -20%, rgba(112, 54, 29, .55), transparent 48rem),
    linear-gradient(145deg, #0d1713, #070a09 72%);
}

.app {
  width: min(1380px, 100%);
}

.topbar {
  grid-template-columns: 44px minmax(0, 1fr) 44px auto;
  min-height: 76px;
}

.topbar h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  color: #fff3cf;
}

.home-link {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  padding: 0 15px;
  border: 1px solid rgba(242, 193, 78, .5);
  border-radius: 12px;
  color: #ffe29a;
  background: rgba(242, 193, 78, .08);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.home-link:hover,
.home-link:focus-visible {
  color: #241900;
  background: var(--gold);
  outline: 2px solid #fff0bd;
  outline-offset: 2px;
}

.player-panel {
  max-width: 520px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(35, 48, 43, .96), rgba(17, 28, 24, .96));
}

#playerNameHint {
  color: #d8cba9;
  font-size: 12px;
  line-height: 1.35;
}

#playerName[aria-invalid="true"] {
  border-color: #ff8277;
  box-shadow: 0 0 0 3px rgba(255, 130, 119, .18);
}

.room-card {
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(40, 57, 50, .95), rgba(19, 34, 28, .95));
  box-shadow: 0 14px 38px rgba(0, 0, 0, .2);
}

.room-card:hover {
  border-color: rgba(242, 193, 78, .5);
  transform: translateY(-2px);
}

.table-shell {
  min-height: min(72vh, 680px);
  border: 8px solid #4a2b1c;
  border-radius: 48px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(237, 197, 111, .08), transparent 35%),
    linear-gradient(145deg, #17221e, #080d0b);
  box-shadow:
    inset 0 0 0 2px rgba(255, 223, 154, .22),
    inset 0 24px 60px rgba(255, 255, 255, .025),
    0 26px 70px rgba(0, 0, 0, .48);
}

.table-shell::after {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 0;
  border: 1px solid rgba(255, 220, 150, .18);
  border-radius: 37px;
  pointer-events: none;
}

.felt {
  inset: 18% 8% 19%;
  z-index: 1;
  gap: 13px;
  border: 15px solid #68402a;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(54, 160, 105, .48), transparent 58%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.018) 0 1px, transparent 1px 5px),
    linear-gradient(145deg, #14734d, #075039);
  box-shadow:
    inset 0 0 0 3px rgba(16, 7, 3, .38),
    inset 0 0 70px rgba(0, 0, 0, .3),
    0 12px 25px rgba(0, 0, 0, .38);
}

.felt::before {
  content: "FUNBREAK";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 244, 205, .055);
  font: 800 clamp(2rem, 7vw, 5rem)/1 Georgia, serif;
  letter-spacing: .12em;
  pointer-events: none;
}

.felt > * {
  position: relative;
  z-index: 1;
}

.message {
  padding: 7px 12px;
  border: 1px solid rgba(255, 240, 191, .18);
  border-radius: 999px;
  color: #fff8df;
  background: rgba(3, 35, 25, .5);
  font-weight: 700;
}

.pot {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #ffe08a;
  background: rgba(20, 12, 3, .52);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 145, .18);
  font-size: 1.05rem;
}

.pot::before {
  content: "●";
  color: #e7b83e;
  text-shadow: -3px 2px 0 #b7433b, 3px 2px 0 #e8e4d5;
}

.card {
  width: clamp(46px, 10vw, 72px);
  border: 1px solid rgba(80, 49, 29, .7);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.9), transparent 35%),
    linear-gradient(145deg, #fffdf2, #e9e1cf);
  box-shadow: 0 9px 18px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255,255,255,.65);
}

.card.hidden-card,
.fold-card {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.12) 0 3px, transparent 3px 8px),
    linear-gradient(145deg, #7d2831, #36131b);
  box-shadow: inset 0 0 0 3px #ead9b5, 0 8px 17px rgba(0,0,0,.35);
}

.seat {
  z-index: 2;
  width: min(36vw, 190px);
  min-height: 82px;
  padding: 10px 11px;
  border: 1px solid rgba(242, 193, 78, .3);
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(29, 44, 38, .98), rgba(6, 18, 14, .96));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
}

.seat .name {
  color: #fff4d5;
  font-size: 14px;
}

.seat .stack {
  color: #c5d4cb;
}

.seat .mini-cards .card {
  width: 38px;
}

.hand-panel,
.log-panel,
.actions {
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(28, 39, 35, .96), rgba(12, 22, 18, .96));
  box-shadow: 0 16px 38px rgba(0, 0, 0, .24);
}

.log-panel summary {
  color: #eadbb8;
  text-transform: none;
  letter-spacing: .02em;
}

.actions {
  border-color: rgba(242, 193, 78, .22);
}

button {
  border-radius: 11px;
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }
  .home-link {
    grid-column: 1 / -1;
    min-height: 40px;
  }
  .table-shell {
    min-height: 66vh;
    border-width: 5px;
    border-radius: 30px;
  }
  .felt {
    inset: 23% 5% 23%;
    border-width: 9px;
  }
  .seat {
    width: 42vw;
    min-height: 70px;
    padding: 7px;
  }
}
