:root {
  --bg: #0B0B0C;
  --surface: #161618;
  --line: #2A2A2D;
  --text: #F4F2EE;
  --muted: #A9A59E;
  --accent: #C8102E;
  --accent-hover: #A50D26;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 20px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
}

.brand h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 6px;
}

.brand .tag {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px 24px;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"] {
  width: 100%;
  background: #0E0E10;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
}

input::placeholder { color: #6B6862; }

input:focus {
  outline: none;
  border-color: var(--accent);
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice {
  background: #0E0E10;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 13px 10px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.choice.active {
  border-color: var(--accent);
  background: rgba(200, 16, 46, 0.14);
}

.error {
  color: var(--accent);
  font-size: 13px;
  margin: -6px 0 14px;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-primary:active { background: var(--accent-hover); }

.btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-ghost {
  width: 100%;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.thanks-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 16px;
}

#thanksView {
  text-align: center;
}

#thanksView h2 {
  font-family: 'Playfair Display', serif;
  margin: 0 0 8px;
}

.muted { color: var(--muted); font-size: 14px; }

.pending-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}

.foot {
  margin-top: auto;
  text-align: center;
  padding-top: 28px;
  color: #55524D;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
}

.modal-card h2 {
  font-family: 'Playfair Display', serif;
  margin: 0 0 8px;
  font-size: 20px;
}

.qr-box {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
}

.qr-box img { display: block; }
