.lobby-friend-invites {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

/* Online lobby — matches landing.css pond glass aesthetic */

body.site-page--lobby > main {
  width: 100%;
}

.lobby-page {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

/* —— Hero —— */

.lobby-hero {
  position: relative;
  margin: 8px 0 16px;
  padding: clamp(24px, 4vw, 36px) clamp(18px, 3vw, 32px);
  border-radius: 20px;
  overflow: hidden;
  background: oklch(20% 0.022 260 / 88%);
  box-shadow:
    inset 0 0 0 1px oklch(100% 0 0 / 9%),
    0 20px 44px oklch(6% 0.02 260 / 38%);
}

.lobby-hero__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.lobby-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
}

.lobby-hero__orb--1 {
  width: min(320px, 55vw);
  height: min(320px, 55vw);
  top: -35%;
  right: -8%;
  background: radial-gradient(circle, oklch(52% 0.12 250 / 65%), transparent 68%);
}

.lobby-hero__orb--2 {
  width: min(280px, 50vw);
  height: min(280px, 50vw);
  bottom: -40%;
  left: -6%;
  background: radial-gradient(circle, oklch(58% 0.14 82 / 50%), transparent 70%);
}

.lobby-hero__hex {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='64' viewBox='0 0 56 64'%3E%3Cpath fill='none' stroke='white' stroke-width='1' d='M28 1 L54 16 L54 48 L28 63 L2 48 L2 16 Z'/%3E%3C/svg%3E");
  background-size: 56px 64px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 40%, black 15%, transparent 72%);
}

.lobby-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.lobby-hero__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(78% 0.1 82);
}

.lobby-hero__title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lobby-hero__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* —— Beta notice —— */

.lobby-beta-notice {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  color: oklch(88% 0.06 75);
  background: oklch(42% 0.06 75 / 22%);
  box-shadow: inset 0 0 0 1px oklch(72% 0.12 75 / 32%);
}

.lobby-beta-notice strong {
  color: oklch(92% 0.08 75);
  font-weight: 600;
}

/* —— Auth strip —— */

.lobby-auth-strip {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  background: oklch(100% 0 0 / 4%);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 8%);
}

.lobby-auth-strip--signed-in {
  color: oklch(88% 0.06 145);
  box-shadow: inset 0 0 0 1px oklch(72% 0.14 145 / 28%);
}

.lobby-auth-strip--signed-out {
  color: var(--muted);
}

.lobby-auth-strip--error {
  color: oklch(78% 0.14 25);
  box-shadow: inset 0 0 0 1px oklch(52% 0.14 25 / 35%);
}

.lobby-auth-strip strong {
  color: var(--text);
  font-weight: 600;
}

.lobby-auth-strip__rating {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}

/* —— Page tabs —— */

.lobby-toolbar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 12px;
}

.lobby-toolbar .landing-btn {
  min-width: 10rem;
}

.lobby-page-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: 14px;
  background: oklch(100% 0 0 / 4%);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 8%);
}

.lobby-page-tabs__btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.lobby-page-tabs__btn:hover {
  color: var(--text);
  background: oklch(100% 0 0 / 6%);
}

.lobby-page-tabs__btn--active {
  color: var(--text);
  background: oklch(52% 0.1 250 / 24%);
  box-shadow: inset 0 0 0 1px oklch(58% 0.12 250 / 40%);
}

/* —— Tab workspace: 3:1 two-column layout —— */

.lobby-workspace {
  gap: 16px;
  align-items: start;
}

.lobby-workspace:not([hidden]) {
  display: grid;
}

.lobby-workspace[hidden] {
  display: none !important;
}

