:root {
  --bg: #f5f2ea;
  --panel: rgba(255, 253, 247, 0.88);
  --ink: #2b2a26;
  --muted: #6b675c;
  --accent: #3f6a35;
  --line: #ddd6c4;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #171815; --panel: rgba(28, 29, 25, 0.88); --ink: #ece9df; --muted: #a8a496; --accent: #8fbf7a; --line: #3a3b34; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
#view { position: fixed; inset: 0; }
#view canvas { display: block; }
.bar {
  position: fixed; left: 16px; right: 16px; top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; backdrop-filter: blur(6px);
}
.bar h1 { font-size: 15px; margin: 0 8px 0 0; }
.bar a.back { color: var(--muted); text-decoration: none; margin-right: 4px; }
.bar button {
  font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; cursor: pointer;
}
.bar button:hover { border-color: var(--accent); }
.bar button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.bar .sep { width: 1px; align-self: stretch; background: var(--line); }
#hint, .credit {
  position: fixed; left: 16px; bottom: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--muted); max-width: calc(100% - 32px);
}
.credit { left: auto; right: 16px; font-size: 12px; }
.credit a { color: var(--muted); }
#status { position: fixed; inset: 0; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
@media (max-width: 640px) { .credit { display: none; } .bar h1 { width: 100%; } }
