:root {
  --font-ui: "Trebuchet MS", Verdana, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --font-logo: "Cooper Black", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-home-button: "Trebuchet MS", Verdana, sans-serif;
  --sky-top: #8fdcff;
  --sky-mid: #c8f0ff;
  --sky-bottom: #f3fcff;
  --ink: #16324b;
  --muted: rgba(22, 50, 75, 0.72);
  --line: rgba(22, 50, 75, 0.14);
  --line-strong: rgba(22, 50, 75, 0.28);
  --gold: #ffe07a;
  --gold-strong: #fff1a8;
  --gold-deep: #a97811;
  --gold-soft: #fff9de;
  --felt-dark: #1d7d57;
  --felt-mid: #2f9969;
  --felt-light: #55bb86;
  --table-ink: #fff8eb;
  --table-muted: rgba(255, 248, 235, 0.78);
  --paper: #fff9ef;
  --paper-shadow: #ecd9ba;
  --paper-line: rgba(125, 90, 48, 0.22);
  --red: #bf2c2c;
  --shadow-soft: 0 18px 40px rgba(43, 116, 156, 0.18);
  --shadow-strong: 0 22px 46px rgba(28, 92, 130, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.96), transparent 18%),
    radial-gradient(circle at 86% 10%, rgba(255, 255, 255, 0.86), transparent 20%),
    radial-gradient(circle at 40% 100%, rgba(255, 255, 255, 0.5), transparent 24%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 46%, var(--sky-bottom) 100%);
}

button {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page {
  min-height: 100vh;
  padding: 10px 10px 14px;
}

.screens {
  max-width: 980px;
  margin: 0 auto;
}

.screen--home {
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: calc(100vh - 48px);
  padding-top: 18px;
}

.eyebrow,
.mode-button__tag,
.table-topline__count {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
}

.table-topline__button--hidden {
  visibility: hidden;
  pointer-events: none;
}

.screen--home h1,
.overlay__card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  line-height: 0.95;
}

.screen--home h1 {
  display: inline-block;
  max-width: min(14ch, 100%);
  justify-self: center;
  padding: 18px 18px 14px;
  border: 1px solid rgba(169, 120, 17, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 252, 239, 0.95), rgba(255, 240, 191, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 72%);
  box-shadow:
    10px 10px 0 rgba(255, 245, 210, 0.72),
    var(--shadow-soft);
  font-family: var(--font-logo);
  font-style: normal;
  font-size: clamp(2.5rem, 10vw, 5.2rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
}

.eyebrow,
.mode-button__tag {
  color: #8f6700;
}

.lead,
.home-note,
.overlay__copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.lead {
  max-width: 32rem;
  font-size: 1.02rem;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 1.04rem;
  line-height: 1.55;
  font-weight: 800;
}

.leaderboard-row__rank {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(169, 120, 17, 0.3);
  background: linear-gradient(180deg, rgba(255, 247, 214, 0.98), rgba(245, 214, 108, 0.94));
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
}

.leaderboard-row__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.leaderboard-row__name,
.profile-card__name,
.recent-match__line {
  font-weight: 800;
  line-height: 1.05;
}

.leaderboard-row__meta,
.profile-card__meta,
.recent-match__meta,
.recent-match__footer {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.leaderboard-row__record {
  text-align: right;
  font-weight: 800;
  line-height: 1.1;
}

.leaderboard-row__record span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.empty-state {
  padding: 14px;
  border: 1px dashed rgba(22, 50, 75, 0.22);
  background: rgba(255, 255, 255, 0.46);
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.mode-list {
  display: grid;
  gap: 12px;
  width: 100%;
}

.mode-button,
.text-button {
  border: 1px solid rgba(169, 120, 17, 0.45);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.mode-button {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 18px 16px;
  font-family: var(--font-home-button);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 36%),
    linear-gradient(180deg, rgba(255, 248, 214, 0.98), rgba(255, 235, 170, 0.94));
  text-align: left;
  cursor: pointer;
}

.mode-button strong {
  font-size: 1.18rem;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mode-button span:last-child {
  font-family: var(--font-ui);
  color: rgba(22, 50, 75, 0.8);
  font-size: 0.98rem;
  line-height: 1.34;
}

.mode-button:hover,
.text-button:hover {
  box-shadow: var(--shadow-strong);
}

.mode-button:active,
.text-button:active,
.deck-button:active {
  transform: translateY(1px);
}

.screen--game {
  display: grid;
  gap: 8px;
  min-height: calc(100vh - 24px);
  grid-template-rows: auto 1fr;
}

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

.table-topline__meta {
  text-align: center;
}

.table-topline__mode {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-family: var(--font-display);
  font-size: 1.16rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
}

.table-topline__count {
  color: var(--muted);
  margin-top: 4px;
}

.text-button {
  min-height: 42px;
  padding: 0 12px;
  font-family: var(--font-home-button);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 36%),
    linear-gradient(180deg, rgba(255, 248, 214, 0.98), rgba(255, 235, 170, 0.94));
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0;
}

.text-button--solid {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 36%),
    linear-gradient(180deg, rgba(255, 248, 214, 0.98), rgba(255, 235, 170, 0.94));
}

.table {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 0;
  height: calc(100vh - 96px);
  padding: 14px 12px 16px;
  color: var(--table-ink);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 14%),
    linear-gradient(180deg, var(--felt-light) 0%, var(--felt-mid) 56%, var(--felt-dark) 100%);
  border: 2px solid rgba(255, 248, 235, 0.9);
  box-shadow: inset 0 0 0 2px rgba(255, 248, 235, 0.16), var(--shadow-strong);
  clip-path: polygon(4% 0, 96% 0, 100% 10%, 100% 100%, 0 100%, 0 10%);
}

.table::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 248, 235, 0.28);
  pointer-events: none;
  clip-path: polygon(4% 0, 96% 0, 100% 10%, 100% 100%, 0 100%, 0 10%);
}

