:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b6860;
  --border: #d9d6cf;
  --accent: #c2410c;
  --accent-text: #ffffff;
  --danger: #b91c1c;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #211f1c;
    --text: #ece9e3;
    --muted: #a19d94;
    --border: #3a3732;
    --accent: #f97316;
    --accent-text: #1c1b19;
    --danger: #f87171;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 16px;
}

h1 { margin: 0; font-size: 1.75rem; }
h2 { margin: 0 0 8px; font-size: 1.25rem; }
.tagline { margin: 4px 0 32px; color: var(--muted); }

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

label { font-weight: 600; }

textarea, input[type="text"], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

textarea, input[type="text"] { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.9rem; }
textarea { resize: vertical; margin-top: 8px; }
select { width: auto; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.row input[type="text"] { flex: 1 1 240px; }

button {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button:disabled { opacity: 0.5; cursor: default; }
button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#create-btn { margin-left: auto; }
.muted { color: var(--muted); font-size: 0.9rem; }
.over { color: var(--danger); }
.status:empty { display: none; }
.status { margin: 12px 0 0; }
a { color: var(--accent); }
code { font-size: 0.9em; }

footer { margin-top: 32px; text-align: center; }
footer p { margin: 12px 0 0; }
footer p a { white-space: nowrap; }
.sponsor-banner { display: block; border-radius: 12px; overflow: hidden; }
.sponsor-banner img { display: block; width: 100%; height: auto; }
