/* Why We Stay: deliberately plain. Big touch targets (iPad), no hover-only controls. */
:root {
  --bg: #f6f4ef;
  --panel: #ffffff;
  --ink: #1f1d1a;
  --muted: #6b665e;
  --line: #ddd7cc;
  --accent: #2f5d8a;
  --accent-ink: #ffffff;
  --warn: #9a3b1b;
  --room: transparent;       /* tinted by the room's mood */
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1a18; --panel: #262421; --ink: #ece8e1; --muted: #a49d92; --line: #3b3833;
    --accent: #7fb0e0; --accent-ink: #10202f; --warn: #f0a07f;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: linear-gradient(var(--room), var(--room));
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}
main { max-width: 1180px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.6rem; margin: 0.2em 0 0.4em; }
h2 { font-size: 1.15rem; margin: 0 0 0.6em; }
h3 { font-size: 1rem; margin: 0.8em 0 0.4em; }
p { margin: 0.4em 0; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .grid.two { grid-template-columns: 1.25fr 1fr; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
button, select, input[type=text] {
  font: inherit; min-height: 44px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); padding: 0 14px;
}
input[type=text] { width: 100%; }
button { cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.chosen { outline: 3px solid var(--accent); outline-offset: 1px; }
button:disabled { opacity: 0.45; cursor: default; }
label.check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
label.check input { width: 22px; height: 22px; }
.code { font: 700 2rem/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.15em; }

/* Felt readouts: a descriptor and a colour swatch, kept apart by dividers so swatches are
   never side by side (comparing across time is the point, not comparing tiles). */
.readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.readout { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.readout .label { font-weight: 600; }
.readout .help { color: var(--muted); font-size: 0.8rem; }
.readout .felt { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); flex: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; background: var(--panel); }
.chip .swatch { width: 26px; height: 26px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.card.on { outline: 3px solid var(--accent); }
.card h4 { margin: 0 0 4px; }

.stepper { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.stepper:last-child { border-bottom: 0; }
.stepper .controls { display: flex; align-items: center; gap: 6px; }
.stepper .controls button { width: 48px; padding: 0; font-size: 1.3rem; }
.stepper .count { min-width: 2ch; text-align: center; font-weight: 700; font-size: 1.15rem; }
.stepper .help { color: var(--muted); font-size: 0.82rem; }

.seat { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.seat:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--line); }
.dot.on { background: #3a8f57; }
.tag { display: inline-block; font-size: 0.78rem; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin: 2px 4px 2px 0; }
.tag.flag { border-color: var(--warn); color: var(--warn); }
.feed { margin: 0; padding-left: 1.1em; }
.feed li { margin: 4px 0; }
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
#banner { position: sticky; top: 0; z-index: 5; background: var(--warn); color: #fff; text-align: center; padding: 6px; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; max-width: 90vw; z-index: 6; }
details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.frame { border-top: 1px solid var(--line); padding: 10px 0; }
