:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #1f1b16;
  --muted: #7a7169;
  --accent: #b6562b;
  --accent-ink: #ffffff;
  --line: #e6e0d6;
  --error: #b42318;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15130f;
    --card: #211d18;
    --ink: #f3ede4;
    --muted: #a39a90;
    --accent: #e0774a;
    --accent-ink: #1a1410;
    --line: #35302a;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
.app { max-width: 560px; margin: 0 auto; padding: 16px 16px 48px; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 20px; }
.brand { font-weight: 700; letter-spacing: .02em; }
.steps { display: flex; gap: 6px; font-size: 12px; color: var(--muted); }
.steps span { padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); }
.steps span.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 8px; }
.lead { margin: 0 0 20px; color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); margin: 12px 0 20px; }
.drop { display: flex; align-items: center; justify-content: center; min-height: 240px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; overflow: hidden; position: relative; text-align: center; padding: 16px; color: var(--muted); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop img:not([hidden]) + span { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.55); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 13px; }
button { font: inherit; border-radius: 12px; padding: 14px 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button.primary { width: 100%; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; margin-top: 12px; }
button.ghost { flex: 1; }
.row { display: flex; gap: 10px; margin-top: 12px; }
textarea, input[type=text], input[type=tel] { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label input, label textarea { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.chips button { padding: 8px 14px; border-radius: 999px; font-size: 14px; }
.chips button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 3px solid transparent; background: var(--card); cursor: pointer; aspect-ratio: 4 / 3; position: relative; }
.gallery figure.on { border-color: var(--accent); }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figure.failed { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; padding: 12px; text-align: center; cursor: default; }
.chosen { width: 100%; border-radius: var(--radius); margin-bottom: 16px; display: block; }
.error { color: var(--error); font-size: 14px; }
.busy { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; z-index: 10; }
.spinner { width: 42px; height: 42px; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.done { text-align: center; padding-top: 40px; }
.check { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 40px; line-height: 72px; }
