:root {
  --fg: #111;
  --muted: #777;
  --border: #ddd;
  --bg: #fff;
  --accent: #111;
  --error: #b00020;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom);
}

.view { padding: 24px 0 40px; }
.hidden { display: none !important; }

h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
}
.muted { color: var(--muted); margin: 0 0 24px; }
.center { text-align: center; }

.photo-picker {
  display: block;
  margin: 20px 0;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
}
.photo-picker input { display: none; }
.photo-picker span { color: var(--muted); }
.photo-picker.has-photo { border-style: solid; background: #fff; }
.photo-picker.has-photo span { color: var(--fg); }

.text-field, form label {
  display: block;
  margin: 14px 0;
}
.text-field span, form label > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.text-field input,
form input:not([type="hidden"]):not([disabled]),
form select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}
form select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23777' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

button.primary,
a.primary {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 16px;
  cursor: pointer;
  -webkit-appearance: none;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}
button.primary:disabled { opacity: 0.4; cursor: not-allowed; }
a.order-again { margin-top: 28px; }

button.link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
  cursor: pointer;
}
button.back { margin-bottom: 12px; }

.preview-wrap {
  display: flex;
  justify-content: center;
  margin: 16px 0 24px;
}
#preview-canvas {
  max-width: 100%;
  height: auto;
}

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

.section-h {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 28px 0 8px;
}
.section-h:first-of-type { margin-top: 8px; }

.confirm-block {
  margin: 0 0 4px;
  font-size: 15px;
  white-space: pre-line;
}
.muted.small { font-size: 13px; margin: 0 0 14px; }

.country-toggle {
  display: flex;
  gap: 8px;
  margin: 6px 0 18px;
}
.country-option {
  flex: 1;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.country-option.active {
  border-color: var(--fg);
  color: var(--fg);
  font-weight: 600;
  background: #f5f5f5;
}
