:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --border: #e2e6ef;
  --text: #0b1220;
  --muted: #5b6478;
  --accent: #3f6fd1;
  --accent-press: #2f57ad;
  --danger: #c53030;
  --ok: #2f855a;
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 1px 1px rgba(11, 18, 32, 0.03);
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
}

.head h1 {
  margin: 6px 0 4px;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.sub {
  margin: 0 0 18px;
  color: var(--muted);
}

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

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

.row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}
@media (max-width: 360px) {
  .row { grid-template-columns: 1fr; }
}
.field > span {
  font-size: 14px;
  color: var(--muted);
}
.field em { font-style: normal; opacity: 0.7; }

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

textarea { resize: vertical; min-height: 96px; }

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(63, 111, 209, 0.18);
}

input[type="file"] {
  padding: 12px;
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

button {
  margin-top: 6px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: var(--radius);
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
button:hover:not(:disabled) { background: var(--accent-press); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.65; cursor: not-allowed; }

#status {
  margin: 4px 0 0;
  min-height: 1.2em;
  font-size: 14px;
}
#status.ok { color: var(--ok); }
#status.err { color: var(--danger); }

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