:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #14171c;
  --muted: #5d6673;
  --border: #d9dde3;
  --accent: #0a84d6;
  --accent-text: #ffffff;
  --error: #c62828;
  --code-bg: #eef1f5;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --surface: #171b21;
    --text: #e8ebef;
    --muted: #9aa3ae;
    --border: #2b313a;
    --accent: #3aa5ec;
    --accent-text: #06121c;
    --error: #ff6b6b;
    --code-bg: #1f252d;
  }
}

* {
  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: 40rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.brand {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

h1 {
  margin: 0.25rem 0 0.75rem;
  font-size: 1.75rem;
  line-height: 1.2;
}

h2 {
  margin-top: 0;
}

h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
}

.lede,
small,
.note {
  color: var(--muted);
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  overflow-x: auto;
}

form,
#result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}

label {
  display: block;
  margin-bottom: 1.25rem;
}

label > span {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
}

input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

input:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#icon-preview {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 1px solid var(--border);
  margin: -0.5rem 0 1.25rem;
  object-fit: cover;
}

details {
  margin-bottom: 1.25rem;
}

summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 1rem;
}

button {
  padding: 0.65rem 1.25rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.copy-row {
  display: flex;
  gap: 0.5rem;
}

.copy-row input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}

.error {
  color: var(--error);
  margin: 0 0 1rem;
}

footer {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}

footer a {
  color: var(--muted);
}
