:root {
  color-scheme: light dark;
  --text: #1c1c1e;
  --muted: #6c6c70;
  --surface: #ffffff;
  --page: #f2f2f7;
  --accent: #0a66d6;
  --line: #d1d1d6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f2f2f7;
    --muted: #a1a1a6;
    --surface: #1c1c1e;
    --page: #000000;
    --accent: #4a9cff;
    --line: #3a3a3c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

main {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

h1 { font-size: 1.6rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }

section {
  background: var(--surface);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
}

label { display: block; font-size: 0.9rem; color: var(--muted); margin: 0.75rem 0 0.25rem; }
label:first-child { margin-top: 0; }

input, textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
}

textarea { resize: vertical; }

button {
  font: inherit;
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
}

button:disabled { background: var(--line); color: var(--muted); cursor: default; }

form button[type="submit"] { margin-top: 1rem; width: 100%; }

.status { min-height: 1.4em; margin: 0.6rem 0 0; color: var(--muted); }

.cards { list-style: none; margin: 0; padding: 0; }

.cards li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.cards li:first-child { border-top: 0; padding-top: 0; }

.photo {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--page);
}

.name { flex: 1; min-width: 0; }

.cards button { flex: none; }

.empty, .message { color: var(--muted); margin: 0; }
.message { margin-top: 2rem; text-align: center; }
