.odd-theme {
  --game-accent: #cdb7ec;
  --game-light: #ede1f8;
  --game-dark: #65458b;
  --stamp-front: #f7eaff;
  --stamp-back: #bb98df;
}

.relay-theme {
  --game-accent: #a9dbc8;
  --game-light: #ddf1e6;
  --game-dark: #286049;
  --stamp-front: #e3f6eb;
  --stamp-back: #85c0a6;
}

.sides-theme {
  --game-accent: #afd8ee;
  --game-light: #e4f1f8;
  --game-dark: #285e78;
  --stamp-front: #f8edbd;
  --stamp-back: #a5cfe8;
}

.dares-theme {
  --game-accent: #f4b5cb;
  --game-light: #fae3eb;
  --game-dark: #8a3653;
  --stamp-front: #fceaf2;
  --stamp-back: #eda9c4;
}

.bank-theme {
  --game-accent: #ffce79;
  --game-light: #ffedc6;
  --game-dark: #805122;
  --stamp-front: #fff4d5;
  --stamp-back: #f1b46c;
}

.game-tile:where(.odd-theme, .relay-theme, .sides-theme, .dares-theme, .bank-theme) {
  background: var(--game-light);
}

.game-stamp {
  display: grid;
  place-items: center;
  width: min(100%, 145px);
  aspect-ratio: 1.13;
  align-self: center;
  justify-self: center;
  container-type: inline-size;
  user-select: none;
}

.game-stamp span {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  width: 47%;
  aspect-ratio: 3 / 4;
  border: 2px solid var(--ink);
  border-radius: 17%;
  background: var(--stamp-back);
  box-shadow: 2px 3px 0 var(--ink);
  transform: translateX(-30%) rotate(-17deg);
  font: 700 37cqi/1 var(--heading);
}

.game-stamp span + span {
  background: var(--stamp-front);
  transform: translate(30%, 4%) rotate(14deg);
}

.relay-stamp span:first-child {
  border-radius: 50%;
  aspect-ratio: 1;
}

.bank-stamp span { aspect-ratio: 1; }
.party-round .game-intro { padding-bottom: 25px; }

.party-player-count {
  margin-top: 10px;
  color: var(--game-dark);
  font-size: .89rem;
  font-weight: 800;
}

.party-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(250px, 1fr);
  align-items: start;
  gap: clamp(18px, 3vw, 38px);
}

.party-board { border-top: 7px solid var(--game-accent); }
.party-board .table-card { min-height: 182px; }
.party-board .table-prompt { font-size: clamp(1.9rem, 4.6vw, 3.25rem); }
.party-board .table-note { max-width: 48ch; }
.party-board .table-actions .score-reset {
  margin-left: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.party-rules {
  margin-top: 3px;
  padding: 17px 18px 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
}

.party-rules h2, .party-related h2 {
  font: 700 clamp(1.4rem, 2.7vw, 1.85rem)/1.12 var(--heading);
  letter-spacing: -.037em;
}

.party-rules ol {
  margin: 12px 0 0;
  padding-inline-start: 1.35em;
}

.party-rules li + li { margin-top: 9px; }
.party-rules li::marker { color: var(--game-dark); font-weight: 800; }
.party-related { margin-block: 32px 46px; }
.party-related p { margin-top: 9px; }

.round-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 142px), 1fr));
  gap: 11px;
  max-width: 460px;
  margin-top: 16px;
}

.round-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr));
  gap: 8px;
  margin-top: 12px;
}

.round-options button {
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  font: 800 .91rem/1.2 var(--body);
  cursor: pointer;
}

.round-options button:hover { background: var(--game-light); }
.round-score { margin-top: 10px; color: var(--game-dark); font-weight: 800; }
.round-results { display: grid; gap: 4px 20px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin: 12px 0 0; padding: 0; list-style: none; }
.round-results li { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.round-results .current-player { color: var(--game-dark); font-weight: 800; }

.side-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }

.side-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  min-height: 148px;
  padding: clamp(11px, 2vw, 17px);
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  background: var(--game-light);
}

.side-choice:nth-child(2) { background: #faedc1; }
.side-choice > p:first-of-type { font: 700 clamp(1.12rem, 2.7vw, 1.68rem)/1.14 var(--heading); overflow-wrap: anywhere; }
.side-letter { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--ink); border-radius: 50%; background: var(--cream); font-weight: 800; }
.side-total { margin-top: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
#vote-a { background: var(--game-accent); }
#vote-b { background: #f7d981; }
.dares-theme #play-title { margin-bottom: 11px; }

.dice-pair { display: flex; justify-content: center; gap: 8px; }

.die-face {
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  place-items: center;
  width: 43px;
  height: 43px;
  padding: 4px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--cream);
  box-shadow: 1px 2px 0 var(--ink);
}

.die-face:empty { opacity: .52; }
.die-face span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }

@media (min-width: 1040px) {
  .home-games .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-games .game-tile { grid-template-columns: minmax(0, 1fr) minmax(72px, 26%); }
  .home-games .card-title { font-size: clamp(1.6rem, 2.65vw, 1.9rem); }
}

@media (max-width: 760px) {
  .party-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .party-board .table-card { min-height: 158px; }
  .party-round .game-intro { padding-bottom: 20px; }
}

@media (max-width: 400px) {
  .party-board .table-actions button { padding-inline: 8px; }
  .party-board .table-actions .score-reset { margin-left: 0; }
  .side-options { gap: 6px; }
}
