:root {
  color-scheme: dark;
  --ink: #f7f0df;
  --muted: #b9ad97;
  --line: rgba(216, 190, 128, 0.28);
  --paper: #08090c;
  --panel: rgba(22, 24, 28, 0.88);
  --panel-solid: #14171b;
  --field: #0e1115;
  --felt: #0f4f43;
  --felt-deep: #0a302a;
  --gold: #d7b56d;
  --gold-soft: #f1dfaa;
  --gold-glow: rgba(241, 223, 170, 0.36);
  --emerald: #145f50;
  --burgundy: #7e1f31;
  --ruby: #b4233e;
  --shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(215, 181, 109, 0.08), transparent 32%),
    linear-gradient(220deg, rgba(17, 91, 76, 0.18), transparent 48%),
    linear-gradient(180deg, #101217 0%, #08090c 58%, #050607 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 76%);
}

.landing-body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 6%, rgba(241, 223, 170, 0.12), transparent 30%),
    linear-gradient(140deg, #17120d 0%, #101217 42%, #07382f 100%);
}

.landing-shell {
  width: min(1120px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 20px 0 42px;
}

.landing-hero {
  position: relative;
  min-height: min(620px, calc(100vh - 24px));
  display: grid;
  align-content: space-between;
  overflow: hidden;
  border: 1px solid rgba(216, 190, 128, 0.22);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 42px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 44%),
    radial-gradient(circle at 72% 48%, rgba(20, 95, 80, 0.42), transparent 38%),
    rgba(8, 10, 12, 0.56);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.38);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.55;
}

.landing-nav,
.landing-hero-content,
.landing-section,
.landing-cta {
  position: relative;
  z-index: 1;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--gold-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 700;
  text-decoration: none;
}

.landing-nav-action,
.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(216, 190, 128, 0.32);
  border-radius: 8px;
  padding: 11px 18px;
  color: var(--gold-soft);
  font-weight: 850;
  text-decoration: none;
}

.landing-nav-action,
.landing-button.secondary {
  background: rgba(8, 10, 12, 0.42);
}

.landing-hero-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(28px, 5vw, 56px);
  padding: clamp(34px, 5vw, 56px) 0 clamp(16px, 3vw, 28px);
}

.landing-hero-copy,
.landing-section-heading,
.landing-card-panel,
.landing-cta {
  min-width: 0;
}

.landing-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.landing-hero h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(52px, 7.5vw, 88px);
  line-height: 0.94;
}

.landing-hero h1 span {
  display: block;
}

.landing-lede {
  max-width: 560px;
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.45;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.landing-button.primary {
  border-color: rgba(241, 223, 170, 0.58);
  color: #16100a;
  background: linear-gradient(180deg, #f1dfaa, #b7893d);
  box-shadow: 0 18px 36px rgba(215, 181, 109, 0.18);
}

.landing-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 470px;
  margin-top: 18px;
}

.landing-highlights span {
  border: 1px solid rgba(216, 190, 128, 0.18);
  border-radius: 8px;
  padding: 10px 9px;
  color: var(--gold-soft);
  background: rgba(8, 10, 12, 0.36);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.landing-table-scene {
  min-height: clamp(300px, 38vw, 430px);
  display: grid;
  place-items: center;
}

.landing-felt {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1.08;
  border: 10px solid #050607;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 44%, rgba(241, 223, 170, 0.11), transparent 34%),
    linear-gradient(135deg, #146151, #0a302a);
  box-shadow:
    inset 0 0 0 1px rgba(241, 223, 170, 0.18),
    inset 0 0 80px rgba(0, 0, 0, 0.25),
    0 28px 70px rgba(0, 0, 0, 0.34);
}

.landing-table-word {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(241, 223, 170, 0.16);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 700;
}

.landing-card {
  position: absolute;
  width: clamp(68px, 8vw, 96px);
  aspect-ratio: 0.72;
  display: grid;
  align-content: start;
  gap: 2px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fbf8ee;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  line-height: 1;
}

.landing-card span {
  font-size: 0.88em;
}

.landing-card.red {
  color: var(--ruby);
}

.landing-card.black {
  color: #101217;
}

.landing-card-top {
  left: 50%;
  top: 10%;
  transform: translateX(-50%) rotate(0.8deg);
}

.landing-card-right {
  right: 14%;
  top: 50%;
  transform: translateY(-50%) rotate(1.4deg);
}

.landing-card-bottom {
  left: 50%;
  bottom: 10%;
  transform: translateX(-50%) rotate(-0.8deg);
}

.landing-card-left {
  left: 14%;
  top: 50%;
  transform: translateY(-50%) rotate(-1.4deg);
}

.landing-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(44px, 7vw, 78px) 0 0;
}

.landing-section-heading h2,
.landing-cta h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
}

.landing-prose {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.72;
}

.landing-prose p,
.rule-card p,
.options-list p,
.landing-cta p {
  margin: 0;
}

.landing-prose p + p {
  margin-top: 16px;
}

.landing-compact-section {
  grid-template-columns: 1fr;
  gap: 22px;
}

.landing-compact-section .landing-section-heading {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.landing-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.rule-card,
.options-list > div,
.landing-card-panel {
  border: 1px solid rgba(216, 190, 128, 0.18);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 70%),
    rgba(8, 10, 12, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.rule-card h3,
.options-list h3,
.landing-card-panel h3 {
  margin: 0 0 8px;
  color: var(--gold-soft);
  font-size: 17px;
}

.rule-card p,
.options-list p {
  color: var(--muted);
  line-height: 1.58;
}

.landing-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.52;
}

.landing-cta {
  max-width: 780px;
  margin: clamp(36px, 6vw, 64px) auto 0;
  text-align: center;
}

.landing-cta p {
  margin: 16px auto 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
}

button,
input,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
  padding: 34px;
}

.workspace {
  max-width: 1220px;
  margin: 0 auto;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 8px 2px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 0.95;
  color: var(--gold-soft);
}

.brand-subtitle {
  max-width: 360px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

h2 {
  margin-bottom: 18px;
  font-size: 18px;
  font-weight: 760;
  color: var(--gold-soft);
}

h3 {
  margin-bottom: 6px;
  font-size: 21px;
  color: var(--ink);
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) 1fr;
  gap: 22px;
}

.setup-mode .layout {
  grid-template-columns: minmax(320px, 560px);
  justify-content: center;
}

.setup-mode .table-panel {
  display: none;
}

.setup-mode #newTableButton {
  display: none;
}

