:root {
  --bg: #f5f6f3; --surface: #ffffff; --surface-2: #eef1ee; --text: #1d2624; --muted: #5e6b68;
  --border: #d9dfdc; --accent: #1f6f78; --accent-ink: #ffffff; --accent-soft: #dcefee;
  --warn: #8a5a0a; --danger: #b4423a; --ok: #2c7a4b; --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 30, 28, .06), 0 4px 16px rgba(20, 30, 28, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131817; --surface: #1b2120; --surface-2: #232b2a; --text: #e7ecea; --muted: #9aa8a5;
    --border: #2f3a38; --accent: #5fb7bf; --accent-ink: #0d1514; --accent-soft: #1f3b3d;
    --warn: #e0b45a; --danger: #e0786f; --ok: #6cc08f; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 64px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name { font-weight: 600; }
.brand-by { font-size: .85rem; color: var(--accent); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.page { max-width: 860px; margin: 0 auto; padding: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.card > .grid:first-of-type { margin-top: 0; }
label, .gender { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.grid label, .grid .gender { margin-bottom: 0; }
input, textarea {
  width: 100%; padding: 9px 11px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
}
textarea { resize: vertical; line-height: 1.45; font-size: .95rem; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn {
  border: 1px solid var(--border); background: var(--surface-2); padding: 10px 16px;
  border-radius: 8px; cursor: pointer; font-weight: 500;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.ghost { background: none; }
.btn:hover { filter: brightness(.97); }
.pill { border: 1px solid var(--border); background: var(--surface-2); padding: 8px 16px; border-radius: 999px; cursor: pointer; margin-right: 6px; }
.pill.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.hint { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.warn { color: var(--warn); font-size: .9rem; margin: 0 0 10px; }
.status { margin: 10px 0 0; min-height: 1.4em; font-weight: 500; }
.status.error { color: var(--danger); }
.status.ok { color: var(--ok); }
.privacy { color: var(--muted); font-size: .85rem; text-align: center; margin: 4px 0 0; }
details summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }

.credits { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 24px 16px 32px; color: var(--muted); }
.credits strong { color: var(--text); font-size: 1.35rem; }
.credits a { color: var(--accent); text-decoration: none; font-weight: 500; }
.credits a:hover { text-decoration: underline; }
.credits-label { font-size: .95rem; }

@media print { .topbar, .credits { display: none; } }
