:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #f7f3e5;
  background: #182a24;
  --muted: #c5d9bc;
  --border: #597468;
  --accent: #dce8b8;
  --panel: #20372e;
}

body {
  box-sizing: border-box;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: radial-gradient(ellipse at top, #284539, transparent 75%);
}

main {
  width: min(100%, 39rem);
}

.title {
  margin-bottom: 2.25rem;
}

.title p {
  margin-top: 0.75rem;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(3.5rem, 13vw, 7rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 400;
}

p {
  margin: 0;
  line-height: 1.5;
}

#setup,
.invite {
  padding: clamp(1rem, 4vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--panel);
}

form {
  margin-top: 1.25rem;
}

label {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

input,
button {
  border-radius: 0.375rem;
  padding: 0.65rem 0.85rem;
  min-height: 2.75rem;
  box-sizing: border-box;
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  background: #14261f;
  color: inherit;
}

button {
  border: 1px solid transparent;
  background: var(--accent);
  color: #172921;
  font-weight: 650;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #edf4d6;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
}

.lobby-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

#seat-count {
  color: var(--muted);
  font-size: 0.875rem;
}

.seats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.8rem 0 1rem;
  padding: 0;
  list-style: none;
}

.seat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--panel);
}

.seat-empty {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
}

.seat-number {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
}

.seat-name {
  overflow-wrap: anywhere;
}

.seat-viewer {
  border-radius: 1rem;
  padding: 0.15rem 0.5rem;
  background: var(--accent);
  color: #172921;
  font-size: 0.72rem;
  font-weight: 650;
}

.message {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.message:empty {
  margin: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 31rem) {
  .input-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