.table-mode .layout {
  grid-template-columns: 1fr;
}

.table-mode #createTableForm {
  display: none;
}

.table-mode .table-panel {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.table-mode .toolbar {
  align-items: center;
  margin-bottom: 12px;
}

.table-mode h1 {
  font-size: 36px;
}

.table-mode .eyebrow {
  margin-bottom: 2px;
}

.table-mode .brand-subtitle {
  display: none;
}

.table-mode .brand-card-mark {
  width: 72px;
  height: 56px;
}

.table-mode .brand-card-mark .lux-card {
  width: 34px;
  height: 46px;
  font-size: 12px;
}

.table-mode .brand-card-mark .lux-card:last-child {
  left: 36px;
}

.table-mode .panel {
  padding: 16px;
}

.table-mode .table-header {
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 8px;
}

.panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 34%),
    linear-gradient(135deg, rgba(215, 181, 109, 0.04), transparent 42%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 24px 70px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.table-panel {
  container-type: inline-size;
  min-height: 640px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 32%),
    linear-gradient(135deg, rgba(18, 95, 80, 0.56), rgba(20, 23, 27, 0.96));
}

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

form > label + label {
  margin-top: 14px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(216, 190, 128, 0.22);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--field);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 181, 109, 0.16);
}

.grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

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

.form-group {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 13px;
  border: 1px solid rgba(216, 190, 128, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 70%),
    rgba(255, 255, 255, 0.018);
}

.form-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.form-group-head span {
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.team-grid,
.target-grid {
  margin-top: 0;
}

.target-grid {
  margin-top: 16px;
}

.settings,
.switches {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.switches {
  padding: 14px;
  border: 1px solid rgba(216, 190, 128, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.switches label {
  grid-template-columns: 18px 1fr;
  align-items: center;
  color: var(--ink);
  font-weight: 650;
}

.switches input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--gold);
}

button {
  min-height: 42px;
  border: 1px solid rgba(215, 181, 109, 0.45);
  border-radius: 6px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold-soft);
  cursor: pointer;
}

button:hover {
  border-color: var(--gold);
  background: rgba(215, 181, 109, 0.12);
}

.primary {
  width: 100%;
  margin-top: 20px;
  border-color: rgba(215, 181, 109, 0.75);
  background: linear-gradient(180deg, #ddbd75, #a77c2d);
  color: #17110a;
  font-weight: 850;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.primary:hover {
  background: linear-gradient(180deg, #efd18a, #b98b38);
}

.empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  text-align: center;
  color: var(--muted);
  border: 1px solid rgba(216, 190, 128, 0.2);
  border-radius: 8px;
  padding: 24px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 12px),
    linear-gradient(145deg, rgba(15, 79, 67, 0.72), rgba(9, 23, 21, 0.92));
}

.empty.slim {
  min-height: 190px;
}

.card-stack {
  position: relative;
  width: 188px;
  height: 132px;
}

.lux-card {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 82px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(20, 20, 20, 0.22);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(215, 181, 109, 0.2), transparent 36%),
    #fbf4df;
  color: #141414;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36);
}

.lux-card.red {
  color: var(--ruby);
}

.lux-card.black {
  color: #161719;
  transform: rotate(-5deg);
  z-index: 1;
}

.lux-card:first-child {
  left: 18px;
  transform: rotate(-5deg);
}

.lux-card:last-child {
  left: 94px;
  transform: rotate(5deg);
}

.brand-card-mark {
  width: 90px;
  height: 72px;
  flex: 0 0 auto;
}

.brand-card-mark .lux-card {
  top: 8px;
  width: 42px;
  height: 58px;
  border-radius: 5px;
  font-size: 14px;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.3);
}

.brand-card-mark .lux-card:first-child {
  left: 2px;
  transform: rotate(-5deg);
}

.brand-card-mark .lux-card:last-child {
  left: 42px;
  transform: rotate(5deg);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  border-bottom: 1px solid rgba(216, 190, 128, 0.24);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.invite {
  margin: 0;
  word-break: break-all;
  color: var(--gold);
  font-size: 13px;
}

.target-chip {
  white-space: nowrap;
  border: 1px solid rgba(215, 181, 109, 0.42);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-size: 13px;
}

.target-chip strong {
  color: var(--gold-soft);
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  flex-wrap: wrap;
}

.copy-room-link {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
  background: rgba(8, 10, 12, 0.5);
  font-size: 13px;
  font-weight: 800;
}

.table-copy-button {
  min-height: 34px;
  border-color: rgba(215, 181, 109, 0.58);
  padding: 7px 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 58%),
    rgba(8, 10, 12, 0.66);
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.table-copy-button.copied {
  background: linear-gradient(180deg, #f2d58e, #ba8936);
  color: #15100a;
}

.copy-room-link.copied {
  background: linear-gradient(180deg, #f2d58e, #ba8936);
  color: #15100a;
}

.copy-fallback {
  flex: 1 1 100%;
  display: grid;
  gap: 6px;
  text-align: left;
}

.copy-fallback span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.copy-fallback input {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 12px;
}

.game-table {
  margin-top: 16px;
  border: 1px solid rgba(216, 190, 128, 0.24);
  border-radius: 8px;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.08), transparent 35%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 11px),
    linear-gradient(145deg, rgba(15, 79, 67, 0.86), rgba(7, 28, 25, 0.98));
  box-shadow: inset 0 0 42px rgba(0, 0, 0, 0.22);
}

.lobby-panel {
  margin-top: 16px;
  border: 1px solid rgba(216, 190, 128, 0.24);
  border-radius: 8px;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 45%, rgba(215, 181, 109, 0.09), transparent 44%),
    rgba(0, 0, 0, 0.18);
}

.invite-table-shell {
  display: grid;
  place-items: center;
  min-height: 610px;
  padding: 44px 34px;
}

.invite-table {
  position: relative;
  width: min(100%, 780px);
  min-height: 560px;
}