.table__center {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  align-content: start;
  justify-items: center;
  gap: 16px;
  padding: 10px 0 0;
}

.table__info {
  display: grid;
  gap: 6px;
  justify-items: center;
  width: 100%;
  max-width: 100%;
}

.players-line {
  width: 100%;
  margin: 0;
  color: #fff5c8;
  text-align: center;
  font-weight: 800;
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  line-height: 1.35;
  text-wrap: balance;
}

.players-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 34rem;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 248, 235, 0.28);
  background: rgba(14, 74, 51, 0.34);
  color: #fff8eb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
}

.player-chip--current {
  border-color: rgba(255, 225, 128, 0.68);
  background: rgba(114, 82, 13, 0.42);
}

.player-chip--loser {
  border-color: rgba(255, 173, 173, 0.72);
  background: rgba(126, 28, 28, 0.42);
}

.player-chip__name {
  font-weight: 800;
  line-height: 1;
}

.player-chip__badge {
  color: rgba(255, 248, 235, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.session-copy {
  margin: 0;
  min-height: 1.2em;
  color: rgba(255, 245, 200, 0.82);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.turn-copy {
  width: 100%;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
  text-wrap: balance;
}

.event-copy {
  margin: 0;
  max-width: 26rem;
  min-height: 2.9em;
  color: var(--table-muted);
  text-align: center;
  line-height: 1.45;
  font-size: 0.98rem;
  text-wrap: balance;
}

.table__action-zone {
  position: relative;
  display: grid;
  width: 100%;
  min-height: clamp(340px, 50vh, 430px);
  align-self: stretch;
  place-items: center;
  padding: 6px 0 24px;
}

.deck-button {
  position: relative;
  position: absolute;
  right: 8px;
  bottom: 14px;
  width: min(20vw, 82px);
  aspect-ratio: 5 / 7;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.deck-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.deck-button__layer {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  overflow: hidden;
}

.deck-button__layer--back {
  transform: translate(-8px, 8px) rotate(-4deg);
  border: 2px solid rgba(255, 248, 235, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(180deg, #7b1a24 0%, #4a1017 100%);
}

.deck-button__layer--front {
  border: 2px solid rgba(255, 248, 235, 0.66);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 40%),
    repeating-linear-gradient(45deg, rgba(255, 248, 235, 0.12) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(-45deg, rgba(255, 248, 235, 0.12) 0 6px, transparent 6px 12px),
    linear-gradient(180deg, #b12231 0%, #851725 100%);
  box-shadow: 0 18px 30px rgba(33, 50, 63, 0.24);
}

.deck-button__layer--front::before,
.deck-button__layer--front::after {
  content: "";
  position: absolute;
}

.deck-button__layer--front::before {
  inset: 12px;
  border: 2px solid rgba(255, 248, 235, 0.55);
}

.deck-button__layer--front::after {
  inset: 28px;
  border: 1px solid rgba(255, 248, 235, 0.38);
}

.deck-button__label {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 70%;
  padding: 8px 10px;
  transform: translate(-50%, -50%);
  border: 2px solid #821622;
  background: rgba(255, 249, 239, 0.96);
  box-shadow: 0 8px 18px rgba(42, 30, 28, 0.18);
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 3vw, 1.05rem);
  font-style: italic;
  color: #7d1621;
  letter-spacing: 0.05em;
  text-align: center;
}

.card-slot {
  width: min(62vw, 244px);
  min-height: 356px;
  display: grid;
  align-content: center;
  justify-items: center;
  justify-self: center;
  transform: translateY(-28px);
  cursor: pointer;
  z-index: 1;
}

.card-slot--empty {
  opacity: 0;
  pointer-events: none;
}

.playing-card {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 240, 220, 0.98)),
    repeating-linear-gradient(0deg, rgba(117, 81, 41, 0.03) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(90deg, rgba(117, 81, 41, 0.03) 0 2px, transparent 2px 6px);
  border: 2px solid rgba(117, 81, 41, 0.32);
  color: #141414;
  box-shadow: 0 18px 32px rgba(33, 50, 63, 0.2);
  cursor: pointer;
}

.playing-card::before,
.playing-card::after {
  content: "";
  position: absolute;
}

.playing-card::before {
  inset: 10px;
  border: 1px solid rgba(125, 90, 48, 0.28);
}

.playing-card::after {
  inset: 16px;
  border-radius: 8px;
  background:
    radial-gradient(circle at center, rgba(225, 194, 137, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 28%);
  opacity: 0.9;
}

.playing-card__corner {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 0.88;
}

.playing-card[data-rank="10"] .playing-card__corner {
  font-size: 1.24rem;
}

.playing-card__corner::after {
  content: attr(data-suit);
  font-size: 1rem;
}

.playing-card__corner--bottom {
  top: auto;
  left: auto;
  right: 12px;
  bottom: 12px;
  transform: rotate(180deg);
}

.playing-card__face {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 42px 22px 40px;
  display: grid;
  place-items: center;
}

.playing-card--art {
  background: transparent;
  border-color: transparent;
}

.playing-card--art::before,
.playing-card--art::after,
.playing-card--art .playing-card__corner {
  display: none;
}

.playing-card--art .playing-card__face {
  padding: 0;
}

.playing-card__art {
  display: block;
  width: 94%;
  height: 94%;
  margin: auto;
  object-fit: contain;
}

.pip-layout {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1.05fr 0.92fr 0.38fr 0.92fr 0.38fr 0.92fr 1.05fr;
  align-items: center;
  justify-items: center;
}

.pip {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 8vw, 2.45rem);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pip--flip {
  transform: rotate(180deg);
}

.pip-layout--A .pip {
  font-size: clamp(5.8rem, 20vw, 8rem);
}

.pip-layout--8 .pip,
.pip-layout--9 .pip {
  font-size: clamp(1.5rem, 7vw, 2.2rem);
}

.pip-layout--10 .pip {
  font-size: clamp(1.3rem, 6.2vw, 1.95rem);
}

.pip--tl { grid-column: 1; grid-row: 1; }
.pip--tr { grid-column: 3; grid-row: 1; }
.pip--ul { grid-column: 1; grid-row: 2; }
.pip--uc { grid-column: 2; grid-row: 2; }
.pip--ur { grid-column: 3; grid-row: 2; }
.pip--ml { grid-column: 1; grid-row: 4; }
.pip--c { grid-column: 2; grid-row: 4; }
.pip--mr { grid-column: 3; grid-row: 4; }
.pip--ll { grid-column: 1; grid-row: 6; }
.pip--lc { grid-column: 2; grid-row: 6; }
.pip--lr { grid-column: 3; grid-row: 6; }
.pip--bl { grid-column: 1; grid-row: 7; }
.pip--bc { grid-column: 2; grid-row: 7; }
.pip--br { grid-column: 3; grid-row: 7; }

.ace-layout {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.ace-layout__suit {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-size: clamp(7rem, 24vw, 9.6rem);
  line-height: 0.88;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
}

.court-card {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0 12px;
}

.court-card__title {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(4.8rem, 18vw, 7rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
}

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

.playing-card.is-losing {
  border-color: rgba(191, 44, 44, 0.7);
  box-shadow: 0 0 0 1px rgba(191, 44, 44, 0.35), 0 18px 32px rgba(33, 50, 63, 0.2);
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(92, 175, 220, 0.34);
  backdrop-filter: blur(5px);
}

.overlay__card {
  width: min(100%, 420px);
  display: grid;
  gap: 16px;
  padding: 26px 22px;
  border: 1px solid rgba(169, 120, 17, 0.36);
  background: linear-gradient(180deg, rgba(255, 250, 235, 0.98), rgba(255, 242, 201, 0.98));
  box-shadow: var(--shadow-strong);
  text-align: center;
}

.overlay__eyebrow {
  margin: 0;
  color: #8f6700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.overlay__line {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.overlay__card h2 {
  color: #b62222;
  font-size: clamp(2.6rem, 12vw, 4.4rem);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.45);
}

.overlay__card--result h2 {
  font-size: clamp(3.2rem, 16vw, 5.2rem);
}

.overlay__card--setup h2 {
  color: var(--ink);
  font-size: clamp(2rem, 10vw, 3.1rem);
}

.overlay__helper {
  margin: -4px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.online-panel {
  display: grid;
  gap: 16px;
}

#online-profile-copy {
  font-weight: 700;
}

.text-button--hero {
  min-height: 58px;
  font-size: 1.18rem;
}

.online-manual-card {
  display: grid;
  gap: 14px;
  padding: 16px 14px;
  border: 1px solid rgba(169, 120, 17, 0.28);
  background: rgba(255, 255, 255, 0.42);
}

.online-manual-card__heading {
  display: grid;
  gap: 4px;
  text-align: left;
}

.online-manual-card__heading h3 {
  margin: 0;
  font-size: 1.18rem;
  color: var(--ink);
}

.overlay__copy--result {
  font-weight: 700;
  color: rgba(22, 50, 75, 0.88);
}

.overlay__card--leaderboard {
  width: min(100%, 860px);
  gap: 18px;
  padding: 22px 18px;
  text-align: left;
}

.overlay__card--leaderboard h2 {
  color: var(--ink);
  font-size: clamp(2.2rem, 9vw, 3.5rem);
}

.leaderboard-panel__topline {
  display: grid;
  gap: 12px;
  align-items: start;
}

.leaderboard-sheet {
  display: grid;
  gap: 14px;
  max-height: min(68vh, 640px);
  overflow: auto;
  padding-right: 2px;
}

.leaderboard-sheet__section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(22, 50, 75, 0.12);
  background: rgba(255, 255, 255, 0.68);
}

.leaderboard-sheet__heading {
  display: grid;
  gap: 6px;
}

.leaderboard-sheet__heading h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.leaderboard-sheet__tag {
  color: #8f6700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
}

.leaderboard-list,
.profile-list,
.recent-match-list {
  display: grid;
  gap: 10px;
}

.leaderboard-row,
.profile-card,
.recent-match {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(22, 50, 75, 0.11);
  background: rgba(255, 255, 255, 0.78);
}

.leaderboard-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.profile-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(169, 120, 17, 0.24);
  background: rgba(255, 248, 215, 0.82);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.recent-match__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.input-field {
  display: grid;
  gap: 8px;
  text-align: left;
}

.name-fields {
  display: grid;
  gap: 12px;
}

.name-fields .input-field input {
  text-align: center;
}

.input-field__label {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.input-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(169, 120, 17, 0.34);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
}

.input-field input:focus {
  outline: 2px solid rgba(244, 204, 82, 0.55);
  outline-offset: 1px;
}

#online-room-input {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

#online-pin-input {
  text-align: center;
  letter-spacing: 0.34em;
  font-weight: 800;
}

.overlay__actions {
  display: grid;
  gap: 10px;
}

.overlay__actions--compact {
  justify-items: center;
}

.overlay__actions--compact .text-button {
  width: min(100%, 280px);
}

.overlay__actions--triple {
  grid-template-columns: 1fr;
}

.overlay__actions--quad {
  grid-template-columns: 1fr;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(169, 120, 17, 0.34);
  background: rgba(255, 252, 242, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

@media (min-width: 760px) {
  .page {
    padding: 24px 18px 34px;
  }

  .screen--home {
    min-height: auto;
    padding-top: 34px;
  }

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

  .leaderboard-sheet {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
  }

  .leaderboard-sheet__section:last-child {
    grid-column: 1 / -1;
  }

  .leaderboard-panel__topline {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .table {
    height: min(720px, calc(100vh - 140px));
    padding: 22px 24px 28px;
  }

  .table__action-zone {
    min-height: 430px;
    padding-bottom: 22px;
  }

  .deck-button {
    right: 16px;
    bottom: 22px;
    width: min(12vw, 96px);
  }

  .card-slot {
    width: min(34vw, 280px);
    min-height: 390px;
    transform: none;
  }

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

  .overlay__actions--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
