:root {
  --bg: #f6e6de;
  --bg-2: #fbf1ec;
  --card: #fffaf7;
  --ink: #4a3029;
  --ink-soft: #6e5148;
  --muted: #a08378;
  --line: #e2c8bc;
  --accent: #b47c64;
  --accent-dark: #8f5b46;
  --pill: #ecd2c6;
  --yes: #b4544a;
  --yes-bg: #f9e3df;
  --ok: #5f8a6a;
  --radius: 22px;
  --shadow: 0 18px 50px -20px rgba(110, 60, 40, 0.35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Heebo", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg-2), var(--bg) 60%) fixed, var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }

.sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px 22px 32px;
}
@media (min-width: 640px) { .sheet { padding: 36px 44px 44px; } }

.brand { text-align: center; }
.brand img { width: 150px; height: 150px; margin: 0 auto 6px; border-radius: 50%; object-fit: cover; }
.title-pill {
  display: inline-block;
  background: var(--pill);
  color: var(--ink);
  padding: 8px 34px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.35rem;
  margin: 6px 0 6px;
}
.subtitle { color: var(--muted); font-size: 0.88rem; margin: 0 0 8px; }

.section { margin-top: 30px; }
.section-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.section-head h2 { margin: 0; font-size: 1.08rem; font-weight: 700; white-space: nowrap; }
.section-head .num { color: var(--muted); font-weight: 300; font-size: 1.05rem; }
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field label { font-size: 0.85rem; color: var(--ink-soft); }
.field label .req { color: var(--accent); }
.input, textarea.input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180, 124, 100, 0.18); }
.input.invalid { border-color: var(--yes); background: #fffafa; }
.err { color: var(--yes); font-size: 0.8rem; min-height: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer;
  background: var(--accent); color: #fff;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 1rem;
  transition: background .15s, transform .1s;
  min-height: 48px;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--accent-dark); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--bg-2); }
.btn.small { padding: 8px 16px; min-height: 38px; font-size: .9rem; }
.btn.danger { background: transparent; color: var(--yes); border: 1px solid #e6b9b2; }

/* Modal */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(74, 48, 41, 0.35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fade .25s ease;
}
.modal {
  width: 100%; max-width: 440px;
  max-height: calc(100vh - 32px); overflow: auto;
  background: var(--card);
  border-radius: 26px;
  box-shadow: 0 30px 80px -20px rgba(74, 48, 41, .5);
  padding: 20px 18px 18px;
  animation: pop .3s cubic-bezier(.2, .9, .3, 1.2);
}
.modal .brand img { width: 72px; height: 72px; }
.modal .grid-2 { grid-template-columns: 1fr 1fr; gap: 0 10px; }
.modal .field { margin-bottom: 10px; gap: 2px; }
.modal .input { padding: 10px 12px; }
.modal .btn { margin-top: 6px; }
.modal h2 { text-align: center; margin: 4px 0 2px; font-size: 1.3rem; }
.modal p.lead { text-align: center; color: var(--muted); margin: 0 0 12px; font-size: .88rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .overlay, .modal { animation: none; } }

.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--muted); }
