:root {
  --bg: #f6f3ee;
  --text: #222;
  --muted: #666;
  --notice: #b03a2e;
  --button: #e6e0d6;
  --pressed: #8a5a2b;
  --private: #f0e6d2;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1e1e1e; --text: #eee; --muted: #aaa; --notice: #ff8a7a;
          --button: #3a3631; --pressed: #c08a4e; --private: #2e2a24; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
}
main { max-width: 460px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.3rem; margin: 0 0 8px; }
h1 small { color: var(--muted); font-weight: normal; font-size: 0.8rem; }
#status { margin: 0 0 12px; }
/* No text selection, magnifier or "copy" bubble when a finger is held on the board */
#board { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#board svg { display: block; width: 100%; height: auto; cursor: pointer; border-radius: 4px; }
#notice { min-height: 1.4em; color: var(--notice); font-weight: 600; }
#controls { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
#controls button {
  font: inherit; padding: 6px 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--muted); background: var(--button); color: var(--text);
}
#controls button[aria-pressed="true"] { background: var(--pressed); border-color: var(--pressed); color: #fff; }
#controls button:disabled { opacity: 0.45; cursor: default; }
h2 { font-size: 1rem; margin: 0 0 6px; color: var(--muted); }
#log { list-style: none; margin: 0; padding: 0; max-height: 14em; overflow-y: auto; font-size: 0.9rem; }
#log li { padding: 3px 6px; border-radius: 4px; }
#log li.log-private { background: var(--private); font-style: italic; }
#info { list-style: none; margin: 0 0 12px; padding: 0; }
#info li { padding: 2px 0; }
#logbox:has(#log:empty) { display: none; }
#links { list-style: none; margin: 16px 0 0; padding: 0; font-size: 0.85rem; color: var(--muted); }
#links li { margin: 0 0 6px; }
#links a { color: inherit; word-break: break-all; }
