:root {
  /* table */
  --felt: #1a4f7c;
  --felt-dark: #0e2c4e;
  --ink: #f3ecd9;
  --muted: #b7cbdc;
  --accent: #ffd75e;
  --bad: #cf4a3f;

  /* cream card (score pad, seat cards) */
  --panel: #f6ecd4;
  --panel-ink: #3a2f18;
  --panel-muted: #8a7a57;

  /* board */
  --cell: #e7dcbc;
  --line: #cec19a;
  --tw: #c2542e;
  --dw: #d8a238;
  --tl: #2e8577;
  --dl: #8fb3c9;

  /* tiles */
  --tile: #f3e3b8;
  --tile-hi: #f9eecb;
  --tile-lo: #e6cd92;
  --tile-edge: #b28e50;
  --tile-ink: #32270f;

  /* rack wood */
  --wood-hi: #a5713d;
  --wood-lo: #6f4620;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 25%, var(--felt) 0%, var(--felt-dark) 80%) fixed;
  color: var(--ink);
  font: 16px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1, h2 { font-weight: 800; letter-spacing: 0.02em; }

button {
  font: inherit;
  font-weight: 700;
  padding: 0.65em 1.2em;
  border: 0;
  border-radius: 0.5em;
  background: linear-gradient(160deg, var(--tile-hi), var(--tile-lo));
  color: var(--tile-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7),
              inset 0 -2px 2px rgba(146, 105, 44, 0.45),
              0 2px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

button:active { transform: translateY(1px); }

button:disabled {
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
  transform: none;
}

button.ghost {
  background: rgba(0, 0, 0, 0.22);
  color: var(--ink);
  border: 1px solid rgba(243, 236, 217, 0.45);
  box-shadow: none;
}

input {
  font: inherit;
  padding: 0.6em 0.8em;
  border-radius: 0.5em;
  border: 2px solid var(--tile-edge);
  background: var(--panel);
  color: var(--panel-ink);
}

input::placeholder { color: var(--panel-muted); }

/* a word spelled out as little tiles (logo, room code) */
.tileWord {
  display: flex;
  gap: 0.18em;
  justify-content: center;
}

.tileWord span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  aspect-ratio: 1;
  border-radius: 0.18em;
  background: linear-gradient(150deg, var(--tile-hi), var(--tile-lo));
  color: var(--tile-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75),
              inset 0 -0.09em 0.09em rgba(146, 105, 44, 0.5),
              0 0.1em 0.18em rgba(0, 0, 0, 0.4);
  font-weight: 800;
}

#toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bad);
  color: #fff;
  padding: 0.6em 1.2em;
  border-radius: 0.5em;
  max-width: 90vw;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 20;
}
