:root {
  --bg: #f4f1ea;
  --panel: #ffffff;
  --text: #222;
  --muted: #777;
  --line: #ddd;
  --accent: #2b6cb0;
  --error: #c53030;
  --highlight: #ffd400;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: #2d3748;
  color: #fff;
}
header a { color: #fff; font-weight: 600; text-decoration: none; }
header .muted { color: #cbd5e0; }
main { padding: 12px 16px; }
#lobby { display: grid; gap: 12px; max-width: 1000px; margin: 0 auto; }
#room { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; }
@media (max-width: 900px) { #room { grid-template-columns: 1fr; } }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.panel h2, .panel h3 { margin: 0 0 8px; font-size: 15px; }
table { border-collapse: collapse; width: 100%; }
td, th { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
form#create { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
form#create label { display: flex; flex-direction: column; gap: 2px; }
form#create .wide { grid-column: 1 / -1; }
input, select, textarea, button { font: inherit; }
textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 12px; }
button {
  border: 1px solid #a0aec0;
  background: #edf2f7;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  margin: 2px;
}
button:hover:not(:disabled) { background: #e2e8f0; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button:disabled { opacity: 0.5; cursor: default; }
.muted { color: var(--muted); }
.error { color: var(--error); }
.ok { color: #2f855a; }
code { font-size: 12px; }
#board-wrap { position: relative; background: #8ec5e8; border-radius: 6px; }
#board { width: 100%; height: calc(100vh - 90px); min-height: 420px; display: block; }
#prompt {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  font-weight: 600;
}
#prompt:empty { display: none; }
#log { max-height: 260px; overflow: auto; padding-left: 28px; margin: 0; font-size: 12px; }
#log li { margin: 1px 0; }
.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid #555;
  vertical-align: middle;
  margin-right: 4px;
}
.player { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.player.current { background: #fffbe6; }
.cards span { display: inline-block; margin: 1px 4px 1px 0; padding: 1px 6px; border-radius: 3px; background: #edf2f7; }
.seat-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; flex-wrap: wrap; }
.clickable { cursor: pointer; }
svg text { pointer-events: none; font-family: system-ui, sans-serif; }
#actions .list { max-height: 220px; overflow: auto; }
details summary { cursor: pointer; color: var(--accent); }
