:root {
  --bg: #fdf3e7;
  --field: #fffaf4;
  --card: #ffffff;
  --text: #2b2320;
  --muted: #7a6a62;
  --line: #f0dfcf;
  --accent: #c9553a;
  --accent-text: #ffffff;
  --ok: #2f7a4a;
  --error: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1715;
    --field: #1c1715;
    --card: #26201d;
    --text: #f5ece6;
    --muted: #b3a39a;
    --line: #3d332e;
    --accent: #f08a6c;
    --accent-text: #2a120b;
    --ok: #79c795;
    --error: #ff8a80;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.card {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 12px 40px rgba(120, 70, 40, 0.08);
}

h1 { margin: 0 0 10px; font-size: 30px; }
.lede { margin: 0 0 24px; color: var(--muted); }
.headline { margin: -4px 0 14px; font-size: 18px; font-weight: 600; color: var(--accent); }
.optional { font-weight: 400; color: var(--muted); }
.edit { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
h2 { margin: 0; font-size: 18px; }

form { display: grid; gap: 16px; }

label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }

input, select, textarea {
  width: 100%;
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.hp { position: absolute; left: -9999px; }

button, .button {
  display: inline-block;
  text-decoration: none;
  justify-self: start;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
}
button:hover, .button:hover { filter: brightness(1.05); }
button:disabled { opacity: 0.6; cursor: wait; }

#status, .status { margin: 0; min-height: 1.5em; font-size: 14px; color: var(--muted); }
#status.ok, .status.ok { color: var(--ok); }
#status.error, .status.error { color: var(--error); }

.make-own { margin: 8px 0 0; font-size: 13px; text-align: center; }
a { color: var(--accent); }
.make-own a { color: var(--muted); text-decoration: none; }
.make-own a:hover { color: var(--accent); text-decoration: underline; }

[hidden] { display: none !important; }
.stack { display: grid; gap: 12px; }
#link { font-size: 14px; }
.hint { margin: -8px 0 0; font-size: 13px; color: var(--muted); }
.prefix-field { display: flex; align-items: center; background: var(--field); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.prefix-field:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.prefix { padding-left: 14px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.prefix-field input { border: 0; background: transparent; padding-left: 2px; }
.prefix-field input:focus { outline: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

@media (max-width: 520px) {
  .card { padding: 24px 20px; }
}
