.social-body .social-main {
  width: 100%;
}

.social-page h1,
.social-page h2 {
  margin: 0 0 0.4rem;
}

.social-header {
  margin-bottom: 1.5rem;
}

.social-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.social-card,
.lobby-seats {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.social-form {
  display: grid;
  gap: 0.9rem;
}

.social-form label,
.social-form select,
.social-form textarea,
.social-form input[type="text"],
.social-form input[type="email"],
.social-form input[type="time"] {
  display: grid;
  gap: 0.35rem;
}

.social-form input,
.social-form textarea,
.social-form select,
.social-inline input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font: inherit;
}

.social-check {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.lobby-seats.identity-list {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.lobby-seat.is-host {
  border-color: rgba(36, 101, 64, 0.28);
}

.lobby-actions,
.lobby-controls,
.social-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1rem;
  align-items: center;
}

.member-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.9rem;
}

.social-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.social-list a,
.social-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 1rem;
}

.social-status {
  color: var(--green-dark);
}

.social-status.is-error {
  color: #8a2b2b;
}

.social-toast {
  position: fixed;
  inset: auto 20px 20px auto;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: min(320px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 10px 16px 14px;
  overflow: hidden;
  border: 1px solid rgba(45, 76, 54, 0.14);
  border-radius: 12px;
  background: var(--paper, #fffaf0);
  color: var(--ink, #1c2416);
  box-shadow: 0 12px 32px rgba(24, 32, 29, 0.18);
}

.social-toast::backdrop {
  background: transparent;
}

.social-toast-message {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.social-toast-count {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(54, 144, 91, 0.12);
  color: #245e42;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.social-toast.is-error .social-toast-count {
  background: rgba(138, 43, 43, 0.12);
  color: #8a2b2b;
}

.social-toast-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #5c6758;
  cursor: pointer;
}

.social-toast-close svg {
  width: 16px;
  height: 16px;
}

.social-toast-close:hover,
.social-toast-close:focus-visible {
  background: rgba(45, 76, 54, 0.08);
  color: var(--ink, #1c2416);
}

.social-toast-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #36905b;
  transform-origin: left center;
  animation: social-toast-drain 5s linear forwards;
}

.social-toast.is-error .social-toast-bar {
  background: #8a2b2b;
}

@keyframes social-toast-drain {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.play-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

.play-mode-link {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: inherit;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
}

.play-unranked {
  font-size: 0.8rem;
  opacity: 0.8;
}

.social-body:not([data-social-page="new-game"]) {
  --sidebar: 220px;
}

.social-body:not([data-social-page="new-game"]) .sidebar {
  width: 220px;
  padding: 18px 12px 16px;
}

.social-body:not([data-social-page="new-game"]) .sidebar .brand-lockup {
  width: auto;
  min-height: 58px;
  margin: 2px 6px 22px;
  justify-content: flex-start;
}

.social-body:not([data-social-page="new-game"]) .brand-lockup .brand-name {
  display: block;
}

.social-body:not([data-social-page="new-game"]) .primary-nav a {
  justify-content: flex-start;
  padding: 0 12px;
}

.social-body:not([data-social-page="new-game"]) .primary-nav a span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

.social-body[data-social-page="new-game"] .sidebar .brand-lockup {
  width: 100%;
  min-height: 46px;
  margin: 0 0 18px;
  justify-content: center;
}

.social-body[data-social-page="new-game"] .sidebar .brand-lockup .brand-name {
  display: none;
}

.social-body[data-social-page="new-game"],
.social-body[data-social-page="new-game"] .site-shell {
  overflow-x: hidden;
}

.social-body[data-social-page="new-game"] .social-main {
  width: auto;
  max-width: none;
  min-height: 100dvh;
  min-height: 100svh;
  padding: 0;
  overflow: hidden;
}

.new-game-board {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 1.75rem 4.5rem;
  overflow: hidden;
}

.new-game-board .table-frame {
  width: min(100%, calc(100svh - 5.5rem), 46rem);
  height: min(100%, calc(100svh - 5.5rem), 46rem);
  min-height: 0;
  aspect-ratio: 1;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  grid-template-areas: "table";
}

.new-game-board .table {
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: 1;
  pointer-events: none;
}

.new-game-overlay[hidden] {
  display: none !important;
}

.new-game-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2rem);
  border-radius: inherit;
  background: rgba(7, 16, 12, 0.64);
}

.new-game-card {
  display: grid;
  gap: 1rem;
  width: min(31rem, 100%);
  max-height: calc(100% - 1rem);
  overflow-y: auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(255, 226, 122, 0.38);
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, rgba(84, 148, 104, 0.28), transparent 42%),
    #24382e;
  color: rgba(245, 248, 244, 0.96);
  box-shadow: 0 18px 40px rgba(5, 12, 9, 0.48);
}

.new-game-card-head {
  text-align: center;
}

.new-game-card-head h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  color: #fff;
  font-size: clamp(1.65rem, 5vw, 2.2rem);
}

