:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #292521;
  background: #f7f4ef;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 12% 12%, rgba(236, 184, 131, 0.2), transparent 32%),
    radial-gradient(circle at 88% 88%, rgba(151, 177, 143, 0.2), transparent 30%),
    #f7f4ef;
}

.card {
  width: min(100%, 440px);
  padding: 36px;
  border: 1px solid rgba(70, 57, 44, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 60px rgba(66, 51, 36, 0.1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  color: #6d5b49;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f1e6d9;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #866c52;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 7vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.subtitle {
  margin: 0 0 28px;
  color: #766e66;
  font-size: 15px;
  line-height: 1.6;
}

.status {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #766e66;
  font-size: 15px;
}

.spinner {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 2px solid #e8dfd5;
  border-top-color: #8a7055;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

#reset-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }

label {
  color: #514a43;
  font-size: 14px;
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #dcd3c9;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #292521;
  font: inherit;
  font-size: 16px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus {
  border-color: #987b5c;
  box-shadow: 0 0 0 3px rgba(152, 123, 92, 0.14);
}

.hint {
  margin: -8px 0 0;
  color: #8a8178;
  font-size: 13px;
}

button {
  min-height: 50px;
  margin-top: 2px;
  border: 0;
  border-radius: 12px;
  background: #80674e;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

button:hover:not(:disabled) { background: #705940; }

button:focus-visible {
  outline: 3px solid rgba(128, 103, 78, 0.3);
  outline-offset: 3px;
}

button:disabled { cursor: wait; opacity: 0.65; }

.message { margin: 0; font-size: 14px; line-height: 1.55; }
.message p { margin: 6px 0 0; }
.standalone { padding: 16px; border-radius: 12px; }
.error { color: #9a4039; }
.error.standalone { border: 1px solid #efd3cf; background: #fff5f3; }
.success { color: #396645; }

.success.standalone {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #d2e5d5;
  background: #f2faf3;
}

.success-icon { flex: 0 0 auto; font-size: 20px; font-weight: 800; }
.success p { margin: 0; }

.footer {
  margin: 28px 0 0;
  color: #9a9188;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

[hidden] { display: none !important; }

@media (max-width: 480px) {
  body { padding: 20px 14px; }
  .card { padding: 28px 22px; border-radius: 20px; }
  .brand { margin-bottom: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.6s; }
  input { transition: none; }
}
