:root {
  --bg: #0a0a0b;
  --card: #141416;
  --card-2: #1b1b1e;
  --line: #2a2a2f;
  --text: #f2f2f3;
  --muted: #9a9aa3;
  --faint: #6b6b73;
  --accent: #f0c44c;
  --accent-ink: #1a1405;
  --good: #46c47e;
  --warn: #f0a24c;
  --bad: #ef5d5d;
  --blue: #5aa6ff;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 16px; /* stops iOS zooming into fields */
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.field { margin-bottom: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card-2);
  border-radius: 12px; padding: 11px 16px; font-weight: 600; cursor: pointer;
  user-select: none; -webkit-user-select: none;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
a.btn { color: var(--text); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 18px; font-size: 16px; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
@media (hover: hover) {
  .btn:hover { border-color: #3a3a40; }
  .btn.primary:hover { background: #f5d06a; }
}

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.chip.good { color: var(--good); border-color: #234d36; background: #10241a; }
.chip.warn { color: var(--warn); border-color: #4d3a23; background: #241a10; }
.chip.bad { color: var(--bad); border-color: #4d2323; background: #241010; }
.chip.blue { color: var(--blue); border-color: #23394d; background: #101a24; }
.chip.gold { color: var(--accent); border-color: #4d4223; background: #241f10; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1; min-width: 56px; padding: 9px 10px; border-radius: 10px; cursor: pointer;
  background: var(--card-2); border: 1px solid var(--line); font-weight: 600; color: var(--muted);
}
.seg button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #26262b; border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px;
  z-index: 100; font-weight: 500; box-shadow: 0 8px 30px rgba(0,0,0,.5); max-width: calc(100% - 32px);
}

/* .spinner: the slab loader, in slab-loader.css */
