:root {
  --red: #b3261e;
  --red-dark: #8c1d18;
  --green: #1f6f43;
  --bg: #fbf7f2;
  --card: #ffffff;
  --text: #1f1d1b;
  --muted: #6b645d;
  --border: #e4ddd4;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
main { max-width: 40rem; margin: 0 auto; padding: 1rem; }
a { color: var(--red); }

header.site { background: var(--red); padding: 0.9rem 1rem; }
header.site .brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
footer.site { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 2rem 1rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}
.card.subtle { background: transparent; box-shadow: none; }
.card.center { text-align: center; }

h1 { margin: 0 0 0.5rem; font-size: 1.7rem; line-height: 1.2; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--muted); margin: 0 0 0.25rem; }
.lead { font-size: 1.05rem; color: var(--muted); }
.help { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0; }
.optional { color: var(--muted); font-weight: 400; font-size: 0.85rem; }

.field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
input[type="text"], input[type="date"], textarea {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.has-error input, .has-error textarea { border-color: var(--red); }
.error, .errors { color: var(--red); font-size: 0.9rem; margin: 0.25rem 0; }
.errors ul, .errorlist { margin: 0; padding-left: 1.2rem; }

button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 0.6rem 1rem;
}
button.primary { background: var(--red); border-color: var(--red); color: #fff; }
button.primary:hover { background: var(--red-dark); }
button.big { font-size: 1.2rem; padding: 0.9rem 1.6rem; margin: 1rem 0; }
button.small { padding: 0.25rem 0.6rem; font-size: 0.85rem; }
button.danger { background: var(--red-dark); border-color: var(--red-dark); color: #fff; margin: 1rem 0; }
.danger-link { color: var(--red-dark); font-size: 0.9rem; }

.copy-row { display: flex; gap: 0.5rem; }
.copy-row input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 0.85rem; }

.notice { border-radius: 8px; padding: 0.75rem 1rem; background: #f3efe9; }
.notice.success { background: #e6f2ea; color: #134a2c; }
.notice.warning { background: #fff4e0; color: #5c3b00; }

.name-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.6rem; }
.name-button {
  display: block;
  text-align: center;
  padding: 0.9rem 0.5rem;
  border-radius: 10px;
  border: 2px solid var(--red);
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
}
.name-button:hover { background: var(--red); color: #fff; }
.name-button.taken { border-color: var(--border); color: var(--muted); background: #f5f2ee; }
.name-button small { display: block; font-weight: 400; font-size: 0.75rem; }

.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.status-list .name { flex: 1; font-weight: 600; }
.status-list form { margin: 0; }
.badge { font-size: 0.8rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: #f3efe9; color: var(--muted); }
.badge.done { background: #e6f2ea; color: var(--green); }

.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 1rem 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }

.target { font-size: 2.6rem; font-weight: 800; color: var(--red); margin: 0.5rem 0; word-break: break-word; }
.target.reveal { animation: reveal 0.9s ease-out; }
@keyframes reveal {
  from { opacity: 0; transform: scale(0.6) rotate(-4deg); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .target.reveal { animation: none; } }
.card > :first-child { margin-top: 0; }
