.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: 1080px;
  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);
}

/* —— 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;
}

/* —— Layout —— */

.lobby-layout {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .lobby-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    align-items: start;
  }

  .lobby-layout__primary {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
}

/* —— 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--public {
  align-self: start;
}

.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: 480px) {
  .lobby-card .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;
}

.lobby-refresh-btn {
  flex-shrink: 0;
  min-height: 36px;
  padding: 6px 14px;
  font-size: 13px;
}

/* —— 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-wrap: wrap;
  gap: 8px;
}

.lobby-invite__actions .landing-btn {
  flex: 1 1 auto;
  min-width: 120px;
}

/* —— 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 .landing-btn {
  flex-shrink: 0;
  min-height: 36px;
  padding: 6px 16px;
  font-size: 13px;
}

/* —— 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 {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

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

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

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

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