:root {
  --bg: #f6f3ec;
  --panel: #fffdf8;
  --text: #1c1a17;
  --muted: #6b655b;
  --line: #ddd6c8;
  --accent: #8a6a1f;
  --accent-text: #fffdf8;
  --danger: #a3321f;
  --ok: #2f6b3a;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15140f;
    --panel: #1e1c17;
    --text: #ece6da;
    --muted: #a59d8e;
    --line: #36322a;
    --accent: #d0a845;
    --accent-text: #15140f;
    --danger: #ec8a74;
    --ok: #8fcf98;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main {
  max-width: 36rem;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
}
h1 {
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
.lead { color: var(--muted); margin: 0 0 2rem; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
}
label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
textarea, input[type="text"], select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
}
textarea { min-height: 9rem; resize: vertical; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.95rem; }
.secret { white-space: pre-wrap; word-break: break-all; }
.row { display: flex; gap: 0.75rem; align-items: end; flex-wrap: wrap; margin-top: 1rem; }
.row > .grow { flex: 1 1 12rem; }
button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 6px;
  padding: 0.65rem 1.1rem;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  min-height: 44px;
}
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button:disabled { opacity: 0.55; cursor: default; }
button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.note { color: var(--muted); font-size: 0.92rem; margin: 1rem 0 0; }
.status { margin: 0.75rem 0 0; font-weight: 600; min-height: 1.5em; }
.status.error { color: var(--danger); }
.status.ok { color: var(--ok); }
[hidden] { display: none !important; }
footer { color: var(--muted); font-size: 0.85rem; margin-top: 2.5rem; }
.flush-top { margin-top: 0; }
.flush-bottom { margin-bottom: 0; }
footer a { color: inherit; }
.optional { font-weight: 400; color: var(--muted); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1rem; }
