:root {
  --tul: #5948ad;
  --tul-dark: #463a87;
  --text: #1a1a1a;
  --muted: #666;
  --border: #d8d8d8;
  --bg: #ffffff;
  --ok: #1b7a3d;
  --err: #c0392b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.form-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 32px;
}

.form-head {
  border-bottom: 3px solid var(--tul);
  padding-bottom: 14px;
  margin-bottom: 24px;
}

.form-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.form-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.field {
  margin-bottom: 18px;
}

.row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.row .field {
  flex: 1 1 200px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

label .req { color: var(--tul); }

input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--tul);
  box-shadow: 0 0 0 3px rgba(89, 72, 173, .18);
}

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

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check input {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}

.check label {
  font-weight: 400;
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

.radio-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radio {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 400;
  font-size: 15px;
  cursor: pointer;
  margin: 0;
  transition: border-color .15s, background .15s;
}

.radio input { width: auto; margin: 0; flex-shrink: 0; accent-color: var(--tul); }

.radio:has(input:checked) {
  border-color: var(--tul);
  background: rgba(89, 72, 173, .07);
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--tul);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
}

button:hover { background: var(--tul-dark); }
button:disabled { background: #b0a8d4; cursor: not-allowed; }

.note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
  text-align: center;
}

.msg {
  display: none;
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 15px;
  margin-bottom: 20px;
}

.msg.ok { display: block; background: #e9f6ee; color: var(--ok); border: 1px solid #b6e0c4; }
.msg.err { display: block; background: #fdecea; color: var(--err); border: 1px solid #f4c2bb; }