.new-game-title-mark {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border: 1px solid #319050;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #54b96e 0%, #369957 100%);
  box-shadow:
    0 3px 0 #1c6a39,
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.new-game-title-mark svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

.new-game-options,
.new-game-options .hub-block,
.new-game-options .hub-list {
  display: grid;
  gap: 0.6rem;
}

.new-game-options .identity-section-title {
  margin: 0.25rem 0 0;
  color: rgba(232, 238, 230, 0.58);
  font-size: 0.67rem;
  letter-spacing: 0.1em;
}

.new-game-options .hub-row,
.new-game-options .hub-choice {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 0.72rem 0.85rem;
  border-color: rgba(232, 238, 230, 0.22);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(245, 248, 244, 0.96);
  text-align: left;
}

.new-game-options .hub-choice-icon {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
}

.new-game-options .hub-choice-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
  fill: currentColor;
  overflow: visible;
}

.new-game-options .hub-choice-icon--now {
  color: #f6d36a;
  background: rgba(240, 193, 74, 0.28);
}

.new-game-options .hub-choice-icon--friends {
  color: #b7e8d0;
  background: rgba(90, 176, 140, 0.28);
}

.new-game-options .hub-choice-icon--group {
  color: #c5ddf8;
  background: rgba(120, 168, 220, 0.28);
}

.new-game-options .hub-choice-icon--puzzle {
  color: #f0b4c8;
  background: rgba(214, 120, 150, 0.28);
}

.new-game-options .hub-choice-icon--learn {
  color: #f3d39a;
  background: rgba(214, 168, 92, 0.28);
}

.new-game-options .hub-choice-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.new-game-options .hub-choice:hover,
.new-game-options .hub-choice:focus-visible {
  border-color: rgba(236, 208, 122, 0.44);
  background: rgba(255, 255, 255, 0.16);
}

.new-game-options .hub-choice span,
.new-game-options .hub-row span,
.new-game-options .hub-note {
  color: rgba(236, 242, 234, 0.82);
}

.new-game-options .identity-button {
  border-color: rgba(255, 255, 255, 0.14);
}

.new-game-options .identity-button-primary {
  background: #3aa064;
  color: #fff;
}

.hub-list {
  display: grid;
  gap: 10px;
}

.hub-row,
.hub-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--identity-line, rgba(45, 76, 54, 0.14));
  border-radius: 10px;
  background: var(--paper, #fff);
}

