:root {
  --bg: #0e0e11;
  --surface: #17171c;
  --surface-2: #1f1f27;
  --line: #2a2a33;
  --text: #f4f4f6;
  --muted: #9a9aa6;
  --gold: #c8a24c;
  --gold-dim: #8c7233;
  --accent: #c8a24c;
  --danger: #e0584f;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding: env(safe-area-inset-top) 18px calc(env(safe-area-inset-bottom) + 18px);
  display: flex;
  flex-direction: column;
}

.loading { margin: auto; color: var(--muted); }

/* ---- header ---- */
.brand {
  text-align: center;
  padding: 34px 0 10px;
}
.brand .mark {
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--gold);
  font-weight: 600;
}
.brand h1 {
  font-size: 26px;
  margin: 6px 0 0;
  font-weight: 600;
}

/* ---- landing ---- */
.landing { margin: auto 0; text-align: center; }
.landing .pitch {
  font-size: 21px;
  font-weight: 500;
  margin: 8px 0 30px;
  color: var(--text);
}
.landing .pitch span { color: var(--muted); display:block; font-size:15px; font-weight:400; margin-top:8px; }

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: var(--radius);
  padding: 17px 18px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  color: #15110a;
  background: linear-gradient(180deg, #d8b35e, #bf9636);
  transition: transform .06s ease, opacity .2s ease;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.btn-secondary {
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  padding: 14px;
  margin-top: 14px;
}
.btn-secondary span { color: var(--gold); }

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}

/* ---- steps / forms ---- */
.step { margin: 8px 0; flex: 1; display: flex; flex-direction: column; }
.step h2 { font-size: 22px; font-weight: 600; margin: 18px 0 4px; }
.step .sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }

.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 16px;
  cursor: pointer;
}
.choice .count { color: var(--muted); font-size: 13px; }
.choice.selected { border-color: var(--gold); background: var(--surface-2); }
.choice .chev { color: var(--muted); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 .choice { justify-content: center; }

textarea, input[type="text"], input[type="number"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  padding: 14px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
}

.spacer { flex: 1; }
.footer-actions { padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }

.back {
  background: none; border: none; color: var(--muted);
  font-size: 14px; padding: 10px 0; cursor: pointer; text-align: left;
}

/* ---- progress dots ---- */
.dots { display: flex; gap: 6px; justify-content: center; margin: 6px 0 4px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--gold); }

/* ---- quotes / status ---- */
.status-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin: 20px 0;
}
.status-card .big { font-size: 40px; font-weight: 700; color: var(--gold); }
.status-card .lbl { color: var(--muted); font-size: 14px; margin-top: 4px; }
.pulse { display:inline-block; width:8px;height:8px;border-radius:50%;background:var(--gold);margin-right:7px;animation:pulse 1.4s infinite;}
@keyframes pulse { 0%,100%{opacity:.3} 50%{opacity:1} }

.quote {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
}
.quote img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: none; }
.quote .body { flex: 1; min-width: 0; }
.quote .name { font-weight: 600; }
.quote .msg { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote .price { font-weight: 700; color: var(--gold); font-size: 17px; white-space: nowrap; }

/* ---- browse grid ---- */
.browse-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.card .photo { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: var(--surface-2); display:block; }
.card .meta { padding: 10px; }
.card .meta .n { font-weight: 600; font-size: 15px; }
.card .meta .c { color: var(--muted); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #2a2a33; color: var(--text); padding: 12px 18px; border-radius: 12px;
  font-size: 14px; border: 1px solid var(--line); max-width: 88%; text-align: center; z-index: 50;
}
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
