:root {
  --bg: #0f0f10;
  --surface: #18181b;
  --surface-hi: #232326;
  --border: #2a2a2e;
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --accent: #ffffff;
  --accent-text: #0f0f10;
  --danger: #f87171;
  --ok: #34d399;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.head h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.head .sub {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 28px;
}

.form { display: flex; flex-direction: column; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 8px; }

.field > label,
.field > legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 0;
}

.req { color: var(--danger); margin-left: 2px; }

.hint {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.4;
}

input[type="text"],
input[type="email"],
input[type="date"],
textarea {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, background .15s;
}

textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

input:focus, textarea:focus {
  border-color: #4b4b52;
  background: var(--surface-hi);
}

input::placeholder, textarea::placeholder { color: #6b6b73; }

fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}

.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }

.chip:hover { border-color: #3a3a40; }

.chip input:checked + span { color: var(--accent-text); }
.chip:has(input:checked) {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.chip.inline { padding: 10px 14px; }

.row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.row > input[type="text"] { flex: 1; }

.actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 13px 22px;
  cursor: pointer;
  transition: transform .05s, opacity .15s, background .15s;
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn.primary:hover { opacity: 0.92; }
.btn.primary:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.status.ok { border-color: rgba(52,211,153,0.4); color: var(--ok); }
.status.err { border-color: rgba(248,113,113,0.4); color: var(--danger); }

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

@media (max-width: 480px) {
  .app { padding: 20px 16px 80px; }
  .head h1 { font-size: 24px; }
  .actions { justify-content: stretch; }
  .actions .btn { width: 100%; }
}
