:root {
  --gold: #c49225;
  --gold-soft: #c492251f;
  --bg: #f7f5f0;
  --card: #ffffff;
  --text: #1c1917;
  --muted: #6b645c;
  --border: #e7e2d9;
  --error: #dc2626;
  --success: #16a34a;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12100d;
    --card: #1d1a16;
    --text: #f5f1ea;
    --muted: #a8a095;
    --border: #332d25;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.shell {
  max-width: 440px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  padding: 4px 4px 0;
}

.logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--gold);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 20px;
}

.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-block: 36px;
}

h1 {
  font-size: 21px;
  line-height: 1.3;
  margin: 4px 0;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.price {
  font-size: 30px;
  font-weight: 800;
  margin: 4px 0 20px;
  font-variant-numeric: tabular-nums;
}

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

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
}

select,
input {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming on focus */
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  appearance: none;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

select:focus,
input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.hint,
.fine {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.fine {
  margin-top: 16px;
  text-align: center;
}

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

.btn {
  width: 100%;
  font: inherit;
  font-weight: 700;
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  margin-top: 18px;
}

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

.btn-primary {
  background: var(--gold);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-link {
  background: none;
  color: var(--muted);
  font-weight: 600;
  margin-top: 8px;
  padding: 8px;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--gold-soft);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
  margin-bottom: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.badge-success {
  background: var(--success);
}

.badge-error {
  background: var(--error);
}

.reference {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  margin: 4px 0 0;
}

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