:root {
  color-scheme: dark;
  --ink: #22140d;
  --cream: #fff2d4;
  --paper: #ffe1aa;
  --gold: #f8bb46;
  --hot: #d84b32;
  --green: #246145;
  --teal: #1d6f73;
  --purple: #633f86;
  --shadow: 0 18px 40px rgb(0 0 0 / 0.32);
}

* {
  box-sizing: border-box;
}

body {
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #18100c;
  color: var(--cream);
}

button {
  min-height: 44px;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.motion-off *,
.motion-off *::before,
.motion-off *::after {
  scroll-behavior: auto !important;
  transition: none !important;
  animation: none !important;
}

.app-shell,
.game-screen {
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
}

.menu-root,
.game-root {
  position: fixed;
  inset: 0;
  height: 100dvh;
  max-height: 100dvh;
}

.game-root {
  overflow: hidden;
}

.menu-root {
  overflow-y: auto;
  background: #18100c;
}

.is-hidden {
  display: none !important;
}

.menu-screen {
  position: relative;
  min-height: 100svh;
  padding: max(18px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  overflow: hidden;
  isolation: isolate;
}

.menu-screen::before,
.menu-backdrop {
  position: absolute;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    linear-gradient(110deg, rgb(22 12 8 / 0.52), rgb(19 62 48 / 0.42), rgb(216 75 50 / 0.18)),
    url("../../public/assets/art/backgrounds/Family Reunion Park Scene.png") center / cover;
  filter: saturate(1.08);
}

.menu-screen::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(180deg, rgb(255 191 78 / 0.16), transparent 28%),
    radial-gradient(ellipse at center, transparent 0 42%, rgb(8 5 4 / 0.78) 100%);
  backdrop-filter: blur(2px);
}

.menu-stage,
.menu-header,
.setup-grid,
.menu-footer-actions,
.menu-panel {
  width: min(100%, 1120px);
  margin-inline: auto;
}

.menu-stage {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100svh - 40px);
  gap: 20px;
}

.hero-title {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding-top: 8px;
  text-align: center;
  text-shadow: 0 4px 18px rgb(0 0 0 / 0.58);
}

.spade-logo {
  display: grid;
  place-items: center;
  width: clamp(86px, 22vw, 148px);
  aspect-ratio: 1;
  border: 3px solid rgb(255 229 153 / 0.82);
  border-radius: 50%;
  background:
    linear-gradient(145deg, #fff0b8, #f5b331 42%, #70430c);
  color: #22140d;
  font-size: clamp(3.4rem, 13vw, 6.8rem);
  line-height: 1;
  box-shadow: 0 0 22px rgb(248 187 70 / 0.72), inset 0 0 20px rgb(255 255 255 / 0.42);
  animation: spadeFloat 2600ms ease-in-out infinite;
}

.hero-title p,
.menu-header p,
.panel-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-title h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.4rem, 9vw, 5.4rem);
  line-height: 0.9;
  text-transform: uppercase;
  -webkit-text-stroke: 1px rgb(255 232 168 / 0.7);
}

.hero-title h1 span {
  display: block;
  color: var(--gold);
}

.character-showcase {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
}

.character-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 2px solid rgb(255 229 153 / 0.62);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(29 111 115 / 0.18), rgb(34 20 13 / 0.94)),
    var(--green);
  box-shadow: 0 20px 34px rgb(0 0 0 / 0.4);
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: panelRise 420ms ease both;
}

.character-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 44px rgb(0 0 0 / 0.48), 0 0 20px rgb(248 187 70 / 0.32);
}

.character-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  object-position: center top;
}

.character-card div {
  position: absolute;
  inset: auto 8px 8px;
  padding: 9px;
  border: 1px solid rgb(255 242 212 / 0.28);
  border-radius: 8px;
  background: rgb(20 11 8 / 0.78);
}

.character-card strong,
.character-card span {
  display: block;
}

.character-card strong {
  color: var(--gold);
}

.character-card span {
  font-size: 0.72rem;
  color: var(--paper);
}

.main-actions,
.menu-footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.mode-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 1120px);
  margin-inline: auto;
}

.mode-card {
  min-height: 116px;
  padding: 12px;
  border: 2px solid rgb(255 229 153 / 0.34);
  border-radius: 8px;
  background: linear-gradient(145deg, rgb(34 20 13 / 0.78), rgb(16 54 43 / 0.74));
  box-shadow: 0 12px 22px rgb(0 0 0 / 0.32);
  text-align: left;
}

.mode-card.selected,
.mode-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgb(248 187 70 / 0.26), 0 14px 26px rgb(0 0 0 / 0.36);
}

.mode-card span,
.mode-card strong,
.mode-card small {
  display: block;
}

.mode-card span {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgb(248 187 70 / 0.18);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.mode-card strong {
  margin-top: 8px;
  color: var(--cream);
}

.mode-card small {
  margin-top: 5px;
  color: var(--paper);
  line-height: 1.35;
}

.glow-button {
  position: relative;
  min-width: 150px;
  padding: 12px 18px;
  overflow: hidden;
  border: 2px solid rgb(255 229 153 / 0.78);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(36 97 69 / 0.98), rgb(18 44 35 / 0.98));
  color: var(--cream);
  box-shadow: 0 12px 24px rgb(0 0 0 / 0.34), inset 0 0 14px rgb(255 255 255 / 0.08);
  font-weight: 950;
  text-transform: uppercase;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.glow-button::before {
  position: absolute;
  inset: -60% auto -60% -40%;
  width: 42%;
  content: "";
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.52), transparent);
  transform: rotate(18deg);
  animation: buttonSheen 2600ms ease-in-out infinite;
}

.glow-button.primary {
  background:
    linear-gradient(180deg, #ffd775, #d49424 52%, #7d4610);
  color: #22140d;
  box-shadow: 0 0 20px rgb(248 187 70 / 0.46), 0 16px 28px rgb(0 0 0 / 0.4);
}

.glow-button.ghost {
  background: rgb(34 20 13 / 0.72);
}

.glow-button:hover,
.glow-button:focus-visible {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.08);
}

.glow-button:active {
  transform: translateY(1px) scale(0.99);
}

.glow-button:disabled {
  opacity: 0.45;
}

.glossary-screen {
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
}

.glossary-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  flex-direction: column;
  background:
    linear-gradient(150deg, rgb(10 20 10 / 0.94), rgb(34 20 13 / 0.94)),
    url("../../public/assets/art/backgrounds/Family Reunion Park Scene.png") center / cover;
  color: var(--cream);
}

.glossary-overlay.visible {
  display: flex;
}

.glossary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px 8px;
}

.glossary-header h1 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(2.2rem, 8vw, 4rem);
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: 0 5px 18px rgb(0 0 0 / 0.55);
}

.glossary-close {
  min-height: 42px;
  padding: 8px 13px;
  border: 2px solid rgb(255 229 153 / 0.52);
  border-radius: 8px;
  background: rgb(34 20 13 / 0.8);
  color: var(--cream);
  font-weight: 950;
  text-transform: uppercase;
}

.glossary-search-wrap {
  display: grid;
  gap: 6px;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 8px 16px 12px;
}

.glossary-search-wrap span {
  color: var(--paper);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.glossary-search {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid rgb(212 160 23 / 0.45);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
}

.glossary-search::placeholder {
  color: rgb(255 255 255 / 0.48);
}

.glossary-list {
  flex: 1;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 0 16px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.glossary-item {
  padding: 14px 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.glossary-term {
  margin: 0 0 4px;
  color: #d4a017;
  font-size: 1rem;
  font-weight: 900;
}

.glossary-def {
  margin: 0;
  color: rgb(255 255 255 / 0.78);
  font-size: 0.86rem;
  line-height: 1.5;
}

.glossary-empty {
  margin: 28px 0 0;
  color: var(--paper);
  font-weight: 850;
  text-align: center;
}

.menu-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.menu-header h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.4rem);
  line-height: 0.95;
  color: var(--cream);
  text-transform: uppercase;
  text-shadow: 0 5px 18px rgb(0 0 0 / 0.55);
}

.menu-header span {
  color: var(--paper);
  font-weight: 800;
}

.back-chip {
  min-width: 82px;
  border: 2px solid rgb(255 229 153 / 0.52);
  border-radius: 8px;
  background: rgb(34 20 13 / 0.72);
  color: var(--cream);
  font-weight: 950;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 14px;
}

.single-player-layout,
.cosmetics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 14px;
  width: min(100%, 1180px);
  margin-inline: auto;
  align-items: start;
}

.setup-stack {
  display: grid;
  gap: 14px;
}

.panel-copy {
  margin: 8px 0 0;
  color: var(--paper);
  line-height: 1.45;
}

.menu-panel {
  padding: 16px;
  border: 2px solid rgb(255 229 153 / 0.46);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgb(16 54 43 / 0.92), rgb(34 20 13 / 0.9));
  box-shadow: 0 22px 40px rgb(0 0 0 / 0.42), inset 0 0 28px rgb(248 187 70 / 0.08);
  animation: panelRise 360ms ease both;
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.difficulty-card,
.placeholder-pill {
  min-height: 96px;
  padding: 12px;
  border: 2px solid rgb(255 242 212 / 0.28);
  border-radius: 8px;
  background: rgb(255 242 212 / 0.08);
  text-align: left;
}

.placeholder-pill.selected {
  border-color: var(--gold);
  background: rgb(248 187 70 / 0.18);
  color: var(--gold);
}

.loadout-row {
  display: grid;
  gap: 7px;
}

