:root {
  --green: #22611f;
  --green-dark: #174617;
  --brown: #60491f;
  --cream: #f7f5ef;
  --ink: #243020;
  --muted: #5c6458;
  --line: #cfd7ca;
  --danger: #ae2e24;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
.honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(145deg, #f7f5ef 0%, #e8eee3 100%);
}

.app-shell { width: min(100%, 720px); margin: 0 auto; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }

.brand-header { display: flex; justify-content: center; padding: 6px 16px 22px; }
.brand-logo { display: block; width: min(100%, 360px); height: auto; }

.card { background: #fff; border-radius: 20px; padding: 26px 20px; box-shadow: 0 8px 30px rgba(47, 70, 42, .14); }
h1 { margin: 0; color: var(--green); font-size: clamp(1.7rem, 6vw, 2.35rem); line-height: 1.15; letter-spacing: -.02em; }
.intro { margin: 14px 0 28px; font-size: 1.05rem; line-height: 1.55; color: var(--muted); }

.install-app-card { margin: -6px 0 28px; padding: 16px; border: 1px solid #c9dfc3; border-radius: 12px; background: #f2f8ef; }
.install-app-title { margin: 0 0 5px; color: var(--green-dark); font-weight: 700; }
.install-app-copy { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.45; }
.install-app-button { width: 100%; min-height: 48px; margin-top: 13px; border: 0; border-radius: 9px; background: var(--brown); color: #fff; cursor: pointer; font: inherit; font-weight: 700; }
.install-app-button:hover, .install-app-button:focus-visible { background: #4d3918; }

fieldset { margin: 0 0 25px; padding: 0; border: 0; }
legend { width: 100%; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid #e1e8dc; color: var(--brown); font-weight: 700; font-size: 1.05rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin: 0 0 17px; }
label { display: block; margin-bottom: 7px; font-size: .98rem; font-weight: 700; line-height: 1.35; }
.optional { color: var(--muted); font-size: .9em; font-weight: 400; }
input, textarea { display: block; width: 100%; min-height: 52px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; outline: none; }
textarea { min-height: 128px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(34, 97, 31, .16); }
input:user-invalid, textarea:user-invalid { border-color: var(--danger); }

.privacy-check { display: flex; gap: 12px; align-items: flex-start; margin: 5px 0 18px; color: var(--muted); font-size: .93rem; font-weight: 400; }
.privacy-check input { flex: 0 0 auto; width: 22px; min-height: 22px; margin: 1px 0 0; accent-color: var(--green); }
.turnstile-container { min-height: 65px; margin: 0 0 18px; }
a { color: var(--green); text-underline-offset: 2px; }
.storage-note { margin: -8px 0 18px 34px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.form-error { margin: 0 0 15px; padding: 12px; border-radius: 9px; background: #fff0ee; color: var(--danger); font-size: .95rem; }
.submit-button, .secondary-button { width: 100%; min-height: 56px; border: 0; border-radius: 10px; padding: 13px 18px; cursor: pointer; font: inherit; font-weight: 700; font-size: 1.04rem; }
.submit-button { background: var(--green); color: #fff; box-shadow: 0 4px 10px rgba(34, 97, 31, .2); }
.submit-button:hover, .submit-button:focus-visible { background: var(--green-dark); }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { cursor: wait; opacity: .72; }

.success-message { padding: 8px 0 0; text-align: center; }
.success-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 17px; border-radius: 50%; background: #e1f0dc; color: var(--green); font-size: 2.2rem; font-weight: 700; }
.success-message h2 { margin: 0 0 12px; color: var(--green); font-size: 1.45rem; }
.success-message p { margin: 0 0 24px; line-height: 1.55; color: var(--muted); }
.secondary-button { background: #e8eee3; color: var(--green-dark); }

@media (max-width: 500px) {
  .app-shell { padding: 18px 12px calc(20px + env(safe-area-inset-bottom)); }
  .brand-header { padding-bottom: 17px; }
  .card { padding: 23px 16px; border-radius: 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .address-grid { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 12px; }
}
