.lobby-shell { width: min(1180px, calc(100% - 48px)); }
.lobby-intro { display: flex; justify-content: space-between; gap: 30px; align-items: end; padding: 50px 0 31px; }
.lobby-intro > div:first-child { max-width: 760px; }
.lobby-intro h1 { margin: 0; font-family: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif; font-size: clamp(40px, 6vw, 65px); line-height: 1; letter-spacing: -0.05em; }
.lobby-intro p:last-child { max-width: 700px; margin: 17px 0 0; color: #435e64; font-size: 15px; line-height: 1.65; }
.lobby-live-indicator { display: grid; grid-template-columns: 11px auto; column-gap: 9px; align-items: center; min-width: 125px; padding: 12px 14px; background: #f5f7f2; border-left: 3px solid #4a8e7f; }
.lobby-live-indicator > span { grid-row: span 2; width: 8px; height: 8px; background: #4a8e7f; border-radius: 50%; }
.lobby-live-indicator strong { font-family: Bahnschrift, "Arial Narrow", sans-serif; font-size: 22px; line-height: 1; }
.lobby-live-indicator small { margin-top: 4px; color: #60777b; font-size: 10px; }
.lobby-toolbar { display: grid; grid-template-columns: auto minmax(180px, 280px) auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lobby-toolbar label { color: var(--steel); font-size: 12px; font-weight: 750; }
.lobby-toolbar select { min-height: 38px; padding: 7px 10px; color: var(--ink); background: #f5f7f2; border: 1px solid #aebfba; border-radius: 3px; font: inherit; font-size: 12px; }
.lobby-toolbar button { min-height: 38px; padding: 8px 13px; color: #f5f7f2; background: var(--steel); border: 0; border-radius: 3px; font-size: 12px; font-weight: 750; cursor: pointer; }
.lobby-toolbar button:hover { background: #203d45; }
.lobby-toolbar button:focus-visible { outline: 3px solid #204df5; outline-offset: 3px; }
#lobby-status { justify-self: end; margin: 0; color: #60777b; font-size: 11px; line-height: 1.4; text-align: right; }
#lobby-status[data-kind="error"] { color: #8f3d28; }
.lobby-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 25px; border-top: 1px solid #9eb2aa; border-bottom: 1px solid #9eb2aa; }
.lobby-counts > div { display: grid; gap: 5px; padding: 14px 16px; }
.lobby-counts > div + div { border-left: 1px solid #b9c9c1; }
.lobby-counts span { color: #60777b; font-size: 10px; }
.lobby-counts strong { color: var(--ink); font-family: Bahnschrift, "Arial Narrow", sans-serif; font-size: 23px; font-variant-numeric: tabular-nums; }
.lobby-section { padding: 37px 0 32px; border-bottom: 1px solid var(--line); }
.lobby-section-heading { display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.lobby-section-heading .eyebrow { margin-bottom: 7px; }
.lobby-section-heading h2, .lobby-howto h2 { margin: 0; font-family: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif; font-size: clamp(27px, 4vw, 38px); line-height: 1.08; letter-spacing: -0.04em; }
.lobby-result-count { color: #60777b; font-size: 11px; white-space: nowrap; }
.lobby-section-copy { margin: 10px 0 17px; color: #52696d; font-size: 12px; line-height: 1.5; }
.waiting-list { display: grid; margin: 0; padding: 0; border-top: 1px solid #9eb2aa; list-style: none; }
.waiting-item { display: grid; grid-template-columns: minmax(155px, 1fr) minmax(120px, 0.9fr) minmax(140px, 1fr) auto; gap: 16px; align-items: center; min-height: 70px; padding: 11px 6px; border-bottom: 1px solid #b9c9c1; }
.waiting-game strong, .waiting-host strong { display: block; font-size: 13px; }
.waiting-game small, .waiting-host small { display: block; margin-top: 4px; color: #60777b; font-size: 10px; }
.waiting-role { color: #435e64; font-size: 11px; }
.waiting-role span { color: #60777b; }
.copy-match { min-height: 33px; padding: 7px 9px; color: var(--steel); background: transparent; border: 1px solid #9eb2aa; border-radius: 2px; font-size: 10px; font-weight: 750; cursor: pointer; }
.copy-match:hover { background: #f5f7f2; }
.copy-match:focus-visible { outline: 3px solid #204df5; outline-offset: 3px; }
.lobby-empty { margin: 0; padding: 17px 0; color: #60777b; font-size: 12px; line-height: 1.55; }
.lobby-empty[hidden] { display: none; }
.lobby-table-wrap { overflow-x: auto; margin-top: 17px; }
.lobby-table { width: 100%; min-width: 590px; border-collapse: collapse; text-align: left; }
.lobby-table th, .lobby-table td { padding: 12px 13px; border-bottom: 1px solid #c5d2ca; }
.lobby-table th { color: #60777b; font-size: 10px; font-weight: 800; }
.lobby-table td { color: #435e64; font-size: 12px; }
.lobby-table td:first-child { color: var(--ink); font-weight: 750; }
.lobby-table tbody tr:last-child td { border-bottom: 0; }
.agent-state { display: inline-flex; align-items: center; gap: 7px; }
.agent-state::before { width: 7px; height: 7px; background: #4a8e7f; border-radius: 50%; content: ""; }
.agent-state[data-state="waiting_for_player"]::before { background: #d6a34d; }
.agent-state[data-state="preparing"]::before, .agent-state[data-state="in_match"]::before { background: #2c7c9c; }
.lobby-howto { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(200px, 0.9fr) auto; gap: 22px; align-items: center; padding: 33px 0; border-bottom: 1px solid var(--line); }
.lobby-howto > div:first-child { max-width: 430px; }
.lobby-howto .eyebrow { margin-bottom: 8px; }
.lobby-howto h2 { font-size: clamp(24px, 3vw, 32px); }
.lobby-howto p:not(.eyebrow) { margin: 10px 0 0; color: #52696d; font-size: 12px; line-height: 1.55; }
.lobby-api-examples { display: grid; gap: 7px; min-width: 0; }
.lobby-api-examples code { overflow-wrap: anywhere; color: #314e56; font-family: Consolas, "Courier New", monospace; font-size: 10px; }
.lobby-howto > a, .lobby-footer a { color: var(--steel); font-size: 11px; font-weight: 750; text-underline-offset: 3px; }
.lobby-footer { display: flex; justify-content: space-between; gap: 15px; padding: 22px 0; color: #60777b; font-size: 10px; }

@media (max-width: 820px) {
  .lobby-shell { width: min(100% - 32px, 700px); }
  .lobby-toolbar { grid-template-columns: auto minmax(180px, 1fr) auto; }
  #lobby-status { grid-column: 1 / -1; justify-self: start; text-align: left; }
  .waiting-item { grid-template-columns: minmax(160px, 1fr) minmax(140px, 1fr) auto; }
  .waiting-role { grid-column: 2; grid-row: 1; }
  .lobby-howto { grid-template-columns: 1fr 1fr; }
  .lobby-howto > a { grid-column: 2; }
}

@media (max-width: 580px) {
  .lobby-shell { width: min(100% - 32px, 520px); }
  .account-header { flex-wrap: wrap; gap: 9px; padding: 10px 0; }
  .account-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 8px 11px; margin-left: auto; font-size: 11px; }
  .lobby-intro { align-items: flex-start; flex-direction: column; gap: 18px; padding: 34px 0 24px; }
  .lobby-intro h1 { font-size: 43px; }
  .lobby-intro p:last-child { font-size: 13px; }
  .lobby-toolbar { grid-template-columns: 1fr auto; gap: 8px 11px; }
  .lobby-toolbar label { grid-column: 1 / -1; }
  .lobby-toolbar select { min-width: 0; }
  .lobby-toolbar button { grid-column: 2; grid-row: 2; }
  #lobby-status { grid-column: 1 / -1; }
  .lobby-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lobby-counts > div:nth-child(3) { border-left: 0; border-top: 1px solid #b9c9c1; }
  .lobby-counts > div:nth-child(4) { border-top: 1px solid #b9c9c1; }
  .lobby-section { padding: 29px 0 25px; }
  .waiting-item { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 13px 3px; }
  .waiting-role { grid-column: 1; grid-row: 2; }
  .waiting-item .copy-match { grid-column: 2; grid-row: 1 / span 2; }
  .lobby-howto { grid-template-columns: 1fr; gap: 16px; padding: 29px 0; }
  .lobby-howto > a { grid-column: 1; }
  .lobby-footer { flex-direction: column; }
}