.invite-felt {
  position: absolute;
  inset: 190px 172px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  border: 1px solid rgba(216, 190, 128, 0.36);
  border-radius: 94px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.11), transparent 36%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 13px),
    linear-gradient(145deg, rgba(16, 91, 77, 0.94), rgba(5, 38, 33, 0.98));
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.42), 0 28px 70px rgba(0, 0, 0, 0.44);
  text-align: center;
}

.table-mark {
  color: rgba(241, 223, 170, 0.48);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
  font-weight: 700;
}

.invite-felt h3 {
  margin: -8px 0 0;
  color: var(--gold-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
}

.copy-table-link {
  min-width: 174px;
  background: rgba(8, 10, 12, 0.5);
}

.invite-open {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid rgba(215, 181, 109, 0.52);
  border-radius: 6px;
  padding: 8px 13px;
  background: rgba(8, 10, 12, 0.54);
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.invite-open:hover {
  border-color: var(--gold);
  background: rgba(215, 181, 109, 0.14);
  color: var(--gold-soft);
}

.invite-seat {
  position: absolute;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 154px;
  border: 1px solid rgba(216, 190, 128, 0.26);
  border-radius: 8px;
  padding: 13px 14px 12px;
  background: rgba(8, 10, 12, 0.78);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.invite-seat strong {
  color: var(--gold-soft);
}

.invite-seat span {
  color: var(--muted);
  font-size: 12px;
}

.invite-seat.occupied {
  border-color: rgba(216, 190, 128, 0.18);
  background: rgba(8, 10, 12, 0.62);
  opacity: 0.72;
}

.invite-plus {
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding: 0 0 2px;
  border-color: rgba(215, 181, 109, 0.72);
  background: linear-gradient(180deg, #ddbd75, #9b7027);
  color: #15100a;
  font-size: 30px;
  line-height: 1;
  font-weight: 500;
}

.invite-plus:hover,
.copy-table-link.copied,
.invite-plus.copied {
  background: linear-gradient(180deg, #f2d58e, #ba8936);
  color: #15100a;
}

.invite-felt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.secondary-action {
  border-color: rgba(216, 190, 128, 0.2);
  background: rgba(8, 10, 12, 0.46);
  color: var(--gold-soft);
}

.watch-open {
  min-height: 36px;
  align-content: center;
}

.view-table-link {
  min-width: 138px;
  border-color: rgba(241, 223, 170, 0.72);
  background: linear-gradient(180deg, rgba(215, 181, 109, 0.24), rgba(145, 103, 38, 0.16));
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

.invite-plus:disabled,
.invite-plus.taken {
  border-color: rgba(216, 190, 128, 0.22);
  background: rgba(216, 190, 128, 0.1);
  color: var(--muted);
  cursor: not-allowed;
}

.invite-open.disabled-link {
  border-color: rgba(216, 190, 128, 0.18);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

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

.invite-seat-1 {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.invite-seat-2 {
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.invite-seat-3 {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.live-table {
  --table-height: clamp(580px, min(76vw, calc(100vh - 80px)), 660px);
  --felt-top: clamp(66px, 7vw, 88px);
  --felt-side: clamp(42px, 9vw, 118px);
  --hand-panel-bottom: clamp(2px, 0.8cqw, 10px);
  --hand-panel-side: clamp(4px, 2.4cqw, 30px);
  --hand-panel-height: clamp(140px, 13vw, 166px);
  --felt-bottom: calc(var(--hand-panel-bottom) + var(--hand-panel-height) + clamp(36px, 4vw, 58px));
  --felt-height: calc(var(--table-height) - var(--felt-top) - var(--felt-bottom));
  --felt-center-y: calc(var(--felt-top) + (var(--felt-height) / 2));
  --seat-edge: clamp(10px, 1.6cqw, 18px);
  --seat-width: clamp(78px, 9cqw, 112px);
  --seat-min-height: clamp(30px, 3.4cqw, 38px);
  --seat-bottom: calc(var(--hand-panel-bottom) + var(--hand-panel-height) + clamp(8px, 1.8cqw, 18px));
  position: relative;
  container-type: inline-size;
  height: var(--table-height);
  min-height: 0;
  width: min(100%, 900px);
  margin: 16px auto 0;
  border: 1px solid rgba(216, 190, 128, 0.34);
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 14%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 70px),
    repeating-linear-gradient(8deg, rgba(255, 255, 255, 0.04) 0 2px, rgba(0, 0, 0, 0.04) 2px 7px, transparent 7px 19px),
    linear-gradient(90deg, #3b2a20, #775741 22%, #4a3225 54%, #8a684d 78%, #34251d);
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.45),
    0 28px 70px rgba(0, 0, 0, 0.34);
}

.live-table::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 0;
  border: 1px solid rgba(241, 223, 170, 0.2);
  border-radius: 12px;
  pointer-events: none;
}

.live-table-hud {
  position: absolute;
  left: clamp(12px, 1.8cqw, 22px);
  right: clamp(12px, 1.8cqw, 22px);
  top: clamp(10px, 1.5cqw, 16px);
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.live-table-hud > * {
  pointer-events: auto;
}

.room-chip {
  display: grid;
  gap: 1px;
  min-width: 132px;
  border: 1px solid rgba(216, 190, 128, 0.28);
  border-radius: 8px;
  padding: 8px 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), transparent 52%),
    rgba(6, 8, 10, 0.68);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.room-chip span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.room-chip strong {
  color: var(--gold-soft);
  font-size: 13px;
}

.table-felt {
  position: absolute;
  inset: var(--felt-top) var(--felt-side) var(--felt-bottom);
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 10px;
  border: clamp(5px, 0.8cqw, 8px) solid #050706;
  border-radius: clamp(36px, 6.8cqw, 62px);
  padding: clamp(24px, 3.6cqw, 38px) clamp(22px, 4.8cqw, 54px) clamp(18px, 3cqw, 30px);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.1), transparent 38%),
    radial-gradient(ellipse at 50% 100%, rgba(215, 181, 109, 0.09), transparent 42%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 13px),
    linear-gradient(145deg, rgba(18, 88, 75, 0.98), rgba(5, 29, 28, 0.99));
  box-shadow:
    0 0 0 3px rgba(215, 181, 109, 0.46),
    inset 0 0 80px rgba(0, 0, 0, 0.42),
    0 30px 64px rgba(0, 0, 0, 0.5);
}

.table-felt::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(241, 223, 170, 0.07);
  border-radius: inherit;
  pointer-events: none;
}

.waiting-table .table-felt {
  inset: var(--felt-top) var(--felt-side) clamp(34px, 6cqw, 72px);
}

.watcher-table {
  --hand-panel-height: clamp(24px, 4cqw, 36px);
  --felt-bottom: clamp(64px, 8cqw, 86px);
  --felt-height: calc(var(--table-height) - var(--felt-top) - var(--felt-bottom));
  --felt-center-y: calc(var(--felt-top) + (var(--felt-height) / 2));
  --seat-bottom: clamp(7px, 1.3cqw, 14px);
}

.watcher-table .table-felt {
  inset: var(--felt-top) var(--felt-side) var(--felt-bottom);
}

.watcher-table .table-seat {
  width: clamp(74px, 9cqw, 104px);
  min-height: clamp(28px, 3.3cqw, 36px);
}

.watcher-header .invite {
  color: var(--gold-soft);
}

.live-table.complete-table {
  height: auto;
  min-height: var(--table-height);
  overflow: visible;
  padding: var(--felt-top) var(--felt-side) clamp(18px, 3cqw, 34px);
}

.live-table.complete-table .table-felt {
  position: relative;
  inset: auto;
  min-height: calc(var(--table-height) - var(--felt-top) - clamp(18px, 3cqw, 34px));
  overflow: visible;
  width: 100%;
}

.table-seats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.table-seat {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 0;
  width: var(--seat-width);
  min-height: var(--seat-min-height);
  border: 1px solid rgba(216, 190, 128, 0.22);
  border-radius: 999px;
  padding: clamp(5px, 0.75cqw, 7px) clamp(8px, 1.1cqw, 12px);
  background: rgba(8, 10, 12, 0.38);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  text-align: center;
  overflow: visible;
  backdrop-filter: blur(5px);
}

.table-seat strong {
  color: var(--gold-soft);
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(11px, 1.15cqw, 13px);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-seat span,
.table-seat small {
  color: var(--muted);
  font-size: clamp(11px, 1.1cqw, 12px);
}

.table-seat.active {
  border-color: var(--gold);
  z-index: 6;
  background: rgba(22, 18, 11, 0.62);
  box-shadow:
    0 0 0 2px rgba(215, 181, 109, 0.16),
    0 0 22px rgba(215, 181, 109, 0.28),
    0 12px 24px rgba(0, 0, 0, 0.26);
}

.table-seat.active::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  transform: translateX(-50%);
  border-radius: 999px;
  width: 10px;
  height: 10px;
  background: linear-gradient(180deg, #f3d78f, #a7792e);
  box-shadow: 0 0 14px rgba(215, 181, 109, 0.8);
}

.table-seat.viewer {
  background: rgba(18, 28, 30, 0.44);
}

.table-seat.not-joined {
  opacity: 0.52;
}

.table-seat.self-seat {
  display: none;
}

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

.seat-1 {
  right: var(--seat-edge);
  top: var(--felt-center-y);
  transform: translateY(-50%);
}

.seat-2 {
  left: 50%;
  top: var(--seat-edge);
  transform: translateX(-50%);
}

.seat-3 {
  left: var(--seat-edge);
  top: var(--felt-center-y);
  transform: translateY(-50%);
}

.card-backs {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 118px;
  height: 86px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: -1;
}

.card-backs span {
  position: absolute;
  left: 43px;
  top: 18px;
  width: 34px;
  height: 48px;
  border: 1px solid rgba(216, 190, 128, 0.28);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(145deg, #254d73, #0e2542 64%, #071522);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.28);
  transform: rotate(var(--back-rotate));
  transform-origin: 50% 120%;
  z-index: var(--back-z);
}

.seat-0 .card-backs {
  display: none;
}

.seat-1 .card-backs {
  left: -10px;
  top: 50%;
  transform: translate(-50%, -50%) rotate(88deg);
}

.seat-2 .card-backs {
  top: 104px;
}

.seat-3 .card-backs {
  left: calc(100% + 10px);
  top: 50%;
  transform: translate(-50%, -50%) rotate(-88deg);
}

.felt-center {
  min-height: clamp(180px, 24cqw, 240px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
}

.play-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.live-table .play-header {
  align-items: start;
  flex-direction: row;
  gap: clamp(8px, 1.4cqw, 16px);
  margin-bottom: clamp(8px, 1.4cqw, 16px);
  border-bottom: 1px solid rgba(216, 190, 128, 0.13);
  padding-bottom: clamp(8px, 1.4cqw, 12px);
}

.live-table .play-header h3 {
  font-size: clamp(16px, 2.2cqw, 21px);
  margin-bottom: 0;
}

.play-header.is-your-turn h3 {
  color: var(--gold-soft);
  text-shadow: 0 0 18px rgba(215, 181, 109, 0.2);
}

.live-table .game-status {
  font-size: clamp(11px, 1.2cqw, 13px);
}

.live-table .target-chip {
  padding: clamp(6px, 0.9cqw, 8px) clamp(8px, 1.2cqw, 12px);
  font-size: clamp(11px, 1.2cqw, 13px);
}

.game-status,
.muted,
.waiting-copy {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
}

.game-status {
  font-weight: 850;
  text-transform: uppercase;
}

.waiting-copy {
  display: inline-block;
  margin: 8px 0 0;
}

.inline-error {
  margin-bottom: 12px;
  border: 1px solid rgba(180, 35, 62, 0.46);
  border-radius: 8px;
  padding: 11px 13px;
  background: rgba(126, 31, 49, 0.3);
  color: #ffd9df;
  font-size: 13px;
}

.seat-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.seat-tabs button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}

.seat-tabs button.active {
  background: rgba(215, 181, 109, 0.16);
  color: var(--gold-soft);
}

.hand-row,
.trick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin: 14px 0;
}

.fan-hand {
  position: relative;
  display: block;
  min-height: 216px;
  padding: 0 28px 8px;
  overflow: visible;
}

.live-table .fan-hand {
  min-height: clamp(142px, 17cqw, 176px);
  margin: clamp(2px, 0.6cqw, 7px) 0 0;
}

.fan-card {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 2cqw, 22px);
  width: var(--fan-hit-width);
  height: var(--fan-card-height);
  min-height: 0;
  z-index: var(--fan-z);
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  pointer-events: auto;
  cursor: pointer;
  transform: translateX(var(--fan-x)) translateY(var(--fan-y));
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.live-table .fan-card {
  bottom: clamp(30px, 4.4cqw, 48px);
}

.fan-card:hover {
  border-color: transparent;
  background: transparent;
}

.fan-card .card-button {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--fan-card-width);
  pointer-events: auto;
  transform: rotate(var(--fan-rotate));
  transform-origin: 50% 220%;
}

.fan-card.hover-target:not(:disabled) {
  z-index: 260;
  opacity: 1;
  transform: translateX(var(--fan-x)) translateY(calc(var(--fan-y) - 20px));
}

.fan-card.selected {
  z-index: var(--fan-z);
  opacity: 1;
  transform: translateX(var(--fan-x)) translateY(calc(var(--fan-y) - 14px));
}

.trick-row {
  position: relative;
  grid-row: 2;
  --trick-card-width: clamp(70px, 8.2cqw, 88px);
  --trick-offset-x: clamp(42px, 6.8cqw, 58px);
  --trick-offset-y: clamp(40px, 6.6cqw, 56px);
  display: block;
  width: min(100%, clamp(236px, 36cqw, 324px));
  height: min(100%, clamp(226px, 33cqw, 294px));
  min-height: 0;
  margin: 0 auto;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.table-center {
  min-height: 0;
  align-items: flex-start;
  align-self: stretch;
}

.table-prompt {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 180px;
  border: 1px solid rgba(216, 190, 128, 0.12);
  border-radius: 999px;
  padding: 13px 18px;
  background: rgba(0, 0, 0, 0.12);
  color: var(--gold-soft);
  box-shadow: none;
  margin-top: clamp(-38px, -4cqw, -24px);
}

.table-prompt.quiet-prompt {
  opacity: 0.62;
  min-width: 132px;
  padding: 9px 13px;
}

.table-prompt span {
  font-weight: 850;
}

.table-prompt small {
  color: var(--muted);
  font-size: 11px;
}

.card-button {
  width: clamp(72px, 9.8cqw, 88px);
  aspect-ratio: 5 / 7;
  min-height: 0;
  position: relative;
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: var(--card-ink, #111317);
  font-family: Georgia, "Times New Roman", serif;
  cursor: pointer;
}

.card-button:hover {
  border-color: transparent;
  background: transparent;
}

.card-button.red,
.played-card .red {
  --card-ink: #a90f2f;
}

.card-button.black {
  --card-ink: #121417;
}

.card-face {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--card-ink);
  overflow: visible;
  filter: drop-shadow(0 13px 15px rgba(0, 0, 0, 0.28));
}

.card-paper {
  fill: #fffdf4;
  stroke: rgba(19, 17, 14, 0.42);
  stroke-width: 1.2;
}

.card-inner {
  fill: none;
  stroke: rgba(20, 18, 15, 0.1);
  stroke-width: 1;
}

.card-index,
.court-rank {
  fill: currentColor;
  font-family: Georgia, "Times New Roman", serif;
  text-anchor: middle;
  dominant-baseline: middle;
}

.index-rank {
  font-size: 18px;
  font-weight: 900;
}

.suit-icon {
  color: var(--card-ink);
  fill: currentColor;
  stroke: none;
}

.suit-shape {
  shape-rendering: geometricPrecision;
}

.pip-icon .suit-shape {
  filter: drop-shadow(0 0.4px 0 rgba(255, 255, 255, 0.18));
}

.index-suit .suit-shape {
  filter: none;
}

.court-picture {
  fill: #fff7e6;
  stroke: rgba(31, 25, 17, 0.42);
  stroke-width: 0.95;
}

.court-picture-inner {
  fill: #fdf0d6;
  stroke: rgba(31, 25, 17, 0.14);
  stroke-width: 0.75;
}

.court-red {
  fill: #c4212f;
  stroke: rgba(82, 9, 16, 0.28);
  stroke-width: 0.45;
  stroke-linejoin: round;
}

.court-black {
  fill: #23201b;
  stroke: rgba(0, 0, 0, 0.22);
  stroke-width: 0.45;
  stroke-linejoin: round;
}

.court-gold,
.court-metal {
  fill: #d4a046;
  stroke: rgba(72, 46, 12, 0.42);
  stroke-width: 0.6;
  stroke-linejoin: round;
}

.court-robe {
  fill: #f3dfb8;
  stroke: rgba(54, 38, 20, 0.44);
  stroke-width: 0.7;
  stroke-linejoin: round;
}

.court-robe-panel {
  fill: rgba(255, 253, 244, 0.72);
  stroke: rgba(54, 38, 20, 0.22);
  stroke-width: 0.55;
}

.court-top-bar {
  opacity: 0.98;
}

.court-sash {
  fill: none;
  stroke: #fff5d8;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.court-collar {
  fill: none;
  stroke: rgba(43, 31, 19, 0.68);
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.court-face-fill {
  fill: #efc69a;
  stroke: rgba(67, 39, 24, 0.26);
  stroke-width: 0.72;
}

.court-face-line,
.court-line-detail {
  fill: none;
  stroke: rgba(36, 27, 18, 0.78);
  stroke-width: 0.82;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.court-accessory {
  fill: none;
  stroke: rgba(35, 26, 16, 0.86);
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.court-flower {
  stroke: #a9172a;
}

.court-jewel {
  fill: #a9172a;
}

.court-divider {
  fill: none;
  stroke: rgba(31, 25, 17, 0.28);
  stroke-width: 0.85;
}

.court-suit-icon,
.court-center-suit {
  color: var(--card-ink);
}

.court-suit-icon .suit-shape,
.court-center-suit .suit-shape {
  filter: none;
}

.court-rank {
  font-size: 19px;
  font-weight: 900;
  fill: var(--card-ink);
}

.card-button.selected {
  opacity: 1;
  outline: none;
}

.card-button.playable:not(.selected) .card-paper {
  stroke: rgba(215, 181, 109, 0.9);
  stroke-width: 2.8;
}

.card-button.playable:not(.selected) .card-face {
  filter:
    drop-shadow(0 0 9px rgba(241, 223, 170, 0.62))
    drop-shadow(0 14px 18px rgba(0, 0, 0, 0.3));
}

.card-button.playable:not(.selected) .card-inner {
  stroke: rgba(215, 181, 109, 0.34);
  stroke-width: 1.7;
}

.card-button.selected .card-paper {
  stroke: var(--gold);
  stroke-width: 4;
}

.card-button.selected .card-face {
  filter:
    drop-shadow(0 0 10px rgba(241, 223, 170, 0.9))
    drop-shadow(0 20px 24px rgba(0, 0, 0, 0.36));
}

.card-button.received .card-paper {
  stroke: var(--gold-soft);
  stroke-width: 3.2;
}

.card-button.received .card-face {
  animation: receivedCardGlow 2800ms ease both;
}

.fan-card:disabled {
  cursor: not-allowed;
}

.card-button:disabled,
.card-button.is-disabled {
  opacity: 1;
  cursor: not-allowed;
}

.card-button:disabled .card-face,
.card-button.is-disabled .card-face {
  filter:
    saturate(0.92)
    drop-shadow(0 10px 12px rgba(0, 0, 0, 0.22));
}

.card-button.static {
  pointer-events: none;
}

.mini-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mini-card-row .card-button {
  width: 40px;
  min-height: 0;
  border-radius: 5px;
}

.mini-card-row .card-face {
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.24));
}

.auto-panel,
.round-tricks {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(216, 190, 128, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.auto-panel strong,
.round-trick strong,
.pile-card strong {
  display: block;
  color: var(--gold-soft);
  margin-bottom: 3px;
}

.auto-panel span,
.round-trick span,
.pile-card span {
  color: var(--muted);
  font-size: 12px;
}

.round-tricks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  max-height: none;
  overflow: visible;
}

.complete-board {
  align-self: start;
  display: grid;
  gap: 14px;
  min-height: 100%;
  width: 100%;
}

.complete-board-action {
  min-height: clamp(84px, 11cqw, 122px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  place-items: center;
  padding: 4px 0;
}

.complete-title {
  justify-self: start;
  display: grid;
  gap: 3px;
}

.complete-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.complete-title strong {
  color: var(--gold-soft);
  font-size: clamp(16px, 2cqw, 22px);
}

.complete-title small {
  max-width: 340px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.complete-board-action .primary {
  width: auto;
  min-width: 190px;
  margin: 0;
  grid-column: 2;
}

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

.game-result-panel > div {
  display: grid;
  gap: 5px;
  min-height: 68px;
  border: 1px solid rgba(216, 190, 128, 0.22);
  border-radius: 8px;
  padding: 11px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 54%),
    rgba(8, 10, 12, 0.46);
}

.game-result-panel span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.game-result-panel strong {
  color: var(--gold-soft);
  font-size: clamp(14px, 1.6cqw, 17px);
  line-height: 1.2;
}

.round-results {
  display: grid;
  gap: 10px;
}

.trick-expansion {
  display: grid;
  gap: 10px;
}

.trick-expansion > .compact {
  justify-self: center;
  min-width: 150px;
}

.trick-expansion .round-tricks {
  margin: 0;
}

.round-trick {
  border: 1px solid rgba(216, 190, 128, 0.15);
  border-radius: 8px;
  padding: 10px;
  background: rgba(8, 10, 12, 0.34);
}

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

.pile-card {
  min-height: 96px;
  border: 1px solid rgba(216, 190, 128, 0.15);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 56%),
    rgba(8, 10, 12, 0.34);
}

.pile-card.has-points {
  border-color: rgba(215, 181, 109, 0.26);
  box-shadow: inset 0 0 28px rgba(215, 181, 109, 0.045);
}

.pile-card.clean-pile {
  opacity: 0.82;
}

.pile-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.pile-card-head strong {
  margin-bottom: 0;
}

.pile-card-head span {
  white-space: nowrap;
  color: var(--gold-soft);
  font-weight: 850;
}

.player-hand-panel {
  border-top: 1px solid rgba(216, 190, 128, 0.18);
  padding-top: 12px;
}

.live-table .player-hand-panel {
  position: absolute;
  left: var(--hand-panel-side);
  right: var(--hand-panel-side);
  bottom: var(--hand-panel-bottom);
  z-index: 3;
  min-height: var(--hand-panel-height);
  border: 0;
  border-radius: 0;
  padding: clamp(3px, 0.55cqw, 7px) clamp(7px, 1.2cqw, 14px) clamp(4px, 0.8cqw, 8px);
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.live-table .player-hand-panel .hand-panel-head,
.live-table .player-hand-panel .fan-hand,
.live-table .player-hand-panel .primary,
.live-table .player-hand-panel .pass-control-bar {
  pointer-events: auto;
}

.pass-receipt {
  position: absolute;
  left: 50%;
  top: clamp(-106px, -9cqw, -82px);
  z-index: 32;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 9px 12px 11px;
  min-width: 210px;
  border: 1px solid rgba(241, 223, 170, 0.46);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 58%),
    rgba(8, 10, 12, 0.88);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28),
    0 18px 36px rgba(0, 0, 0, 0.42),
    0 0 26px rgba(241, 223, 170, 0.2);
  pointer-events: none;
  transform: translateX(-50%) translateY(20px) scale(0.96);
  animation: passReceiptPop 2800ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.pass-receipt span {
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.pass-receipt-cards {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.pass-receipt-cards .card-button {
  width: clamp(42px, 4.7cqw, 54px);
  min-height: 0;
}

.hand-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.hand-actions .primary {
  margin-top: 0;
}

.player-hand-panel h3 {
  font-size: 16px;
  text-align: center;
}

.hand-panel-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hand-panel-head-quiet {
  justify-content: flex-end;
  padding-right: clamp(6px, 1.2cqw, 14px);
}

.hand-panel-head h3 {
  margin: 0;
}

.hand-panel-head span {
  border: 1px solid rgba(216, 190, 128, 0.24);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: rgba(8, 10, 12, 0.42);
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(8px);
}

.pass-control-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2cqw, 12px);
  width: fit-content;
  max-width: min(100%, 680px);
  margin: 0 auto;
  border: 1px solid rgba(216, 190, 128, 0.22);
  border-radius: 999px;
  padding: 6px 7px 6px 13px;
  background: rgba(8, 10, 12, 0.48);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.pass-control-dock {
  display: flex;
  justify-content: center;
  margin: 8px 0 0;
}

.pass-instruction,
.pass-count {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 850;
}

.pass-instruction {
  color: var(--gold-soft);
}

.pass-count {
  color: var(--muted);
}

.live-table .player-hand-panel > .primary.compact {
  display: block;
  margin: 8px auto 0;
}

.pass-control-bar .primary.compact {
  min-width: 132px;
  min-height: 34px;
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
}

.played-card {
  position: absolute;
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--muted);
  font-size: 12px;
  z-index: var(--trick-z, 20);
  transform-origin: center;
  --entry-x: 0px;
  --entry-y: 0px;
  --trick-x: 0px;
  --trick-y: 0px;
  --trick-rotate: 0deg;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translate(var(--trick-x), var(--trick-y)) rotate(var(--trick-rotate));
}

.played-card .card-button {
  width: var(--trick-card-width);
  min-height: 0;
  animation: playedCardSettle 210ms ease-out both;
}

.trick-seat-0 {
  --trick-y: var(--trick-offset-y);
  --trick-rotate: -1.4deg;
  --entry-y: clamp(24px, 4cqw, 38px);
}

.trick-seat-1 {
  --trick-x: var(--trick-offset-x);
  --trick-rotate: 1.1deg;
  --entry-x: clamp(24px, 4cqw, 38px);
}

.trick-seat-2 {
  --trick-y: calc(-1 * var(--trick-offset-y));
  --trick-rotate: 1.3deg;
  --entry-y: clamp(-38px, -4cqw, -24px);
}

.trick-seat-3 {
  --trick-x: calc(-1 * var(--trick-offset-x));
  --trick-rotate: -1.1deg;
  --entry-x: clamp(-38px, -4cqw, -24px);
}

.recent-trick-row .played-card .card-face {
  filter:
    drop-shadow(0 0 10px rgba(241, 223, 170, 0.42))
    drop-shadow(0 16px 18px rgba(0, 0, 0, 0.28));
}

@keyframes playedCardSettle {
  from {
    opacity: 0;
    transform: translate(var(--entry-x), var(--entry-y)) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

.compact {
  width: auto;
  min-width: 168px;
}

.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.seats,
.score-grid,
.history {
  display: grid;
  gap: 10px;
}

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

.seat,
.score-card,
.history-row,
.rule-list {
  border: 1px solid rgba(216, 190, 128, 0.2);
  border-radius: 8px;
  padding: 13px;
  background: rgba(8, 10, 12, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.seat strong,
.score-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-soft);
}

.seat span {
  color: var(--muted);
  font-size: 12px;
}

.score-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 8px 0 10px;
}

.score-card {
  min-height: 78px;
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), transparent 54%),
    rgba(8, 10, 12, 0.48);
}

.score-card.active-score {
  border-color: rgba(215, 181, 109, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 2px rgba(215, 181, 109, 0.14),
    0 0 24px rgba(215, 181, 109, 0.18);
}

.score-card.viewer-score {
  background:
    linear-gradient(180deg, rgba(215, 181, 109, 0.1), transparent 56%),
    rgba(8, 10, 12, 0.5);
}

.score-card.danger-score .score-meter span {
  background: linear-gradient(90deg, #d7b56d, #b4233e);
}

.score-top,
.score-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.score-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: end;
}

.score-tag {
  border: 1px solid rgba(215, 181, 109, 0.34);
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.24);
  font-size: 10px;
  font-weight: 850;
}

.score-tag.turn {
  border-color: rgba(215, 181, 109, 0.72);
  color: #17110a;
  background: linear-gradient(180deg, #efd18a, #a77c2d);
}

.score-card .value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.score-value-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-meter {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.score-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
  box-shadow: 0 0 12px rgba(215, 181, 109, 0.24);
}

.history {
  margin-top: 16px;
}

.history-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.history-row strong {
  color: var(--gold-soft);
}

.rule-list {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.rule-list strong {
  color: var(--gold-soft);
}

@keyframes passReceiptPop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(24px) scale(0.94);
  }

  14%,
  76% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(0.98);
  }
}

@keyframes receivedCardGlow {
  0% {
    filter:
      drop-shadow(0 0 0 rgba(241, 223, 170, 0))
      drop-shadow(0 14px 18px rgba(0, 0, 0, 0.3));
  }

  18%,
  72% {
    filter:
      drop-shadow(0 0 12px rgba(241, 223, 170, 0.86))
      drop-shadow(0 20px 24px rgba(0, 0, 0, 0.38));
  }

  100% {
    filter:
      drop-shadow(0 13px 15px rgba(0, 0, 0, 0.28));
  }
}

@media (max-width: 900px) {
  .shell {
    padding: 18px;
  }

  .landing-shell {
    width: min(100vw - 24px, 720px);
    padding-top: 12px;
  }

  .landing-hero {
    min-height: auto;
    padding: 20px;
  }

  .landing-hero-content,
  .landing-section {
    grid-template-columns: 1fr;
  }

  .landing-hero-content {
    gap: 26px;
    padding: 34px 0 10px;
  }

  .landing-table-scene {
    min-height: 300px;
  }

  .landing-compact-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 42px;
  }

  .toolbar,
  .table-header,
  .play-header {
    align-items: start;
    flex-direction: column;
  }

  .table-mode .toolbar,
  .table-mode .table-header {
    align-items: center;
    flex-direction: row;
  }

  .table-actions {
    justify-content: start;
  }

  .brand-lockup {
    align-items: center;
  }

  .seat-tabs {
    justify-content: start;
  }

  .layout,
  .two,
  .seats {
    grid-template-columns: 1fr;
  }

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

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

  .game-result-panel {
    grid-template-columns: 1fr;
  }

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

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

  .auto-panel {
    align-items: start;
    flex-direction: column;
  }

  .table-panel {
    min-height: 520px;
  }

  .invite-table-shell {
    min-height: 660px;
    padding: 14px 0 8px;
  }

  .invite-table {
    min-height: 640px;
  }

  .invite-felt {
    inset: 244px 18px 188px;
    border-radius: 42px;
  }

  .table-mark {
    font-size: 46px;
  }

  .invite-seat {
    min-width: 142px;
  }

  .invite-seat-1 {
    right: 2px;
    top: 104px;
    transform: none;
  }

  .invite-seat-3 {
    left: 2px;
    top: 104px;
    transform: none;
  }

  .live-table {
    --table-height: clamp(540px, min(92vw, calc(100vh - 54px)), 620px);
    --felt-top: clamp(62px, 10vw, 80px);
    --felt-side: clamp(28px, 7vw, 44px);
    --hand-panel-bottom: clamp(0px, 0.7cqw, 6px);
    --hand-panel-side: clamp(4px, 1.8cqw, 14px);
    --hand-panel-height: clamp(144px, 25vw, 164px);
    --felt-bottom: calc(var(--hand-panel-bottom) + var(--hand-panel-height) + clamp(30px, 7vw, 44px));
    --seat-width: clamp(78px, 18cqw, 110px);
    --seat-min-height: clamp(30px, 6cqw, 38px);
    --seat-edge: clamp(10px, 1.8cqw, 16px);
    height: var(--table-height);
  }

  .watcher-table {
    --hand-panel-height: clamp(20px, 5vw, 32px);
    --felt-bottom: clamp(62px, 13vw, 78px);
    --felt-height: calc(var(--table-height) - var(--felt-top) - var(--felt-bottom));
    --felt-center-y: calc(var(--felt-top) + (var(--felt-height) / 2));
    --seat-bottom: clamp(7px, 2.1vw, 12px);
  }

  .table-felt {
    border-radius: 28px;
    padding: clamp(22px, 3.8cqw, 30px) clamp(18px, 3.8cqw, 24px) clamp(18px, 3.4cqw, 26px);
  }

  .live-table .player-hand-panel {
    padding: 4px 8px 8px;
  }

  .table-seat {
    width: min(var(--seat-width), calc(42cqw - 18px));
  }

  .seat-0 {
    bottom: var(--seat-bottom);
  }

  .seat-1 {
    right: var(--seat-edge);
    top: var(--felt-center-y);
    transform: translateY(-50%);
  }

  .seat-2 {
    top: var(--seat-edge);
  }

  .seat-3 {
    left: var(--seat-edge);
    top: var(--felt-center-y);
    transform: translateY(-50%);
  }

  .fan-hand {
    min-height: 144px;
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (max-width: 560px) {
  .landing-shell {
    width: calc(100vw - 16px);
  }

  .landing-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-nav-action,
  .landing-actions,
  .landing-button {
    width: 100%;
  }

  .landing-actions {
    display: grid;
  }

  .landing-hero {
    padding: 16px;
  }

  .landing-hero h1 {
    font-size: clamp(42px, 13vw, 54px);
    line-height: 0.98;
  }

  .landing-lede {
    font-size: 17px;
  }

  .landing-table-scene {
    width: 100%;
    min-height: 236px;
  }

  .landing-felt {
    width: min(100%, 304px);
    border-width: 8px;
  }

  .landing-card {
    width: clamp(58px, 17vw, 68px);
    padding: 8px 9px;
  }

  .landing-section {
    padding-top: 42px;
  }

  .landing-section-heading h2,
  .landing-cta h2 {
    max-width: 100%;
    font-size: clamp(30px, 10vw, 39px);
    line-height: 1.04;
    overflow-wrap: break-word;
  }

  .rules-grid,
  .options-list,
  .landing-highlights {
    grid-template-columns: 1fr;
  }

  .table-mode .toolbar,
  .table-mode .table-header {
    align-items: start;
    flex-direction: column;
  }

  .table-actions {
    width: 100%;
    justify-content: space-between;
  }

  .score-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 6px 0 8px;
  }

  .score-card {
    min-height: 62px;
    gap: 4px;
    padding: 8px 7px;
  }

  .score-top,
  .score-value-row {
    gap: 4px;
  }

  .score-card strong {
    font-size: 11px;
    line-height: 1.05;
  }

  .score-tags {
    display: none;
  }

  .score-card .value {
    font-size: 23px;
  }

  .score-value-row > span {
    display: none;
  }

  .score-meter {
    height: 4px;
  }

  .live-table .play-header {
    flex-direction: row;
  }

  .complete-board-action {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: center;
  }

  .complete-title {
    justify-self: center;
  }

  .complete-board-action .primary {
    grid-column: auto;
  }

  .pile-grid,
  .round-tricks {
    grid-template-columns: 1fr;
  }

  .live-table-hud {
    justify-content: flex-end;
  }

  .live-table-hud .room-chip {
    display: none;
  }

  .played-card {
    gap: 3px;
    font-size: 10px;
  }

  .played-card .card-button {
    width: var(--trick-card-width);
  }

  .trick-row,
  .table-center {
    --trick-card-width: clamp(58px, 15cqw, 70px);
    --trick-offset-x: clamp(34px, 11cqw, 46px);
    --trick-offset-y: clamp(34px, 10cqw, 44px);
    width: min(100%, clamp(220px, 64vw, 270px));
    height: min(100%, clamp(220px, 58vw, 260px));
    min-height: 0;
  }

  .fan-hand {
    display: block;
    min-height: 146px;
    padding: 0 8px 12px;
    overflow: visible;
    scrollbar-width: auto;
    touch-action: manipulation;
  }

  .fan-card {
    position: absolute;
    left: 50%;
    bottom: clamp(28px, 7cqw, 42px);
    flex: none;
    transform: translateX(var(--fan-x)) translateY(var(--fan-y));
  }

  .live-table .fan-card .card-button {
    transform-origin: 50% 165%;
  }

  .fan-card.hover-target:not(:disabled),
  .fan-card.selected {
    transform: translateX(var(--fan-x)) translateY(calc(var(--fan-y) - 14px));
  }

  .pass-control-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: start;
    gap: 5px 8px;
    width: min(100%, 390px);
    border-radius: 8px;
    padding: 7px 8px;
  }

  .pass-instruction {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .pass-control-bar .primary.compact {
    min-width: 118px;
  }
}

@media (max-width: 500px) {
  .fan-hand .fan-card .card-button {
    width: var(--fan-card-width);
  }
}

@media (max-width: 420px) {
  .setup-mode .team-grid,
  .setup-mode .target-grid {
    grid-template-columns: 1fr;
  }

  .fan-hand .fan-card .card-button {
    width: var(--fan-card-width);
  }
}

@media (max-width: 360px) {
  .fan-hand .fan-card .card-button {
    width: var(--fan-card-width);
  }
}
