:root {
  --bg: #0e0f12;
  --bg-raised: #1a1c21;
  --bg-sunk: #08090b;
  --line: #2c2f36;
  --text: #f1efe9;
  --text-dim: #9a9ca3;
  --text-faint: #62656d;
  --accent: #f2c14e;
  --accent-text: #1a1406;
  --warn: #f29e4c;
  --danger: #e5484d;
  --ok: #46a758;
  --radius: 14px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --emoji: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button {
  border: 1px solid var(--line);
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  min-height: 48px;
  touch-action: manipulation;
}
button:disabled { opacity: 0.4; cursor: default; }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
button.danger { background: var(--danger); border-color: var(--danger); color: white; font-weight: 600; }
button.quiet { background: transparent; border-color: transparent; color: var(--text-dim); }
textarea, input[type='text'] {
  width: 100%;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  resize: none;
}
textarea:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 14px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.hint {
  border-left: 3px solid var(--warn);
  padding: 6px 10px;
  color: var(--warn);
  font-size: 14px;
  background: color-mix(in srgb, var(--warn) 8%, transparent);
  border-radius: 0 8px 8px 0;
}
.emoji { font-family: var(--emoji); }
.status-dot { position: fixed; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); opacity: 0; transition: opacity 0.3s; }
.status-dot.offline { opacity: 1; }
[hidden] { display: none !important; }