.hub-choice {
  grid-template-columns: minmax(0, 1fr);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.hub-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.hub-choice:hover,
.hub-choice:focus-visible {
  border-color: rgba(36, 101, 64, 0.35);
}

.hub-choice strong,
.hub-row strong {
  display: block;
  font-family: var(--identity-display, inherit);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.hub-choice span,
.hub-row span {
  color: var(--muted);
  font-size: 0.88rem;
}

.hub-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.group-primary-action {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.lobby-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
  gap: 22px;
  align-items: start;
}

.lobby-board {
  min-width: 0;
}

.lobby-stage {
  --play-room: #141a16;
  background:
    radial-gradient(circle at 50% 18%, rgba(47, 125, 100, 0.18), transparent 42%),
    linear-gradient(180deg, #1a221d 0%, var(--play-room) 100%);
  border-radius: 1.35rem;
  padding: 1.05rem 0.85rem 1.2rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 32px rgba(12, 28, 20, 0.12);
}

.lobby-table-frame {
  --felt-hi: #2f7d64;
  --felt-mid: #246b55;
  --felt-low: #1c5a48;
  --rim-top: #2f6a4d;
  --rim: #184832;
  --rim-bottom: #0f2f21;
  --rim-shadow: #0a1f16;
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr) minmax(5.5rem, auto);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    ". north ."
    "west felt east"
    ". south .";
  gap: 0.55rem 0.7rem;
  justify-items: center;
  align-items: center;
  width: min(100%, 34rem);
  margin: 0 auto;
}

.lobby-felt {
  grid-area: felt;
  position: relative;
  width: min(100%, 28rem);
  aspect-ratio: 1;
  padding: 0.8rem;
  border-radius: 1.15rem;
  background:
    linear-gradient(180deg, var(--rim-top) 0%, var(--rim) 38%, var(--rim-bottom) 100%);
  box-shadow:
    0 0.55rem 0 var(--rim-shadow),
    0 1.05rem 1.8rem rgba(5, 16, 11, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.lobby-felt-grain,
.lobby-center {
  position: absolute;
  inset: 0.72rem;
  border-radius: 0.72rem;
}

.lobby-felt-grain {
  background:
    radial-gradient(circle at 44% 36%, rgba(92, 176, 148, 0.2), transparent 48%),
    linear-gradient(145deg, var(--felt-hi) 0%, var(--felt-mid) 56%, var(--felt-low) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(226, 245, 230, 0.16),
    inset 0 0 2.4rem rgba(7, 32, 22, 0.24);
}

.lobby-center {
  z-index: 1;
  display: grid;
  place-content: center;
  gap: 0.45rem;
  padding: 1rem;
  text-align: center;
  color: #e8eee6;
}

.lobby-count {
  margin: 0;
  font-family: var(--identity-display, inherit);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.lobby-next {
  margin: 0;
  max-width: 16rem;
  justify-self: center;
  color: rgba(232, 238, 230, 0.78);
  font-size: 0.86rem;
  line-height: 1.35;
}

.lobby-center-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.lobby-center-actions .identity-button,
.lobby-center-actions .identity-button-primary {
  color: #1d3326;
}

.lobby-center-actions .identity-button-primary {
  background: linear-gradient(180deg, #e6c56a, #c4a14a);
  border-color: rgba(61, 50, 32, 0.2);
}

/* Cancel and Leave sit on the felt, so they take the felt's light text. */
.lobby-center-actions .identity-quiet {
  border-color: rgba(247, 243, 230, 0.46);
  color: #f7f3e6;
}

.lobby-center-actions .identity-quiet:hover,
.lobby-center-actions .identity-quiet:focus-visible {
  border-color: rgba(247, 243, 230, 0.78);
  background: rgba(247, 243, 230, 0.14);
  color: #fffdf6;
}

.lobby-seat[data-seat-slot="north"] { grid-area: north; }
.lobby-seat[data-seat-slot="west"] { grid-area: west; }
.lobby-seat[data-seat-slot="east"] { grid-area: east; }
.lobby-seat[data-seat-slot="south"] { grid-area: south; }

.lobby-seat {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.28rem;
  min-width: 5.4rem;
}

.lobby-seat-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  justify-items: center;
  gap: 0.28rem;
  cursor: default;
  font: inherit;
  color: inherit;
}

.lobby-seat.is-open .lobby-seat-button,
.lobby-seat.is-bot .lobby-seat-button.is-host-control {
  cursor: pointer;
}

.lobby-seat.is-open .lobby-seat-button:hover .lobby-avatar,
.lobby-seat.is-open .lobby-seat-button:focus-visible .lobby-avatar {
  box-shadow:
    inset 0 0 0 1px rgba(232, 238, 230, 0.42),
    0 0 0 3px rgba(230, 197, 106, 0.28);
}

.lobby-avatar {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #d7e4d8;
  font-size: 0.78rem;
  font-weight: 750;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 5px rgba(6, 16, 12, 0.28);
}

.lobby-seat[data-seat-slot="north"] .lobby-avatar { background: linear-gradient(180deg, #4a7a61, #2f5846); }
.lobby-seat[data-seat-slot="west"] .lobby-avatar { background: linear-gradient(180deg, #3f6d55, #2a4d3d); }
.lobby-seat[data-seat-slot="east"] .lobby-avatar { background: linear-gradient(180deg, #3d7a6e, #2a5750); }
.lobby-seat[data-seat-slot="south"] .lobby-avatar {
  color: #3d3220;
  background: linear-gradient(180deg, #e6c56a, #c4a14a);
}

.lobby-seat.is-open .lobby-avatar {
  background: rgba(232, 238, 230, 0.08);
  color: rgba(232, 238, 230, 0.72);
  box-shadow: inset 0 0 0 1px rgba(232, 238, 230, 0.18);
}

.lobby-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lobby-seat-name,
.lobby-seat-meta {
  margin: 0;
  text-align: center;
  max-width: 7.2rem;
  color: rgba(232, 238, 230, 0.86);
}

.lobby-seat-name {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lobby-seat-meta {
  font-size: 0.7rem;
  color: rgba(232, 238, 230, 0.58);
}

.lobby-seat.is-open .lobby-seat-name,
.lobby-seat.is-open .lobby-seat-meta {
  color: rgba(232, 238, 230, 0.62);
}

.lobby-seat.is-arriving .lobby-avatar {
  animation: lobby-arrive 420ms ease;
}

.lobby-menu {
  position: absolute;
  z-index: 6;
  top: calc(100% + 6px);
  left: 50%;
  translate: -50% 0;
  display: grid;
  gap: 4px;
  min-width: 11.5rem;
  padding: 8px;
  border: 1px solid var(--identity-line, rgba(45, 76, 54, 0.14));
  border-radius: 10px;
  background: #fffaf0;
  box-shadow: 0 10px 24px rgba(16, 32, 24, 0.16);
  color: var(--ink, #1d3326);
}

.lobby-menu.is-south {
  top: auto;
  bottom: calc(100% + 6px);
}

.lobby-menu.is-west {
  left: calc(100% + 8px);
  top: 50%;
  translate: 0 -50%;
}

.lobby-menu.is-east {
  left: auto;
  right: calc(100% + 8px);
  top: 50%;
  translate: 0 -50%;
}

.lobby-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink, #1d3326);
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.lobby-menu button:hover,
.lobby-menu button:focus-visible {
  background: rgba(36, 101, 64, 0.08);
}

.lobby-invite {
  display: grid;
  gap: 12px;
  align-content: start;
}

.identity-quiet-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.lobby-waiting {
  margin: 0;
  color: rgba(232, 238, 230, 0.84);
  font-size: 0.86rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .lobby-layout {
    grid-template-columns: 1fr;
  }

  .lobby-table-frame {
    width: min(100%, 22.5rem);
  }

  .lobby-menu.is-west,
  .lobby-menu.is-east {
    left: 50%;
    right: auto;
    top: calc(100% + 6px);
    translate: -50% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lobby-seat.is-arriving .lobby-avatar {
    animation: none;
  }
}

@keyframes lobby-arrive {
  from {
    transform: scale(0.82);
    opacity: 0.2;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .social-body[data-social-page="new-game"] .social-main {
    width: auto;
    min-height: calc(100dvh - 64px);
    min-height: calc(100svh - 64px);
  }

  .new-game-board {
    width: 100%;
    min-height: calc(100dvh - 64px);
    min-height: calc(100svh - 64px);
    padding: 1rem 1.25rem;
  }

  .new-game-board .table-frame {
    width: min(100%, calc(100svh - 8rem));
    height: min(100%, calc(100svh - 8rem));
  }

  .new-game-overlay {
    padding: 0.55rem;
  }

  .new-game-card {
    gap: 0.65rem;
    padding: 0.8rem;
  }

  .new-game-options .hub-choice-copy > span {
    display: none;
  }

  .new-game-options .hub-row,
  .new-game-options .hub-choice {
    padding: 0.58rem 0.7rem;
  }

  .lobby-seats {
    grid-template-columns: 1fr;
  }
}

.social-body.is-group-lobby main.social-main {
  position: relative;
  width: auto;
  max-width: none;
  min-height: 100dvh;
  min-height: 100svh;
  padding: 0;
  overflow: hidden;
}

.social-body.is-group-lobby .identity-back {
  position: absolute;
  z-index: 8;
  top: 0.75rem;
  left: 0.85rem;
}

.group-lobby-app.play-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "stage";
  width: 100%;
  height: 100dvh;
  height: 100svh;
  max-height: none;
  margin: 0;
  overflow: hidden;
}

.group-lobby .play-stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0.5rem;
  container-type: normal;
}

.group-lobby .table-frame {
  --id-y: 3.4rem;
  --top-chrome: var(--id-y);
  width: min(100%, calc(100svh - 1.25rem));
  height: min(100%, calc(100svh - 1.25rem));
  max-width: 100%;
  justify-self: center;
  align-self: center;
  container-type: size;
  grid-template-columns: var(--id-x) minmax(0, 1fr) var(--id-x);
  grid-template-rows: var(--top-chrome) minmax(0, 1fr) var(--id-y);
  grid-template-areas:
    "top top top"
    "id-west table id-east"
    ". id-south .";
}

.group-lobby .table-top {
  grid-template-columns: var(--id-x) minmax(0, 1fr) var(--id-x);
}

.group-lobby .table {
  width: min(
    calc(100cqw - (2 * var(--id-x))),
    calc(100cqh - var(--top-chrome) - var(--id-y) - 0.6rem)
  );
  height: auto;
  max-width: none;
  aspect-ratio: 1;
}

.group-lobby .player-id[data-seat="west"],
.group-lobby .player-id[data-seat="east"] {
  position: static;
  top: auto;
  right: auto;
  left: auto;
  height: auto;
  margin: 0;
  transform: none;
}

.group-lobby .player-id[data-seat="west"] {
  grid-area: id-west;
  justify-self: end;
  align-self: center;
}

.group-lobby .player-id[data-seat="east"] {
  grid-area: id-east;
  justify-self: start;
  align-self: center;
}

.group-lobby .table-mark,
.group-lobby #action-stage,
.group-lobby #winning-rack-panel {
  display: none;
}

.group-lobby .player-id {
  position: relative;
}

.group-lobby .lobby-invite-chip,
.group-lobby .player-id.is-host-seat {
  pointer-events: auto;
  cursor: pointer;
}

.lobby-invite-chip,
.lobby-join-chip {
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  background: #f1c75b;
  color: #1c2418;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.lobby-center-live {
  position: relative;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  min-width: 8rem;
  pointer-events: none;
  text-align: center;
}

.lobby-count-number {
  margin: 0;
  font-size: 4.6rem;
  font-weight: 750;
  line-height: 0.85;
  color: #f7f3ea;
}

.lobby-count-label,
.lobby-wait-note {
  margin: 0;
  color: rgba(247, 243, 234, 0.82);
  font-size: 0.95rem;
  font-weight: 700;
}

.lobby-join-chip {
  pointer-events: auto;
}

.lobby-menu-email {
  display: grid;
  gap: 6px;
  padding-bottom: 6px;
}

.lobby-menu-email input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(45, 76, 54, 0.2);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  font: inherit;
}

.group-lobby .player-id.is-arriving .player-avatar {
  animation: lobby-arrive 420ms ease;
}

/* Clubs & Friends: a lobby you walk into. A felt Start a table with seats filling around a little
   table, live tables with a beating dot, the people and tables to play again, and clubs as cards
   in their own colors. */

.clubs-head-copy {
  display: grid;
  gap: 6px;
}

.clubs-live-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.clubs-live-line[hidden] {
  display: none;
}

.clubs-dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2483d;
}

.clubs-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: clubs-ping 1.6s ease-out infinite;
}

@keyframes clubs-ping {
  from { transform: scale(1); opacity: 0.55; }
  to { transform: scale(2.6); opacity: 0; }
}

.clubs-lobby {
  display: grid;
  gap: 18px;
  width: min(1160px, 100%);
  align-items: start;
}

@media (min-width: 900px) {
  .clubs-lobby {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.clubs-side {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.clubs-rise {
  animation: clubs-rise 0.55s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.clubs-side > .clubs-rise:nth-child(2) { animation-delay: 0.06s; }
.clubs-side > .clubs-rise:nth-child(3) { animation-delay: 0.12s; }
.clubs-side > .clubs-rise:nth-child(4) { animation-delay: 0.18s; }

@keyframes clubs-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* The hero */

.clubs-hero {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 26px 22px 24px;
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 50% 18%, rgba(92, 176, 148, 0.32), transparent 60%),
    linear-gradient(180deg, #2f7d64 0%, #1c5a48 62%, #0e2b22 100%);
  box-shadow: 0 18px 38px rgba(14, 43, 34, 0.24), inset 0 0 0 1px rgba(226, 245, 230, 0.14);
  color: #f3f7f1;
  text-align: center;
}

.clubs-table {
  --side: 128px;
  position: relative;
  width: calc(var(--side) + 120px);
  height: calc(var(--side) + 96px);
}

.clubs-felt {
  position: absolute;
  inset: 48px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 26px;
  background: linear-gradient(135deg, #2f7d64, #246b55 55%, #1c5a48);
  box-shadow: 0 0 0 8px #2f6a4d, 0 4px 0 8px #0f2f21, 0 14px 24px rgba(5, 16, 11, 0.4);
}

.clubs-tile {
  width: 17px;
  height: 23px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ecd07a, #c9a44c);
  box-shadow: 0 2px 0 #ede4cf, 0 3px 4px rgba(5, 16, 11, 0.35);
  transform: rotate(-6deg);
  animation: clubs-bob 1.6s ease-in-out infinite alternate;
}

.clubs-tile:nth-child(2) { animation-delay: 0.2s; }
.clubs-tile:nth-child(3) { animation-delay: 0.4s; }
.clubs-tile:nth-child(4) { animation-delay: 0.6s; }

@keyframes clubs-bob {
  to { translate: 0 -3px; }
}

.clubs-seat {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-family: var(--identity-display);
  font-weight: 750;
  animation: clubs-sit 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.clubs-seat-you {
  bottom: 0;
  left: calc(50% - 23px);
  width: 46px;
  height: 46px;
  border: 1.5px solid rgba(243, 217, 138, 0.7);
  background: linear-gradient(180deg, #fffaf0, #efe3c8);
  color: #285641;
  font-size: 0.9rem;
  animation-delay: 0.15s;
}

.clubs-seat-open {
  border: 1.5px dashed rgba(243, 217, 138, 0.85);
  background: rgba(0, 0, 0, 0.22);
  color: #f3d98a;
  font-size: 1.15rem;
  font-weight: 500;
  animation: clubs-sit 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both, clubs-glow 1.4s ease-in-out 0.8s infinite alternate;
}

.clubs-seat-left { left: 4px; top: calc(50% - 20px); animation-delay: 0.24s, 0.8s; }
.clubs-seat-top { top: 0; left: calc(50% - 20px); animation-delay: 0.33s, 1s; }
.clubs-seat-right { right: 4px; top: calc(50% - 20px); animation-delay: 0.42s, 1.2s; }

@keyframes clubs-sit {
  from { opacity: 0; transform: scale(0.3); }
  to { opacity: 1; transform: none; }
}

@keyframes clubs-glow {
  from { box-shadow: 0 0 3px rgba(243, 217, 138, 0.15); }
  to { box-shadow: 0 0 10px rgba(243, 217, 138, 0.55); }
}

.clubs-hero-copy {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(420px, 100%);
}

.clubs-hero-copy h2 {
  margin: 0;
  color: #f3f7f1;
  font-family: var(--identity-display);
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.clubs-hero-copy p {
  margin: 0 0 6px;
  color: rgba(243, 247, 241, 0.78);
  font-size: 0.95rem;
  font-weight: 550;
  line-height: 1.4;
}

.clubs-start {
  appearance: none;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ecd07a, #c9a44c);
  box-shadow: inset 0 1px 0 rgba(255, 243, 196, 0.8), 0 3px 0 #7a5a22, 0 10px 18px rgba(5, 16, 11, 0.35);
  color: #1c170c;
  cursor: pointer;
  font-family: var(--identity-display);
  font-size: 1.05rem;
  font-weight: 750;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.clubs-start:hover,
.clubs-start:focus-visible {
  background: linear-gradient(180deg, #f2d98a, #d1ac55);
}

.clubs-start:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 243, 196, 0.8), 0 1px 0 #7a5a22, 0 4px 8px rgba(5, 16, 11, 0.3);
}

.clubs-start:disabled {
  opacity: 0.7;
  cursor: progress;
}

/* Side panels */

.clubs-panel {
  padding: 16px 18px 18px;
  border: 1px solid var(--identity-line);
  border-radius: 10px;
  background: var(--paper);
}

.clubs-panel[hidden] {
  display: none;
}

.clubs-panel h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.clubs-how ol {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: clubs-step;
}

.clubs-how li {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 46px;
  counter-increment: clubs-step;
}

.clubs-how li::before {
  content: counter(clubs-step);
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: var(--identity-display);
  font-weight: 750;
}

.clubs-how li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  left: 15px;
  width: 2px;
  height: calc(100% - 22px);
  background: rgba(55, 113, 89, 0.2);
}

.clubs-how strong {
  font-family: var(--identity-display);
  font-size: 0.98rem;
  font-weight: 750;
}

.clubs-how span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 550;
}

.clubs-rows {
  display: grid;
  gap: 10px;
}

.clubs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--identity-line);
  border-radius: 10px;
  background: #fffaf0;
  color: inherit;
  text-decoration: none;
}

a.clubs-row:hover,
a.clubs-row:focus-visible {
  background: #f7f1e2;
}

.clubs-row.is-live {
  border-color: rgba(55, 113, 89, 0.32);
}

.clubs-row-copy {
  display: grid;
  flex: 1;
  gap: 1px;
  min-width: 0;
}

.clubs-row-copy strong {
  overflow: hidden;
  font-family: var(--identity-display);
  font-size: 0.98rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clubs-row-copy > span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clubs-row-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2f9a5c;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clubs-row-kicker .clubs-dot {
  width: 6px;
  height: 6px;
  background: #2f9a5c;
}

.clubs-row-kicker.is-playing {
  color: #d0392f;
}

.clubs-row-kicker.is-playing .clubs-dot {
  background: #e2483d;
}

.clubs-pill {
  appearance: none;
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ecd07a, #c9a44c);
  color: #1c170c;
  cursor: pointer;
  font-family: var(--identity-display);
  font-size: 0.86rem;
  font-weight: 750;
}

.clubs-pill-quiet {
  border: 1px solid rgba(55, 113, 89, 0.3);
  background: #fff;
  color: var(--green-dark);
}

.clubs-pill-quiet:hover,
.clubs-pill-quiet:focus-visible {
  background: #eef4ef;
}

.clubs-faces {
  display: inline-flex;
  flex: none;
}

.clubs-face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 2px solid #fffaf0;
  border-radius: 50%;
  background: linear-gradient(180deg, #fffdf8, #f4ead4);
  color: #285641;
  font-family: var(--identity-display);
  font-size: 0.68rem;
  font-weight: 750;
}

.clubs-face + .clubs-face {
  margin-left: -9px;
}

.clubs-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clubs-face-more {
  background: #f3d98a;
  color: #3d3220;
}

.clubs-people {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.clubs-person {
  display: grid;
  flex: none;
  justify-items: center;
  gap: 6px;
  width: 62px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}

.clubs-person span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clubs-person-face .clubs-face {
  width: 52px;
  height: 52px;
  border-color: rgba(55, 113, 89, 0.2);
  font-size: 0.95rem;
}

.clubs-person:hover .clubs-face,
.clubs-person:focus-visible .clubs-face {
  border-color: var(--green);
}

/* Club cards */

.groups-yours .clubs-card {
  position: relative;
  justify-items: start;
  align-content: space-between;
  min-height: 150px;
  padding: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 50%),
    linear-gradient(135deg, var(--club-top), var(--club-bottom));
  box-shadow: 0 4px 0 color-mix(in srgb, var(--club-bottom) 70%, #000), 0 10px 18px rgba(24, 32, 29, 0.14);
  color: #fff;
  text-align: left;
  transition: transform 0.12s ease;
}

.groups-yours .clubs-card:hover,
.groups-yours .clubs-card:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent 50%),
    linear-gradient(135deg, var(--club-top), var(--club-bottom));
  outline: none;
  transform: translateY(-2px);
}

.groups-yours .clubs-card.is-light {
  color: #3d3220;
}

.clubs-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.clubs-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 1.55rem;
}

.groups-yours .clubs-card .groups-seal,
.groups-yours .clubs-card img {
  width: 46px;
  height: 46px;
}

.groups-yours .clubs-card .clubs-face img {
  width: 100%;
  height: 100%;
}

.groups-yours .clubs-card .groups-yours-copy {
  justify-items: start;
  text-align: left;
}

.groups-yours .clubs-card .groups-yours-copy strong {
  font-size: 1.02rem;
}

.clubs-card-members {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.groups-yours .clubs-card .clubs-card-members {
  color: inherit;
  opacity: 0.9;
  font-weight: 700;
}

.clubs-card .clubs-face {
  width: 22px;
  height: 22px;
  border-color: var(--club-bottom);
  font-size: 0.56rem;
}

.clubs-card .clubs-face + .clubs-face {
  margin-left: -7px;
}

.clubs-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  color: #3d3220;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.clubs-badge .clubs-dot {
  width: 6px;
  height: 6px;
  background: #2f9a5c;
}

.clubs-badge.is-playing .clubs-dot {
  background: #e2483d;
}

.groups-yours .clubs-card-new {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-height: 150px;
  border: 1.5px dashed rgba(55, 113, 89, 0.4);
  border-radius: 18px;
  background: transparent;
  color: var(--green-dark);
  text-decoration: none;
}

.groups-yours .clubs-card-new span {
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1;
}

.groups-yours .clubs-card-new:hover,
.groups-yours .clubs-card-new:focus-visible {
  background: rgba(55, 113, 89, 0.06);
  outline: none;
}

.clubs-start-club {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 8px 8px 4px;
  text-align: center;
}

.clubs-fan {
  display: inline-flex;
  margin-bottom: 4px;
  animation: clubs-bob 1.8s ease-in-out infinite alternate;
}

.clubs-fan span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  background: linear-gradient(180deg, var(--club-top), var(--club-bottom));
  box-shadow: 0 3px 0 color-mix(in srgb, var(--club-bottom) 70%, #000);
  font-size: 1.6rem;
}

.clubs-fan span:first-child { transform: rotate(-8deg) translateX(12px); }
.clubs-fan span:nth-child(2) { position: relative; z-index: 1; width: 60px; height: 60px; }
.clubs-fan span:last-child { transform: rotate(8deg) translateX(-12px); }

.clubs-start-club strong {
  font-family: var(--identity-display);
  font-size: 1.05rem;
  font-weight: 750;
}

.clubs-start-club p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 550;
  line-height: 1.4;
}

.clubs-start-club-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 6px;
  padding: 0 16px;
  border: 1px solid rgba(55, 113, 89, 0.3);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .clubs-rise,
  .clubs-seat,
  .clubs-tile,
  .clubs-fan,
  .clubs-dot::after {
    animation: none !important;
  }
}