.loadout-row span {
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.loadout-row select {
  min-height: 46px;
  border: 2px solid rgb(255 229 153 / 0.46);
  border-radius: 8px;
  background: #22140d;
  color: var(--cream);
  font: inherit;
  font-weight: 850;
}

.visual-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.visual-tile {
  min-height: 176px;
  padding: 9px;
  border: 2px solid rgb(255 242 212 / 0.24);
  border-radius: 8px;
  background: rgb(0 0 0 / 0.2);
  text-align: left;
}

.tile-art {
  display: block;
  width: 100%;
  height: 86px;
  border: 1px solid rgb(255 242 212 / 0.22);
  border-radius: 8px;
  background-position: center;
  background-size: cover;
}

.visual-tile strong,
.visual-tile small,
.cosmetic-card strong,
.cosmetic-card small {
  display: block;
}

.visual-tile strong,
.cosmetic-card strong {
  margin-top: 8px;
  color: var(--gold);
}

.visual-tile small,
.cosmetic-card small {
  margin-top: 4px;
  color: var(--paper);
  line-height: 1.3;
}

.card-back-grid .visual-tile {
  text-align: center;
}

.card-back-mini,
.preview-card-back {
  display: block;
  width: 64px;
  aspect-ratio: 0.72;
  margin-inline: auto;
  border: 2px solid rgb(255 229 153 / 0.7);
  border-radius: 8px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 14px 24px rgb(0 0 0 / 0.38);
}

.match-preview-panel,
.cosmetic-preview-panel {
  position: sticky;
  top: 16px;
}

.preview-table,
.large-cosmetic-preview {
  position: relative;
  min-height: 280px;
  margin-top: 12px;
  overflow: hidden;
  border: 2px solid rgb(255 229 153 / 0.5);
  border-radius: 8px;
  background:
    linear-gradient(rgb(22 65 48 / 0.2), rgb(34 20 13 / 0.22)),
    var(--preview-table-art) center / cover;
  box-shadow: inset 0 0 40px rgb(0 0 0 / 0.38);
}

.preview-team-layout {
  position: absolute;
  inset: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.preview-team-layout article {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgb(255 242 212 / 0.26);
  border-radius: 8px;
  background: rgb(20 11 8 / 0.72);
}

.preview-team-layout img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
}

.preview-team-layout strong,
.preview-team-layout span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-team-layout strong {
  color: var(--gold);
}

.preview-team-layout span {
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 850;
}

.preview-card-back {
  position: absolute;
  right: 18px;
  bottom: 16px;
  background-image: var(--preview-card-art);
  transform: rotate(8deg);
}

.preview-card-back.large {
  width: 106px;
  right: 50%;
  bottom: 50%;
  transform: translate(50%, 50%) rotate(7deg);
}

.preview-copy {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.preview-copy h2,
.cosmetic-preview-panel h2,
.cosmetic-preview-panel h3 {
  margin: 0;
  color: var(--gold);
}

.preview-copy p,
.cosmetic-preview-panel p {
  margin: 0;
  color: var(--paper);
  line-height: 1.45;
}

.lock-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  border: 1px solid rgb(255 229 153 / 0.6);
  border-radius: 999px;
  background: rgb(34 20 13 / 0.82);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cosmetic-section-kicker {
  display: block;
  margin-top: 16px;
}

.cosmetic-grid,
.roadmap-panel {
  display: grid;
  gap: 10px;
}

.cosmetic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.cosmetic-card {
  min-height: 132px;
  padding: 12px;
  border: 2px solid rgb(255 242 212 / 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(248 187 70 / 0.12), rgb(29 111 115 / 0.18)),
    rgb(34 20 13 / 0.7);
  text-align: left;
}

.cosmetic-card.selected,
.cosmetic-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 22px rgb(248 187 70 / 0.22);
}

.cosmetic-card strong,
.cosmetic-card span {
  display: block;
}

.cosmetic-card strong {
  color: var(--gold);
}

.cosmetic-card span {
  margin-top: 6px;
  color: var(--paper);
  font-size: 0.84rem;
}

.cosmetic-card .tile-art {
  margin-top: 0;
}

.roadmap-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.roadmap-panel article {
  padding: 12px;
  border: 1px solid rgb(255 242 212 / 0.2);
  border-radius: 8px;
  background: rgb(0 0 0 / 0.16);
}

.roadmap-panel p {
  margin: 8px 0 0;
  color: var(--paper);
  line-height: 1.45;
}

.difficulty-card strong,
.difficulty-card span {
  display: block;
}

.difficulty-card strong {
  color: var(--gold);
  font-size: 1.08rem;
}

.difficulty-card span {
  margin-top: 5px;
  color: var(--paper);
  font-size: 0.84rem;
}

.difficulty-card.selected {
  border-color: var(--gold);
  background: linear-gradient(145deg, rgb(248 187 70 / 0.24), rgb(29 111 115 / 0.24));
  box-shadow: 0 0 22px rgb(248 187 70 / 0.25);
}

.future-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.partner-tile {
  min-height: 136px;
  padding: 7px;
  border: 2px solid rgb(255 242 212 / 0.24);
  border-radius: 8px;
  background: rgb(0 0 0 / 0.2);
  box-shadow: 0 10px 18px rgb(0 0 0 / 0.22);
}

.partner-tile img {
  width: 100%;
  height: 92px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
}

.partner-tile span {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-tile.selected,
.partner-tile:hover,
.visual-tile.selected,
.visual-tile:hover,
.cosmetic-card.selected,
.cosmetic-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 22px rgb(248 187 70 / 0.26), 0 14px 26px rgb(0 0 0 / 0.32);
}

.partner-style-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgb(255 242 212 / 0.22);
  border-radius: 8px;
  background: rgb(0 0 0 / 0.18);
}

.partner-style-card img {
  width: 112px;
  height: 132px;
  border: 2px solid rgb(255 229 153 / 0.5);
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
}

.partner-style-card p {
  margin: 6px 0 10px;
  color: var(--paper);
  line-height: 1.45;
}

.stat-stack {
  display: grid;
  gap: 7px;
}

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

.stat-row span {
  color: var(--cream);
  font-size: 0.76rem;
  font-weight: 900;
}

.stat-row i {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 242 212 / 0.14);
}

.stat-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--hot));
}

.placeholder-pill {
  min-height: 56px;
  color: var(--paper);
  font-weight: 850;
  text-align: center;
}

.settings-panel {
  display: grid;
  gap: 12px;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 240px);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgb(255 242 212 / 0.18);
  border-radius: 8px;
  background: rgb(0 0 0 / 0.18);
}

.setting-row strong,
.setting-row small {
  display: block;
}

.setting-row small {
  color: var(--paper);
}

.setting-row input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}

.setting-row input[type="checkbox"] {
  justify-self: end;
  width: 28px;
  height: 28px;
  accent-color: var(--gold);
}

.setting-row select {
  min-height: 44px;
  border: 2px solid rgb(255 229 153 / 0.52);
  border-radius: 8px;
  background: #22140d;
  color: var(--cream);
  font: inherit;
  font-weight: 850;
}

.tutorial-screen .menu-panel {
  max-width: 980px;
}

.tutorial-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(100%, 980px);
  margin-inline: auto;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgb(36 97 69 / 0.92), rgb(34 20 13 / 0.94)),
    radial-gradient(circle at 28% 20%, rgb(248 187 70 / 0.18), transparent 34%);
}

.tutorial-progress {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--gold);
  font-weight: 950;
}

.tutorial-progress div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 242 212 / 0.18);
}

.tutorial-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--hot));
}

.tutorial-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.tutorial-dots button {
  width: 10px;
  min-width: 10px;
  height: 10px;
  min-height: 10px;
  padding: 0;
  border: 1px solid rgb(255 242 212 / 0.62);
  border-radius: 999px;
  background: rgb(255 242 212 / 0.18);
}

.tutorial-dots button.active {
  width: 28px;
  background: var(--gold);
  box-shadow: 0 0 14px rgb(248 187 70 / 0.52);
}

.tutorial-slide {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 0.58fr);
  gap: 16px;
  align-items: stretch;
  min-height: 430px;
  touch-action: pan-y;
}

.tutorial-character {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 100%;
  overflow: hidden;
  border: 2px solid rgb(255 229 153 / 0.52);
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent 34%, rgb(20 11 8 / 0.9)),
    rgb(20 11 8 / 0.38);
}

.tutorial-character img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.tutorial-character div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  padding: 14px;
  background: linear-gradient(180deg, transparent, rgb(20 11 8 / 0.86));
}