@media (min-width: 768px) {
  .lobby-workspace:not([hidden]) {
    /* Listings column 3, join/create sidebar 1 */
    grid-template-columns: minmax(0, 3fr) minmax(200px, 1fr);
  }

  .lobby-workspace--single:not([hidden]) {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

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

.lobby-workspace__side .board-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lobby-workspace__side .board-modal__fieldset {
  margin-bottom: 12px;
}

.lobby-workspace__side .board-modal__legend {
  font-size: 11px;
}

.lobby-workspace__side .board-modal__label {
  font-size: 12px;
}

.lobby-workspace__side .board-modal__check {
  font-size: 13px;
}

/* —— Cards —— */

.lobby-card {
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 7%);
}

.lobby-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.lobby-card__head .lobby-card__title {
  margin-bottom: 0;
}

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

.lobby-card__title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.lobby-card__hint {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.lobby-card .board-modal__fieldset {
  margin-bottom: 14px;
}

.lobby-card .board-modal__field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

@media (min-width: 900px) {
  .lobby-workspace__main .board-modal__field:not(.board-modal__field--stack) {
    grid-template-columns: 132px 1fr;
    align-items: center;
  }
}

.lobby-card .board-modal__label {
  font-size: 14px;
}

.lobby-card .board-modal__select,
.lobby-card input.board-modal__select {
  width: 100%;
  margin: 0;
}

.lobby-card__actions {
  margin-top: 4px;
}

/* Consistent button sizing across Active, Public, and Tournaments tabs */
.lobby-page .landing-btn {
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 10px;
  line-height: 1.2;
}

.lobby-page .lobby-card__actions .landing-btn,
.lobby-page .lobby-invite__actions .landing-btn {
  width: 100%;
  min-width: 0;
}

.lobby-page .lobby-card__head-actions .landing-btn {
  width: auto;
  min-width: 5.5rem;
}

.lobby-page .lobby-game-row__actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
}

.lobby-page .lobby-game-row__actions .landing-btn {
  min-width: 5.5rem;
}

/* —— Invite panel —— */

.lobby-invite {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(
    165deg,
    oklch(24% 0.03 260) 0%,
    oklch(20% 0.04 82 / 35%) 100%
  );
  box-shadow: inset 0 0 0 1px oklch(72% 0.14 82 / 28%);
}

.lobby-invite__heading {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
}

.lobby-invite__note {
  margin: 0 0 8px;
  font-size: 12px;
  color: oklch(82% 0.08 82);
}

.lobby-invite__url {
  display: block;
  word-break: break-all;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--text);
  background: oklch(8% 0.02 260 / 50%);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 10%);
}

.lobby-invite__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lobby-invite__actions--modal {
  margin-bottom: 16px;
}

.lobby-page .board-modal__form .lobby-invite__actions--modal .landing-btn {
  width: 100%;
}

.lobby-page .board-modal__actions--stack .landing-btn {
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.lobby-page #lobby-create-game-modal .board-modal__field--stack,
.lobby-page #lobby-game-created-modal .board-modal__field--stack {
  grid-template-columns: 1fr;
}

/* —— Public games list —— */

.lobby-games-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lobby-games-list__loading,
.lobby-games-list__empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-radius: 12px;
  background: oklch(100% 0 0 / 3%);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 8%);
}

.lobby-game-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: oklch(100% 0 0 / 4%);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 10%);
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.lobby-game-row:hover {
  background: oklch(100% 0 0 / 6%);
  box-shadow: inset 0 0 0 1px oklch(58% 0.06 260 / 35%);
}

.lobby-game-row__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.lobby-game-row__host {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.lobby-game-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lobby-game-row__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: oklch(100% 0 0 / 6%);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 10%);
}

.lobby-game-row__tag--timed {
  color: oklch(82% 0.08 82);
  box-shadow: inset 0 0 0 1px oklch(72% 0.14 82 / 25%);
}

.lobby-game-row__tag--your-turn {
  color: oklch(88% 0.12 145);
  background: oklch(32% 0.06 145 / 55%);
  box-shadow: inset 0 0 0 1px oklch(62% 0.12 145 / 40%);
}

.lobby-game-row__tag--waiting {
  color: var(--muted);
}

.lobby-forfeit-btn {
  min-width: 5.5rem;
}

/* —— Status —— */

.lobby-status {
  margin: 12px 0 0;
  font-size: 13px;
  min-height: 1.35em;
  line-height: 1.4;
  color: var(--muted);
}

.lobby-status--error {
  color: oklch(78% 0.14 25);
}

.lobby-status:empty {
  min-height: 0;
  margin-top: 0;
}

#lobby-create-submit:disabled,
#tournament-create-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* —— Tournament hub —— */

.tournament-section-title {
  margin: 16px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.tournament-registration__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tournament-bracket-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.tournament-bracket-round {
  min-width: 160px;
  flex: 0 0 auto;
}

.tournament-bracket-round__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tournament-match-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: oklch(100% 0 0 / 5%);
  border: 1px solid oklch(100% 0 0 / 10%);
  font-size: 13px;
}

.tournament-match-card__status {
  font-size: 11px;
  color: var(--muted);
  text-transform: capitalize;
}

.tournament-champion {
  margin: 12px 0 0;
  font-size: 18px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .lobby-page {
    padding: 0 14px 36px;
  }

  .lobby-page-tabs__btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  .lobby-invite__actions {
    flex-direction: column;
  }

  .lobby-invite__actions .landing-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lobby-game-row:hover {
    transform: none;
  }
}
