/*
  Shared styles for the multiplayer games (public/games/<slug>/).
  The game CSS and canvas code read the older token names below, so they
  are mapped onto the fluffshine palette here rather than renamed.
*/
:root {
  --ground: var(--meringue);
  --card: var(--paper);
  --accent: var(--candyfloss-deep);
  --good: #1f8a62;
  --bad: #c43a4f;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --good: #6fd6a8; --bad: #ff7d8f; }
}

#app { margin-inline: auto; }
#app h1 { font-size: var(--step-3); }

button, input { font: inherit; color: inherit; }
button {
  padding: 0.6rem 1.1rem;
  background: var(--paper);
  border: 2px solid var(--rule);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  cursor: pointer;
  transition: transform 120ms, border-color 120ms;
}
button:hover:not(:disabled) { border-color: var(--candyfloss); transform: translateY(-1px); }
button:active:not(:disabled) { transform: scale(0.97); }
button:disabled { cursor: default; opacity: 0.45; }
button.primary { background: var(--candyfloss); border-color: var(--candyfloss); color: #3a1636; }
button.small { padding: 0.25rem 0.75rem; font-size: 0.85rem; }
input {
  padding: 0.6rem 0.9rem;
  background: var(--paper);
  border: 2px solid var(--rule);
  border-radius: 1rem;
}
input:focus-visible { border-color: var(--candyfloss-deep); }

/* Lobby (public/lib/lobby.js). */
.crumb { margin: 0 0 1rem; font-family: var(--font-display); font-size: var(--step--1); }
.crumb a, a.crumb { color: var(--ink-soft); text-decoration: none; }
.tagline { color: var(--ink-soft); font-size: var(--step-1); max-width: 32rem; margin: 0.6rem 0 2rem; }
.lobby {
  display: grid; gap: 0.5rem; max-width: 24rem;
  padding: 1.5rem; border-radius: var(--radius);
  background: color-mix(in srgb, var(--lilac) 22%, var(--paper));
  border: 2px solid color-mix(in srgb, var(--lilac) 60%, var(--paper));
  box-shadow: var(--shadow);
}
.lobby label { font-family: var(--font-display); font-weight: 500; color: var(--ink-soft); }
.choices { display: grid; gap: 0.75rem; margin-top: 1rem; }
.or { margin: 0; text-align: center; font-size: var(--step--1); color: var(--ink-soft); }
.row { display: flex; gap: 0.5rem; }
.code-input { width: 7rem; text-transform: uppercase; letter-spacing: 0.2em; font-family: var(--font-mono); }
.row button { flex: 1; }
.error { color: var(--bad); margin: 0.5rem 0 0; min-height: 1.5em; }

/* In-game panels. */
.room .code { color: var(--candyfloss-deep); }
aside h2 { font-family: var(--font-display) !important; letter-spacing: 0.04em !important; }
.result { border-radius: var(--radius) !important; border-width: 2px !important; }
.board { border-radius: 1rem !important; border-width: 2px !important; }
.bar .crumb { font-family: var(--font-display) !important; text-decoration: none; }

/* Game pages get a compact site header so the board fits on screen. */
body .head { padding-block: 0.6rem 0; }
body .head__inner { flex-wrap: nowrap; }
body .head__home { font-size: var(--step-0); gap: 0.35rem; }
body .head__home svg { width: 30px; height: auto; }
body .head__nav a { padding: 0.25em 0.8em; font-size: var(--step--1); }
#main.main { padding-block-start: 0.75rem; }
#app .crumb { margin-bottom: 0.25rem; }