.tutorial-character strong {
  color: var(--cream);
  font-size: clamp(1.45rem, 4vw, 2.4rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.tutorial-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.tutorial-voice {
  margin: 0;
  color: var(--cream);
  font-size: clamp(1.1rem, 2.7vw, 1.55rem);
  font-weight: 850;
  line-height: 1.28;
}

.tutorial-rule {
  padding: 14px;
  border: 2px solid rgb(248 187 70 / 0.48);
  border-radius: 8px;
  background: rgb(20 11 8 / 0.52);
  box-shadow: inset 0 0 22px rgb(248 187 70 / 0.1);
}

.tutorial-rule span {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tutorial-rule p {
  margin: 5px 0 0;
  color: var(--paper);
  font-size: clamp(0.98rem, 2vw, 1.14rem);
  font-weight: 800;
  line-height: 1.35;
}

.tutorial-example {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  min-height: 86px;
}

.tutorial-example span {
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 0.72;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 12px 22px rgb(0 0 0 / 0.36);
  font-weight: 950;
}

.tutorial-example .tutorial-joker-card {
  background:
    radial-gradient(circle at 50% 38%, rgb(248 187 70 / 0.34), transparent 42%),
    linear-gradient(135deg, #1a0a3a, #2c1654 58%, #13071f);
  color: var(--gold);
  text-shadow: 0 1px 4px rgb(0 0 0 / 0.72);
}

.tutorial-swipe-hint {
  color: rgb(255 242 212 / 0.68);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.tutorial-skip {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 14px;
  z-index: 5;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgb(255 229 153 / 0.48);
  border-radius: 999px;
  background: rgb(20 11 8 / 0.72);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.micro-tutorial-card {
  background:
    linear-gradient(145deg, rgb(18 48 36 / 0.95), rgb(34 20 13 / 0.94)),
    radial-gradient(circle at 68% 16%, rgb(248 187 70 / 0.2), transparent 34%);
}

.micro-tutorial-copy {
  align-content: center;
}

.micro-tutorial-copy .tutorial-rule {
  background: linear-gradient(135deg, rgb(248 187 70 / 0.22), rgb(20 11 8 / 0.58));
}

.micro-tutorial-copy .tutorial-rule p {
  margin: 0;
  color: var(--gold);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  text-align: center;
  text-transform: uppercase;
}

.micro-animation {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 176px;
  padding: 16px;
  overflow: hidden;
  border: 2px solid rgb(255 229 153 / 0.36);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 28%, rgb(248 187 70 / 0.18), transparent 42%),
    rgb(0 0 0 / 0.18);
}

.micro-animation span {
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 0.72;
  border: 2px solid rgb(255 229 153 / 0.82);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 950;
  box-shadow: 0 12px 24px rgb(0 0 0 / 0.32);
}

.micro-animation strong,
.micro-animation em,
.micro-animation b {
  color: var(--gold);
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.micro-spades {
  grid-template-columns: repeat(4, auto);
}

.micro-spades strong {
  grid-column: 1 / -1;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  animation: coachGoldPulse 1.4s ease-in-out infinite;
}

.micro-spades .winner {
  animation: microWinnerRise 1.4s ease-in-out infinite;
  box-shadow: 0 0 28px rgb(248 187 70 / 0.78), 0 14px 24px rgb(0 0 0 / 0.34);
}

.micro-spades .faded {
  animation: microFadeSuit 1.4s ease-in-out infinite;
}

.micro-bid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.micro-bid strong,
.micro-bid em {
  grid-column: 1 / -1;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.micro-hand {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 96px;
  padding-top: 18px;
}

.micro-hand span {
  margin-left: -18px;
  transform-origin: 50% 120%;
}

.micro-hand span:first-child {
  margin-left: 0;
}

.micro-hand b {
  position: absolute;
  top: -2px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  transform: translateX(-50%);
  animation: coachGoldPulse 1.2s ease-in-out infinite;
}

.micro-follow {
  gap: 8px;
}

.led-suit {
  color: var(--gold);
  font-weight: 950;
  text-transform: uppercase;
}

.micro-follow-hand {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.micro-follow-hand.no-hearts {
  animation: microSwapHands 3.2s ease-in-out infinite;
}

.micro-follow .legal {
  border-color: #7cff97;
  box-shadow: 0 0 18px rgb(124 255 151 / 0.52), 0 12px 24px rgb(0 0 0 / 0.32);
}

.micro-follow .dim {
  opacity: 0.34;
  filter: grayscale(1);
}

.micro-jokers {
  gap: 8px;
}

.joker-showdown {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, auto);
  place-items: center;
  gap: 7px;
  min-height: 118px;
}

.micro-animation .micro-joker-card {
  background:
    radial-gradient(circle at 50% 38%, rgb(248 187 70 / 0.34), transparent 42%),
    linear-gradient(135deg, #1a0a3a, #2c1654 58%, #13071f);
  color: var(--gold);
  text-shadow: 0 1px 5px rgb(0 0 0 / 0.72);
}

.micro-joker-card.big {
  z-index: 2;
  animation:
    jokerMicroEntry 420ms ease-out both,
    jokerMicroRise 1.5s ease-in-out 520ms infinite,
    jokerMicroGlow 800ms ease-in-out 420ms 3;
}

.micro-joker-card.little {
  position: absolute;
  right: 8px;
  bottom: -2px;
  width: 42px;
  animation:
    jokerMicroLittleEntry 420ms ease-out 2.1s both,
    jokerMicroLittleGlow 760ms ease-in-out 2.52s 3;
}

.micro-joker-target {
  animation: jokerTargetFade 1.5s ease-in-out 540ms infinite;
}

.micro-jokers strong,
.micro-jokers em {
  font-size: clamp(1rem, 3vw, 1.65rem);
}

.micro-jokers em {
  color: var(--paper);
  font-style: normal;
  letter-spacing: 0.04em;
}

.micro-practice strong {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
}

.micro-practice em {
  color: var(--paper);
  font-style: normal;
  font-size: clamp(1rem, 2.6vw, 1.25rem);
}

.history-screen .menu-panel {
  max-width: 980px;
}

.history-card {
  display: grid;
  gap: 12px;
  width: min(100%, 980px);
  margin-inline: auto;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgb(34 20 13 / 0.95), rgb(16 54 43 / 0.9)),
    radial-gradient(circle at 80% 18%, rgb(248 187 70 / 0.16), transparent 34%);
}

.history-slide {
  display: grid;
  grid-template-columns: minmax(190px, 0.36fr) minmax(0, 0.64fr);
  gap: 16px;
  min-height: 430px;
  touch-action: pan-y;
}

.history-era {
  display: grid;
  align-content: end;
  gap: 10px;
  min-height: 100%;
  padding: 16px;
  border: 2px solid rgb(255 229 153 / 0.5);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(248 187 70 / 0.18), rgb(20 11 8 / 0.86)),
    var(--green);
  box-shadow: inset 0 0 34px rgb(0 0 0 / 0.32);
}

.history-era span {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgb(255 242 212 / 0.44);
  border-radius: 999px;
  background: rgb(20 11 8 / 0.52);
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-era strong {
  color: var(--cream);
  font-size: clamp(1.7rem, 4.8vw, 3.1rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.history-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.history-copy > p {
  margin: 0;
  color: var(--cream);
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 750;
  line-height: 1.5;
}

.history-copy blockquote {
  margin: 0;
  padding: 14px;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  background: rgb(20 11 8 / 0.54);
  color: var(--paper);
  font-size: clamp(1rem, 2.2vw, 1.24rem);
  font-weight: 900;
  line-height: 1.35;
}

.history-credit {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 2px solid rgb(248 187 70 / 0.5);
  border-radius: 8px;
  background: rgb(248 187 70 / 0.12);
}

.history-credit span {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.history-credit p {
  margin: 0;
  color: var(--paper);
  font-weight: 780;
  line-height: 1.38;
}

.history-credit a {
  color: var(--gold);
  font-weight: 950;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.coming-soon-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.coming-soon-panel img {
  width: 100%;
  border: 2px solid rgb(255 229 153 / 0.52);
  border-radius: 8px;
}

.coming-soon-panel h2 {
  margin: 4px 0;
  color: var(--gold);
}

.game-screen {
  --player-dock-height: 138px;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 14px calc(var(--player-dock-height) + max(10px, env(safe-area-inset-bottom)));
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.game-screen.is-bidding {
  --player-dock-height: 136px;
}

.game-screen.is-human-turn {
  --player-dock-height: 146px;
}

.game-screen.is-bidding .action-panel {
  position: absolute;
  right: 14px;
  bottom: calc(100% + 8px);
  left: 14px;
  z-index: 10;
  width: auto;
}

.game-screen.is-bidding .hand-zone {
  min-height: 96px;
}

.phase-player-turn .player-area {
  box-shadow:
    0 -2px 0 rgb(248 187 70 / 0.88),
    0 -12px 28px rgb(248 187 70 / 0.28);
}

.table-scene {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  min-height: 0;
  padding: 6px 8px 12px;
  border: 2px solid rgb(255 229 153 / 0.18);
  border-radius: 8px;
  background: rgb(20 11 8 / 0.18);
  backdrop-filter: blur(0.5px);
  overflow: hidden;
}

.player-area {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 9999;
  display: grid;
  grid-template-rows: minmax(42px, auto) minmax(92px, auto);
  gap: 8px;
  width: min(100%, 1040px);
  height: var(--player-dock-height);
  margin-inline: auto;
  padding: 8px 14px max(10px, env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, transparent, rgb(20 11 8 / 0.88) 30%, rgb(20 11 8 / 0.98));
  transform: translateX(-50%);
}

.audio-debug-panel {
  margin-top: 14px;
}

.audio-test-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.audio-debug-panel pre {
  max-height: 180px;
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  background: rgb(0 0 0 / 0.35);
  color: var(--paper);
  font-size: 0.78rem;
}

.scene-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-color: #18100c;
  background-image:
    linear-gradient(180deg, rgb(34 20 13 / 0.16), rgb(34 20 13 / 0.74)),
    var(--scene-bg-url, url("/public/assets/art/backgrounds/Main Backyard BBQ Scene.png"));
  background-position:
    center center,
    center top;
  background-repeat:
    no-repeat,
    no-repeat;
  background-size:
    cover,
    100% auto;
}

.scene-backdrop::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: radial-gradient(circle at 50% 48%, transparent 0 34%, rgb(20 11 8 / 0.58) 86%);
}

.top-hud,
.score-strip,
.action-panel,
.trash-talk {
  width: min(100%, 1040px);
  margin-inline: auto;
}

.score-strip {
  display: none;
}

.top-hud {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 0.8fr) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
}

.hud-center {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
}

.team-score-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 78px;
  padding: 10px 12px;
  border: 2px solid rgb(255 229 153 / 0.46);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgb(16 54 43 / 0.86), rgb(34 20 13 / 0.78));
  box-shadow: 0 14px 26px rgb(0 0 0 / 0.28);
}

.team-score-card div {
  min-width: 0;
}

.team-score-card span,
.team-score-card em,
.round-chip {
  display: block;
  color: var(--gold);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.team-score-card .books-status {
  margin-top: 4px;
  color: rgb(255 242 212 / 0.86);
  font-size: 0.78rem;
}

.team-score-card .books-status.is-emphasized {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid rgb(255 242 212 / 0.34);
  border-radius: 6px;
  background: rgb(248 187 70 / 0.16);
  color: #fff2d4;
  font-size: 0.9rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgb(20 11 8 / 0.22);
}

.team-score-card small {
  display: block;
  overflow: hidden;
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-score-card strong {
  display: grid;
  place-items: center;
  min-width: 72px;
  min-height: 56px;
  border-left: 2px solid rgb(255 229 153 / 0.26);
  color: var(--gold);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.round-chip {
  padding: 4px 9px;
  border: 1px solid rgb(255 229 153 / 0.44);
  border-radius: 999px;
  background: rgb(34 20 13 / 0.68);
}

.top-actions {
  display: flex;
  gap: 8px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 3px 10px rgb(0 0 0 / 0.45);
}

.brand-lockup img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-lockup p,
.brand-lockup h1 {
  margin: 0;
  line-height: 1;
}

.brand-lockup p {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--gold);
}

.brand-lockup h1 {
  font-size: clamp(1.3rem, 4vw, 2rem);
  text-transform: uppercase;
  color: var(--gold);
}

.icon-button,
.primary-action,
.bid-panel button {
  border: 2px solid rgb(255 242 212 / 0.72);
  border-radius: 8px;
  background: rgb(34 20 13 / 0.76);
  box-shadow: 0 8px 16px rgb(0 0 0 / 0.22);
  font-weight: 800;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.icon-button:hover,
.primary-action:hover,
.bid-panel button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 0 16px rgb(248 187 70 / 0.3), 0 10px 18px rgb(0 0 0 / 0.26);
}

.score-strip {
  display: none;
}

.score-strip article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
  padding: 8px 10px;
  border: 2px solid rgb(255 242 212 / 0.36);
  border-radius: 8px;
  background: rgb(34 20 13 / 0.68);
}

.score-strip span,
.score-strip small {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.score-strip strong {
  grid-row: span 2;
  font-size: 1.8rem;
  color: var(--gold);
}

.players-ring {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 220px));
  justify-content: center;
  gap: 8px;
  width: min(100%, 1040px);
  margin-inline: auto;
  pointer-events: none;
}

.player-seat {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  min-height: 94px;
  padding: 6px;
  border: 2px solid rgb(255 242 212 / 0.32);
  border-radius: 8px;
  background: rgb(34 20 13 / 0.7);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.player-seat img {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center 18%;
  background: var(--gold);
}

.player-seat > div {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.player-seat.is-current {
  border-color: var(--gold);
  box-shadow: 0 0 24px rgb(248 187 70 / 0.42), var(--shadow);
  transform: translateY(-2px);
}

.player-seat.is-trick-winner {
  border-color: #fff2d4;
  box-shadow: 0 0 26px rgb(248 187 70 / 0.62), var(--shadow);
}

.player-seat.is-speaking {
  z-index: 2;
}

.speech-bubble {
  position: absolute;
  left: 18px;
  bottom: calc(100% - 4px);
  max-width: min(270px, 78vw);
  padding: 9px 11px;
  border: 2px solid #3d1c12;
  border-radius: 16px 16px 16px 4px;
  background: #fff2d4;
  color: var(--ink);
  box-shadow: 0 12px 22px rgb(0 0 0 / 0.28);
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.2;
  animation: speechPop 180ms ease both;
}

.reaction-goodPlay img {
  animation: reactionBounce 420ms ease both;
}

.reaction-winning img {
  animation: reactionGlow 900ms ease-in-out infinite alternate;
}

.reaction-losing img {
  animation: reactionShake 360ms ease both;
}

.reaction-trashTalk img {
  animation: reactionPop 280ms ease both;
}

.reaction-shocked img {
  animation: reactionZoom 260ms ease both;
}

.player-seat strong,
.player-seat span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-seat strong {
  font-size: clamp(0.72rem, 1.4vw, 0.92rem);
  line-height: 1.05;
}

.player-seat span {
  font-size: 0.76rem;
  color: var(--paper);
}

.table-zone {
  display: grid;
  place-items: center;
  min-height: 0;
  padding-top: 0;
  overflow: hidden;
}

.table-felt {
  position: relative;
  display: grid;
  place-items: center;
  width: auto;
  height: min(100%, 360px);
  max-width: min(82vw, 640px);
  max-height: 100%;
  aspect-ratio: 1.48;
  border: 6px solid #3d1c12;
  border-radius: 18px;
  background-image:
    linear-gradient(rgb(16 10 7 / 0.1), rgb(16 10 7 / 0.2)),
    var(--selected-table-art, url(/public/assets/art/Tables/Cookout%20Edition%20%28Black%20%26%20Gold%29.png));
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  box-shadow:
    inset 0 0 38px rgb(0 0 0 / 0.42),
    0 0 0 8px rgb(102 48 24 / 0.42),
    var(--shadow);
  animation: tableSlideIn 520ms ease both;
}

.table-player-chips,
.table-status-strip {
  display: none;
}

.table-status-strip {
  position: absolute;
  right: 12px;
  bottom: 10px;
  left: 12px;
  z-index: 8;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.phase-player-turn .table-status-strip {
  display: flex;
}

.table-turn-badge::before,
.table-turn-badge::after {
  content: none !important;
}

.table-card-back {
  position: absolute;
  right: 12%;
  bottom: 12%;
  width: clamp(46px, 6vw, 58px);
  aspect-ratio: 0.72;
  border: 2px solid rgb(255 229 153 / 0.72);
  border-radius: 8px;
  background: var(--selected-card-back-art) center / cover;
  box-shadow: 0 10px 18px rgb(0 0 0 / 0.34);
  transform: rotate(9deg);
  pointer-events: none;
}

.trick-area {
  position: relative;
  width: 76%;
  height: 70%;
}

.played-card {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 3px;
  text-shadow: 0 2px 8px rgb(0 0 0 / 0.6);
}

.played-card span {
  font-size: 0.72rem;
  font-weight: 900;
}

.played-card.is-winning-card .card {
  border-color: #fff2d4;
  box-shadow:
    0 0 0 3px rgb(248 187 70 / 0.42),
    0 0 24px rgb(248 187 70 / 0.66),
    0 10px 18px rgb(0 0 0 / 0.34);
  transform: translateY(-4px) scale(1.04);
}

.played-card .joker-played {
  animation:
    jokerEntry 420ms ease-out both,
    jokerGlow 820ms ease-in-out 420ms 3;
  will-change: transform, opacity, box-shadow;
}

.joker-announcement {
  position: absolute;
  top: -22px;
  left: 50%;
  z-index: 6;
  padding: 4px 10px;
  border: 1px solid rgb(255 242 212 / 0.76);
  border-radius: 999px;
  background: var(--gold);
  color: #120906;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-shadow: none;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 16px rgb(0 0 0 / 0.32);
  transform: translateX(-50%);
  animation: jokerAnnouncementPop 900ms ease-out both;
}

.trick-winner-banner {
  position: absolute;
  left: 50%;
  bottom: 3%;
  z-index: 200;
  max-width: min(90%, 340px);
  padding: 8px 14px;
  border: 2px solid rgb(255 242 212 / 0.78);
  border-radius: 8px;
  background: linear-gradient(135deg, rgb(61 28 18 / 0.92), rgb(248 187 70 / 0.88));
  color: #fff2d4;
  font-size: clamp(0.82rem, 2.2vw, 1rem);
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 2px 4px rgb(0 0 0 / 0.48);
  text-transform: uppercase;
  box-shadow: 0 14px 30px rgb(0 0 0 / 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px) scale(0.96);
}

.trick-winner-banner.is-visible {
  animation: winnerBannerPop 220ms ease forwards;
}

.played-card.seat-0 {
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
}

.played-card.seat-1 {
  right: 6%;
  top: 50%;
  transform: translateY(-50%);
}

.played-card.seat-2 {
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
}

.played-card.seat-3 {
  left: 6%;
  top: 50%;
  transform: translateY(-50%);
}

.card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 64px;
  aspect-ratio: 0.72;
  padding: 5px;
  border: 2px solid #2c1810;
  border-radius: 8px;
  background: #fdf8ef;
  color: #1a1a1a;
  box-shadow: 0 8px 16px rgb(0 0 0 / 0.28);
  user-select: none;
}

.card-corner-top,
.card-corner-bottom {
  display: block;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.card-corner-top {
  justify-self: start;
}

.card-corner-bottom {
  justify-self: end;
  transform: rotate(180deg);
}

.card-suit-center {
  display: grid;
  place-items: center;
  font-size: 1.74rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.played-card .card-corner-top,
.played-card .card-corner-bottom {
  font-size: 0.82rem;
}

.played-card .card-suit-center {
  font-size: 1.45rem;
}

.card-joker {
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 2px solid var(--gold);
  background:
    radial-gradient(circle at 50% 38%, rgb(248 187 70 / 0.3), transparent 42%),
    linear-gradient(135deg, #1a0a3a, #2c1654 58%, #13071f);
  color: var(--gold);
  text-shadow: 0 1px 5px rgb(0 0 0 / 0.72);
  box-shadow:
    inset 0 0 16px rgb(248 187 70 / 0.18),
    0 8px 16px rgb(0 0 0 / 0.28);
}

.card-joker.joker-big {
  background:
    radial-gradient(circle at 50% 38%, rgb(248 187 70 / 0.38), transparent 44%),
    linear-gradient(135deg, #1a0a3a, #2c1654 48%, #4c2567);
}

.card-joker.joker-little {
  background:
    radial-gradient(circle at 50% 38%, rgb(248 187 70 / 0.26), transparent 42%),
    linear-gradient(135deg, #13071f, #2c1654 54%, #1a0a3a);
}

.card-joker .joker-label {
  display: block;
  color: var(--gold);
  font-size: clamp(0.5rem, 1.5vw, 0.66rem);
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
}

.card-joker .joker-label-bottom {
  transform: rotate(180deg);
}

.card-joker .card-center-symbol {
  display: grid;
  place-items: center;
  color: #ffe8a3;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  line-height: 1;
  text-align: center;
  filter: drop-shadow(0 0 8px rgb(248 187 70 / 0.54));
}

.card-joker.card-mini .joker-label,
.played-card .card-joker .joker-label {
  font-size: 0.5rem;
}

.card-joker.card-mini .card-center-symbol,
.played-card .card-joker .card-center-symbol {
  font-size: 1.15rem;
}

.card.hearts,
.card.diamonds {
  color: #c0392b;
}

.card.clubs {
  color: #1a1a1a;
}

.card.spades {
  border-color: var(--gold);
  color: #1a1a1a;
}

.card:not(.card-joker):not(.card-has-art),
.card-has-art.card-art-missing:not(.card-joker) {
  border-color: #d4b896 !important;
  background: #fdf8ef !important;
  color: #1a1a1a !important;
  text-shadow: none !important;
}

.card.hearts:not(.card-joker),
.card.diamonds:not(.card-joker) {
  color: #c0392b !important;
}

.card.spades:not(.card-joker),
.card.clubs:not(.card-joker) {
  color: #1a1a1a !important;
}

.card.spades:not(.card-joker):not(.card-has-art),
.card-has-art.card-art-missing.spades:not(.card-joker) {
  border-color: var(--gold) !important;
}

.card.card-joker {
  border: 2px solid #d4a017 !important;
  background:
    radial-gradient(circle at 50% 38%, rgb(248 187 70 / 0.3), transparent 42%),
    linear-gradient(135deg, #1a0a3a, #2c1654 58%, #13071f) !important;
  color: #d4a017 !important;
}

.card-has-art {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  border-color: var(--gold);
  color: #d4a017;
  background: #fdf8ef;
}

.card-art-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.card-art-corner-tl,
.card-art-corner-br {
  position: absolute;
  z-index: 2;
  color: #d4a017;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 1px 1px 0 #000;
}

.card-art-corner-tl {
  top: 3px;
  left: 4px;
}

.card-art-corner-br {
  right: 4px;
  bottom: 3px;
  transform: rotate(180deg);
}

.card-art-fallback {
  display: none;
}

.card-has-art.card-art-missing {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 5px;
}

.card-has-art.card-art-missing .card-art-image,
.card-has-art.card-art-missing .card-art-corner-tl,
.card-has-art.card-art-missing .card-art-corner-br {
  display: none;
}

.card-has-art.card-art-missing .card-art-fallback {
  display: contents;
}

.trash-talk {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(100% + 8px);
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  width: auto;
  min-height: 0;
  max-height: 72px;
  margin-inline: 0;
  padding: 8px 10px;
  overflow: hidden;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  background: rgb(34 20 13 / 0.76);
  box-shadow: var(--shadow);
  animation: panelRise 360ms ease both;
  pointer-events: auto;
  transition:
    max-height 240ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.trash-talk.is-expanded {
  max-height: min(260px, calc(100dvh - 220px));
  overflow-y: auto;
  background: rgb(34 20 13 / 0.9);
  box-shadow: 0 16px 30px rgb(0 0 0 / 0.38);
}

.trash-talk.winner-showing {
  animation: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

.game-screen.is-bidding .trash-talk {
  bottom: calc(100% + 86px);
}

.trash-talk-header {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.trash-talk-header strong,
.trash-talk-message strong {
  overflow: hidden;
  color: var(--gold);
  font-size: 0.76rem;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.trash-talk-header span {
  overflow: hidden;
  color: rgb(255 242 212 / 0.72);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.chat-toggle-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid rgb(255 229 153 / 0.48);
  border-radius: 999px;
  background: rgb(20 11 8 / 0.58);
  color: var(--gold);
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
}

.chat-toggle-btn:hover,
.chat-toggle-btn:focus-visible {
  background: rgb(248 187 70 / 0.18);
  outline: 2px solid rgb(248 187 70 / 0.46);
}

.chat-new-dot {
  position: absolute;
  top: 2px;
  right: 3px;
  display: none;
  width: 8px;
  height: 8px;
  border: 1px solid rgb(255 242 212 / 0.8);
  border-radius: 50%;
  background: #c0392b;
  box-shadow: 0 0 8px rgb(192 57 43 / 0.75);
}

.trash-talk.chat-has-new .chat-new-dot {
  display: block;
}

.trash-talk-messages {
  display: grid;
  grid-column: 1 / -1;
  gap: 4px;
  min-width: 0;
  overflow: visible;
}

.trash-talk-message {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  min-width: 0;
  margin: 0;
  color: var(--paper);
}

.trash-talk-message span {
  display: block;
  overflow: visible;
  color: var(--paper);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: clip;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: unset;
}

.trash-talk.is-collapsed .trash-talk-messages {
  overflow: hidden;
}

.trash-talk.is-collapsed .trash-talk-message span {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: clip;
  -webkit-line-clamp: 2;
}

.trash-talk.is-expanded .trash-talk-message span {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.action-panel {
  min-height: 42px;
  display: grid;
  place-items: center;
  color: var(--paper);
  font-weight: 900;
}

.player-turn-indicator {
  position: absolute;
  top: -22px;
  left: 50%;
  z-index: 12;
  display: none;
  padding: 5px 14px;
  border: 2px solid rgb(255 242 212 / 0.78);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #d4a017);
  color: #1b0d08;
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 2px;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgb(248 187 70 / 0.56), 0 10px 22px rgb(0 0 0 / 0.34);
  pointer-events: none;
  transform: translateX(-50%);
}

.phase-player-turn .player-turn-indicator {
  display: none;
  animation: turnBadgePulse 1.2s ease-in-out infinite;
}

.player-book-badge {
  position: absolute;
  top: -22px;
  right: 14px;
  z-index: 12;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 6px;
  max-width: min(360px, calc(100vw - 28px));
  padding: 6px 10px;
  border: 1px solid rgb(255 242 212 / 0.5);
  border-radius: 999px;
  background: rgb(34 20 13 / 0.88);
  color: var(--paper);
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgb(0 0 0 / 0.34);
  pointer-events: none;
}

.player-book-badge span,
.player-book-badge small {
  color: rgb(255 242 212 / 0.72);
  font-size: 0.68rem;
  white-space: nowrap;
}

.player-book-badge strong {
  color: var(--gold);
  font-size: 0.82rem;
  white-space: nowrap;
}

.coach-layer {
  position: fixed;
  inset: max(92px, env(safe-area-inset-top)) 14px auto;
  z-index: 320;
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
}

.coach-tooltip,
.coach-banner {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: min(440px, calc(100vw - 28px));
  min-height: 70px;
  padding: 9px 12px;
  border: 2px solid rgb(255 229 153 / 0.72);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgb(20 11 8 / 0.94), rgb(18 48 36 / 0.92));
  color: var(--paper);
  box-shadow: 0 18px 34px rgb(0 0 0 / 0.48), 0 0 20px rgb(248 187 70 / 0.28);
  font-weight: 850;
  text-align: left;
  animation: coachTipPop 180ms ease both;
}

.coach-tooltip {
  pointer-events: auto;
}

.coach-tooltip img,
.coach-banner img {
  width: 54px;
  height: 54px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
}

.coach-tooltip span,
.coach-banner span {
  line-height: 1.25;
}

.coach-banner {
  width: min(520px, calc(100vw - 28px));
  min-height: 58px;
  background:
    linear-gradient(145deg, rgb(248 187 70 / 0.96), rgb(212 91 42 / 0.95));
  color: var(--ink);
}

.coach-highlight-gold {
  animation: coachGoldPulse 1s ease-in-out infinite;
  box-shadow:
    0 0 0 3px rgb(248 187 70 / 0.45),
    0 0 24px rgb(248 187 70 / 0.78),
    0 12px 22px rgb(0 0 0 / 0.34) !important;
}

.coach-highlight-green {
  animation: coachGreenPulse 1s ease-in-out infinite;
  box-shadow:
    0 0 0 3px rgb(124 255 151 / 0.38),
    0 0 22px rgb(124 255 151 / 0.64),
    0 12px 22px rgb(0 0 0 / 0.34) !important;
}

.coach-score-pulse {
  animation: coachGoldPulse 780ms ease-in-out 4;
}

.tutorial-completion-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 18%, rgb(248 187 70 / 0.24), transparent 34%),
    rgb(8 15 8 / 0.95);
  backdrop-filter: blur(4px);
}

.tutorial-completion-overlay.visible {
  display: flex;
}

.tutorial-completion-card {
  display: grid;
  gap: 14px;
  width: min(92vw, 500px);
  padding: 24px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgb(18 48 36 / 0.97), rgb(20 11 8 / 0.98));
  color: var(--paper);
  text-align: center;
  box-shadow: 0 28px 70px rgb(0 0 0 / 0.58);
}

.tutorial-completion-card h2 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.tutorial-completion-card p {
  margin: 0;
  color: var(--paper);
  font-weight: 850;
}

.tutorial-completion-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tutorial-completion-stats span,
.tutorial-completion-stats strong {
  display: block;
  padding: 10px;
  border: 1px solid rgb(255 242 212 / 0.22);
  background: rgb(0 0 0 / 0.18);
}

.tutorial-completion-stats span {
  color: rgb(255 242 212 / 0.78);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
}

.tutorial-completion-stats strong {
  color: var(--gold);
}

.tutorial-completion-actions {
  display: grid;
  gap: 8px;
}

.btn-continue.secondary {
  background: linear-gradient(135deg, #246145, #133225);
  color: var(--cream);
}

.round-end-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 18%, rgb(248 187 70 / 0.18), transparent 34%),
    rgb(8 15 8 / 0.94);
  backdrop-filter: blur(4px);
}

.round-end-overlay.visible {
  display: flex;
}

.round-end-card {
  display: grid;
  gap: 14px;
  width: min(92vw, 520px);
  max-height: min(92dvh, 680px);
  padding: 24px;
  overflow: auto;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgb(18 48 36 / 0.96), rgb(20 11 8 / 0.98));
  color: var(--paper);
  text-align: center;
  box-shadow: 0 28px 70px rgb(0 0 0 / 0.58);
}

.round-end-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 2px;
  line-height: 1;
  text-transform: uppercase;
}

.round-end-card h2 {
  margin: 0;
  color: #fff2d4;
  font-size: clamp(1.8rem, 7vw, 2.5rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.round-character-reaction {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.round-character-reaction img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border: 2px solid rgb(255 242 212 / 0.52);
  border-radius: 8px;
  background: rgb(20 11 8 / 0.62);
}

.round-character-reaction span {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.round-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.round-result-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgb(255 242 212 / 0.24);
  border-radius: 8px;
  background: rgb(8 5 4 / 0.34);
  text-align: left;
}

.round-result-card.is-home {
  border-color: rgb(248 187 70 / 0.62);
  background: rgb(248 187 70 / 0.12);
}

.round-result-card span,
.round-result-card em {
  color: var(--gold);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.round-result-card strong {
  color: #fff2d4;
  font-size: 1.08rem;
  line-height: 1.05;
}

.round-result-card p {
  margin: 0;
  color: rgb(255 242 212 / 0.78);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

.round-score-total {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgb(255 242 212 / 0.2);
  border-radius: 8px;
  background: rgb(20 11 8 / 0.54);
}

.round-score-total span {
  color: #fff2d4;
  font-size: 0.86rem;
  font-weight: 950;
  text-transform: uppercase;
}

.btn-continue {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a7a4a, #145230);
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 24px rgb(0 0 0 / 0.34);
}

.btn-continue:hover,
.btn-continue:focus-visible {
  background: linear-gradient(135deg, #21955c, #176137);
  outline: 2px solid rgb(248 187 70 / 0.56);
}

.bid-panel {
  display: grid;
  grid-template-columns: auto repeat(9, minmax(42px, 1fr));
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 980px;
  padding: 8px;
  border: 2px solid rgb(255 229 153 / 0.32);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgb(34 20 13 / 0.78), rgb(36 97 69 / 0.62));
  box-shadow: 0 12px 22px rgb(0 0 0 / 0.26);
}

.bid-panel span {
  font-weight: 900;
  text-transform: uppercase;
}

.bid-panel button {
  min-height: 54px;
  background: linear-gradient(180deg, #ffca62, #d86f28);
  color: var(--ink);
  font-size: 1rem;
  text-shadow: 0 1px 0 rgb(255 255 255 / 0.24);
}

.bid-panel button[data-bid-type='blindNil'] {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  padding: 6px;
  line-height: 1;
  white-space: nowrap;
}

.bid-panel button[data-bid-type='blindNil'] small,
.bid-panel button[data-bid-type='blindNil'] strong {
  display: block;
  line-height: 1;
  text-transform: uppercase;
}

.bid-panel button[data-bid-type='blindNil'] small {
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.bid-panel button[data-bid-type='blindNil'] strong {
  font-size: 0.98rem;
  font-weight: 950;
}

.selected-card-panel {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(128px, auto);
  justify-content: center;
  gap: 8px;
  align-items: center;
  width: fit-content;
  max-width: min(100%, 520px);
  min-height: 48px;
  padding: 6px 8px;
  border: 2px solid rgb(255 229 153 / 0.38);
  border-radius: 8px;
  background: rgb(34 20 13 / 0.76);
  box-shadow: 0 12px 22px rgb(0 0 0 / 0.28);
}

.selected-card-panel span {
  color: var(--paper);
  font-size: 0.88rem;
  font-weight: 850;
}

.hand-zone {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  min-height: 96px;
  padding: 8px 12px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.hand-zone::-webkit-scrollbar {
  display: none;
}

.hand-card {
  flex: 0 0 auto;
  min-width: 52px;
  margin-left: 0;
  transition: transform 160ms ease, filter 160ms ease;
}

.hand-card:first-child {
  margin-left: 0;
}

.hand-card:not(:disabled):hover,
.hand-card:not(:disabled):focus-visible,
.hand-card.selected {
  transform: translateY(-10px);
}

.hand-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgb(248 187 70 / 0.52), 0 12px 20px rgb(0 0 0 / 0.32);
}

.hand-card:disabled {
  filter: brightness(0.72) saturate(0.75);
}

.hand-card.card-joker.just-dealt {
  animation: jokerDeal 1s ease both;
}

.phase-player-turn .hand-card:not(:disabled) {
  border-color: var(--gold);
  box-shadow:
    0 0 0 2px rgb(248 187 70 / 0.32),
    0 0 18px rgb(248 187 70 / 0.5),
    0 10px 18px rgb(0 0 0 / 0.3);
  filter: brightness(1.08) saturate(1.08);
}

.phase-player-turn .hand-card:not(:disabled):not(.selected) {
  animation: playableCardPulse 1.35s ease-in-out infinite;
}

@media (max-width: 768px) {
  .game-screen {
    --mobile-player-area-height: 112px;
    --player-dock-height: var(--mobile-player-area-height);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 3px;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: max(4px, env(safe-area-inset-top)) 6px calc(var(--mobile-player-area-height) + max(8px, env(safe-area-inset-bottom)));
  }

  .game-screen.is-bidding {
    --mobile-player-area-height: 112px;
  }

  .game-screen.is-human-turn {
    --mobile-player-area-height: 112px;
  }

  .table-scene {
    grid-template-rows: auto minmax(0, 1fr);
    gap: 4px;
    min-height: 0;
    padding: 4px 4px 6px;
    border-width: 1px;
  }

  .scene-backdrop {
    background-position:
      center center,
      center top;
    background-size:
      cover,
      100% auto;
  }

  .audio-test-grid {
    grid-template-columns: 1fr;
  }

  .hero-title h1 {
    font-size: clamp(2.1rem, 12vw, 3.3rem);
  }

  .character-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .character-card {
    min-height: 174px;
  }

  .character-card img {
    height: 158px;
  }

  .main-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mode-strip,
  .cosmetic-grid,
  .roadmap-panel,
  .single-player-layout,
  .cosmetics-layout {
    grid-template-columns: 1fr;
  }

  .glow-button {
    width: 100%;
    min-height: 54px;
  }

  .menu-header {
    grid-template-columns: 1fr;
  }

  .back-chip {
    justify-self: start;
  }

  .setup-grid,
  .coming-soon-panel {
    grid-template-columns: 1fr;
  }

  .top-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .hud-center {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    grid-column: 1 / -1;
    order: -1;
    gap: 4px;
    min-height: 30px;
  }

  .team-score-card {
    grid-template-columns: minmax(0, 1fr) minmax(48px, auto);
    min-height: 50px;
    padding: 5px 7px;
    gap: 5px;
  }

  .team-score-card strong {
    min-width: 42px;
    min-height: 38px;
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .team-score-card span,
  .team-score-card em,
  .round-chip {
    font-size: 0.64rem;
  }

  .team-score-card .books-status.is-emphasized {
    padding: 3px 5px;
    font-size: 0.72rem;
  }

  .team-score-card small {
    font-size: 0.68rem;
    line-height: 1.05;
    white-space: normal;
  }

  .brand-lockup {
    gap: 4px;
    justify-self: start;
  }

  .brand-lockup img {
    display: none;
  }

  .brand-lockup p {
    display: none;
  }

  .brand-lockup h1 {
    font-size: clamp(0.78rem, 4vw, 1rem);
    line-height: 1;
  }

  .round-chip {
    display: none;
  }

  .top-actions {
    justify-self: end;
    gap: 5px;
  }

  .icon-button {
    min-height: 34px;
    padding-inline: 8px;
    font-size: 0.82rem;
  }

  .partner-grid,
  .visual-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partner-style-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .partner-style-card img {
    width: 84px;
    height: 104px;
  }

  .stat-row {
    grid-template-columns: 92px 1fr;
  }

  .match-preview-panel,
  .cosmetic-preview-panel {
    position: static;
  }

  .difficulty-grid,
  .setting-row {
    grid-template-columns: 1fr;
  }

  .setting-row input[type="checkbox"] {
    justify-self: start;
  }

  .players-ring {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    order: 1;
    max-height: 70px;
  }

  .player-seat {
    grid-template-columns: 48px minmax(0, 1fr);
    justify-items: start;
    gap: 2px;
    min-height: 64px;
    padding: 3px;
    text-align: left;
  }

  .player-seat img {
    width: 48px;
    height: 58px;
    object-fit: cover;
    object-position: top center;
  }

  .player-seat strong {
    width: 100%;
    font-size: clamp(0.62rem, 2.8vw, 0.76rem);
    line-height: 1.02;
    white-space: nowrap;
  }

  .player-seat span {
    width: 100%;
    font-size: 0.55rem;
    line-height: 1.05;
    white-space: nowrap;
  }

  .speech-bubble {
    left: 8px;
    bottom: calc(100% - 2px);
    max-width: calc(100vw - 32px);
  }

  .table-zone {
    order: 2;
    place-items: start center;
    padding-top: 0;
  }

  .table-felt {
    width: min(100%, 520px);
    height: min(100%, clamp(238px, 42dvh, 330px));
    max-width: calc(100vw - 16px);
    aspect-ratio: 1.34;
    border-width: 4px;
  }

  .trick-area {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    place-content: center;
    gap: 8px 12px;
    width: 100%;
    height: 100%;
  }

  .played-card,
  .played-card.seat-0,
  .played-card.seat-1,
  .played-card.seat-2,
  .played-card.seat-3 {
    position: static;
    transform: none;
  }

  .bid-panel {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    max-width: 100%;
    padding: 6px;
  }

  .bid-panel button {
    min-height: 44px;
    font-size: 0.88rem;
  }

  .bid-panel button[data-bid-type='blindNil'] {
    gap: 2px;
    padding: 5px 2px;
  }

  .bid-panel button[data-bid-type='blindNil'] small {
    font-size: 0.5rem;
    letter-spacing: 0.03em;
  }

  .bid-panel button[data-bid-type='blindNil'] strong {
    font-size: 0.84rem;
  }

  .selected-card-panel {
    grid-template-columns: 1fr;
    width: min(148px, calc(100vw - 20px));
    min-height: 42px;
    padding: 5px;
    box-shadow: 0 12px 28px rgb(0 0 0 / 0.42);
  }

  .selected-card-panel span {
    display: none;
  }

  .bid-panel span {
    grid-column: 1 / -1;
    font-size: 0.78rem;
    line-height: 1.05;
    text-align: center;
  }

  .card {
    width: 58px;
  }

  .tutorial-screen .menu-header {
    padding-right: 64px;
  }

  .tutorial-card {
    padding: 12px;
  }

  .tutorial-slide {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
  }

  .tutorial-character {
    grid-template-columns: 96px minmax(0, 1fr);
    align-content: stretch;
    min-height: 126px;
  }

  .tutorial-character img {
    position: static;
    width: 96px;
    height: 126px;
  }

  .tutorial-character div {
    align-content: center;
    padding: 10px;
    background: rgb(20 11 8 / 0.72);
  }

  .tutorial-character strong {
    font-size: clamp(1.22rem, 7vw, 1.8rem);
  }

  .tutorial-voice {
    font-size: clamp(1rem, 4.3vw, 1.22rem);
  }

  .tutorial-rule {
    padding: 10px;
  }

  .tutorial-example {
    min-height: 72px;
  }

  .tutorial-example span {
    width: 48px;
    font-size: 0.82rem;
  }

  .micro-animation {
    min-height: 148px;
    padding: 10px;
  }

  .micro-animation span {
    width: 44px;
  }

  .micro-spades {
    grid-template-columns: repeat(4, minmax(0, auto));
  }

  .micro-bid {
    grid-template-columns: 1fr;
  }

  .micro-bid strong,
  .micro-bid em {
    grid-column: auto;
  }

  .joker-showdown {
    grid-template-columns: repeat(5, minmax(0, auto));
    gap: 4px;
    min-height: 104px;
  }

  .micro-joker-card.little {
    right: 2px;
    width: 36px;
  }

  .tutorial-skip {
    top: max(8px, env(safe-area-inset-top));
    right: 10px;
    min-height: 34px;
    padding: 5px 10px;
    font-size: 0.7rem;
  }

  .history-screen .menu-header {
    padding-right: 64px;
  }

  .history-card {
    padding: 12px;
  }

  .history-slide {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
  }

  .history-era {
    min-height: 132px;
    padding: 12px;
  }

  .history-era strong {
    font-size: clamp(1.4rem, 8vw, 2.1rem);
  }

  .history-copy > p,
  .history-copy blockquote {
    font-size: clamp(0.96rem, 4vw, 1.08rem);
  }

  .player-area {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 7;
    display: block;
    width: 100%;
    height: calc(var(--mobile-player-area-height) + max(18px, env(safe-area-inset-bottom)));
    padding: 4px 8px max(12px, env(safe-area-inset-bottom));
    background:
      linear-gradient(180deg, transparent, rgb(20 11 8 / 0.86) 26%, rgb(20 11 8 / 0.96));
    transform: none;
  }

  .trash-talk {
    position: absolute;
    left: 10px;
    right: auto;
    bottom: calc(100% + 8px);
    z-index: 9;
    width: min(250px, calc(100vw - 168px));
    min-height: 0;
    max-height: 48px;
    margin-inline: 0;
    padding: 6px 8px;
    overflow: hidden;
    pointer-events: auto;
  }

  .trash-talk.is-expanded {
    width: min(270px, calc(100vw - 168px));
    max-height: 136px;
  }

  .trash-talk-header span {
    display: none;
  }

  .trash-talk-message {
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
  }

  .trash-talk-message strong {
    font-size: 0.64rem;
  }

  .trash-talk-message span {
    font-size: 0.78rem;
    line-height: 1.1;
  }

  .action-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(86px + max(8px, env(safe-area-inset-bottom)));
    z-index: 10;
    min-height: 0;
    width: auto;
    margin-inline: auto;
    place-items: center;
  }

  .game-screen.is-bidding .action-panel {
    bottom: calc(100% + 8px);
  }

  .game-screen.is-bidding .trash-talk {
    bottom: calc(100% + 150px);
    width: min(270px, calc(100vw - 20px));
  }

  .game-screen.is-bidding .trash-talk.is-expanded {
    width: min(300px, calc(100vw - 20px));
  }

  .game-screen.is-human-turn .action-panel {
    position: absolute;
    right: 10px;
    left: auto;
    bottom: calc(118px + max(8px, env(safe-area-inset-bottom)));
    width: auto;
  }

  .game-screen.is-human-turn .player-turn-indicator {
    top: -24px;
    left: 14px;
    padding: 5px 11px;
    font-size: 0.68rem;
    letter-spacing: 1.6px;
    transform: none;
  }

  .player-book-badge {
    top: -24px;
    right: 10px;
    gap: 4px;
    max-width: min(190px, calc(100vw - 170px));
    padding: 5px 8px;
  }

  .player-book-badge span {
    display: none;
  }

  .player-book-badge strong {
    font-size: 0.74rem;
  }

  .player-book-badge small {
    font-size: 0.6rem;
  }

  .coach-layer {
    inset: max(76px, env(safe-area-inset-top)) 8px auto;
    z-index: 18;
  }

  .coach-tooltip,
  .coach-banner {
    grid-template-columns: 42px minmax(0, 1fr);
    width: min(330px, calc(100vw - 16px));
    min-height: 56px;
    padding: 7px 9px;
    font-size: 0.82rem;
  }

  .coach-tooltip img,
  .coach-banner img {
    width: 42px;
    height: 42px;
  }

  .tutorial-completion-card {
    padding: 18px;
  }

  .tutorial-completion-stats {
    grid-template-columns: 1fr;
  }

  .round-end-card {
    gap: 10px;
    width: min(94vw, 420px);
    padding: 18px;
  }

  .round-character-reaction img {
    width: 72px;
    height: 72px;
  }

  .round-result-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .round-result-card {
    padding: 10px;
  }

  .game-screen.is-human-turn .trash-talk {
    right: auto;
    bottom: calc(100% + 8px);
    width: min(214px, calc(100vw - 184px));
    max-height: 48px;
  }

  .game-screen.is-human-turn .trash-talk.is-expanded {
    width: min(230px, calc(100vw - 184px));
    max-height: 136px;
  }

  .hand-zone {
    min-height: 84px;
    max-height: 94px;
    justify-content: flex-start;
    gap: 4px;
    padding: 8px 8px 11px;
    scroll-snap-type: x proximity;
  }

  .hand-card {
    flex: 0 0 60px;
    min-width: 60px;
    margin-left: 0;
    scroll-snap-align: center;
  }

  .hand-card:not(:disabled):hover,
  .hand-card:not(:disabled):focus-visible,
  .hand-card.selected {
    transform: translateY(-14px);
  }
}

@media (max-width: 768px) and (max-height: 720px) {
  .game-screen {
    --mobile-player-area-height: 104px;
  }

  .game-screen.is-bidding {
    --mobile-player-area-height: 104px;
  }

  .table-scene {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .team-score-card {
    min-height: 44px;
  }

  .brand-lockup h1 {
    font-size: 1.05rem;
  }

  .round-chip {
    padding: 3px 7px;
  }

  .player-seat {
    min-height: 58px;
  }

  .player-seat img {
    width: 43px;
    height: 52px;
  }

  .table-felt {
    width: min(100%, 344px);
    height: min(100%, clamp(252px, 48dvh, 318px));
    max-width: calc(100vw - 24px);
  }

  .trash-talk {
    bottom: calc(100% + 6px);
    max-height: 38px;
    padding-block: 5px;
  }

  .trash-talk.is-expanded {
    max-height: 118px;
  }

  .bid-panel button {
    min-height: 44px;
  }

  .hand-zone {
    min-height: 78px;
    max-height: 86px;
  }

  .card {
    width: 54px;
  }

  .hand-card {
    flex-basis: 56px;
  }

  .action-panel,
  .game-screen.is-human-turn .action-panel {
    bottom: calc(92px + max(8px, env(safe-area-inset-bottom)));
  }

  .game-screen.is-bidding .action-panel {
    bottom: calc(100% + 8px);
  }

  .game-screen.is-human-turn .action-panel {
    bottom: calc(108px + max(8px, env(safe-area-inset-bottom)));
  }

  .game-screen.is-human-turn .trash-talk {
    right: auto;
    bottom: calc(100% + 6px);
  }

  .player-book-badge {
    top: -21px;
    right: 8px;
    max-width: min(168px, calc(100vw - 146px));
    padding: 4px 7px;
  }

  .player-book-badge strong {
    font-size: 0.68rem;
  }

  .player-book-badge small {
    display: none;
  }
}

@media (max-width: 480px) {
  .single-player-screen {
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  }

  .single-player-screen .menu-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 8px;
  }

  .single-player-screen .menu-header h1 {
    font-size: 1.75rem;
  }

  .single-player-screen .menu-header span {
    font-size: 0.76rem;
  }

  .single-player-screen .back-chip {
    min-width: 64px;
    min-height: 38px;
    padding-inline: 10px;
  }

  .single-player-screen .single-player-layout {
    grid-template-columns: 1fr;
    gap: 8px;
    overflow-x: hidden;
  }

  .single-player-screen .single-player-layout > *,
  .single-player-screen .setup-stack {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .single-player-screen .setup-stack {
    gap: 8px;
  }

  .single-player-screen .menu-panel {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    padding: 9px;
  }

  .single-player-screen .panel-kicker {
    font-size: 0.66rem;
    letter-spacing: 1.6px;
  }

  .single-player-screen .panel-copy,
  .single-player-screen .visual-tile small,
  .single-player-screen .difficulty-card span {
    display: none;
  }

  .single-player-screen .difficulty-grid,
  .single-player-screen .partner-grid,
  .single-player-screen .visual-tile-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .single-player-screen .difficulty-grid::-webkit-scrollbar,
  .single-player-screen .partner-grid::-webkit-scrollbar,
  .single-player-screen .visual-tile-grid::-webkit-scrollbar {
    display: none;
  }

  .single-player-screen .difficulty-card,
  .single-player-screen .partner-tile,
  .single-player-screen .visual-tile {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .single-player-screen .difficulty-card {
    min-width: 126px;
    min-height: 48px;
    padding: 9px 11px;
    border-radius: 999px;
  }

  .single-player-screen .difficulty-card strong {
    font-size: 0.82rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  .single-player-screen .partner-tile {
    display: grid;
    justify-items: center;
    width: 84px;
    min-height: 72px;
    padding: 6px;
    border-radius: 20px;
  }

  .single-player-screen .partner-tile img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
  }

  .single-player-screen .partner-tile span {
    width: 100%;
    margin-top: 4px;
    font-size: 0.66rem;
    text-align: center;
  }

  .single-player-screen .visual-tile {
    width: 128px;
    min-height: 82px;
    padding: 7px;
    border-radius: 16px;
  }

  .single-player-screen .tile-art {
    height: 44px;
    border-radius: 12px;
  }

  .single-player-screen .visual-tile strong {
    margin-top: 5px;
    overflow: hidden;
    font-size: 0.7rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .single-player-screen .card-back-grid .visual-tile {
    width: 100px;
  }

  .single-player-screen .card-back-mini {
    width: 38px;
    border-radius: 7px;
  }

  .single-player-screen .sr-friendly-select {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .single-player-screen .partner-style-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
  }

  .single-player-screen .partner-style-card img {
    width: 42px;
    height: 46px;
    border-radius: 50%;
  }

  .single-player-screen .partner-style-card p {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .single-player-screen .stat-stack {
    display: none;
  }

  .single-player-screen .match-preview-panel {
    padding: 10px;
  }

  .single-player-screen .preview-table {
    min-height: 88px;
    margin-top: 8px;
    border-width: 1px;
  }

  .single-player-screen .preview-team-layout {
    inset: 6px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .single-player-screen .preview-team-layout article {
    padding: 4px;
    text-align: center;
  }

  .single-player-screen .preview-team-layout img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
  }

  .single-player-screen .preview-team-layout strong {
    margin-top: 2px;
    font-size: 0.58rem;
  }

  .single-player-screen .preview-team-layout span {
    display: none;
  }

  .single-player-screen .preview-card-back {
    width: 34px;
    right: 10px;
    bottom: 8px;
  }

  .single-player-screen .preview-copy {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px 8px;
    margin-top: 8px;
  }

  .single-player-screen .preview-copy h2 {
    grid-column: 1 / -1;
    font-size: 0.92rem;
  }

  .single-player-screen .preview-copy p {
    overflow: hidden;
    font-size: 0.68rem;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .single-player-screen .menu-footer-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    gap: 8px;
    margin-top: 0;
    padding-top: 8px;
    background: linear-gradient(180deg, transparent, rgb(12 38 31 / 0.94) 28%);
  }

  .single-player-screen .glow-button {
    min-height: 44px;
    font-size: 0.78rem;
  }

  .game-screen {
    --mobile-action-height: 52px;
    --mobile-hand-height: 100px;
    --mobile-player-area-height: calc(var(--mobile-action-height) + var(--mobile-hand-height));
    --player-dock-height: var(--mobile-player-area-height);
    grid-template-rows: 96px minmax(0, 1fr);
    gap: 4px;
    padding: max(4px, env(safe-area-inset-top)) 6px calc(var(--mobile-player-area-height) + max(8px, env(safe-area-inset-bottom)));
  }

  .game-screen.is-bidding,
  .game-screen.is-human-turn {
    --mobile-player-area-height: calc(var(--mobile-action-height) + var(--mobile-hand-height));
  }

  .top-hud {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 44px 52px;
    gap: 3px 5px;
    height: 96px;
    align-items: stretch;
  }

  .hud-center {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    min-height: 44px;
    padding: 4px 6px;
    border: 1px solid rgb(255 229 153 / 0.24);
    border-radius: 8px;
    background: rgb(20 11 8 / 0.7);
  }

  .brand-lockup {
    min-width: 0;
  }

  .brand-lockup h1 {
    overflow: hidden;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    margin-left: auto;
  }

  .icon-button {
    min-height: 34px;
    padding-inline: 9px;
    font-size: 0.72rem;
  }

  .home-score {
    grid-column: 1;
    grid-row: 2;
  }

  .away-score {
    grid-column: 2;
    grid-row: 2;
  }

  .team-score-card {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 52px;
    padding: 5px 6px;
    gap: 4px;
  }

  .team-score-card span {
    font-size: 0.6rem;
  }

  .team-score-card small {
    display: none;
  }

  .team-score-card .books-status,
  .team-score-card .books-status.is-emphasized {
    margin-top: 2px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--paper);
    font-size: 0.64rem;
    line-height: 1.05;
  }

  .team-score-card strong {
    min-width: 34px;
    min-height: 34px;
    padding-left: 5px;
    font-size: 1.28rem;
  }

  .scene-backdrop {
    background-color: #0a120c;
    background-image:
      linear-gradient(180deg, rgb(18 12 8 / 0.1), rgb(18 12 8 / 0.42)),
      var(--scene-bg-url, url("/public/assets/art/backgrounds/Main Backyard BBQ Scene.png")),
      var(--scene-bg-url, url("/public/assets/art/backgrounds/Main Backyard BBQ Scene.png"));
    background-position:
      center center,
      center top,
      center center;
    background-repeat:
      no-repeat,
      no-repeat,
      no-repeat;
    background-size:
      cover,
      100% auto,
      auto 100%;
    filter: brightness(0.78) saturate(1.18);
  }

  .scene-backdrop::after {
    background:
      linear-gradient(180deg, rgb(0 0 0 / 0.1), transparent 18%, rgb(0 0 0 / 0.34) 100%),
      radial-gradient(circle at 50% 50%, transparent 0 46%, rgb(20 11 8 / 0.36) 92%);
  }

  .game-screen[data-scene="backyard"] .scene-backdrop {
    background-position:
      center center,
      center top,
      center center;
  }

  .game-screen[data-scene="livingRoom"] .scene-backdrop {
    background-position:
      center center,
      center top,
      center center;
  }

  .game-screen[data-scene="reunion"] .scene-backdrop {
    background-position:
      center center,
      center top,
      center center;
  }

  .game-screen[data-scene="bonfire"] .scene-backdrop {
    background-position:
      center center,
      center top,
      center center;
    filter: brightness(0.84) saturate(1.2);
  }

  .table-scene {
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    padding: 10px 12px 12px;
    border: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .players-ring {
    display: none;
  }

  .table-zone {
    order: 0;
    place-items: center;
    padding: 0;
    min-height: 0;
  }

  .table-felt {
    width: min(100%, 390px);
    height: min(100%, clamp(294px, 52dvh, 430px));
    max-width: calc(100vw - 24px);
    max-height: 100%;
    aspect-ratio: 0.86;
    border-width: 4px;
    border-radius: 18px;
    overflow: hidden;
    background-color: rgb(20 11 8 / 0.76);
    background-image: none !important;
    box-shadow:
      inset 0 0 34px rgb(0 0 0 / 0.38),
      0 0 0 4px rgb(102 48 24 / 0.24),
      0 16px 34px rgb(0 0 0 / 0.64);
  }

  .table-felt::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    content: "";
    background-image:
      linear-gradient(rgb(16 10 7 / 0.1), rgb(16 10 7 / 0.28)),
      var(--selected-table-art, url(/public/assets/art/Tables/Cookout%20Edition%20%28Black%20%26%20Gold%29.png));
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    opacity: 0.84;
    pointer-events: none;
  }

  .trick-area,
  .table-card-back,
  .table-player-chips,
  .table-status-strip {
    position: relative;
    z-index: 1;
  }

  .table-player-chips {
    position: absolute;
    top: 6px;
    right: 6px;
    left: 6px;
    z-index: 7;
    display: flex;
    justify-content: space-between;
    gap: 4px;
    pointer-events: none;
  }

  .table-player-chip {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 31%;
    min-height: 34px;
    gap: 4px;
    padding: 3px 7px 3px 3px;
    border: 1px solid rgb(255 229 153 / 0.42);
    border-radius: 999px;
    background: rgb(0 0 0 / 0.62);
    box-shadow: 0 8px 18px rgb(0 0 0 / 0.32);
  }

  .table-player-chip.is-current {
    border-color: var(--gold);
    box-shadow: 0 0 16px rgb(248 187 70 / 0.48), 0 8px 18px rgb(0 0 0 / 0.32);
  }

  .table-player-chip img {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
  }

  .table-player-chip span {
    display: grid;
    min-width: 0;
    line-height: 1;
  }

  .table-player-chip strong,
  .table-player-chip small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .table-player-chip strong {
    color: var(--cream);
    font-size: 0.58rem;
    font-weight: 950;
  }

  .table-player-chip small {
    margin-top: 2px;
    color: var(--gold);
    font-size: 0.52rem;
    font-weight: 900;
  }

  .trick-area {
    width: 100%;
    height: 100%;
    padding: 50px 8px 44px;
    gap: 10px 14px;
  }

  .played-card span {
    max-width: 66px;
    font-size: 0.58rem;
  }

  .card {
    width: 62px;
  }

  .table-card-back {
    right: 10px;
    bottom: 48px;
    width: 42px;
    opacity: 0.78;
  }

  .table-status-strip {
    position: absolute;
    right: 8px;
    bottom: 7px;
    left: 8px;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
  }

  .table-turn-badge,
  .table-books-counter {
    padding: 5px 9px;
    border: 1px solid rgb(255 229 153 / 0.52);
    border-radius: 999px;
    background: rgb(20 11 8 / 0.78);
    box-shadow: 0 10px 18px rgb(0 0 0 / 0.34);
    font-size: 0.64rem;
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
  }

  .table-turn-badge {
    display: none;
    color: #1b0d08;
    background: linear-gradient(180deg, #ffe08a, #d4a017);
  }

  .phase-player-turn .table-turn-badge {
    display: inline-block;
    animation: turnBadgePulse 1.2s ease-in-out infinite;
  }

  .table-books-counter {
    margin-left: auto;
    color: var(--gold);
  }

  .player-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(118px, 1.25fr);
    grid-template-rows: var(--mobile-action-height) var(--mobile-hand-height);
    gap: 0 8px;
    height: calc(var(--mobile-player-area-height) + max(8px, env(safe-area-inset-bottom)));
    padding: 0 8px max(8px, env(safe-area-inset-bottom));
    background: rgb(20 11 8 / 0.96);
  }

  .player-turn-indicator,
  .player-book-badge {
    display: none;
  }

  .trash-talk {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    width: 100%;
    max-width: none;
    max-height: 52px;
    padding: 6px 8px;
    border-radius: 8px;
    pointer-events: auto;
  }

  .trash-talk.is-expanded {
    position: absolute;
    left: 8px;
    bottom: calc(var(--mobile-hand-height) + var(--mobile-action-height) + max(12px, env(safe-area-inset-bottom)));
    width: min(300px, calc(100vw - 16px));
    max-height: min(230px, calc(100dvh - 230px));
    overflow-y: auto;
    z-index: 30;
  }

  .game-screen.is-bidding .trash-talk,
  .game-screen.is-human-turn .trash-talk {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-height: 52px;
  }

  .game-screen.is-bidding .trash-talk.is-expanded,
  .game-screen.is-human-turn .trash-talk.is-expanded {
    position: absolute;
    left: 8px;
    bottom: calc(var(--mobile-hand-height) + var(--mobile-action-height) + max(12px, env(safe-area-inset-bottom)));
    width: min(300px, calc(100vw - 16px));
    max-height: min(230px, calc(100dvh - 230px));
    overflow-y: auto;
  }

  .trash-talk-header strong {
    font-size: 0.62rem;
  }

  .trash-talk.is-collapsed .trash-talk-header span {
    display: none;
  }

  .trash-talk-message {
    gap: 1px;
  }

  .trash-talk-message span {
    font-size: 0.7rem;
    line-height: 1.12;
  }

  .trash-talk.is-expanded .trash-talk-message span {
    font-size: 0.74rem;
    line-height: 1.25;
  }

  .action-panel,
  .game-screen.is-human-turn .action-panel,
  .game-screen.is-bidding .action-panel {
    position: relative;
    inset: auto;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: stretch;
    width: 100%;
    min-height: 42px;
    z-index: 10;
  }

  .selected-card-panel {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .selected-card-panel span {
    display: none;
  }

  .selected-card-panel .primary-action {
    width: 100%;
    min-height: 44px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 950;
  }

  .bid-panel {
    position: static;
    width: 100%;
    max-width: none;
  }

  .game-screen.is-bidding .action-panel {
    position: absolute;
    right: 8px;
    bottom: calc(var(--mobile-hand-height) + var(--mobile-action-height) + max(12px, env(safe-area-inset-bottom)));
    left: 8px;
    width: auto;
  }

  .hand-zone {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: var(--mobile-hand-height);
    max-height: var(--mobile-hand-height);
    padding: 8px 2px 10px;
    gap: 4px;
  }

  .hand-card {
    flex-basis: 60px;
    min-width: 60px;
  }

  .coach-layer {
    inset: 104px 8px auto;
  }
}

@media (min-width: 769px) and (max-height: 620px) and (orientation: landscape) {
  .game-screen {
    grid-template-rows: auto minmax(0, 1fr) minmax(82px, auto);
    gap: 5px;
    padding-block: max(6px, env(safe-area-inset-top)) max(4px, env(safe-area-inset-bottom));
  }

  .top-hud {
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 0.7fr) minmax(160px, 1fr);
  }

  .team-score-card {
    min-height: 54px;
    padding: 6px 8px;
  }

  .team-score-card strong {
    min-width: 52px;
    min-height: 42px;
    font-size: 2rem;
  }

  .players-ring {
    grid-template-columns: repeat(3, minmax(130px, 180px));
  }

  .player-seat {
    grid-template-columns: 68px minmax(0, 1fr);
    min-height: 74px;
  }

  .player-seat img {
    width: 68px;
    height: 68px;
  }

  .table-felt {
    width: auto;
    height: min(100%, 220px);
    max-width: min(54vw, 520px);
    aspect-ratio: 1.72;
  }

  .selected-card-panel {
    min-height: 40px;
    padding: 5px 8px;
  }

  .hand-zone {
    min-height: 82px;
    padding-inline: 8px;
  }

  .card {
    width: 54px;
  }

  .hand-card {
    flex-basis: 56px;
    min-width: 56px;
  }

  .character-showcase {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .character-card {
    min-height: 158px;
  }

  .character-card img {
    height: 148px;
  }
}

@keyframes jokerEntry {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }

  60% {
    opacity: 1;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes jokerGlow {
  0%,
  100% {
    box-shadow:
      inset 0 0 16px rgb(248 187 70 / 0.18),
      0 0 8px rgb(212 160 23 / 0.72),
      0 8px 16px rgb(0 0 0 / 0.28);
  }

  50% {
    box-shadow:
      inset 0 0 18px rgb(248 187 70 / 0.28),
      0 0 28px #d4a017,
      0 0 48px rgb(212 160 23 / 0.4),
      0 8px 16px rgb(0 0 0 / 0.28);
  }
}

@keyframes jokerAnnouncementPop {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.82);
  }

  30% {
    opacity: 1;
    transform: translate(-50%, -2px) scale(1.08);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes microWinnerRise {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.14);
  }
}

@keyframes microFadeSuit {
  0%,
  100% {
    opacity: 0.72;
    transform: translateY(0);
  }
  50% {
    opacity: 0.28;
    transform: translateY(8px);
  }
}

@keyframes microSwapHands {
  0%,
  42% {
    opacity: 0;
    transform: translateY(10px);
  }
  56%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes jokerMicroEntry {
  0% {
    opacity: 0;
    transform: translateX(-120px) scale(0.2);
  }
  60% {
    opacity: 1;
    transform: translateX(0) scale(1.3);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes jokerMicroLittleEntry {
  0% {
    opacity: 0;
    transform: translateX(72px) scale(0.2);
  }
  60% {
    opacity: 1;
    transform: translateX(0) scale(1.16);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(0.92);
  }
}

@keyframes jokerMicroRise {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-18px) scale(1.08);
  }
}

@keyframes jokerMicroGlow {
  0%,
  100% {
    box-shadow: 0 0 8px rgb(212 160 23 / 0.72), 0 12px 24px rgb(0 0 0 / 0.32);
  }
  50% {
    box-shadow:
      0 0 24px #d4a017,
      0 0 42px rgb(212 160 23 / 0.48),
      0 12px 24px rgb(0 0 0 / 0.32);
  }
}

@keyframes jokerMicroLittleGlow {
  0%,
  100% {
    box-shadow: 0 0 8px rgb(212 160 23 / 0.62), 0 12px 24px rgb(0 0 0 / 0.32);
  }
  50% {
    box-shadow:
      0 0 18px #d4a017,
      0 0 30px rgb(212 160 23 / 0.38),
      0 12px 24px rgb(0 0 0 / 0.32);
  }
}

@keyframes jokerTargetFade {
  0%,
  100% {
    opacity: 0.82;
    transform: translateY(0);
  }
  50% {
    opacity: 0.3;
    transform: translateY(7px);
  }
}

@keyframes jokerDeal {
  0% {
    box-shadow: none;
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px #d4a017, 0 0 40px rgb(212 160 23 / 0.5);
    transform: scale(1.08);
  }
  100% {
    box-shadow: 0 0 8px #d4a017;
    transform: scale(1);
  }
}

@keyframes coachTipPop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes coachGoldPulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.16);
  }
}

@keyframes coachGreenPulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.14) saturate(1.18);
  }
}

@keyframes spadeFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-9px) rotate(3deg);
  }
}

@keyframes buttonSheen {
  0%,
  42% {
    transform: translateX(-160%) rotate(18deg);
  }
  72%,
  100% {
    transform: translateX(520%) rotate(18deg);
  }
}

@keyframes tableSlideIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panelRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes speechPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes winnerBannerPop {
  from {
    opacity: 0;
    transform: translate(-50%, 10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes turnBadgePulse {
  0%,
  100% {
    box-shadow: 0 0 16px rgb(248 187 70 / 0.42), 0 10px 22px rgb(0 0 0 / 0.34);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 28px rgb(248 187 70 / 0.78), 0 10px 22px rgb(0 0 0 / 0.34);
    filter: brightness(1.08);
  }
}

@keyframes playableCardPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgb(248 187 70 / 0.24),
      0 0 12px rgb(248 187 70 / 0.34),
      0 10px 18px rgb(0 0 0 / 0.3);
  }
  50% {
    box-shadow:
      0 0 0 2px rgb(248 187 70 / 0.5),
      0 0 24px rgb(248 187 70 / 0.64),
      0 10px 18px rgb(0 0 0 / 0.3);
  }
}

@keyframes reactionBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-8px) scale(1.04);
  }
}

@keyframes reactionGlow {
  from {
    filter: drop-shadow(0 0 0 rgb(248 187 70 / 0));
  }
  to {
    filter: drop-shadow(0 0 16px rgb(248 187 70 / 0.85));
  }
}

@keyframes reactionShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  55% {
    transform: translateX(4px);
  }
  80% {
    transform: translateX(-2px);
  }
}

@keyframes reactionPop {
  from {
    transform: translateX(-8px) scale(0.96);
  }
  to {
    transform: translateX(0) scale(1.04);
  }
}

@keyframes reactionZoom {
  0% {
    transform: scale(0.88);
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}
